diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 328593c9..00000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# output folders -target/ -bin/ - -.metadata -/.*.md.html -#*.settings/ -/*.error - -# MacOS -*.DS_Store diff --git a/.project b/.project deleted file mode 100644 index 05fef095..00000000 --- a/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - nodeclipse-1 - https://github.com/Nodeclipse/nodeclipse-1 - - - - - - - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6dcac96b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: java -script: mvn clean package -Pfull && mvn -pl org.nodeclipse.site com.github.github:site-maven-plugin:site -Pfull - -notifications: - email: false \ No newline at end of file diff --git a/ATTENSION.md b/ATTENSION.md deleted file mode 100644 index b67b4d2d..00000000 --- a/ATTENSION.md +++ /dev/null @@ -1,3 +0,0 @@ -# ATTENSION -Moved from https://github.com/tomotaro1065/nodeclipse to https://github.com/Nodeclipse/nodeclipse-1 . - diff --git a/Arguments.png b/Arguments.png deleted file mode 100644 index 4a205c61..00000000 Binary files a/Arguments.png and /dev/null differ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index d5075bf2..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,30 +0,0 @@ - -Nodeclipse is developers-driven project. That means new features arrives - when someone cares to develop it, asks a question or raises a bug. - -Reminder from - -

Support

-

Browse existing questions on StackOverflow, as we do.

- diff --git a/Nodeclipse_logo_light.png b/Nodeclipse_logo_light.png deleted file mode 100755 index 401a6a67..00000000 Binary files a/Nodeclipse_logo_light.png and /dev/null differ diff --git a/README.md b/README.md deleted file mode 100644 index 6479ddc1..00000000 --- a/README.md +++ /dev/null @@ -1,421 +0,0 @@ -# Nodeclipse - Node.js & Java development in Eclipse-based IDE - - - -Release ![](https://api.bintray.com/packages/nodeclipse/nodeclipse/nodeclipse-1/images/download.svg) - - - - -![nodeclipse-logo](Nodeclipse_logo_light.png) - -## Developing with Nodeclipse, Enide Studio - -Read that has News, post Shares, Installing details, Features list, -Usage (incl Video, Demo) with all shortcuts, Help and Hints, - Support options, Where Helping needed, How to thank and Contact us, also History page. - -### Personal message - -Hello, I am Paul Verest, one of Nodeclipse [contributors](https://github.com/Nodeclipse/nodeclipse-1/graphs/contributors). -I am Java developer adopting Node.js ( and less PhantomJS, Nashorn etc Javascript ) into my set of tools. -In January 2013 I just started developing Node.js in Eclipse without any plugins, but then I came to the point "how to debug?". -That lead me to know Nodeclipse 0.2 by Tomoyuki Inagaki, that by that time was fork in his own account. -We unified 0.2 back into Nodeclipse organization (it automatically got name `nodeclipse-1` because `nodeclipse` repository was there), -the rest can be seen in [history](http://www.nodeclipse.org/history). - -## Enhancing Nodeclipse - -First give a try (using [Eclipse IDE for Eclipse Committers](https://www.eclipse.org/downloads/) -or any Eclipse/Enide Studio with PDE installed): - -- `git clone https://github.com/Nodeclipse/nodeclipse-1.git` or EGit equivalent -- (optionally, recommended) run `mvn package` to make sure the build passes locally and you got all dependencies, - this way you won't need waiting Eclipse downloading (that can make it unresponsive) -- import as existing project "nodeclipse-1" (only root, that is general project, without any builds). - Now you already can navigate over code -- in Project Explorer right-click a plugin project folder, e.g. "org.nodeclipse.enide.editors.jade", - select "Select Import as Project" -- right-click chosen plugin project as select Run As -> Eclipse Application - -Now you have Eclipse running with the latest version of chosen plugin! -Make your changes to the code and see it running (for some cases without launch Eclipse restart). -For example try changes Jade keywords in -[`src/org/nodeclipse/enide/editors/jade/highlight/Words.java`](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.enide.editors.jade/src/org/nodeclipse/enide/editors/jade/highlight/Words.java) - -There is also [Nodeclipse CLI Node.js project at `org.nodeclipse.ui\templates`](https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.ui/templates). - -To go on some minimal Java & Eclipse plugin development skills are needed for improving code base. -Check "Plug-in development 101" as great tutorial by Chris Aniszczyk (2008). -That will be great starting point, that lets you get understanding. -For future references there is also often updated "Eclipse 4 RCP - Tutorial" - for new evolving e4 API by Lars Vogel. - -JavaScript experienced leader could help by giving guidance and insight of trends. - -Even without skills above you can do even more helping by research. Start by raising an issue, -describing what problem you want to solve, sharing some link. It maybe how to use Nodeclipse, new plugin to include, -how to support newer JavaScript features, Node.js packages, other JS libs like AngularJS, EmberJS etc. - -## Diving-In - -Try out next version from this sources just by `git clone`, `mvn package` , then install from .zip (see Maven build below for more). - -You don't need import all project, and please change only one project per Pull Request. - -Check README.md in project modules (e.g. `org.nodeclipse.debug` ). See launching Node.js logic in -[LaunchConfigurationDelegate.java](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java) - -### Developing with PDE - -From plugin.xml form click Run as Eclipse application. - -If memory is not enough (getting `java.lang.OutOfMemoryError: PermGen space` error when when running or debugging), - change in launch configuration for Eclipse Application -> Arguments -> VM Arguments - - -Dosgi.requiredJavaVersion=1.6 -Xms128m -Xmx784m -XX:MaxPermSize=128m -Xss2m - - -[see src/site/markdown/developing.md file](src/site/markdown/developing.md) - -FYI when launching Eclipse Application - - Command-line arguments: -product org.eclipse.platform.ide -data D:\Progs\Enide-Monster-08-kepler-win32\ws/../runtime-EclipseApplication -dev file:D:/Progs/Enide-Monster-08-kepler-win32/ws/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86 -consoleLog - -Developing doesn't require maven usage, just import one project e.g. `org.nodeclipse.ui` into Eclipse with PDE. - -Maven build is optional for full build with other plugins. - -### Maven build - -[Maven](http://maven.apache.org/) build (using [Tycho plugin](http://eclipse.org/tycho/)) is headless build, that doesn't require Eclipse. - -From Nodeclipse-1 base folder just run `mvn package`. Run offline when to re-build `mvn clean package -o`. - -`mvn clean package -Pquick` builds in `org.nodeclipse.site.quick/target` with less external dependencies. -It is not enough for release, e.g. because JSHint is external plugin and there are 20 more others. - -`mvn clean package -Pfull` builds in `org.nodeclipse.site/target`. For release. - --[] TODO not to repeat definitions in `.site` and `.updates` - -Before release - -`mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=1.0.2-SNAPSHOT -Pall` - -#### Install site.zip (quick and simple way) - -1. Locate zip file under `org.nodeclipse.site\target` in Project Explorer, StartExplore-> Copy Resource Path to Clipboard -2. Help -> Install New Software ... -3. Add... -4. Archive... -5. Insert copied string into name and path. - E.g. `C:\Users\pverest\git\nodeclipse-056\org.nodeclipse.site\target\org.nodeclipse.site-0.5.0-SNAPSHOT.zip` - -For the next time just select the zip entry from Work With drop-down list. - -#### Install from freshly built p2 repository (cool and long way) - -2. `npm install http-server -g` -3. `http-server org.nodeclipse.site\target\repository -p 8010` -4. start http://localhost:8010/ -5. // navigate `http://localhost:8010/` in browser to check -5. Help->Install New Software, enter http://localhost:8010/ in Work With - -#### Tools - -- [![InstallLink][1]](http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=1508744) - [PDE Incubator Dependency Visualization](http://www.eclipse.org/pde/incubator/dependency-visualization/) v0.5.0.200904151517 - [mp](https://marketplace.eclipse.org/content/pde-incubator-dependency-visualization) - - [1]: http://marketplace.eclipse.org/sites/all/modules/custom/marketplace/images/installbutton.png - -Or use update site `http://download.eclipse.org/eclipse/pde/incubator/visualization/site` -Need to uncheck "Group items by category" for item to appear. - -![](src/site/markdown/org.nodeclipse.ui-dependants.png) - -### A lot of words from 2013 - -Below is long and a little bit old notes. You should better start with building yourself, checking -that has all links. - -**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* - -- [Nodeclipse - Node.js support in Eclipse IDE](#nodeclipse---nodejs-support-in-eclipse-ide) - - [Vision](#vision) - - [Features](#features) - - [Installing](#installing) - - [Usage](#usage) - - [What's new](#whats-new) - - [Roadmap](#roadmap) - - [Developing](#developing) - - [First tiny steps](#first-tiny-steps) - - [Before starting development, please do](#before-starting-development-please-do) - - [Preparing environment](#preparing-environment) - - [Recommended way](#recommended-way) - - [Other way, not recommended way](#other-way-not-recommended-way) - - [Maven build](#maven-build) - - [Code standard](#code-standard) - - [Update forked project](#update-forked-project) - - [Send Pull Request steps](#send-pull-request-steps) - - [Testing](#testing) - - [Contributors](#contributors) - - [Contacts](#contacts) - - [For Bloggers and Users of Twitter, Flickr, LinkedIn, Weibo etc.](#for-bloggers-and-users-of-twitter-flickr-linkedin-weibo-etc) - - [Spread the words](#spread-the-words) - - [Hot requests](#hot-requests) - - [Interesting and useful Links](#interesting-and-useful-links) - - [Other Node IDEs](#other-node-ides) - - [Other Eclipse-based IDEs](#other-eclipse-based-ides) - - [Hints & Notes](#hints--notes) - -Moved from [https://github.com/tomotaro1065/nodeclipse](https://github.com/tomotaro1065/nodeclipse) - to [https://github.com/Nodeclipse/nodeclipse-1](https://github.com/Nodeclipse/nodeclipse-1) . - Initially based on . - -> [Nodeclipse](http://www.nodeclipse.org/) ( sources [nodeclipse-1](https://github.com/Nodeclipse/nodeclipse-1)) - is [Eclipse](http://www.eclipse.org/) plugin for the [Node.js](http://www.nodejs.org/). -The purpose of Nodeclipse is to create environment in -which Node.js development is easy for any user from beginner to professional. - -Check [developers news](https://github.com/Nodeclipse/nodeclipse-blog#news) and [Maven generated documentation site](http://dev.nodeclipse.com/) - -## Vision - -One-stop shop for Node.js tools. - -We can't develop everything at once, but we let you know what are the best things around for Node.js development with Eclipse. - -## Features - -* Creating default structure for New Node Project and New Node Source File -* JavaScript Syntax highlighting -* Content Assistant -* NPM support -* Debugging - Breakpoint, Trace, etc... via [Eclipse debugger plugin for V8](http://code.google.com/p/chromedevtools/) -* Generating Express project -* Support for [JSHint](http://www.jshint.com/).
- Download site: http://github.eclipsesource.com/jshint-eclipse/updates/ -* Support for Juno, Kepler - -## Installing -Drag and drop into a running Eclipse to install Nodeclipse, -or use Download site : http://www.nodeclipse.org/updates - -## Usage - -Check out [website](http://www.nodeclipse.org/) and [watch video](http://www.nodeclipse.org/index2.htm). -For debugging check [Using-Eclipse-as-Node-Applications-Debugger]( https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger) - -For [Markdown](http://daringfireball.net/projects/markdown/dingus): - -~~1. Window -> Show View -> Other... -> Markdown~~ - -2. Click inside "Markdown HTML Preview" view to refresh rendering -3. (Optional, may be useful because double whitespace is hard line break) - Show whitespace character via Preferences > General > Editors > Text Editors : checkbox labeled "Show whitespace characters" - - If [Node Express Project] menu does not appear under File->New, reset [Node] perspective by right-clicking on the [Node] button, which is located perspective switching area.
- ![ResetPerspective](org.nodeclipse.help/contents/images/ResetPerspective.png) - -## What's new - - - -See Changelong.md -and also Changelong.md & History.md at [www.nodeclipse.org repository](https://github.com/Nodeclipse/www.nodeclipse.org). - -## Roadmap - -We use [Semantic Versioning](http://semver.org/). Version is MAJOR.MINOR.PATCH, where - -- MAJOR indicates substantially new release, possibly with API change -- MINOR indicates updates, that are fully backward-compatible -- PATCH indicates that is bug-fix - -Please participate in discussion, [propose and vote on new feature](http://nodeclipse.uservoice.com/forums/216804-general), - on raise bugs on - -UPDATE: Roadmap is defined by currently raised issues, voted ideas on uservoice, and desires of developers. - Below is what was discussed in Spring 2013. - - - -### 0.x - -- #1 [Kepler 4.3](http://www.eclipse.org/downloads/index-developer.php) support -- Improving Code Assist (new ideas needed) -- #26 Add CoffeeFileWizard -- Nodeclipse/www.nodeclipse.org#2 [Task] merge enide solution (hints, roadmap) and nodeclipse-blog into www.nodeclipse.org -- resource for developers [Nodeclipse.github.io](http://nodeclipse.github.io/) -* [t#4 [Low priority enhancement] Option to Run project default module (taken from package.json), - when righ-clicking project folder](https://github.com/tomotaro1065/nodeclipse/issues/4) -- (Optional) Support for Sublime Text -- Improving Code Assist with convention-based completions.json -- JSquared Editor - -### 1.0 - -Is expected together with Node.js 1.0 - -### Next - -### Ideas, proposals, work-in-progress etc. -- Improving Code Assist -- Debugging features without Chrome developer tools. In other words, debugging on Node Editor -- Obfuscation and source-level debugging features using Source Maps -- Unit test support (how?) -- Easily deployment to Heroku (possibly via [Heroku Eclipse plugin](https://devcenter.heroku.com/articles/getting-started-with-heroku-eclipse)) - Download site: https://eclipse-plugin.herokuapp.com/install - -- Add Jade support (http://blog.wookets.com/2011/10/how-to-compile-coffeescript-jade-stylus.html Posted 30th October 2011 by Sean Wesenberg) -- Integrate console window (library unknown) -> currently can use StartExplorer (bundled with Enide) -- Add CoffeeScript support via [coffeescript-eclipse plugin](https://github.com/adamschmideg/coffeescript-eclipse) - Download site: http://coffeescript-editor.eclipselabs.org.codespot.com/hg/ - (also requires XText. See CoffeeScriptSet.p2f in Enide for quick install) - -### Shelved - -- [Eclipse Json Editor Plugin](http://sourceforge.net/p/eclipsejsonedit/wiki/Home/) Last Update: 2012-11-07 - (The JSON Editor is a simple plugin for the Eclipse IDE that provides: - - Color text highlighting - - An Outline Tree view - - JSON validation - - Text formatting - Text folding for the JSON data format.) - No Update site. - -### Code standard - -1. If you edited or created file, add yourself as @author in JavaDoc or comments -2. Import CodeStyle_codetemplates.xml from - Nodeclipse.github.io

- Instructions are inside the xml file. - This will add @author in new files automatically. Use Ctrl+Alt+J to quickly insert in existing files. - -### Update forked project - -If you forked into your account, after a while it is possible that code at original repository was updated. - -With git command line you need to open project base folder, then - -

-git remote add upstream https://github.com/Nodeclipse/project-you-forked.git
-git fetch upstream
-git merge upstream/master
-git push origin master
-
- -With EGit you should do the same steps but within GUI. - -### Send Pull Request steps - -1. Push to your remote origin (your account) -2. Open GitHub page for your fork -3. Press Pull Request -4. Review Commits on Commits tab -5. Write description, press Send pull request - -### Testing - -Build from sources, install in Eclipse, give a try. - -## Contributors - -- LambGao 魔都 https://github.com/Nodeclipse (original creator v0.1.8) -- Scott Elcomb https://github.com/psema4 (just forked) -- Tomoyuki Inagaki https://github.com/tomotaro1065 (debugging integration v0.2..0.5+) [blog](http://d.hatena.ne.jp/tomotaro1065/) -- Paul Verest https://github.com/PaulVI/ (Vision, site, help, docs, all the research, finding plugings, less code, maven build; Enide; making it all to be next level) - [DemoDays](http://demodays.github.io/), [Eclipse-China](http://eclipse-china.github.io/), [blog](https://github.com/PaulVI/blog) -- Daniel Winterstein ([Markdown Editor](http://www.winterwell.com/software/markdown-editor.php)) -- Pushkar Gupte https://github.com/pushkar85 (together for 0.4) -- Adam Schmideg (CoffeeScript Editor before 0.3) -- Robert Gründler - -## Contacts - -Do not hesitate to contact developers. -Create issue or send [email to dev group](mailto:dev@nodeclipse.org). -Or skype by ID pverest, QQ 908781544. -Visit [Nodeclipse Google Group](https://groups.google.com/forum/?hl=en&fromgroups#!forum/nodeclipse). - - -## For Bloggers and Users of Twitter, Flickr, LinkedIn, Weibo etc. - -In case you plan to blog or tweet about the Nodeclipse plugin, please use the tag "#nodeclipse" - in order to make it easier to find all the comments and pictures. Thanks a lot for telling the world about the project! - | 隸キ用#nodeclipse#譬・ュセ微博一下。 - | Por favor, utilizar etiqueta #nodeclipse - | ツイートする時は、#nodeclipseタグを使用してください。 - | Bitte benutzen Sie tag #nodeclipse um zu twiten. - - -## Spread the words - -Please let others know about this effort. Add links below: - -Sites that reference this project -http://www.oschina.net/p/nodeclipse -http://stackoverflow.com/questions/8025825/is-there-a-nodejs-plugin-for-aptana-studio -http://stackoverflow.com/questions/8179369/debugging-node-js-with-eclipse -http://stackoverflow.com/questions/7038961/node-js-in-eclipse-which-plugins-are-most-people-using -https://groups.google.com/forum/#!msg/nodejs/ayLUeUOanzA/et6EEZppVjMJ -http://stackoverflow.com/questions/15407334/eclipse-rcp-add-optional-dependencies -http://stackoverflow.com/questions/12641679/nodejs-a-step-by-step-debugger-for-nodejs/15296275#15296275 -http://cnodejs.org/topic/5149c795069911196df84af7 - -### Hot requests - -http://stackoverflow.com/questions/14533885/which-ide-supports-coffeescript-debugging-source-mapping-breakpoints-call-st -http://stackoverflow.com/questions/10286364/coffeescript-editor-plugin-for-eclipse -http://stackoverflow.com/questions/7057466/how-to-use-coffeescript-and-eclipse-together-in-windows -http://stackoverflow.com/questions/3919977/what-ide-to-use-for-node-js-javascript asked Oct 13 '10 [closed] -> Vim, Cloud9 IDE, editors -http://www.iteye.com/news/23933 - -### Interesting and useful Links - -#### Other Node IDEs - -- Nide http://coreh.github.com/nide/ v0.2 Last update 2012-04 -- JetBrains WebStorm or [IntelliJ IDEA](www.jetbrains.com/idea/features/nodejs.html) (commercial products) -- Microsoft WebMatrix (free) or Visual Studio (commercial product) -- CloudIDE [c9.io](https://c9.io) (cloud service) -- Scripted https://github.com/scripted-editor/scripted (no news for 3 months) -- Eclipse Orion (will it really support Node.js?) -- komodo-ide http://www.activestate.com/komodo-ide (commercial product that nobody tried) -- Netbeans have a [NodeJS plugin](http://plugins.netbeans.org/plugin/36653/nodejs) - -#### Other Eclipse-based IDEs - -- Adobe Flash Builder -- ADT (Android Development Tools) -- Aptana Studio (PHP, Python, Rubi) -- Erlang IDE -- Groovy & Grails Tool Suite (GGTS) -- IBM Rational product line -- JBoss Developer Studio -- MyEclipse, from Genuitec is a commercial IDE -- PyDev Python IDE -- SAP NetWeaver Developer Studio -- Scala IDE -- Spring Tool Suite -- Zend Studio (PHP) Commercial - -#### Hints & Notes - -http://wiki.eclipse.org/Tycho/Reference_Card -http://stackoverflow.com/questions/10352089/how-do-i-build-an-eclipse-rcp-app-so-that-its-features-can-be-updated-automatica?rq=1 -http://stackoverflow.com/questions/14591472/installing-an-additional-feature-during-product-build-for-some-eclipse-versions -http://stackoverflow.com/questions/10529859/how-to-include-video-in-jekyll-markdown-blog -http://stackoverflow.com/questions/2330620/eclipse-i-turned-on-hidden-characters-now-i-cant-turn-off -[Eclipse JavaScript Development Tools (JSDT)](http://eclipse.org/webtools/jsdt/) has only JS web support. -add interesting stuff here... - -with-Eclipse logo diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 3d767866..00000000 --- a/changelog.md +++ /dev/null @@ -1,51 +0,0 @@ -## Changelog - -http://www.nodeclipse.org/history is continuation. - -## What's new (ver 0.3) - -- Add support for [JSHint](http://www.jshint.com/) integration for Eclipse, [developed by EclipseSource](https://github.com/eclipsesource/jshint-eclipse) - You had to set project property for JSHint for each project creating. It was boring task.
- Nodeclipse 0.3 will set them automatically when generating Node project and Express project.
- You should install JSHint integration for Eclipse.
- Update site: http://github.eclipsesource.com/jshint-eclipse/updates/ -- Update template for new project -* Add README.md template -* Add hello-world-server.js -* Add package.json (This is good practice) -* [Publish](http://marketplace.eclipse.org/quickstart) on Eclipse marketplace -* [t#3 [Feature Request] allow passing arguments](https://github.com/tomotaro1065/nodeclipse/issues/3) - You can pass arguments to application and node.js setting on [Debug configration...]-[Node Application]-[<your configration name>]-[Arguments].
- You can also set arguments on [Run configuration...].
- ![Screen shot](Arguments.png) -* [n#2 on x64 windows doesn't find NodeJS dir automatically](https://github.com/Nodeclipse/nodeclipse/issues/2) - -### 0.3.1 - -* [#5 When creating Node project and folder already exists, then add only .project file and don't add 3 files (README.md, hello-world-server.js, package.json)](https://github.com/Nodeclipse/nodeclipse-1/issues/5) -* [#6 Add Express Project in main menu under File -> New (in Node perspective)](https://github.com/Nodeclipse/nodeclipse-1/issues/6)
- If [Node Express Project] menu does not appear under File->New, reset [Node] perspective by right-clicking on the [Node] button, which is located perspective switching area.
- ![ResetPerspective](ResetPerspective.png) - - -### ver 0.3.0 (2013-02-10) -- Modify generating project adding support for [JSHint](http://www.jshint.com/) integration for Eclipse, [developed by EclipseSource](https://github.com/eclipsesource/jshint-eclipse) - Download site: http://github.eclipsesource.com/jshint-eclipse/updates/ -- Update template for new project -* Add README.md template -* Add hello-world-server.js -* Add package.json (This is good practice) -* [Publish](http://marketplace.eclipse.org/quickstart) on Eclipse marketplace - -* [t#3 [Feature Request] allow passing arguments](https://github.com/tomotaro1065/nodeclipse/issues/3) -* [n#2 on x64 windows doesn't find NodeJS dir automatically](https://github.com/Nodeclipse/nodeclipse/issues/2) - -### ver 0.2.0 (2013-02-10) -* Debugging - Breakpoint, Trace, etc... via [Eclipse debugger plugin for V8](http://code.google.com/p/chromedevtools/) -* Generating Express project - -### ver 0.1.8 -* Creating default structure for New Node Project and New Node Source File -* JavaScript Syntax highlighting -* Content Assistant -* NPM support diff --git a/chromedevtools/LICENSE b/chromedevtools/LICENSE deleted file mode 100755 index a7531cf7..00000000 --- a/chromedevtools/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/README.md b/chromedevtools/README.md deleted file mode 100644 index 3f5444be..00000000 --- a/chromedevtools/README.md +++ /dev/null @@ -1,28 +0,0 @@ - -# chromedevtools - -Nodeclipse/chromedevtools are modified "Google Chrome Developer Tools for Java" http://code.google.com/p/chromedevtools/ . -They make the largest and oldest part of codebase. - -## Node.js debugging - -From [Node wiki](https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger) - -First, there is new "Nodeclipse":http://www.nodeclipse.org/ project, that lets to create, edit and debug Node.js application in fully integrated way. It uses modified "Eclipse debugger plugin for V8":http://code.google.com/p/chromedevtools/ (with some bugs below fixed). The usage may be simplified, but the principle stays the same. - -"Eclipse debugger plugin for V8":http://code.google.com/p/chromedevtools/ can be easily used to debug node scripts. -(On OSX 10.5 the plugin requires an Eclipse 64 bit Version, started with Java SE 6). The V8 engine provides debugging -support by enabling attachment of the remote debugger on a TCP port (5858 is node's default). - -## Maven build - -We use following plugins and features. - -- [v] [plugins/org.chromium.debug.core](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/plugins/org.chromium.debug.core) -- [v] [plugins/org.chromium.debug.ui](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/plugins/org.chromium.debug.ui) -- [v] [plugins/org.chromium.debug](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/plugins/org.chromium.debug) -- [v] [plugins/org.chromium.sdk.wip.eclipse](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/plugins/org.chromium.sdk.wip.eclipse) -- [v] [plugins/org.chromium.sdk](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/plugins/org.chromium.sdk) - -- [v] [features/org.chromium.debug](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/features/org.chromium.debug) -- [v] [features/org.chromium.sd](https://github.com/Nodeclipse/nodeclipse-1/tree/master/chromedevtools/features/org.chromium.sdk) \ No newline at end of file diff --git a/chromedevtools/builder/build-main/LICENSE b/chromedevtools/builder/build-main/LICENSE deleted file mode 100644 index e6c0d72a..00000000 --- a/chromedevtools/builder/build-main/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/builder/build-main/releng.builder/allElements.xml b/chromedevtools/builder/build-main/releng.builder/allElements.xml deleted file mode 100644 index 65b552ef..00000000 --- a/chromedevtools/builder/build-main/releng.builder/allElements.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-main/releng.builder/build.properties b/chromedevtools/builder/build-main/releng.builder/build.properties deleted file mode 100644 index 8318ea14..00000000 --- a/chromedevtools/builder/build-main/releng.builder/build.properties +++ /dev/null @@ -1,251 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2006 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -##################### -# Parameters describing how and where to execute the build. -# Typical users need only update the following properties: -# baseLocation - where things you are building against are installed -# bootclasspath - The base jars to compile against (typicaly rt.jar) -# configs - the list of {os, ws, arch} configurations to build. -# -# Of course any of the settings here can be overridden by spec'ing -# them on the command line (e.g., -DbaseLocation=d:/eclipse - -#The type of the top level element we are building, generally "feature" -topLevelElementType = feature -#The id of the top level element we are building -topLevelElementId = org.foo.bar - -############# PRODUCT/PACKAGING CONTROL ############# -product=/plugin or feature id/path/to/.product -runPackager=true - -#Set the name of the archive that will result from the product build. -#archiveNamePrefix= - -# The prefix that will be used in the generated archive. -archivePrefix= - -# The location underwhich all of the build output will be collected. -collectingFolder=${archivePrefix} - -# The list of {os, ws, arch} configurations to build. This -# value is a '&' separated list of ',' separate triples. For example, -# configs=win32,win32,x86 & linux,motif,x86 -# By default the value is *,*,* -configs = *, *, * -#configs=win32, win32, x86 & \ -# linux, gtk, ppc &\ -# linux, gtk, x86 & \ -# linux, gtk, x86_64 & \ -# linux, motif, x86 & \ -# solaris, motif, sparc & \ -# solaris, gtk, sparc & \ -# aix, motif, ppc & \ -# hpux, motif, PA_RISC & \ -# macosx, carbon, ppc - -# By default PDE creates one archive (result) per entry listed in the configs property. -# Setting this value to true will cause PDE to only create one output containing all -# artifacts for all the platforms listed in the configs property. -# To control the output format for the group, add a "group, group, group - " entry to the -# archivesFormat. -#groupConfigurations=true - -#The format of the archive. By default a zip is created using antZip. -#The list can only contain the configuration for which the desired format is different than zip. -#archivesFormat=win32, win32, x86 - antZip& \ -# linux, gtk, ppc - antZip &\ -# linux, gtk, x86 - antZip& \ -# linux, gtk, x86_64 - antZip& \ -# linux, motif, x86 - antZip& \ -# solaris, motif, sparc - antZip& \ -# solaris, gtk, sparc - antZip& \ -# aix, motif, ppc - antZip& \ -# hpux, motif, PA_RISC - antZip& \ -# macosx, carbon, ppc - antZip - -#Set to true if you want the output to be ready for an update jar (no site.xml generated) -#outputUpdateJars = false - -#Set to true for Jnlp generation -#codebase should be a URL that will be used as the root of all relative URLs in the output. -#generateJnlp=false -#jnlp.codebase= -#jnlp.j2se= -#jnlp.locale= -#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features -#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built - -#Set to true if you want to sign jars -#signJars=false -#sign.alias= -#sign.keystore= -#sign.storepass= - -#Arguments to send to the zip executable -zipargs= - -#Arguments to send to the tar executable -tarargs= - -#Control the creation of a file containing the version included in each configuration - on by default -#generateVersionsLists=false - -#Generate individual source bundles -#individualSourceBundles=true - -############## BUILD NAMING CONTROL ################ -# The directory into which the build elements are fetched and where -# the build takes place. -# We use the default of "next to the current branch" directory. -buildDirectory=${base}/../../staging - -# Type of build. Used in naming the build output. Typically this value is -# one of I, N, M, S, ... -buildType=I - -# ID of the build. Used in naming the build output. -buildId=ChromeDevToolsBuild - -# Label for the build. Used in naming the build output -buildLabel=${buildType}.${buildId} - -# Timestamp for the build. Used in naming the build output -timestamp=007 - -#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. -#The value will only be applied to plugin or features indicating build.properties, qualifier = context -#forceContextQualifier= - -#Enable / disable the generation of a suffix for the features that use .qualifier. -#The generated suffix is computed according to the content of the feature -#generateFeatureVersionSuffix=true - -############# BASE CONTROL ############# -# Settings for the base Eclipse components and Java class libraries -# against which you are building. -# Base location for anything the build needs to compile against. For example, -# in most RCP app or a plug-in, the baseLocation should be the location of a previously -# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. - -base=${builder}/.. -baseLocation=${base}/eclipse -#Os/Ws/Arch/nl of the eclipse specified by baseLocation -baseos=win32 -basews=win32 -basearch=x86 - -#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built -filteredDependencyCheck=false - -#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons) -resolution.devMode=false - -#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) -#a location is one of: -#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo -#- a directory that contains a /plugins or /features subdirectory -#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml -#pluginPath= - -skipBase=true -eclipseURL= -eclipseBuildId= -eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip - - -############# MAP FILE CONTROL ################ -# This section defines CVS tags to use when fetching the map files from the repository. -# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml - -skipMaps=true - -tagMaps=true -mapsTagTag=v${buildId} - - -############ REPOSITORY CONTROL ############### -# This section defines properties parameterizing the repositories where plugins, fragments -# bundles and features are being obtained from. - -# The tags to use when fetching elements to build. -# By default thebuilder will use whatever is in the maps. -# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the -# overriding value -# For example fetchTag=CVS=HEAD, SVN=v20050101 -# fetchTag=HEAD -skipFetch=true - - -############# JAVA COMPILER OPTIONS ############## -# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE -bootclasspath=${java.rt} - -# specific JRE locations to compile against. These values are used to compile bundles specifying a -# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support -#CDC-1.0/Foundation-1.0= /path/to/rt.jar -#CDC-1.1/Foundation-1.1= -#OSGi/Minimum-1.0= -#OSGi/Minimum-1.1= -#JRE-1.1= -#J2SE-1.2= -#J2SE-1.3= -#J2SE-1.4= -J2SE-1.5=${java.rt} -JavaSE-1.6=${java.rt} -#PersonalJava-1.1= -#PersonalJava-1.2= -#CDC-1.0/PersonalBasis-1.0= -#CDC-1.0/PersonalJava-1.0= -#CDC-1.1/PersonalBasis-1.1= -#CDC-1.1/PersonalJava-1.1= - -# Specify the output format of the compiler log when eclipse jdt is used -logExtension=.log - -# Whether or not to include debug info in the output jars -javacDebugInfo=true - -# Whether or not to fail the build if there are compiler errors -javacFailOnError=true - -# Enable or disable verbose mode of the compiler -javacVerbose=true - -# Extra arguments for the compiler. These are specific to the java compiler being used. -#compilerArg= - -# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties -javacSource=1.5 - -# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. -javacTarget=1.5 - - -# p2 properties - -p2Repository=${buildDirectory}/buildRepo - -generate.p2.metadata=true - -p2.metadata.repo.name=ChromeDevTools Updates -p2.metadata.repo=file:${p2Repository} -p2.artifact.repo.name=ChromeDevTools Artifacts -p2.artifact.repo=file:${p2Repository} -p2.flavor=tooling -p2.publish.artifacts=true -p2.category.definition=file:${base}/category.xml - -# TODO Eclipse 3.5 does not support custom -# repository names with p2.gathering=true -# You need to fix them manually. -p2.gathering=true -p2.build.repo=file:${p2Repository} diff --git a/chromedevtools/builder/build-main/releng.builder/customAssembly.xml b/chromedevtools/builder/build-main/releng.builder/customAssembly.xml deleted file mode 100644 index b7dd8145..00000000 --- a/chromedevtools/builder/build-main/releng.builder/customAssembly.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-main/releng.builder/customTargets.xml b/chromedevtools/builder/build-main/releng.builder/customTargets.xml deleted file mode 100644 index 3916616d..00000000 --- a/chromedevtools/builder/build-main/releng.builder/customTargets.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-wipbackend/LICENSE b/chromedevtools/builder/build-wipbackend/LICENSE deleted file mode 100644 index e6c0d72a..00000000 --- a/chromedevtools/builder/build-wipbackend/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/builder/build-wipbackend/backendIterator.xml b/chromedevtools/builder/build-wipbackend/backendIterator.xml deleted file mode 100644 index 97b39665..00000000 --- a/chromedevtools/builder/build-wipbackend/backendIterator.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-wipbackend/main-plugins/PUT_PLUGINS_HERE b/chromedevtools/builder/build-wipbackend/main-plugins/PUT_PLUGINS_HERE deleted file mode 100644 index 33f31918..00000000 --- a/chromedevtools/builder/build-wipbackend/main-plugins/PUT_PLUGINS_HERE +++ /dev/null @@ -1,2 +0,0 @@ -Plugin 'org.chromium.sdk' should be put here (plus any additional dependencies if any), -'org.chromium.sdk' must be unjarred (perhaps manully), or json-simple library won't be resolved. diff --git a/chromedevtools/builder/build-wipbackend/releng.builder/allElements.xml b/chromedevtools/builder/build-wipbackend/releng.builder/allElements.xml deleted file mode 100644 index 27d8d14a..00000000 --- a/chromedevtools/builder/build-wipbackend/releng.builder/allElements.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-wipbackend/releng.builder/build.properties b/chromedevtools/builder/build-wipbackend/releng.builder/build.properties deleted file mode 100644 index 5bf0c719..00000000 --- a/chromedevtools/builder/build-wipbackend/releng.builder/build.properties +++ /dev/null @@ -1,251 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2006 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -##################### -# Parameters describing how and where to execute the build. -# Typical users need only update the following properties: -# baseLocation - where things you are building against are installed -# bootclasspath - The base jars to compile against (typicaly rt.jar) -# configs - the list of {os, ws, arch} configurations to build. -# -# Of course any of the settings here can be overridden by spec'ing -# them on the command line (e.g., -DbaseLocation=d:/eclipse - -#The type of the top level element we are building, generally "feature" -topLevelElementType = feature -#The id of the top level element we are building -topLevelElementId = org.foo.bar - -############# PRODUCT/PACKAGING CONTROL ############# -product=/plugin or feature id/path/to/.product -runPackager=true - -#Set the name of the archive that will result from the product build. -#archiveNamePrefix= - -# The prefix that will be used in the generated archive. -archivePrefix= - -# The location underwhich all of the build output will be collected. -collectingFolder=${archivePrefix} - -# The list of {os, ws, arch} configurations to build. This -# value is a '&' separated list of ',' separate triples. For example, -# configs=win32,win32,x86 & linux,motif,x86 -# By default the value is *,*,* -configs = *, *, * -#configs=win32, win32, x86 & \ -# linux, gtk, ppc &\ -# linux, gtk, x86 & \ -# linux, gtk, x86_64 & \ -# linux, motif, x86 & \ -# solaris, motif, sparc & \ -# solaris, gtk, sparc & \ -# aix, motif, ppc & \ -# hpux, motif, PA_RISC & \ -# macosx, carbon, ppc - -# By default PDE creates one archive (result) per entry listed in the configs property. -# Setting this value to true will cause PDE to only create one output containing all -# artifacts for all the platforms listed in the configs property. -# To control the output format for the group, add a "group, group, group - " entry to the -# archivesFormat. -#groupConfigurations=true - -#The format of the archive. By default a zip is created using antZip. -#The list can only contain the configuration for which the desired format is different than zip. -#archivesFormat=win32, win32, x86 - antZip& \ -# linux, gtk, ppc - antZip &\ -# linux, gtk, x86 - antZip& \ -# linux, gtk, x86_64 - antZip& \ -# linux, motif, x86 - antZip& \ -# solaris, motif, sparc - antZip& \ -# solaris, gtk, sparc - antZip& \ -# aix, motif, ppc - antZip& \ -# hpux, motif, PA_RISC - antZip& \ -# macosx, carbon, ppc - antZip - -#Set to true if you want the output to be ready for an update jar (no site.xml generated) -#outputUpdateJars = false - -#Set to true for Jnlp generation -#codebase should be a URL that will be used as the root of all relative URLs in the output. -#generateJnlp=false -#jnlp.codebase= -#jnlp.j2se= -#jnlp.locale= -#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features -#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built - -#Set to true if you want to sign jars -#signJars=false -#sign.alias= -#sign.keystore= -#sign.storepass= - -#Arguments to send to the zip executable -zipargs= - -#Arguments to send to the tar executable -tarargs= - -#Control the creation of a file containing the version included in each configuration - on by default -#generateVersionsLists=false - -#Generate individual source bundles -#individualSourceBundles=true - -############## BUILD NAMING CONTROL ################ -# The directory into which the build elements are fetched and where -# the build takes place. -# We use the default of "next to the current branch" directory. -buildDirectory=${base}/../../staging - -# Type of build. Used in naming the build output. Typically this value is -# one of I, N, M, S, ... -buildType=I - -# ID of the build. Used in naming the build output. -buildId=ChromeDevToolsBuild - -# Label for the build. Used in naming the build output -buildLabel=${buildType}.${buildId} - -# Timestamp for the build. Used in naming the build output -timestamp=007 - -#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. -#The value will only be applied to plugin or features indicating build.properties, qualifier = context -#forceContextQualifier= - -#Enable / disable the generation of a suffix for the features that use .qualifier. -#The generated suffix is computed according to the content of the feature -#generateFeatureVersionSuffix=true - -############# BASE CONTROL ############# -# Settings for the base Eclipse components and Java class libraries -# against which you are building. -# Base location for anything the build needs to compile against. For example, -# in most RCP app or a plug-in, the baseLocation should be the location of a previously -# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. - -base=${builder}/.. -baseLocation=${base}/eclipse -#Os/Ws/Arch/nl of the eclipse specified by baseLocation -baseos=win32 -basews=win32 -basearch=x86 - -#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built -filteredDependencyCheck=false - -#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons) -resolution.devMode=false - -#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) -#a location is one of: -#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo -#- a directory that contains a /plugins or /features subdirectory -#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml -pluginPath=${buildDirectory}/mainPlugins - -skipBase=true -eclipseURL= -eclipseBuildId= -eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip - - -############# MAP FILE CONTROL ################ -# This section defines CVS tags to use when fetching the map files from the repository. -# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml - -skipMaps=true - -tagMaps=true -mapsTagTag=v${buildId} - - -############ REPOSITORY CONTROL ############### -# This section defines properties parameterizing the repositories where plugins, fragments -# bundles and features are being obtained from. - -# The tags to use when fetching elements to build. -# By default thebuilder will use whatever is in the maps. -# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the -# overriding value -# For example fetchTag=CVS=HEAD, SVN=v20050101 -# fetchTag=HEAD -skipFetch=true - - -############# JAVA COMPILER OPTIONS ############## -# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE -bootclasspath=${java.rt} - -# specific JRE locations to compile against. These values are used to compile bundles specifying a -# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support -#CDC-1.0/Foundation-1.0= /path/to/rt.jar -#CDC-1.1/Foundation-1.1= -#OSGi/Minimum-1.0= -#OSGi/Minimum-1.1= -#JRE-1.1= -#J2SE-1.2= -#J2SE-1.3= -#J2SE-1.4= -J2SE-1.5=${java.rt} -JavaSE-1.6=${java.rt} -#PersonalJava-1.1= -#PersonalJava-1.2= -#CDC-1.0/PersonalBasis-1.0= -#CDC-1.0/PersonalJava-1.0= -#CDC-1.1/PersonalBasis-1.1= -#CDC-1.1/PersonalJava-1.1= - -# Specify the output format of the compiler log when eclipse jdt is used -logExtension=.log - -# Whether or not to include debug info in the output jars -javacDebugInfo=true - -# Whether or not to fail the build if there are compiler errors -javacFailOnError=true - -# Enable or disable verbose mode of the compiler -javacVerbose=true - -# Extra arguments for the compiler. These are specific to the java compiler being used. -#compilerArg= - -# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties -javacSource=1.5 - -# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. -javacTarget=1.5 - - -# p2 properties - -p2Repository=${buildDirectory}/buildRepo - -generate.p2.metadata=true - -p2.metadata.repo.name=ChromeDevTools Updates -p2.metadata.repo=file:${p2Repository} -p2.artifact.repo.name=ChromeDevTools Artifacts -p2.artifact.repo=file:${p2Repository} -p2.flavor=tooling -p2.publish.artifacts=true -p2.category.definition=file:${base}/category.xml - -# TODO Eclipse 3.5 does not support custom -# repository names with p2.gathering=true -# You need to fix them manually. -p2.gathering=true -p2.build.repo=file:${p2Repository} diff --git a/chromedevtools/builder/build-wipbackend/releng.builder/customAssembly.xml b/chromedevtools/builder/build-wipbackend/releng.builder/customAssembly.xml deleted file mode 100644 index b7dd8145..00000000 --- a/chromedevtools/builder/build-wipbackend/releng.builder/customAssembly.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build-wipbackend/releng.builder/customTargets.xml b/chromedevtools/builder/build-wipbackend/releng.builder/customTargets.xml deleted file mode 100644 index 6843161b..00000000 --- a/chromedevtools/builder/build-wipbackend/releng.builder/customTargets.xml +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/build.properties b/chromedevtools/builder/build.properties deleted file mode 100644 index d68c619b..00000000 --- a/chromedevtools/builder/build.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Where the PDE builder (releng) Eclipse installation resides. We run -# this Eclipse for building -pdeEclipseLocation=FILL THIS VALUE - -# The location of the target Eclipse installation: that against which --> -# he project will be compiled. --> -# It is recommended to use a distinct target Eclipse installation --> -# but for the sake of simplicity we are using the releng one. --> -baseLocation=${pdeEclipseLocation} - -# The location of rt.jar in the build environment -java.rt=FILL THIS VALUE - -code.google.com.username=FILL THIS VALUE diff --git a/chromedevtools/builder/build.xml b/chromedevtools/builder/build.xml deleted file mode 100644 index 50e08ced..00000000 --- a/chromedevtools/builder/build.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/buildVersionExtractor.py b/chromedevtools/builder/buildVersionExtractor.py deleted file mode 100755 index 53a65bd8..00000000 --- a/chromedevtools/builder/buildVersionExtractor.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# A script that helps Ant build system to recognize current plugin versions numbers -- -# a task that Ant can't seem to do itself. Input: built chromedevtools plugins -# and features. Output: .properties file that has version numbers extracted. -# These numbers are going to be used to generate additional zip/tar deployment (standalone -# libraries and update site zip). - -import sys -import os -import re - -buildDirectory = sys.argv[1] -outputDir = sys.argv[2] - -items = os.listdir("%s/plugins" % buildDirectory) -# print(items) - -def findRegExp(nameList, pattern): - result = [] - for n in nameList: - r = pattern.match(n) - if r: - result.append(r) - if len(result) != 1: - raise Error("Exactly one file name should match %s" % pattern) - return result[0] - -sdkMatch = findRegExp(items, re.compile(r'org\.chromium\.sdk_(\d+\.\d+\.\d+)\.(.+)\.jar')) -backendSourceMatch = findRegExp(items, - re.compile(r'org\.chromium\.sdk\.wipbackends\.source_(\d+\.\d+\.\d+)\.(.+)\.jar')) - -propertiesFile = open("%s/pluginVersion.properties" % outputDir, mode='w') - -propertiesFile.write("mainVersion=%s\n" % sdkMatch.group(1)) -propertiesFile.write("backendVersion=%s\n" % backendSourceMatch.group(1)) -propertiesFile.write("mainBuilderVersion=%s\n" % sdkMatch.group(2)) -propertiesFile.write("backendBuilderVersion=%s\n" % backendSourceMatch.group(2)) - -propertiesFile.close() diff --git a/chromedevtools/builder/repack/category.xml b/chromedevtools/builder/repack/category.xml deleted file mode 100644 index 011e05ed..00000000 --- a/chromedevtools/builder/repack/category.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/repack/merge_repositories_script b/chromedevtools/builder/repack/merge_repositories_script deleted file mode 100644 index ac36ab62..00000000 --- a/chromedevtools/builder/repack/merge_repositories_script +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Builds repository with a proper title using bundles and features from one or -# several other repositories (they should be passed as command line params). - -# Configuration. - -ECLIPSE_DIR= -ECLIPSE_CMD="$ECLIPSE_DIR/eclipse -vm " -DEST= -CATEGORY_FILE= - -REPOSITORY_LIST=$* - - -# Implementation. - -_pluginList=$(for f1 in $REPOSITORY_LIST; do echo -n $f1/plugins,; done) -_featureList=$(for f1 in $REPOSITORY_LIST; do echo -n $f1/features,; done) -rm $DEST -r - -ECLIPSE_CMD="$ECLIPSE_CMD -nosplash" - -$ECLIPSE_CMD -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \ - -metadataRepository file:$DEST/repository \ - -artifactRepository file:$DEST/repository \ - -bundles $_pluginList \ - -features $_featureList \ - -metadataRepositoryName "ChromeDevTools Update Site" \ - -artifactRepositoryName "ChromeDevTools Update Site Artifacts" \ - -publishArtifacts - -$ECLIPSE_CMD -application org.eclipse.equinox.p2.publisher.CategoryPublisher \ - -metadataRepository file:$DEST/repository \ - -categoryDefinition file:$CATEGORY_FILE - -categoryQualifier chrome_dev_tools_category_0_3_4 - diff --git a/chromedevtools/builder/sdkTargets.xml b/chromedevtools/builder/sdkTargets.xml deleted file mode 100644 index 25572a88..00000000 --- a/chromedevtools/builder/sdkTargets.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/builder/uploadToDownloads.py b/chromedevtools/builder/uploadToDownloads.py deleted file mode 100644 index 33347c67..00000000 --- a/chromedevtools/builder/uploadToDownloads.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This script is expected to be called from build.xml uploadToDownloads target - -import sys -import getpass -import googlecode_upload - -resultDir = sys.argv[1] -user_name = sys.argv[2] - -main_version = sys.argv[3] -backend_version = sys.argv[4] - -pwd = getpass.getpass(prompt="Google SVN password: ") - -def uploadFile(file, summary): - (http_status, http_reason, file_url) = googlecode_upload.upload(file=file, project_name="chromedevtools", user_name=user_name, password=pwd, summary=summary) - if http_status != 201: - raise Exception("Failed to upload file %s: %d '%s'" % (file, http_status, http_reason)) - print "Uploaded to %s" % file_url - -uploadFile("%s/org.chromium.sdk-wipbackends-%s-%s.tar" % (resultDir, main_version, backend_version), "ChromeDevTools SDK WIP backends v. %s/%s" % (main_version, backend_version)) -uploadFile("%s/org.chromium.sdk-lib-%s.tar" % (resultDir, main_version), "ChromeDevTools SDK library as tar archive v. %s" % main_version) -uploadFile("%s/chromedevtools-%s-wipbackends-%s-site.zip" % (resultDir, main_version, backend_version), "ChromeDevTools %s/WIP backends %s update site in zip archive" % (main_version, backend_version)) diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/.project b/chromedevtools/features/org.chromium.debug.jsdtbridge/.project deleted file mode 100644 index 3ea25048..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.debug.jsdtbridge.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/LICENSE b/chromedevtools/features/org.chromium.debug.jsdtbridge/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/build.properties b/chromedevtools/features/org.chromium.debug.jsdtbridge/build.properties deleted file mode 100644 index ed42f159..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html -src.includes = LICENSE diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.properties b/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.properties deleted file mode 100755 index eda2d501..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2010 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=Chromium JavaScript Debugger Bridge to JSDT - -providerName=The Chromium Authors - -description=A bridge between Chromium JavaScript debugger and JavaScript Development Tools (JSDT) - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.xml b/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.xml deleted file mode 100644 index 3fa22cf0..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/feature.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/license.html b/chromedevtools/features/org.chromium.debug.jsdtbridge/license.html deleted file mode 100755 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/LICENSE b/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/feature.properties b/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/feature.properties deleted file mode 100755 index 06799bbc..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplateFeature/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=Chromium JavaScript Debugger Bridge to JSDT (Source Code) - -providerName=The Chromium Authors - -description=A bridge between Chromium JavaScript debugger and JavaScript Development Tools (JSDT) (source code) - -licenseUrl=http://code.google.com/p/chromedevtools/wiki/License - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/LICENSE b/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/LICENSE deleted file mode 100755 index 8dc35041..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/build.properties b/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/build.properties deleted file mode 100755 index fe667f47..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = plugin.properties, plugin.xml, LICENSE, src/**, META-INF/ -sourcePlugin=true \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/plugin.properties b/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/plugin.properties deleted file mode 100755 index 8bd7b755..00000000 --- a/chromedevtools/features/org.chromium.debug.jsdtbridge/sourceTemplatePlugin/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2010 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -pluginName=Chromium JavaScript Debugger Bridge to JSDT (Source Code) - -providerName=The Chromium Authors \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.debug/.project b/chromedevtools/features/org.chromium.debug/.project deleted file mode 100755 index 093a675a..00000000 --- a/chromedevtools/features/org.chromium.debug/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.debug.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.debug/LICENSE b/chromedevtools/features/org.chromium.debug/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.debug/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug/build.properties b/chromedevtools/features/org.chromium.debug/build.properties deleted file mode 100755 index ed42f159..00000000 --- a/chromedevtools/features/org.chromium.debug/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html -src.includes = LICENSE diff --git a/chromedevtools/features/org.chromium.debug/feature.properties b/chromedevtools/features/org.chromium.debug/feature.properties deleted file mode 100755 index 3623718a..00000000 --- a/chromedevtools/features/org.chromium.debug/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=Nodeclipse Chromium JavaScript Remote Debugger - -providerName=The Chromium Authors, Nodeclipse - -description=A remote Eclipse debugger for JavaScript developers using the Chromium browser - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug/feature.xml b/chromedevtools/features/org.chromium.debug/feature.xml deleted file mode 100755 index 6e92ff86..00000000 --- a/chromedevtools/features/org.chromium.debug/feature.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.debug/license.html b/chromedevtools/features/org.chromium.debug/license.html deleted file mode 100755 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.debug/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/features/org.chromium.debug/pom.xml b/chromedevtools/features/org.chromium.debug/pom.xml deleted file mode 100644 index be0082f4..00000000 --- a/chromedevtools/features/org.chromium.debug/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - 4.0.0 - - - org.chromium.chromedevtools - org.chromium.parent - 0.3.9-SNAPSHOT - ../../pom.xml - - - org.chromium.chromedevtools.features - org.chromium.debug - eclipse-feature - - org.chromium.debug (feature) - org.chromium.debug (feature) - - - diff --git a/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/LICENSE b/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/feature.properties b/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/feature.properties deleted file mode 100755 index 2d6f56b4..00000000 --- a/chromedevtools/features/org.chromium.debug/sourceTemplateFeature/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=Chromium JavaScript Remote Debugger (Source Code) - -providerName=The Chromium Authors - -description=A remote Eclipse debugger for JavaScript developers using the Chromium browser (source code) - -licenseUrl=http://code.google.com/p/chromedevtools/wiki/License - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/LICENSE b/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/LICENSE deleted file mode 100755 index a7531cf7..00000000 --- a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/build.properties b/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/build.properties deleted file mode 100755 index fe667f47..00000000 --- a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = plugin.properties, plugin.xml, LICENSE, src/**, META-INF/ -sourcePlugin=true \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/plugin.properties b/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/plugin.properties deleted file mode 100755 index 39c9797a..00000000 --- a/chromedevtools/features/org.chromium.debug/sourceTemplatePlugin/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -pluginName=Chromium JavaScript Remote Debugger (Source Code) - -providerName=The Chromium Authors \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/.project b/chromedevtools/features/org.chromium.sdk.wip.source/.project deleted file mode 100644 index 46719bd6..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.sdk.wip.source - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/LICENSE b/chromedevtools/features/org.chromium.sdk.wip.source/LICENSE deleted file mode 100644 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/build.properties b/chromedevtools/features/org.chromium.sdk.wip.source/build.properties deleted file mode 100644 index 96ade738..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html - -generate.feature@org.chromium.sdk.wipbackends.source=org.chromium.sdk.wipbackends diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/feature.properties b/chromedevtools/features/org.chromium.sdk.wip.source/feature.properties deleted file mode 100644 index 89356b7e..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=ChromeDevTools SDK WIP Backends' Source Code - -providerName=The Chromium Authors - -description=Source code for the Google Chrome Developer Tools SDK WIP backends - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/feature.xml b/chromedevtools/features/org.chromium.sdk.wip.source/feature.xml deleted file mode 100644 index 3281fe63..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/feature.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.sdk.wip.source/license.html b/chromedevtools/features/org.chromium.sdk.wip.source/license.html deleted file mode 100644 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.sdk.wip.source/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/.project b/chromedevtools/features/org.chromium.sdk.wipbackends/.project deleted file mode 100644 index 274d37f4..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.sdk.wipbackends.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/LICENSE b/chromedevtools/features/org.chromium.sdk.wipbackends/LICENSE deleted file mode 100644 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/build.properties b/chromedevtools/features/org.chromium.sdk.wipbackends/build.properties deleted file mode 100644 index ed42f159..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html -src.includes = LICENSE diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/feature.properties b/chromedevtools/features/org.chromium.sdk.wipbackends/feature.properties deleted file mode 100644 index 4b855165..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=ChromeDevTools SDK WIP Backends - -providerName=The Chromium Authors - -description=Google Chrome Developer Tools SDK WIP implementation backends - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/feature.xml b/chromedevtools/features/org.chromium.sdk.wipbackends/feature.xml deleted file mode 100644 index 80de1f88..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/feature.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/license.html b/chromedevtools/features/org.chromium.sdk.wipbackends/license.html deleted file mode 100644 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/LICENSE b/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/LICENSE deleted file mode 100644 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/feature.properties b/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/feature.properties deleted file mode 100644 index 978023c8..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplateFeature/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=ChromeDevTools SDK WIP Backends (Source Code) - -providerName=The Chromium Authors - -description=Source code for the Google Chrome Developer Tools SDK WIP implementation backends - -licenseUrl=http://code.google.com/p/chromedevtools/wiki/License - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/LICENSE b/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/LICENSE deleted file mode 100644 index a6e0dcfb..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/build.properties b/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/build.properties deleted file mode 100644 index fe667f47..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = plugin.properties, plugin.xml, LICENSE, src/**, META-INF/ -sourcePlugin=true \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/plugin.properties b/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/plugin.properties deleted file mode 100644 index 3efafa51..00000000 --- a/chromedevtools/features/org.chromium.sdk.wipbackends/sourceTemplatePlugin/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -pluginName=ChromeDevTools SDK WIP Backends (Source Code) - -providerName=The Chromium Authors \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.sdk/.project b/chromedevtools/features/org.chromium.sdk/.project deleted file mode 100755 index 25fe37e7..00000000 --- a/chromedevtools/features/org.chromium.sdk/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.sdk.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.sdk/LICENSE b/chromedevtools/features/org.chromium.sdk/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.sdk/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk/build.properties b/chromedevtools/features/org.chromium.sdk/build.properties deleted file mode 100755 index ed42f159..00000000 --- a/chromedevtools/features/org.chromium.sdk/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html -src.includes = LICENSE diff --git a/chromedevtools/features/org.chromium.sdk/feature.properties b/chromedevtools/features/org.chromium.sdk/feature.properties deleted file mode 100755 index 2f5b69ad..00000000 --- a/chromedevtools/features/org.chromium.sdk/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=Nodeclipse ChromeDevTools SDK - -providerName=The Chromium Authors, Nodeclipse - -description=Google Chrome Developer Tools SDK - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk/feature.xml b/chromedevtools/features/org.chromium.sdk/feature.xml deleted file mode 100755 index d3ccf05c..00000000 --- a/chromedevtools/features/org.chromium.sdk/feature.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.sdk/license.html b/chromedevtools/features/org.chromium.sdk/license.html deleted file mode 100755 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.sdk/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/features/org.chromium.sdk/pom.xml b/chromedevtools/features/org.chromium.sdk/pom.xml deleted file mode 100644 index 0a4c14c9..00000000 --- a/chromedevtools/features/org.chromium.sdk/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - 4.0.0 - - - org.chromium.chromedevtools - org.chromium.parent - 0.3.9-SNAPSHOT - ../../pom.xml - - - org.chromium.chromedevtools.features - org.chromium.sdk - eclipse-feature - - org.chromium.sdk (feature) - org.chromium.sdk (feature) - - - diff --git a/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/LICENSE b/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/feature.properties b/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/feature.properties deleted file mode 100755 index f35e59f7..00000000 --- a/chromedevtools/features/org.chromium.sdk/sourceTemplateFeature/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=ChromeDevTools SDK (Source Code) - -providerName=The Chromium Authors - -description=Source code for the Google Chrome Developer Tools SDK - -licenseUrl=http://code.google.com/p/chromedevtools/wiki/License - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/LICENSE b/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/LICENSE deleted file mode 100755 index a7531cf7..00000000 --- a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/build.properties b/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/build.properties deleted file mode 100755 index fe667f47..00000000 --- a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = plugin.properties, plugin.xml, LICENSE, src/**, META-INF/ -sourcePlugin=true \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/plugin.properties b/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/plugin.properties deleted file mode 100755 index 1b89bcac..00000000 --- a/chromedevtools/features/org.chromium.sdk/sourceTemplatePlugin/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -pluginName=ChromeDevTools SDK (Source Code) - -providerName=The Chromium Authors \ No newline at end of file diff --git a/chromedevtools/features/org.chromium.source/.project b/chromedevtools/features/org.chromium.source/.project deleted file mode 100755 index c39cabaf..00000000 --- a/chromedevtools/features/org.chromium.source/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.chromium.source - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/chromedevtools/features/org.chromium.source/LICENSE b/chromedevtools/features/org.chromium.source/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/features/org.chromium.source/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.source/build.properties b/chromedevtools/features/org.chromium.source/build.properties deleted file mode 100755 index 929e97ce..00000000 --- a/chromedevtools/features/org.chromium.source/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - LICENSE,\ - license.html - -generate.feature@org.chromium.sdk.source=org.chromium.sdk -generate.feature@org.chromium.debug.source=org.chromium.debug -generate.feature@org.chromium.debug.jsdtbridge.source=org.chromium.debug.jsdtbridge diff --git a/chromedevtools/features/org.chromium.source/feature.properties b/chromedevtools/features/org.chromium.source/feature.properties deleted file mode 100755 index c3360d5a..00000000 --- a/chromedevtools/features/org.chromium.source/feature.properties +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -featureName=ChromeDevTools Project Source Code - -providerName=The Chromium Authors - -description=Source code for the Google Chrome Developer Tools project components - -licenseUrl=license.html - -licenseAgreement=\ -Copyright (c) 2012 The Chromium Authors. All rights reserved.\n\ -\n\ -Redistribution and use in source and binary forms, with or without modification,\ -are permitted provided that the following conditions are met:\n\ -* Redistributions of source code must retain the above copyright notice,\ -this list of conditions and the following disclaimer.\n\ -* Redistributions in binary form must reproduce the above copyright notice,\ -this list of conditions and the following disclaimer in the documentation\ -and/or other materials provided with the distribution.\n\ -* Neither the name of Google Inc. nor the names of its contributors may be used\ -to endorse or promote products derived from this software without specific prior\ -written permission.\n\ -\n\ -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\ -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\ -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\ -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\ -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\ -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\ -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\ -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\ -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\ -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\ -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\ -OF SUCH DAMAGE. diff --git a/chromedevtools/features/org.chromium.source/feature.xml b/chromedevtools/features/org.chromium.source/feature.xml deleted file mode 100755 index b9f318d9..00000000 --- a/chromedevtools/features/org.chromium.source/feature.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - %description - - - - Copyright (c) 2012 The Chromium Authors. All rights reserved. - - - - %licenseAgreement - - - - - - - - - - - - - diff --git a/chromedevtools/features/org.chromium.source/license.html b/chromedevtools/features/org.chromium.source/license.html deleted file mode 100755 index 64e63df7..00000000 --- a/chromedevtools/features/org.chromium.source/license.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Google Chrome Developer Tools License Agreement - - -

-Google Chrome Developer Tools License Agreement -

-

-Copyright (c) 2012 The Chromium Authors. All rights reserved. -

-

-

-Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -
    -
  • Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.
  • -
  • Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution.
  • -
  • Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission.
  • -
-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

- diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/.classpath b/chromedevtools/plugins/org.chromium.debug.core.tests/.classpath deleted file mode 100644 index ad32c83a..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/.project b/chromedevtools/plugins/org.chromium.debug.core.tests/.project deleted file mode 100644 index a7c1e15a..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.chromium.debug.core.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/META-INF/MANIFEST.MF b/chromedevtools/plugins/org.chromium.debug.core.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 465ec516..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Chromium JavaScript Remote Debugger Core Tests -Bundle-SymbolicName: org.chromium.debug.core.tests -Bundle-Version: 0.3.9.0 -Fragment-Host: org.chromium.debug.core;bundle-version="0.1.0.0" -Require-Bundle: org.eclipse.core.runtime, - org.chromium.debug.core;bundle-version="0.3.9", - org.junit4;bundle-version="4.8.1" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/build.properties b/chromedevtools/plugins/org.chromium.debug.core.tests/build.properties deleted file mode 100644 index 34d2e4d2..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - . diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/PositionMapBuilderImplTest.java b/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/PositionMapBuilderImplTest.java deleted file mode 100644 index 3ffad44b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/PositionMapBuilderImplTest.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.sourcemap; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Random; - -import junit.framework.Assert; - -import org.chromium.debug.core.model.StringMappingData; -import org.chromium.debug.core.model.VmResourceId; -import org.chromium.debug.core.sourcemap.SourcePositionMap.TranslateDirection; -import org.chromium.debug.core.sourcemap.SourcePositionMapBuilder.CannotAddException; -import org.chromium.debug.core.sourcemap.SourcePositionMapBuilder.MappingHandle; -import org.chromium.debug.core.sourcemap.SourcePositionMapBuilder.ResourceSection; -import org.junit.Test; - -public class PositionMapBuilderImplTest { - /** - * Creates a sample position map and checks several points. - */ - @Test - public void basicTest() throws CannotAddException { - SourcePositionMapBuilder builder = new PositionMapBuilderImpl(); - builder.addMapping(new ResourceSection(new VmResourceId("source1.js", null), 0, 0, 5, 0), - new ResourceSection(new VmResourceId("compiled.js", null), 0, 0, 1, 0), - new TextSectionMappingImpl( - new StringMappingData(new int [] { 0,0, 1,0, 2,0, 3,0, 4,0 } , 5, 0), - new StringMappingData(new int [] { 0,0, 0,10, 0,20, 0,30, 0,40 }, 0, 50))); - - builder.addMapping(new ResourceSection(new VmResourceId("source2.js", null), 0, 0, 5, 0), - new ResourceSection(new VmResourceId("compiled.js", null), 1, 0, 2, 0), - new TextSectionMappingImpl( - new StringMappingData(new int [] { 0,0, 1,0, 2,0, 3,0, 4,0}, 5, 0), - new StringMappingData(new int [] { 1,0, 1,10, 1,20, 1,30, 1,40}, 1, 50))); - - builder.addMapping(new ResourceSection(new VmResourceId("source3.js", null), 0, 0, 5, 0), - new ResourceSection(new VmResourceId("compiled.js", null), 2, 0, 3, 0), - new TextSectionMappingImpl( - new StringMappingData(new int [] {0,0, 1,0, 2,0, 3,0, 4,0}, 5, 0), - new StringMappingData(new int [] {2,0, 2,10, 2,20, 2,30, 2,40}, 2, 50))); - - SourcePositionMap map = builder.getSourcePositionMap(); - - checkTwoWay(map, "other.js", 17, 4, "other.js", 17, 4, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 2, 11, "source3.js", 1, 1, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 0, 0, "source1.js", 0, 0, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 0, 1, "source1.js", 0, 1, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 1, 0, "source2.js", 0, 0, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 1, 3, "source2.js", 0, 3, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 2, 0, "source3.js", 0, 0, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 2, 3, "source3.js", 0, 3, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 3, 0, "compiled.js", 3, 0, TranslateDirection.VM_TO_USER); - - checkTwoWay(map, "compiled.js", 3, 3, "compiled.js", 3, 3, TranslateDirection.VM_TO_USER); - } - - private static SourcePosition checkOneWay(SourcePositionMap map, - String fromFile, int fromLine, int fromColumn, - String toFile, int toLine, int toColumn, TranslateDirection direction) { - SourcePosition result = map.translatePosition(new VmResourceId(fromFile, null), - fromLine, fromColumn, direction); - Assert.assertEquals(new SourcePosition(new VmResourceId(toFile, null), toLine, toColumn), - result); - return result; - } - - private static void checkTwoWay(SourcePositionMap map, - String fromFile, int fromLine, int fromColumn, - String toFile, int toLine, int toColumn, TranslateDirection direction) { - checkOneWay(map, fromFile, fromLine, fromColumn, toFile, toLine, toColumn, direction); - SourcePosition result = map.translatePosition(new VmResourceId(toFile, null), toLine, toColumn, - direction.opposite()); - Assert.assertEquals(new SourcePosition(new VmResourceId(fromFile, null), fromLine, fromColumn), - result); - } - - /** - * Checks that {@link SourcePositionMapBuilder#addMapping} correctly handles overlapping regions. - */ - @Test - public void testAddMappingOverlaps() throws CannotAddException { - new OverlappingMapTestFramework().run(); - } - - private static abstract class MultiRangeMapTestFrameworkBase { - static final VmResourceId COMPILED_JS_ID = new VmResourceId("compiled.js", null); - static ResourceSection[] GOOD_SECTIONS = { - new ResourceSection(COMPILED_JS_ID, 1, 0, 2, 0), - new ResourceSection(COMPILED_JS_ID, 3, 0, 3, 0), - new ResourceSection(COMPILED_JS_ID, 5, 0, 5, 0), - new ResourceSection(COMPILED_JS_ID, 5, 0, 5, 0), - new ResourceSection(COMPILED_JS_ID, 5, 0, 8, 0), - new ResourceSection(COMPILED_JS_ID, 8, 0, 8, 0), - }; - private static final int SHUFFLE_TRIES = 10; - - void run() throws CannotAddException { - // We get all good sections and add them in a random order. Then we check - // that each of conflict section will not add. - - Random random = new Random(0); - for (int i = 0; i < SHUFFLE_TRIES; i++) { - runOneShuffle(random); - } - } - - protected abstract void runOneShuffle(Random random) throws CannotAddException; - - protected ArrayList addGoodRanges(SourcePositionMapBuilder builder, - Random random) throws CannotAddException { - List vmSections = - new ArrayList(Arrays.asList(GOOD_SECTIONS)); - Collections.shuffle(vmSections, random); - ArrayList result = - new ArrayList(vmSections.size()); - // Add all good sections. - int index = 0; - for (ResourceSection section : vmSections) { - addSection(builder, section, index); - index++; - } - return result; - } - - protected static MappingHandle addSection(SourcePositionMapBuilder builder, - ResourceSection vmSection, int index) throws CannotAddException { - ResourceSection originalSection = - new ResourceSection(new VmResourceId(("source" + index + ".js"), null), 0, 0, 5, 0); - - TextSectionMappingImpl textMapping = new TextSectionMappingImpl( - new StringMappingData( - new int [] { vmSection.getStart().getLine(), vmSection.getStart().getColumn() }, - vmSection.getEnd().getLine(), vmSection.getEnd().getColumn()), - new StringMappingData((new int [] { 0, 0 }), 5, 0)); - - return builder.addMapping(originalSection, vmSection, textMapping); - } - } - - private static class OverlappingMapTestFramework extends MultiRangeMapTestFrameworkBase { - private static ResourceSection[] CONFLICT_SECTIONS = { - new ResourceSection(COMPILED_JS_ID, 1, 0, 2, 0), - new ResourceSection(COMPILED_JS_ID, 0, 1, 1, 1), - new ResourceSection(COMPILED_JS_ID, 1, 1, 2, 1), - new ResourceSection(COMPILED_JS_ID, 1, 1, 1, 2), - new ResourceSection(COMPILED_JS_ID, 2, 0, 4, 0), - new ResourceSection(COMPILED_JS_ID, 4, 0, 6, 0), - new ResourceSection(COMPILED_JS_ID, 6, 0, 7, 0), - new ResourceSection(COMPILED_JS_ID, 7, 0, 9, 0), - }; - - protected void runOneShuffle(Random random) throws CannotAddException { - - final SourcePositionMapBuilder builder = new PositionMapBuilderImpl(); - - List goodRangeHandles = addGoodRanges(builder, random); - - final int conflict_section_index = goodRangeHandles.size(); - // Now try to add conflict sections. - for (final ResourceSection section : CONFLICT_SECTIONS) { - assertThrowsAddException(new RunnableWithCannotAddException() { - public void run() throws CannotAddException { - addSection(builder, section, conflict_section_index); - } - }); - } - } - } - - /** - * Checks that {@link SourcePositionMapBuilder} can add mappings and delete them - * in different order. - */ - @Test - public void testAddAndDeleteMapping() throws CannotAddException { - new AddAndDeleteMapTestFramework().run(); - } - - private static class AddAndDeleteMapTestFramework extends MultiRangeMapTestFrameworkBase { - protected void runOneShuffle(Random random) throws CannotAddException { - final SourcePositionMapBuilder builder = new PositionMapBuilderImpl(); - - ArrayList goodRangeHandles = addGoodRanges(builder, random); - - // Delete ranges in other order. - Collections.shuffle(goodRangeHandles, random); - - for (MappingHandle handle : goodRangeHandles) { - handle.delete(); - } - } - } - - private interface RunnableWithCannotAddException { - void run() throws CannotAddException; - } - - private static void assertThrowsAddException(RunnableWithCannotAddException runnable) { - try { - runnable.run(); - Assert.fail("Exception expected"); - } catch (CannotAddException e) { - // Expected exception. - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/TextSectionMappingImplTest.java b/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/TextSectionMappingImplTest.java deleted file mode 100644 index 680724b2..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core.tests/src/org/chromium/debug/core/sourcemap/TextSectionMappingImplTest.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.sourcemap; - -import static junit.framework.Assert.*; - -import org.chromium.debug.core.model.StringMappingData; -import org.chromium.debug.core.sourcemap.TextSectionMapping.Direction; -import org.chromium.debug.core.sourcemap.TextSectionMapping.TextPoint; -import org.junit.Test; - -public class TextSectionMappingImplTest { - - @Test - public void testBasic() { - TextSectionMapping mapping = new TextSectionMappingImpl( - new StringMappingData( - new int[] { 0,0, 0,2, 0,12, 2,5, 2,10, 2,10, 2,10, 3,0, 4,0 }, 5, 0), - new StringMappingData( - new int[] { 5,3, 5,5, 7,3, 9,5, 9,10, 11,3, 11,17, 11,17, 12,0 }, 13, 0) - ); - - checkTwoWays(mapping, new TextPoint(0, 0), new TextPoint(5, 3)); - checkTwoWays(mapping, new TextPoint(0, 1), new TextPoint(5, 4)); - checkTwoWays(mapping, new TextPoint(0, 2), new TextPoint(5, 5)); - checkTwoWays(mapping, new TextPoint(0, 3), new TextPoint(5, 6)); - checkTwoWays(mapping, new TextPoint(0, 10), new TextPoint(5, 13)); - checkTwoWays(mapping, new TextPoint(0, 11), new TextPoint(5, 14)); - - assertEquals(new TextPoint(0, 11), - mapping.transform(new TextPoint(5, 15), Direction.REVERSE)); - assertEquals(new TextPoint(0, 11), - mapping.transform(new TextPoint(5, 16), Direction.REVERSE)); - assertEquals(new TextPoint(0, 11), - mapping.transform(new TextPoint(6, 3), Direction.REVERSE)); - assertEquals(new TextPoint(0, 11), - mapping.transform(new TextPoint(7, 2), Direction.REVERSE)); - - checkTwoWays(mapping, new TextPoint(0, 12), new TextPoint(7, 3)); - checkTwoWays(mapping, new TextPoint(0, 13), new TextPoint(7, 4)); - checkTwoWays(mapping, new TextPoint(1, 13), new TextPoint(8, 13)); - checkTwoWays(mapping, new TextPoint(2, 0), new TextPoint(9, 0)); - checkTwoWays(mapping, new TextPoint(2, 4), new TextPoint(9, 4)); - checkTwoWays(mapping, new TextPoint(2, 5), new TextPoint(9, 5)); - checkTwoWays(mapping, new TextPoint(2, 9), new TextPoint(9, 9)); - - assertEquals(new TextPoint(2, 10), - mapping.transform(new TextPoint(11, 3), Direction.REVERSE)); - assertEquals(new TextPoint(2, 10), - mapping.transform(new TextPoint(11, 4), Direction.REVERSE)); - assertEquals(new TextPoint(2, 10), - mapping.transform(new TextPoint(11, 16), Direction.REVERSE)); - assertEquals(new TextPoint(3, 0), - mapping.transform(new TextPoint(11, 17), Direction.REVERSE)); - assertEquals(new TextPoint(11, 18), - mapping.transform(new TextPoint(3, 1), Direction.DIRECT)); - } - - private static void checkTwoWays(TextSectionMapping mapping, - TextPoint source, TextPoint destination) { - TextPoint resultOne = mapping.transform(source, Direction.DIRECT); - assertEquals(destination, resultOne); - TextPoint resultTwo = mapping.transform(resultOne, Direction.REVERSE); - assertEquals(source, resultTwo); - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/.classpath b/chromedevtools/plugins/org.chromium.debug.core/.classpath deleted file mode 100755 index 065ac06e..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.debug.core/.options b/chromedevtools/plugins/org.chromium.debug.core/.options deleted file mode 100755 index a1d1d232..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/.options +++ /dev/null @@ -1,3 +0,0 @@ -org.chromium.debug.core/debug=true -org.chromium.debug.core/debug/transport=true -org.chromium.debug.core/debug/v8DebuggerTool=true \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.debug.core/.project b/chromedevtools/plugins/org.chromium.debug.core/.project deleted file mode 100755 index 297eea55..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.chromium.debug.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/chromedevtools/plugins/org.chromium.debug.core/.settings/org.eclipse.jdt.core.prefs b/chromedevtools/plugins/org.chromium.debug.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/chromedevtools/plugins/org.chromium.debug.core/LICENSE b/chromedevtools/plugins/org.chromium.debug.core/LICENSE deleted file mode 100755 index e6c0d72a..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/chromedevtools/plugins/org.chromium.debug.core/META-INF/MANIFEST.MF b/chromedevtools/plugins/org.chromium.debug.core/META-INF/MANIFEST.MF deleted file mode 100755 index 14bf51bd..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.chromium.debug.core;singleton:=true -Bundle-Version: 0.3.9.qualifier -Bundle-Activator: org.chromium.debug.core.ChromiumDebugPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.core.filesystem;bundle-version="1.2.0", - org.eclipse.debug.ui;bundle-version="3.4.1", - org.eclipse.ui;bundle-version="3.4.1", - org.eclipse.jface.text;bundle-version="3.4.1", - org.eclipse.ui.workbench.texteditor;bundle-version="3.4.1", - org.chromium.sdk;bundle-version="0.3.9", - org.eclipse.core.expressions;bundle-version="3.4.0" -Bundle-ActivationPolicy: lazy -Export-Package: org.chromium.debug.core, - org.chromium.debug.core.model, - org.chromium.debug.core.sourcemap, - org.chromium.debug.core.util -Eclipse-LazyStart: true -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/chromedevtools/plugins/org.chromium.debug.core/build.properties b/chromedevtools/plugins/org.chromium.debug.core/build.properties deleted file mode 100755 index 33ed0bf4..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -bin.includes = META-INF/,\ - plugin.xml,\ - .,\ - LICENSE,\ - plugin.properties -source.. = src/ -output.. = bin/ -src.includes = LICENSE diff --git a/chromedevtools/plugins/org.chromium.debug.core/plugin.properties b/chromedevtools/plugins/org.chromium.debug.core/plugin.properties deleted file mode 100755 index da03cb0c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/plugin.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -providerName = The Chromium Authors - -pluginName = Chromium JavaScript Remote Debugger Core - -SourceNameMapperContainer.name = JavaScript Source Name Mapper -SourceNameMapperContainer.description = Transforms name of source and delegates lookup to another source container. \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.debug.core/plugin.xml b/chromedevtools/plugins/org.chromium.debug.core/plugin.xml deleted file mode 100755 index d02aa33b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/plugin.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.debug.core/pom.xml b/chromedevtools/plugins/org.chromium.debug.core/pom.xml deleted file mode 100644 index c53137bb..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.chromium.chromedevtools - org.chromium.parent - 0.3.9-SNAPSHOT - ../../pom.xml - - - org.chromium.debug.core - eclipse-plugin - - org.chromium.debug.core - org.chromium.debug.core - - diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumDebugPlugin.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumDebugPlugin.java deleted file mode 100755 index a9883e0c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumDebugPlugin.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; - -import org.chromium.debug.core.model.ChromiumBreakpointWBAFactory; -import org.chromium.debug.core.model.ChromiumLineBreakpoint; -import org.chromium.debug.core.model.ConnectedTargetData; -import org.chromium.debug.core.model.DebugTargetImpl; -import org.chromium.debug.core.model.VmResource; -import org.chromium.debug.core.util.ScriptTargetMapping; -import org.chromium.sdk.BrowserFactory; -import org.eclipse.core.internal.resources.Workspace; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdapterManager; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.BundleContext; - -/** - * The activator class that controls the plug-in life cycle. - */ -public class ChromiumDebugPlugin extends Plugin { - - /** The plug-in ID. */ - public static final String PLUGIN_ID = "org.chromium.debug.core"; //$NON-NLS-1$ - - /** The JavaScript line breakpoint marker. */ - public static final String BP_MARKER = PLUGIN_ID + ".LineBP"; //$NON-NLS-1$ - - /** The JavaScript exception breakpoint marker. */ - public static final String EXCEPTION_BP_MARKER = PLUGIN_ID + ".ExceptionBP"; //$NON-NLS-1$ - - /** The shared instance. */ - private static ChromiumDebugPlugin plugin; - - private ChromiumBreakpointWBAFactory breakpointWorkbenchAdapterFactory; - - public ChromiumDebugPlugin() { - } - - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - IAdapterManager manager = Platform.getAdapterManager(); - breakpointWorkbenchAdapterFactory = new ChromiumBreakpointWBAFactory(); - manager.registerAdapters(breakpointWorkbenchAdapterFactory, ChromiumLineBreakpoint.class); - plugin = this; - - BrowserFactory.getRootLogger().addHandler(SDK_LOG_HANDLER); - } - - @Override - public void stop(BundleContext context) throws Exception { - BrowserFactory.getRootLogger().removeHandler(SDK_LOG_HANDLER); - plugin = null; - IAdapterManager manager = Platform.getAdapterManager(); - manager.unregisterAdapters(breakpointWorkbenchAdapterFactory); - super.stop(context); - } - - /** - * @return the shared instance - */ - public static ChromiumDebugPlugin getDefault() { - return plugin; - } - - /** - * Finds all file pairs for a user working file. One working file may correspond to several - * scripts if there are more than one debug sessions. - */ - public static List getScriptTargetMapping(IFile localFile) { - List targetDataList = DebugTargetImpl.getAllConnectedTargetDatas(); - ArrayList result = - new ArrayList(targetDataList.size()); - - for (ConnectedTargetData targetData : targetDataList) { - Collection resources; - try { - resources = targetData.getVmResource(localFile); - } catch (CoreException e) { - throw new RuntimeException("Failed to resolve script from the file " + localFile, e); - } - if (resources == null || resources.isEmpty()) { - continue; - } - result.add(new ScriptTargetMapping(localFile, resources, targetData)); - } - return result; - } - - public static boolean isDebug() { - ChromiumDebugPlugin thePlugin = getDefault(); - return thePlugin != null && thePlugin.isDebugging(); - } - - public static boolean isTransportDebug() { - return isDebug() && - Boolean.valueOf(Platform.getDebugOption(PLUGIN_ID + "/debug/transport")); //$NON-NLS-1$ - } - - public static boolean isV8DebuggerToolDebug() { - return isDebug() && - Boolean.valueOf(Platform.getDebugOption(PLUGIN_ID + "/debug/v8DebuggerTool")); //$NON-NLS-1$ - } - - public static void log(IStatus status) { - ChromiumDebugPlugin plugin = getDefault(); - if (plugin != null) { - plugin.getLog().log(status); - } else { - System.err.println(status.getPlugin() + ": " + status.getMessage()); //$NON-NLS-1$ - } - } - - public static void log(Throwable e) { - if (e instanceof CoreException) { - log(new Status(IStatus.ERROR, PLUGIN_ID, - ((CoreException) e).getStatus().getSeverity(), e.getMessage(), e.getCause())); - } else { - log(new Status(IStatus.ERROR, PLUGIN_ID, Messages.ChromiumDebugPlugin_InternalError, e)); - } - } - - public static void logError(String message, Object... arguments) { - log(new Status(Status.ERROR, PLUGIN_ID, getPossiblyFormattedString(message, arguments))); - } - - public static void logWarning(String message, Object... arguments) { - log(new Status(Status.WARNING, PLUGIN_ID, getPossiblyFormattedString(message, arguments))); - } - - private static String getPossiblyFormattedString(String message, Object... arguments) { - return arguments.length > 0 - ? MessageFormat.format(message, arguments) - : message; - } - - private static final Handler SDK_LOG_HANDLER = new Handler() { - @Override - public void publish(LogRecord record) { - int statusSeverity = 0; - Level level = record.getLevel(); - if (level == Level.SEVERE) { - statusSeverity = Status.ERROR; - } else if (level == Level.WARNING) { - statusSeverity = Status.WARNING; - } else { - statusSeverity = Status.INFO; - } - log(new Status(statusSeverity, PLUGIN_ID, "SDK:" + record.getLoggerName() + ": " + - record.getMessage(), record.getThrown())); - } - - @Override - public void flush() { - } - - @Override - public void close() throws SecurityException { - } - }; -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceComputer.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceComputer.java deleted file mode 100644 index ae260d51..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceComputer.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.sourcelookup.ISourceContainer; -import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate; - -/** - * A source path computer implementation that provides {@link VProjectSourceContainer} as - * a default source files container for V8/Chrome debug sessions. - */ -public class ChromiumSourceComputer implements ISourcePathComputerDelegate { - public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, - IProgressMonitor monitor) throws CoreException { - return new ISourceContainer[] { new VProjectSourceContainer() }; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceDirector.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceDirector.java deleted file mode 100644 index 688ae569..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ChromiumSourceDirector.java +++ /dev/null @@ -1,513 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; - -import org.chromium.debug.core.ScriptNameManipulator.ScriptNamePattern; -import org.chromium.debug.core.model.JavascriptVmEmbedder; -import org.chromium.debug.core.model.LaunchParams; -import org.chromium.debug.core.model.LaunchParams.LookupMode; -import org.chromium.debug.core.model.ResourceManager; -import org.chromium.debug.core.model.StackFrame; -import org.chromium.debug.core.model.VmResource; -import org.chromium.debug.core.model.VmResourceId; -import org.chromium.debug.core.model.VmResourceRef; -import org.chromium.debug.core.util.AccuratenessProperty; -import org.chromium.sdk.Breakpoint; -import org.chromium.sdk.BreakpointTypeExtension; -import org.chromium.sdk.Script; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector; -import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant; -import org.eclipse.debug.core.sourcelookup.ISourceContainer; -import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.MessageBox; - -/** - * A source lookup director implementation that provides a simple participant and - * accepts instance of virtual project once it is created. - */ -public class ChromiumSourceDirector extends AbstractSourceLookupDirector { - private volatile ResourceManager resourceManager = null; - private volatile IProject project = null; - private volatile ReverseSourceLookup reverseSourceLookup = null; - private volatile JavascriptVmEmbedder javascriptVmEmbedder = null; - - /** - * Contains 'true' if we have already shown the warning about unsupported look-up mode. - * However this should be reset when user switches from one mode to another. - */ - private volatile boolean lookupWarningShown = false; - - public void initializeParticipants() { - ISourceLookupParticipant participant = new LookupParticipant(this); - addParticipants(new ISourceLookupParticipant[] { participant } ); - - // Check mode post factum. - checkSupportedLookupMode(); - } - - public VmResourceRef findVmResourceRef(IFile file) throws CoreException { - return getLookupModeHandler().findVmResourceRef(file); - } - - public static LookupMode readLookupMode(ILaunchConfiguration launchConfiguration) - throws CoreException { - String lookupStringValue = launchConfiguration.getAttribute( - LaunchParams.SOURCE_LOOKUP_MODE, (String) null); - LookupMode value; - if (lookupStringValue == null) { - value = LookupMode.DEFAULT_VALUE; - } else { - value = LookupMode.STRING_CONVERTER.decode(lookupStringValue); - } - return value; - } - - private LookupModeHandler getLookupModeHandler() { - LookupMode mode; - try { - mode = readLookupMode(getLaunchConfiguration()); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - mode = LookupMode.DEFAULT_VALUE; - } - return mode.accept(MODE_TO_HANDLER_VISITOR); - } - - private final LookupMode.Visitor MODE_TO_HANDLER_VISITOR = - new LookupMode.Visitor() { - @Override - public LookupModeHandler visitExactMatch() { - return exactMatchLookupMode; - } - - @Override - public LookupModeHandler visitAutoDetect() { - return autoDetectLookupMode; - } - }; - - @Override - public boolean isFindDuplicates() { - return getLookupModeHandler().forceFindDuplicates() || super.isFindDuplicates(); - } - - /** - * A single implementation of look participant. This way the participant may decide to become - * exact match/auto-detect after it is created, because javascriptVm instances comes too late - * after everything is created. - */ - private static class LookupParticipant extends AbstractSourceLookupParticipant { - private final SuperClassAccess superClassAccess = new SuperClassAccess(); - private final ChromiumSourceDirector chromiumSourceDirector; - - LookupParticipant(ChromiumSourceDirector chromiumSourceDirector) { - this.chromiumSourceDirector = chromiumSourceDirector; - } - - public String getSourceName(Object object) throws CoreException { - return getSourceNameImpl(object); - } - - @Override - public Object[] findSourceElements(Object object) throws CoreException { - Delegate delegate = chromiumSourceDirector.getLookupModeHandler().getDelegate(); - return delegate.findSourceElements(object, superClassAccess); - } - - private Object[] findSourceElementsSuper(Object object) throws CoreException { - return super.findSourceElements(object); - } - - - static abstract class Delegate { - abstract Object[] findSourceElements(Object object, SuperClassAccess superClass) - throws CoreException; - } - - class SuperClassAccess { - Object[] findSourceElements(Object object) throws CoreException { - return findSourceElementsSuper(object); - } - - ISourceContainer[] getSourceContainers() { - return LookupParticipant.this.getSourceContainers(); - } - - ChromiumSourceDirector getChromiumSourceDirector() { - return chromiumSourceDirector; - } - } - } - - private static final LookupParticipant.Delegate EXACT_MATCH_DELEGATE = - new LookupParticipant.Delegate() { - @Override - Object[] findSourceElements(Object object, LookupParticipant.SuperClassAccess superClass) - throws CoreException { - Object[] result = superClass.findSourceElements(object); - if (result.length > 0) { - ArrayList filtered = new ArrayList(result.length); - for (Object obj : result) { - if (obj instanceof VProjectSourceContainer.LookupResult) { - VProjectSourceContainer.LookupResult vprojectResult = - (VProjectSourceContainer.LookupResult) obj; - expandVProjectResult(vprojectResult, object, filtered); - } else { - filtered.add(obj); - } - } - result = filtered.toArray(); - } - return result; - } - }; - - private static final LookupParticipant.Delegate AUTO_DETECT_DELEGATE = - new LookupParticipant.Delegate() { - @Override - Object[] findSourceElements(Object object, LookupParticipant.SuperClassAccess superClass) - throws CoreException { - ArrayList result = new ArrayList(); - JavascriptVmEmbedder vmEmbedder = - superClass.getChromiumSourceDirector().javascriptVmEmbedder; - ScriptNameManipulator.FilePath scriptName = - getParsedScriptFileName(object, vmEmbedder.getScriptNameManipulator()); - if (scriptName != null) { - for (ISourceContainer container : superClass.getSourceContainers()) { - try { - findSourceElements(container, object, scriptName, result); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - continue; - } - // If one container returned one file -- that's a single uncompromised result. - IFile oneFile = getSimpleResult(result); - if (oneFile != null) { - return new Object[] { oneFile }; - } - } - } - return result.toArray(); - } - - private void findSourceElements(ISourceContainer container, Object object, - ScriptNameManipulator.FilePath scriptName, ArrayList output) - throws CoreException { - Object[] objects = container.findSourceElements(scriptName.getLastComponent()); - - if (objects.length == 0) { - return; - } - - int outputStartPos = output.size(); - - for (Object obj : objects) { - if (obj instanceof IFile) { - IFile file = (IFile) obj; - if (matchFileAccurateness(file, scriptName)) { - output.add(obj); - } - } else if (obj instanceof VProjectSourceContainer.LookupResult) { - VProjectSourceContainer.LookupResult vprojectResult = - (VProjectSourceContainer.LookupResult) obj; - expandVProjectResult(vprojectResult, object, output); - } else { - output.add(obj); - } - } - - int outputEndPos = output.size(); - - if (outputEndPos - outputStartPos > 1) { - // Put short name last. They cannot be filtered out by our rules, so they may - // be parasite. - Collections.sort(output.subList(outputStartPos, outputEndPos), SHORT_NAME_LAST); - } - } - - private IFile getSimpleResult(List objects) { - if (objects.size() != 1) { - return null; - } - Object oneObject = objects.get(0); - if (oneObject instanceof IFile == false) { - return null; - } - IFile file = (IFile) oneObject; - return file; - } - - private boolean matchFileAccurateness(IFile file, - ScriptNameManipulator.FilePath scriptName) throws CoreException { - int accurateness = AccuratenessProperty.read(file); - if (accurateness > AccuratenessProperty.BASE_VALUE) { - IPath path = file.getFullPath(); - int pathPos = path.segmentCount() - AccuratenessProperty.BASE_VALUE -1; - Iterator scriptIterator = scriptName.iterator(); - while (accurateness > AccuratenessProperty.BASE_VALUE) { - if (pathPos < 0 || !scriptIterator.hasNext()) { - return false; - } - String scriptComponent = scriptIterator.next(); - String pathComponent = path.segment(pathPos--); - if (!scriptComponent.equals(pathComponent)) { - return false; - } - accurateness--; - } - } - return true; - } - - - private ScriptNameManipulator.FilePath getParsedScriptFileName(Object object, - ScriptNameManipulator nameManipulator) throws CoreException { - VmResourceId vmResourceId = getVmResourceId(object); - if (vmResourceId == null) { - return null; - } - final String scriptName = vmResourceId.getName(); - if (scriptName == null) { - return UNKNOWN_NAME; - } - return nameManipulator.getFileName(scriptName); - } - }; - - private static String getSourceNameImpl(Object object) throws CoreException { - VmResourceId vmResourceId = getVmResourceId(object); - if (vmResourceId == null) { - return null; - } - String name = vmResourceId.getName(); - if (name == null) { - // Do not return null, this will cancel look-up. - // Return empty string. Virtual project container will pass us some data. - name = ""; //$NON-NLS-1$ - } - return name; - } - - private static final ScriptNameManipulator.FilePath UNKNOWN_NAME = - new ScriptNameManipulator.FilePath() { - @Override - public String getLastComponent() { - return ""; //$NON-NLS-1$ - } - - @Override - public Iterator iterator() { - return Collections.emptyList().iterator(); - } - }; - - - private static final Comparator SHORT_NAME_LAST = new Comparator() { - @Override - public int compare(Object o1, Object o2) { - int len1 = getPathLength(o1); - int len2 = getPathLength(o2); - return len2 - len1; - } - - private int getPathLength(Object obj) { - if (obj instanceof IFile == false) { - return Integer.MIN_VALUE; - } - IFile file = (IFile) obj; - return file.getFullPath().segmentCount(); - } - }; - - private static VmResourceId getVmResourceId(Object object) throws CoreException { - if (object instanceof Script) { - Script script = (Script) object; - return VmResourceId.forScript(script); - } else if (object instanceof StackFrame) { - StackFrame jsStackFrame = (StackFrame) object; - return jsStackFrame.getVmResourceId(); - } else if (object instanceof Breakpoint) { - Breakpoint breakpoint = (Breakpoint) object; - return breakpoint.getTarget().accept(BREAKPOINT_RESOURCE_VISITOR); - } else if (object instanceof VmResourceId) { - VmResourceId resourceId = (VmResourceId) object; - return resourceId; - } else { - return null; - } - } - - /** - * Virtual project container cannot properly resolve from a sting name. Instead it returns - * {@link ResourceManager} object that can be processed here, where we have full - * {@link VmResourceId}. - */ - private static void expandVProjectResult(VProjectSourceContainer.LookupResult lookupResult, - Object object, ArrayList output) throws CoreException { - VmResourceId resourceId = getVmResourceId(object); - if (resourceId.getId() != null) { - VmResource vmResource = lookupResult.getVmResource(resourceId); - if (vmResource != null) { - output.add(vmResource.getVProjectFile()); - } - } - } - - private static final Breakpoint.Target.Visitor BREAKPOINT_RESOURCE_VISITOR = - new BreakpointTypeExtension.ScriptRegExpSupport.Visitor() { - @Override public VmResourceId visitScriptName(String scriptName) { - return new VmResourceId(scriptName, null); - } - @Override public VmResourceId visitScriptId(Object scriptId) { - return new VmResourceId(null, scriptId); - } - @Override public VmResourceId visitRegExp(String regExp) { - // RegExp cannot be converted into VmResourceId without additional context. - return null; - } - @Override public VmResourceId visitUnknown(Breakpoint.Target target) { - return null; - } - }; - - public void initializeVProjectContainers(IProject project, ResourceManager resourceManager, - JavascriptVmEmbedder javascriptVmEmbedder) { - this.resourceManager = resourceManager; - this.project = project; - this.javascriptVmEmbedder = javascriptVmEmbedder; - this.reverseSourceLookup = new ReverseSourceLookup(this); - checkSupportedLookupMode(); - } - - public ReverseSourceLookup getReverseSourceLookup() { - return reverseSourceLookup; - } - - public ResourceManager getResourceManager() { - return resourceManager; - } - - IProject getProject() { - return project; - } - - private void checkSupportedLookupMode() { - LookupModeHandler lookupMode = getLookupModeHandler(); - if (javascriptVmEmbedder != null) { - lookupMode.showUnsupportedWarning(javascriptVmEmbedder); - } - } - - private static abstract class LookupModeHandler { - abstract LookupParticipant.Delegate getDelegate(); - - abstract void showUnsupportedWarning(JavascriptVmEmbedder javascriptVmEmbedder); - - abstract boolean forceFindDuplicates(); - - abstract VmResourceRef findVmResourceRef(IFile file) throws CoreException; - } - - private final LookupModeHandler exactMatchLookupMode = new LookupModeHandler() { - @Override LookupParticipant.Delegate getDelegate() { - return EXACT_MATCH_DELEGATE; - } - - @Override void showUnsupportedWarning(JavascriptVmEmbedder javascriptVmEmbedder) { - // 'Exact match' is chosen. Enable warning again. - lookupWarningShown = false; - } - - @Override boolean forceFindDuplicates() { - return false; - } - - @Override - VmResourceRef findVmResourceRef(IFile file) throws CoreException { - VmResourceId vmResourceId = reverseSourceLookup.findVmResource(file); - if (vmResourceId == null) { - return null; - } - return VmResourceRef.forVmResourceId(vmResourceId); - } - }; - - private final LookupModeHandler autoDetectLookupMode = new LookupModeHandler() { - @Override LookupParticipant.Delegate getDelegate() { - return AUTO_DETECT_DELEGATE; - } - - @Override - void showUnsupportedWarning(final JavascriptVmEmbedder javascriptVmEmbedder) { - if (lookupWarningShown) { - return; - } - BreakpointTypeExtension breakpointTypeExtension = - javascriptVmEmbedder.getJavascriptVm().getBreakpointTypeExtension(); - BreakpointTypeExtension.ScriptRegExpSupport scriptRegExpSupport = - breakpointTypeExtension.getScriptRegExpSupport(); - if (scriptRegExpSupport != null) { - return; - } - lookupWarningShown = true; - Display display = Display.getDefault(); - display.asyncExec(new Runnable() { - @Override - public void run() { - Display display = Display.getDefault(); - MessageBox messageBox = new MessageBox(display.getActiveShell(), SWT.ICON_WARNING); - messageBox.setText(Messages.ChromiumSourceDirector_WARNING_TITLE); - String messagePattern = Messages.ChromiumSourceDirector_WARNING_TEXT_PATTERN; - String message = NLS.bind(messagePattern, - javascriptVmEmbedder.getJavascriptVm().getVersion()); - messageBox.setMessage(message); - messageBox.open(); - } - }); - } - - @Override boolean forceFindDuplicates() { - return true; - } - - @Override - VmResourceRef findVmResourceRef(IFile file) throws CoreException { - { - // Try inside virtual project. - VmResourceId resourceId = resourceManager.getResourceId(file); - if (resourceId != null) { - return VmResourceRef.forVmResourceId(resourceId); - } - } - IPath path = file.getFullPath(); - int accurateness = AccuratenessProperty.read(file); - if (accurateness > path.segmentCount()) { - accurateness = path.segmentCount(); - } - int offset = path.segmentCount() - accurateness; - List components = new ArrayList(accurateness); - for (int i = 0; i < accurateness; i++) { - components.add(path.segment(i + offset)); - } - ScriptNameManipulator scriptNameManipulator = javascriptVmEmbedder.getScriptNameManipulator(); - ScriptNamePattern pattern = scriptNameManipulator.createPattern(components); - return VmResourceRef.forRegExpBased(pattern); - } - }; -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/FilePropertyTester.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/FilePropertyTester.java deleted file mode 100644 index 415b0969..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/FilePropertyTester.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.eclipse.core.expressions.PropertyTester; -import org.eclipse.core.resources.IFile; - -/** - * Implementation of additional properties for files that are JavaScript sources. - */ -public abstract class FilePropertyTester extends PropertyTester { - private static final String IS_JS_FILE_PROPERTY = "isJsFile"; //$NON-NLS-1$ - - public static class ForFile extends FilePropertyTester { - @Override - protected IFile extractFile(Object receiver) { - return (IFile) receiver; - } - } - - public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { - IFile file = extractFile(receiver); - if (IS_JS_FILE_PROPERTY.equals(property)) { - return testIsJsFile(file); - } else { - throw new RuntimeException("Unrecognized property name"); //$NON-NLS-1$ - } - } - - protected abstract IFile extractFile(Object receiver); - - private static boolean testIsJsFile(IFile file) { - return ChromiumDebugPluginUtil.SUPPORTED_EXTENSIONS.contains(file.getFileExtension()); - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/Messages.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/Messages.java deleted file mode 100755 index 5979bdd0..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/Messages.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.eclipse.osgi.util.NLS; - -/** - * NLS messages for the package. - */ -public class Messages extends NLS { - private static final String BUNDLE_NAME = - "org.chromium.debug.core.messages"; //$NON-NLS-1$ - - public static String ChromiumDebugPlugin_InternalError; - - public static String ChromiumSourceDirector_WARNING_TEXT_PATTERN; - - public static String ChromiumSourceDirector_WARNING_TITLE; - - public static String SourceNameMapperContainer_NAME; - - public static String VProjectSourceContainer_DEFAULT_TYPE_NAME; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ReverseSourceLookup.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ReverseSourceLookup.java deleted file mode 100644 index 69803109..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ReverseSourceLookup.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.chromium.debug.core.model.VmResourceId; -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.debug.core.sourcelookup.ISourceContainer; -import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; -import org.eclipse.debug.core.sourcelookup.containers.ContainerSourceContainer; -import org.eclipse.debug.core.sourcelookup.containers.DefaultSourceContainer; -import org.eclipse.debug.core.sourcelookup.containers.WorkspaceSourceContainer; - -/** - * Eclipse has a standard facility for looking up source file for a debug artifact. - * LiveEdit feature has an opposite problem: find script in remote VM for a particular js file. - * This class implements some approach to this problem. An instance of this class corresponds - * to a particular debug launch. - */ -public class ReverseSourceLookup { - private final ISourceLookupDirector sourceDirector; - - public ReverseSourceLookup(ISourceLookupDirector sourceDirector) { - this.sourceDirector = sourceDirector; - } - - /** - * Tries to find a corresponding script for a file from a user workspace. The method uses - * the file name and current source lookup rules to retrieve a resource id, regardless of - * whether the resource has actually been loaded into the VM (you may want to set a breakpoint - * on resource before it is actually loaded). - */ - public VmResourceId findVmResource(IFile sourceFile) throws CoreException { - for (ISourceContainer container : sourceDirector.getSourceContainers()) { - VmResourceId scriptName = tryForContainer(sourceFile, container); - if (scriptName != null) { - return scriptName; - } - } - return null; - } - - public static boolean isGoodTargetContainer(ISourceContainer container) { - return wrapNonVirtualContainer(container) != null; - } - - private VmResourceId tryForContainer(IFile sourceFile, ISourceContainer container) - throws CoreException { - if (container.isComposite() && isSupportedCompositeContainer(container)) { - ISourceContainer[] subContainers = container.getSourceContainers(); - for (ISourceContainer subContainer : subContainers) { - VmResourceId res = tryForContainer(sourceFile, subContainer); - if (res != null) { - return res; - } - } - return null; - } else if (container instanceof VProjectSourceContainer) { - VProjectSourceContainer projectSourceContainer = (VProjectSourceContainer) container; - return projectSourceContainer.findScriptId(sourceFile); - } else { - String name = tryForNonVirtualContainer(sourceFile, container); - if (name == null) { - return null; - } - return new VmResourceId(name, null); - } - } - - /** - * We use {@link ISourceContainer#getSourceContainers()} method to unwrap internal containers. - * However it doesn't make sense for all composite containers (some of them may return their - * subdirectories as containers, which is not what we need). - */ - private boolean isSupportedCompositeContainer(ISourceContainer container) { - return container instanceof DefaultSourceContainer; - } - - /** - * @param container that may not wrap VProjectSourceContainer - */ - private String tryForNonVirtualContainer(IFile resource, ISourceContainer container) { - ContainerWrapper wrapper = wrapNonVirtualContainer(container); - if (wrapper == null) { - return null; - } - return wrapper.lookup(resource); - } - - private static ContainerWrapper wrapNonVirtualContainer(ISourceContainer container) { - if (container instanceof ContainerSourceContainer) { - final ContainerSourceContainer containerSourceContainer = - (ContainerSourceContainer) container; - return new ContainerWrapper() { - @Override - public String lookup(IFile resource) { - return lookupInResourceContainer(resource, containerSourceContainer.getContainer()); - } - }; - } else if (container instanceof WorkspaceSourceContainer) { - return new ContainerWrapper() { - @Override - public String lookup(IFile resource) { - return lookupInResourceContainer(resource, ResourcesPlugin.getWorkspace().getRoot()); - } - }; - } else if (container instanceof SourceNameMapperContainer) { - SourceNameMapperContainer mappingContainer = (SourceNameMapperContainer) container; - final ContainerWrapper targetContainerWrapper = - wrapNonVirtualContainer(mappingContainer.getTargetContainer()); - final String prefix = mappingContainer.getPrefix(); - return new ContainerWrapper() { - @Override - public String lookup(IFile resource) { - String subResult = targetContainerWrapper.lookup(resource); - if (subResult == null) { - return null; - } - return prefix + subResult; - } - }; - } - - return null; - } - - /** - * Wraps a container. This interface guarantees that original container with all inner containers - * are supported by our reversed lookup. - */ - private interface ContainerWrapper { - String lookup(IFile resource); - } - - private static String lookupInResourceContainer(IFile resource, IContainer resourceContainer) { - IPath resourceFullPath = resource.getFullPath(); - IPath containerFullPath = resourceContainer.getFullPath(); - if (!containerFullPath.isPrefixOf(resourceFullPath)) { - return null; - } - int offset = containerFullPath.segmentCount(); - IPath newPath = resourceFullPath.removeFirstSegments(offset); - return newPath.toPortableString(); - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ScriptNameManipulator.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ScriptNameManipulator.java deleted file mode 100644 index 5605550c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/ScriptNameManipulator.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import java.util.Iterator; -import java.util.List; - -/** - * Parses script names and generates RegExp for them as needed for 'auto-detect' source look-up - * feature. Incapsulates knowledge about script name schema. For example it may support - * plain file names, URLs that hold file name as the 'path' part. There might be - * more exotic implementations that parses URLs like - * "http://server/get?dir=foo/bar&file=index.html". - */ -public interface ScriptNameManipulator { - /** - * Obtains file path from the script name - */ - FilePath getFileName(String scriptName); - - /** - * An interface to parsed file path. Iterator allows lazy parsing. - */ - interface FilePath extends Iterable { - String getLastComponent(); - - /** - * @return all file path components in reversed order excluding the last one - */ - @Override public Iterator iterator(); - } - - /** - * For a file path (presented as components) creates a pattern that matches - * script names with this file path. - */ - ScriptNamePattern createPattern(List components); - - /** - * A wrapper for a pattern. It is implemented as a plain holder of JavaScript - * RegExp source. - */ - class ScriptNamePattern { - private final String javaScriptString; - - public ScriptNamePattern(String javaScriptString) { - this.javaScriptString = javaScriptString; - } - - public String getJavaScriptRegExp() { - return javaScriptString; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java deleted file mode 100644 index e5c66ab3..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.chromium.debug.core.util.MementoFormat; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.sourcelookup.ISourceContainer; -import org.eclipse.debug.core.sourcelookup.ISourceContainerType; -import org.eclipse.debug.core.sourcelookup.ISourceContainerTypeDelegate; -import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; -import org.eclipse.osgi.util.NLS; - -/** - * A special type of container that translates names of the source and delegates lookup - * to another source container. - * This could be useful when JS resource name is like "http://localhost/scripts/util.js"; such - * source name could be converted into "scripts/util.js". - * Currently container supports only prefix-based translation: if source name starts with a prefix, - * the prefix is truncated; otherwise the source name is discarded. - */ -public class SourceNameMapperContainer implements ISourceContainer { - - private static final String TYPE_ID = - "org.chromium.debug.core.SourceNameMapperContainer.type"; //$NON-NLS-1$ - - private final ISourceContainer targetContainer; - private final String prefix; - - public SourceNameMapperContainer(String prefix, ISourceContainer targetContainer) { - this.targetContainer = targetContainer; - this.prefix = prefix; - } - - public void dispose() { - } - - public String getPrefix() { - return prefix; - } - - public ISourceContainer getTargetContainer() { - return targetContainer; - } - - public Object[] findSourceElements(String name) throws CoreException { - if (!name.startsWith(prefix)) { - return new Object[0]; - } - String shortName = name.substring(prefix.length()); - return targetContainer.findSourceElements(shortName); - } - - - public String getName() { - return NLS.bind(Messages.SourceNameMapperContainer_NAME, prefix); - } - - - public ISourceContainer[] getSourceContainers() { - return new ISourceContainer[] { targetContainer }; - } - - - public ISourceContainerType getType() { - return DebugPlugin.getDefault().getLaunchManager().getSourceContainerType(TYPE_ID); - } - - - public void init(ISourceLookupDirector director) { - } - - - public boolean isComposite() { - return true; - } - - private String getMemento() throws CoreException { - StringBuilder builder = new StringBuilder(); - MementoFormat.encodeComponent(prefix, builder); - MementoFormat.encodeComponent(targetContainer.getType().getId(), builder); - MementoFormat.encodeComponent(targetContainer.getType().getMemento(targetContainer), builder); - return builder.toString(); - } - - - public Object getAdapter(Class adapter) { - return null; - } - - /** - * A type delegate that serializes/deserializes container instances into/from memento. - */ - public static class TypeDelegate implements ISourceContainerTypeDelegate { - public ISourceContainer createSourceContainer(String memento) throws CoreException { - MementoFormat.Parser parser = new MementoFormat.Parser(memento); - String prefix; - String typeId; - String subContainerMemento; - try { - prefix = parser.nextComponent(); - typeId = parser.nextComponent(); - subContainerMemento = parser.nextComponent(); - } catch (MementoFormat.ParserException e) { - throw new CoreException(new Status(IStatus.ERROR, - ChromiumDebugPlugin.PLUGIN_ID, "Failed to parse memento", e)); //$NON-NLS-1$ - } - ISourceContainerType subContainerType = - DebugPlugin.getDefault().getLaunchManager().getSourceContainerType(typeId); - ISourceContainer subContainer = subContainerType.createSourceContainer(subContainerMemento); - return new SourceNameMapperContainer(prefix, subContainer); - } - - public String getMemento(ISourceContainer container) throws CoreException { - SourceNameMapperContainer chromeContainer = (SourceNameMapperContainer) container; - return chromeContainer.getMemento(); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/VProjectSourceContainer.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/VProjectSourceContainer.java deleted file mode 100644 index fe903d52..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/VProjectSourceContainer.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core; - -import org.chromium.debug.core.model.ResourceManager; -import org.chromium.debug.core.model.VmResource; -import org.chromium.debug.core.model.VmResourceId; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.sourcelookup.ISourceContainer; -import org.eclipse.debug.core.sourcelookup.ISourceContainerType; -import org.eclipse.debug.core.sourcelookup.ISourceContainerTypeDelegate; -import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; - -/** - * A source container implementation that wraps V8 virtual project. Currently virtual project - * has a flat file structure, so the container is accordingly one-level. - *

- * Unlike other implementation of {@link ISourceContainer} this class initially gets instantiated - * with no data. In this state it serves as an empty container because actual VM scripts are - * not available yet. Launch configuration UI will use it in this state more as a symbolic - * place-holder in sources tab. Later when VM is connected, method - * {@link #init(ISourceLookupDirector)} will be called and the actual content will be set. - */ -public class VProjectSourceContainer implements ISourceContainer { - - private static final String TYPE_ID = - "org.chromium.debug.core.VProjectSourceContainer.type"; //$NON-NLS-1$ - - private ChromiumSourceDirector chromiumSourceDirector = null; - - VProjectSourceContainer() { - } - - public void init(ISourceLookupDirector director) { - if (director instanceof ChromiumSourceDirector) { - chromiumSourceDirector = (ChromiumSourceDirector) director; - } - } - - public void dispose() { - } - - public Object[] findSourceElements(String name) { - if (chromiumSourceDirector == null) { - return new Object[0]; - } - ResourceManager resourceManager = chromiumSourceDirector.getResourceManager(); - LookupResult lookupResult = new LookupResult(resourceManager); - return new Object[] { lookupResult }; - } - - public String getName() { - IProject project = null; - if (chromiumSourceDirector != null) { - project = chromiumSourceDirector.getProject(); - } - if (project == null) { - return Messages.VProjectSourceContainer_DEFAULT_TYPE_NAME; - } else { - return project.getName(); - } - } - - public ISourceContainer[] getSourceContainers() { - return null; - } - - public ISourceContainerType getType() { - return DebugPlugin.getDefault().getLaunchManager().getSourceContainerType(TYPE_ID); - } - - public boolean isComposite() { - return false; - } - - public VmResourceId findScriptId(IFile resource) { - if (chromiumSourceDirector == null) { - throw new IllegalStateException(); - } - return chromiumSourceDirector.getResourceManager().getResourceId(resource); - } - - public Object getAdapter(Class adapter) { - return null; - } - - /** - * A type delegate that implements a trivial memento. We do not save any actual data here, - * because it all should be derived from a current VM launch. - */ - public static class TypeDelegate implements ISourceContainerTypeDelegate { - public ISourceContainer createSourceContainer(String memento) throws CoreException { - return new VProjectSourceContainer(); - } - - public String getMemento(ISourceContainer container) throws CoreException { - return "VProjectSourceContainer.memento.stub"; //$NON-NLS-1$ - } - } - - /** - * Result that {@link VProjectSourceContainer#findSourceElements(String)} returns instead of - * IFile that other containers normally return. This result is could be converted to file - * later in {@link ChromiumSourceDirector} where scriptId is available. - *

If source director failed to process result, the back-up strategy could be to do - * something in our implementation of ISourcePresentation. - * - */ - public static class LookupResult { - private final ResourceManager resourceManager; - - LookupResult(ResourceManager resourceManager) { - this.resourceManager = resourceManager; - } - - public VmResource getVmResource(VmResourceId resourceId) { - return resourceManager.getVmResource(resourceId); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileStore.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileStore.java deleted file mode 100755 index 65d0b234..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileStore.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.efs; - -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; - -import org.eclipse.core.filesystem.IFileInfo; -import org.eclipse.core.filesystem.IFileStore; -import org.eclipse.core.filesystem.provider.FileStore; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; - -/** - * A script file store. Delegates all operations to the ChromiumScriptStorage - * instance. - */ -public class ChromiumScriptFileStore extends FileStore { - - /** The filesystem storage. */ - private static final ChromiumScriptStorage STORAGE = ChromiumScriptStorage.getInstance(); - - /** The host filesystem of this resource. */ - private final ChromiumScriptFileSystem fileSystem; - - /** The resource path in the filesystem. */ - private final IPath path; - - /** - * Constructs a proxy for a real resource (which might not exist). - * - * @param fileSystem that stores the resource - * @param path of the resource - */ - public ChromiumScriptFileStore(ChromiumScriptFileSystem fileSystem, IPath path) { - this.fileSystem = fileSystem; - this.path = path; - } - - @Override - public String[] childNames(int options, IProgressMonitor monitor) throws CoreException { - return STORAGE.childNames(this.path); - } - - @Override - public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException { - return STORAGE.fetchInfo(path, options); - } - - @Override - public IFileStore getChild(String name) { - return fileSystem.getStore(path.append(name)); - } - - @Override - public String getName() { - if (path.isEmpty()) { - return "ROOT"; //$NON-NLS-1$ - } - return path.lastSegment(); - } - - @Override - public IFileStore getParent() { - if (path.segmentCount() == 0) { - return null; - } - return new ChromiumScriptFileStore(fileSystem, path.removeLastSegments(1)); - } - - @Override - public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException { - return STORAGE.openInputStream(path, options); - } - - @Override - public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException { - return STORAGE.openOutputStream(path, options); - } - - @Override - public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException { - STORAGE.mkdir(path, options); - return this; - } - - @Override - public URI toURI() { - return ChromiumScriptFileSystem.getFileStoreUri(path); - } - - @Override - public void delete(int options, IProgressMonitor monitor) throws CoreException { - STORAGE.delete(path, options); - } - - @Override - public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException { - STORAGE.putInfo(path, info, options); - } - -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileSystem.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileSystem.java deleted file mode 100755 index 0de28330..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptFileSystem.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.efs; - -import java.net.URI; -import java.net.URISyntaxException; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.filesystem.IFileStore; -import org.eclipse.core.filesystem.provider.FileSystem; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; - -/** - * An in-memory filesystem for remote scripts. - * The supported URLs are {@code chromiumdebug:///resource_path}. - */ -public class ChromiumScriptFileSystem extends FileSystem { - - /** All file URLs in this filesystem have this scheme. */ - private static final String CHROMIUMDEBUG_SCHEME = "chromiumdebug"; //$NON-NLS-1$ - - @Override - public IFileStore getStore(URI uri) { - return new ChromiumScriptFileStore(this, toPath(uri)); - } - - public IFileStore getStore(IPath path) { - return getStore(toUri(path)); - } - - /** - * Constructs a URI by a path. - * - * @param path of a filesystem resource - * @return a URI corresponding to the given {@code path} - */ - public static URI getFileStoreUri(IPath path) { - try { - return new URI(CHROMIUMDEBUG_SCHEME, null, path.toPortableString(), null); - } catch (URISyntaxException e) { - ChromiumDebugPlugin.log(e); - return null; - } - } - - public static boolean isChromiumDebugURI(URI uri) { - return CHROMIUMDEBUG_SCHEME.equals(uri.getScheme()); - } - - /** - * Converts a chromiumdebug FS FileStore URI into a path relative to the FS root. - * - * @param uri to convert - * @return the path corresponding to the uri - */ - static IPath toPath(URI uri) { - return Path.fromPortableString(uri.getPath()).setDevice(null); - } - - /** - * Converts a chromiumdebug FS FileStore path into a FS URI. - * - * @param path to convert - * @return the URI corresponding to the given path - */ - static URI toUri(IPath path) { - try { - return new URI(CHROMIUMDEBUG_SCHEME, null, path.toPortableString(), null); - } catch (URISyntaxException e) { - return null; - } - } - -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptStorage.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptStorage.java deleted file mode 100755 index 8f82e35b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/efs/ChromiumScriptStorage.java +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.efs; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.filesystem.EFS; -import org.eclipse.core.filesystem.IFileInfo; -import org.eclipse.core.filesystem.provider.FileInfo; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; - -/** - * A memory-based storage for browser scripts. All resource-related EFS - * operations are delegated into here. - */ -public class ChromiumScriptStorage { - - /** - * The filesystem root path. - */ - // This one should go before INSTANCE. - private static final IPath ROOT_PATH = new Path(null, ""); //$NON-NLS-1$ - - private static final ChromiumScriptStorage INSTANCE = new ChromiumScriptStorage(); - - public static ChromiumScriptStorage getInstance() { - return INSTANCE; - } - - private static abstract class CommonNode { - final IPath path; - - final FileInfo info; - - final CommonNode parent; - - CommonNode(IPath path, FolderNode parent, boolean isDirectory) { - this.path = path; - this.parent = parent; - this.info = new FileInfo(path.lastSegment()); - this.info.setDirectory(isDirectory); - this.info.setExists(true); - if (parent != null) { - parent.add(this); - } - } - - String getName() { - return info.getName(); - } - - boolean isFile() { - return !info.isDirectory(); - } - - } - - private static class RootNode extends FolderNode { - RootNode() { - super(ROOT_PATH, null); - if (parent != null) { - throw new IllegalArgumentException("Parent must be null, was: " + parent); //$NON-NLS-1$ - } - } - - @Override - synchronized void add(CommonNode node) { - if (node.isFile()) { - throw new IllegalArgumentException("Cannot add files to the root"); //$NON-NLS-1$ - } - super.add(node); - } - - } - - /** - * Contains other nodes. - */ - private static class FolderNode extends CommonNode { - private final Map children = - Collections.synchronizedMap(new HashMap()); - - FolderNode(IPath path, FolderNode parent) { - super(path, parent, true); - } - - void add(CommonNode node) { - children.put(node.getName(), node); - } - - void remove(String name) { - // System.out.println(this.hashCode() + " removing " + name); - CommonNode removedNode = children.remove(name); - if (removedNode != null) { - removedNode.info.setExists(false); - } - } - } - - private static class FileNode extends CommonNode { - private static final byte[] EMPTY_BYTES = new byte[0]; - - protected volatile byte[] contents = EMPTY_BYTES; - - FileNode(IPath path, FolderNode parent) { - super(path, parent, false); - } - - synchronized InputStream getInputStream() { - return new ByteArrayInputStream(contents); - } - - synchronized OutputStream getOutputStream(final int options) { - return new ByteArrayOutputStream() { - @Override - public void close() throws IOException { - super.close(); - byte[] data; - if ((options & EFS.APPEND) == 0) { - data = this.toByteArray(); - } else { - byte[] outputData = this.toByteArray(); - data = new byte[contents.length + this.size()]; - System.arraycopy(contents, 0, data, 0, contents.length); - System.arraycopy(outputData, 0, data, contents.length, outputData.length); - } - setFileContents(data); - } - }; - - } - - protected synchronized void setFileContents(byte[] data) { - contents = data; - info.setLength(data.length); - info.setLastModified(System.currentTimeMillis()); - info.setExists(true); - } - - } - - private static final String[] EMPTY_NAMES = new String[0]; - - private final RootNode ROOT = new RootNode(); - - private CommonNode find(IPath path) { - if (path == null) { - return null; - } - CommonNode currentNode = ROOT; - // invariant: node(path[i]) is a folder - for (int i = 0, length = path.segmentCount(); i < length; i++) { - // > 1 segments - if (currentNode == null || currentNode.isFile()) { - // currentNode is not an existing folder - return null; - } - // currentNode is a folder - currentNode = ((FolderNode) currentNode).children.get(path.segment(i)); - } - return currentNode; - } - - String[] childNames(IPath path) { - Map childrenMap = childNodes(path); - if (childrenMap == null) { - return EMPTY_NAMES; - } - return childrenMap.keySet().toArray(EMPTY_NAMES); - } - - OutputStream openOutputStream(IPath path, int options) throws CoreException { - CommonNode node = find(path); - if (node == null) { // file does not exist - if (path.segmentCount() > 0) { - CommonNode parent = find(getParentPath(path)); - if (parent != null && !parent.isFile()) { - FileNode fileNode = createFile(path, parent); - return fileNode.getOutputStream(options); - } else { - throw newCoreException("Bad store path (no parent folder), child=" + path, null); //$NON-NLS-1$ - } - } else { - throw newCoreException("Cannot open OutputStream for the Root", null); //$NON-NLS-1$ - } - } - if (node.isFile()) { - return ((FileNode) node).getOutputStream(options); - } else { - throw newCoreException("Cannot open a directory for writing: " + path, null); //$NON-NLS-1$ - } - } - - void mkdir(IPath path, int options) throws CoreException { - CommonNode node = find(path); - if (node != null || path.segmentCount() == 0) { // folder exists - return; - } - IPath parentPath = getParentPath(path); - // parentPath will not be null due to the check above - CommonNode parentNode = find(parentPath); - if ((options & EFS.SHALLOW) != 0) { - IPath chainPath = ROOT_PATH; - CommonNode childNode = null; - parentNode = find(ROOT_PATH); - for (int i = 0, length = path.segmentCount(); i < length; i++) { - chainPath = chainPath.append(path.segment(i)); - childNode = find(chainPath); - if (childNode == null) { - createFolder(chainPath, parentNode); - parentNode = childNode; - continue; - } - if (childNode.isFile()) { - throw newCoreException("File encountered in the path: " + chainPath, null); //$NON-NLS-1$ - } - } - } else { - if (parentNode == null) { - throw newCoreException("Parent does not exist, child=" + path, null); //$NON-NLS-1$ - } - // not shallow and parent exists - if (!parentNode.isFile()) { - createFolder(path, parentNode); - } else { - throw newCoreException("Parent is a file: " + parentNode.path, null); //$NON-NLS-1$ - } - } - } - - void delete(IPath path, int options) throws CoreException { - CommonNode parent = find(getParentPath(path)); - if (parent == null) { - return; - } - if (parent.isFile()) { - throw newCoreException("Parent is not a directory: " + getParentPath(path), null); //$NON-NLS-1$ - } - FolderNode parentFolder = (FolderNode) parent; - parentFolder.remove(path.lastSegment()); - } - - InputStream openInputStream(IPath path, int options) throws CoreException { - CommonNode node = find(path); - if (node == null) { - throw newCoreException("File not found: " + path, null); //$NON-NLS-1$ - } - if (!node.isFile()) { - throw newCoreException("Cannot open InputStream on directory: " + path, null); //$NON-NLS-1$ - } - return ((FileNode) node).getInputStream(); - } - - IFileInfo fetchInfo(IPath path, int options) { - CommonNode node = find(path); - if (node == null) { - FileInfo fileInfo = new FileInfo(path.lastSegment()); - fileInfo.setExists(false); - return fileInfo; - } else { - return node.info; - } - } - - void putInfo(IPath path, IFileInfo info, int options) throws CoreException { - CommonNode node = find(path); - if (node == null) { - throw newCoreException("The store does not exist: " + path, null); //$NON-NLS-1$ - } else { - if ((options & EFS.SET_ATTRIBUTES) != 0) { - copyAttribute(info, node.info, EFS.ATTRIBUTE_ARCHIVE); - copyAttribute(info, node.info, EFS.ATTRIBUTE_EXECUTABLE); - copyAttribute(info, node.info, EFS.ATTRIBUTE_HIDDEN); - copyAttribute(info, node.info, EFS.ATTRIBUTE_LINK_TARGET); - copyAttribute(info, node.info, EFS.ATTRIBUTE_READ_ONLY); - } - if ((options & EFS.SET_LAST_MODIFIED) != 0) { - node.info.setLastModified(info.getLastModified()); - } - } - } - - private static void copyAttribute(IFileInfo from, IFileInfo to, int attribute) { - to.setAttribute(attribute, from.getAttribute(attribute)); - } - - private static CoreException newCoreException(String message, Throwable cause) { - return new CoreException( - new Status(Status.ERROR, ChromiumDebugPlugin.PLUGIN_ID, message, cause)); - } - - private static IPath getParentPath(IPath path) { - if (path.segmentCount() == 0) { - return null; - } - return path.removeLastSegments(1); - } - - private static void createFolder(IPath path, CommonNode parentNode) { - new FolderNode(path, (FolderNode) parentNode); - } - - private static FileNode createFile(IPath path, CommonNode parent) { - return new FileNode(path, (FolderNode) parent); - } - - private Map childNodes(IPath parent) { - CommonNode node = find(parent); - if (node == null || node.isFile()) { - return null; - } - return ((FolderNode) node).children; - } - -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/messages.properties b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/messages.properties deleted file mode 100755 index 89b06b02..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/messages.properties +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -ChromiumDebugPlugin_InternalError=Internal Error -ChromiumSourceDirector_WARNING_TEXT_PATTERN=You are running in ''auto-detect'' source look-up mode.\n\ - However the connected JavaScript VM (version="{0}") does not support it.\n\ - You won''t be able to set breakpoints except for scripts in virtual project.\n\ - \n\ - It is recommended that you switch to ''exact match' look-up mode (or get newer version of JavaScript VM). -ChromiumSourceDirector_WARNING_TITLE=Auto-Detect Source Look-Up Mode Problem -SourceNameMapperContainer_NAME=Source mapper with prefix {0} -VProjectSourceContainer_DEFAULT_TYPE_NAME=Remote V8/Chrome Scripts diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ArrayValue.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ArrayValue.java deleted file mode 100755 index aecae87b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ArrayValue.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.Collections; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; - -import org.chromium.sdk.JsArray; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IIndexedValue; -import org.eclipse.debug.core.model.IVariable; - -/** - * An IIndexedValue implementation for an array element range using a JsArray - * instance. - */ -public class ArrayValue extends Value implements IIndexedValue { - - private final AtomicReference elementsRef = new AtomicReference(null); - - public ArrayValue(EvaluateContext evaluateContext, JsArray array, - ValueBase.ValueAsHostObject hostObject) { - super(evaluateContext, array, hostObject); - } - - private IVariable[] createElements() { - JsArray jsArray = (JsArray) getJsValue(); - return StackFrame.wrapVariables(getEvaluateContext(), jsArray.getProperties(), - ARRAY_HIDDEN_PROPERTY_NAMES, - // Do not show internal properties for arrays (this may be an option). - null, getHostObject(), null); - } - - private IVariable[] getElements() { - IVariable[] result = elementsRef.get(); - if (result == null) { - result = createElements(); - elementsRef.compareAndSet(null, result); - return elementsRef.get(); - } else { - return result; - } - } - - public int getInitialOffset() { - return 0; - } - - public int getSize() throws DebugException { - return getElements().length; - } - - public IVariable getVariable(int offset) throws DebugException { - return getElements()[offset]; - } - - public IVariable[] getVariables(int offset, int length) throws DebugException { - IVariable[] result = new IVariable[length]; - System.arraycopy(getElements(), offset, result, 0, length); - return result; - } - - @Override - public IVariable[] getVariables() throws DebugException { - return getElements(); - } - - @Override - public boolean hasVariables() throws DebugException { - return getElements().length > 0; - } - - private static final Set ARRAY_HIDDEN_PROPERTY_NAMES = Collections.singleton("length"); -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointAdapterFactory.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointAdapterFactory.java deleted file mode 100755 index 14072ce3..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointAdapterFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget; -import org.eclipse.ui.texteditor.ITextEditor; - -/** - * Factory of LineBreakpointAdapters for browser scripts. - */ -public class BreakpointAdapterFactory implements IAdapterFactory { - - @SuppressWarnings("unchecked") - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adaptableObject instanceof ITextEditor) { - ITextEditor editorPart = (ITextEditor) adaptableObject; - IResource resource = - (IResource) editorPart.getEditorInput().getAdapter(IResource.class); - if (resource != null) { - String extension = resource.getFileExtension(); - if (extension != null && ChromiumDebugPluginUtil.SUPPORTED_EXTENSIONS.contains(extension)) { - return new LineBreakpointAdapter.ForVirtualProject(); - } - } - } - return null; - } - - @SuppressWarnings("unchecked") - public Class[] getAdapterList() { - return new Class[] { IToggleBreakpointsTarget.class }; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointInTargetMap.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointInTargetMap.java deleted file mode 100644 index 6ec5870b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointInTargetMap.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import static org.chromium.sdk.util.BasicUtil.getSafe; -import static org.chromium.sdk.util.BasicUtil.removeSafe; - -import java.util.HashMap; -import java.util.Map; - -/** - * A one-to-one map between SDK and UI breakpoints inside one debug target. - */ -public class BreakpointInTargetMap { - private final Map sdkToUiMap = new HashMap(); - private final Map uiToSdkMap = new HashMap(); - - public BreakpointInTargetMap() { - } - - public synchronized SDK getSdkBreakpoint(UI uiBreakpoint) { - return getSafe(uiToSdkMap, uiBreakpoint); - } - - public synchronized UI getUiBreakpoint(SDK sdkBreakpoint) { - return getSafe(sdkToUiMap, sdkBreakpoint); - } - - public synchronized void add(SDK sdkBreakpoint, UI uiBreakpoint) { - Object conflict1 = uiToSdkMap.put(uiBreakpoint, sdkBreakpoint); - Object conflict2 = sdkToUiMap.put(sdkBreakpoint, uiBreakpoint); - if (conflict1 != null || conflict2 != null) { - throw new RuntimeException(); - } - } - - public synchronized void remove(UI uiBreakpoint) { - SDK sdkBreakpoint = removeSafe(uiToSdkMap, uiBreakpoint); - if (sdkBreakpoint == null) { - throw new RuntimeException(); - } - removeSafe(sdkToUiMap, sdkBreakpoint); - } - - public synchronized void clear() { - sdkToUiMap.clear(); - uiToSdkMap.clear(); - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java deleted file mode 100644 index 34ecf8a5..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/BreakpointSynchronizer.java +++ /dev/null @@ -1,731 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import static org.chromium.sdk.util.BasicUtil.getSafe; -import static org.chromium.sdk.util.BasicUtil.removeSafe; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.ChromiumSourceDirector; -import org.chromium.debug.core.ScriptNameManipulator.ScriptNamePattern; -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.chromium.sdk.Breakpoint; -import org.chromium.sdk.BreakpointTypeExtension; -import org.chromium.sdk.CallbackSemaphore; -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.RelayOk; -import org.chromium.sdk.SyncCallback; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.MultiStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.model.IBreakpoint; - -/** - * A class responsible for comparing breakpoints in workspace and on remote VM and synchronizing - * them in both directions. {@link Direction#RESET_REMOTE} allows several synchronization - * jobs to different VMs. - */ -public class BreakpointSynchronizer { - private final JavascriptVm javascriptVm; - private final ChromiumSourceDirector sourceDirector; - private final BreakpointHelper breakpointHelper; - private final String debugModelId; - - public BreakpointSynchronizer(JavascriptVm javascriptVm, - ChromiumSourceDirector sourceDirector, BreakpointHelper breakpointHelper, - String debugModelId) { - this.javascriptVm = javascriptVm; - this.sourceDirector = sourceDirector; - this.breakpointHelper = breakpointHelper; - this.debugModelId = debugModelId; - } - - /** - * Describes a direction the breakpoint synchronization should be performed in. - */ - public enum Direction { - - /** - * All breakpoints in remote VM/VMs are cleared/updated/created to conform to breakpoints in - * Eclipse workspace. - */ - RESET_REMOTE, - - /** - * All breakpoints in local workspace are cleared/updated/created to conform to breakpoints in - * remote VM (not applicable for multiple VMs). - */ - RESET_LOCAL, - - /** - * Breakpoints are created locally or remotely or tied together so that every breakpoint - * has a counterpart on other side. - */ - MERGE - } - - /** - * Additional interface used by {@link BreakpointSynchronizer}. - */ - public interface BreakpointHelper { - /** - * Create breakpoint on remote VM (asynchronously) and link it to uiBreakpoint. - */ - RelayOk createBreakpointOnRemote(ChromiumLineBreakpoint uiBreakpoint, - VmResourceRef vmResourceRef, - CreateCallback createCallback, SyncCallback syncCallback) throws CoreException; - - BreakpointInTargetMap getLineBreakpointMap(); - - void registerExceptionBreakpoint(Collection breakpoints); - - interface CreateCallback { - void failure(Exception ex); - void success(); - } - } - - public interface Callback { - void onDone(IStatus status); - } - - /** - * The main entry method of the class. Asynchronously performs synchronization job. - */ - public void syncBreakpoints(Direction direction, Callback callback) { - ReportBuilder reportBuilder = new ReportBuilder(direction); - StatusBuilder statusBuilder = new StatusBuilder(callback, reportBuilder); - - statusBuilder.plan(UNCODITIONALLY_RELAY_TO_REST_OF_METHOD_OK); - Exception ex = null; - try { - syncBreakpointsImpl(direction, statusBuilder); - } catch (RuntimeException e) { - ex = e; - } finally { - statusBuilder.done(ex); - } - } - - private static final RelayOk UNCODITIONALLY_RELAY_TO_REST_OF_METHOD_OK = new RelayOk() {}; - - private void syncBreakpointsImpl(final Direction direction, final StatusBuilder statusBuilder) { - // Collect the remote breakpoints. - Collection sdkBreakpoints = readSdkBreakpoints(javascriptVm); - // Collect all local breakpoints. - ChromiumBreakpointsFiltered uiBreakpoints = getUiBreakpoints(); - - List lineSdkBreakpoints = new ArrayList(sdkBreakpoints.size()); - - if (direction != Direction.MERGE) { - breakpointHelper.getLineBreakpointMap().clear(); - } - - // Throw away all already linked breakpoints and put remaining into lineSdkBreakpoints list. - for (Breakpoint sdkBreakpoint : sdkBreakpoints) { - ChromiumLineBreakpoint uiBreakpoint = - breakpointHelper.getLineBreakpointMap().getUiBreakpoint(sdkBreakpoint); - if (uiBreakpoint == null) { - // No mapping. Schedule for further processing. - lineSdkBreakpoints.add(sdkBreakpoint); - } else { - // There is a live mapping. This set should also contain this breakpoint. - removeSafe(uiBreakpoints.getLineBreakpoints(), uiBreakpoint); - statusBuilder.getReportBuilder().increment(ReportBuilder.Property.LINKED); - } - } - - // Sort all breakpoints by (script_name, line_number). - SortedBreakpoints sortedUiBreakpoints = - sortBreakpoints(uiBreakpoints.getLineBreakpoints(), uiBreakpointHandler); - SortedBreakpoints sortedSdkBreakpoints = - sortBreakpoints(lineSdkBreakpoints, sdkBreakpointHandler); - - BreakpointMerger breakpointMerger = - new BreakpointMerger(direction, breakpointHelper.getLineBreakpointMap()); - - // Find all unlinked breakpoints on both sides. - mergeBreakpoints(breakpointMerger, sortedUiBreakpoints, sortedSdkBreakpoints); - - List sdkBreakpointsToDelete; - List sdkBreakpointsToCreate; - List uiBreakpointsToDelete; - List uiBreakpointsToCreate; - - // Plan actions for all breakpoints without pair. - if (direction == Direction.RESET_REMOTE) { - sdkBreakpointsToDelete = breakpointMerger.getMissingSdk(); - sdkBreakpointsToCreate = Collections.emptyList(); - } else { - sdkBreakpointsToCreate = breakpointMerger.getMissingSdk(); - sdkBreakpointsToDelete = Collections.emptyList(); - } - - if (direction == Direction.RESET_LOCAL) { - uiBreakpointsToDelete = breakpointMerger.getMissingUi(); - uiBreakpointsToCreate = Collections.emptyList(); - } else { - uiBreakpointsToCreate = breakpointMerger.getMissingUi(); - uiBreakpointsToDelete = Collections.emptyList(); - } - - // First delete everything, then create (we may need to re-create some breakpoints, so order - // is significant). - deteleBreakpoints(sdkBreakpointsToDelete, uiBreakpointsToDelete, statusBuilder); - createBreakpoints(sdkBreakpointsToCreate, uiBreakpointsToCreate, statusBuilder); - - breakpointHelper.registerExceptionBreakpoint(uiBreakpoints.getExceptionBreakpoints()); - } - - private void deteleBreakpoints(List sdkBreakpointsToDelete, - List uiBreakpointsToDelete, final StatusBuilder statusBuilder) { - for (Breakpoint sdkBreakpoint : sdkBreakpointsToDelete) { - final PlannedTaskHelper deleteTaskHelper = new PlannedTaskHelper(statusBuilder); - JavascriptVm.BreakpointCallback callback = new JavascriptVm.BreakpointCallback() { - public void failure(String errorMessage) { - deleteTaskHelper.setException(new Exception(errorMessage)); - } - public void success(Breakpoint breakpoint) { - statusBuilder.getReportBuilder().increment(ReportBuilder.Property.DELETED_ON_REMOTE); - } - }; - RelayOk relayOk = sdkBreakpoint.clear(callback, deleteTaskHelper); - deleteTaskHelper.registerSelf(relayOk); - } - for (ChromiumLineBreakpoint uiBreakpoint : uiBreakpointsToDelete) { - ChromiumLineBreakpoint.getIgnoreList().add(uiBreakpoint); - try { - try { - uiBreakpoint.delete(); - } catch (CoreException e) { - throw new RuntimeException(e); - } - } finally { - ChromiumLineBreakpoint.getIgnoreList().remove(uiBreakpoint); - } - statusBuilder.getReportBuilder().increment(ReportBuilder.Property.DELETED_LOCALLY); - } - } - - private void createBreakpoints(List sdkBreakpointsToCreate, - List uiBreakpointsToCreate, final StatusBuilder statusBuilder) { - IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); - for (Breakpoint sdkBreakpoint : sdkBreakpointsToCreate) { - Object sourceElement = sourceDirector.getSourceElement(sdkBreakpoint); - if (sourceElement instanceof IFile == false) { - statusBuilder.getReportBuilder().addProblem( - ReportBuilder.Problem.UNRESOLVED_REMOTE_BREAKPOINT, - sdkBreakpoint.getTarget().accept(ChromiumDebugPluginUtil.BREAKPOINT_TARGET_TO_STRING)); - continue; - } - // We do not actually support working files for scripts with offset. - int script_line_offset = 0; - IFile resource = (IFile) sourceElement; - ChromiumLineBreakpoint uiBreakpoint; - try { - uiBreakpoint = ChromiumLineBreakpoint.Helper.createLocal( - sdkBreakpoint, breakpointManager, resource, script_line_offset, debugModelId); - breakpointHelper.getLineBreakpointMap().add(sdkBreakpoint, uiBreakpoint); - } catch (CoreException e) { - throw new RuntimeException(e); - } - statusBuilder.getReportBuilder().increment(ReportBuilder.Property.CREATED_LOCALLY); - } - for (ChromiumLineBreakpoint uiBreakpoint : uiBreakpointsToCreate) { - VmResourceRef vmResourceRef = uiBreakpointHandler.getVmResourceRef(uiBreakpoint); - if (vmResourceRef == null) { - // Actually we should not get here, because getScript call succeeded before. - continue; - } - - final PlannedTaskHelper createTaskHelper = new PlannedTaskHelper(statusBuilder); - BreakpointHelper.CreateCallback createCallback = new BreakpointHelper.CreateCallback() { - public void success() { - statusBuilder.getReportBuilder().increment(ReportBuilder.Property.CREATED_ON_REMOTE); - } - public void failure(Exception ex) { - createTaskHelper.setException(ex); - } - }; - try { - RelayOk relayOk = breakpointHelper.createBreakpointOnRemote(uiBreakpoint, vmResourceRef, - createCallback, createTaskHelper); - createTaskHelper.registerSelf(relayOk); - } catch (CoreException e) { - statusBuilder.addOnStartException(e); - } - } - } - - private static class BreakpointMerger extends Merger { - private final Direction direction; - private final List missingUi = new ArrayList(); - private final List missingSdk = new ArrayList(); - private final BreakpointInTargetMap breakpointMap; - - BreakpointMerger(Direction direction, - BreakpointInTargetMap breakpointMap) { - this.direction = direction; - this.breakpointMap = breakpointMap; - } - @Override - void both(ChromiumLineBreakpoint v1, Breakpoint v2) { - if (direction == Direction.MERGE) { - breakpointMap.add(v2, v1); - } else { - onlyFirst(v1); - onlySecond(v2); - } - } - @Override - void onlyFirst(ChromiumLineBreakpoint v1) { - missingUi.add(v1); - } - @Override - void onlySecond(Breakpoint v2) { - missingSdk.add(v2); - } - List getMissingUi() { - return missingUi; - } - List getMissingSdk() { - return missingSdk; - } - } - - /** - * A class responsible for creating a summary status of synchronization operation. The status - * is created once all asynchronous jobs have finished. Each job first registers itself - * via {@link #plan()} method and - * later reports its result via {@link #done(Exception)} method. - * When the last job is reporting its finishing, the status gets built and sent to - * {@link #callback}. If no exceptions were registered, - * status contains text report from {@link ReportBuilder}. - */ - private static class StatusBuilder { - private final Callback callback; - private int plannedNumber = 0; - private final List exceptions = new ArrayList(0); - private boolean alreadyReported = false; - private final ReportBuilder reportBuilder; - - StatusBuilder(Callback callback, ReportBuilder reportBuilder) { - this.callback = callback; - this.reportBuilder = reportBuilder; - } - - ReportBuilder getReportBuilder() { - return reportBuilder; - } - - public synchronized void plan(RelayOk relayOk) { - if (alreadyReported) { - throw new IllegalStateException(); - } - plannedNumber++; - } - - public void done(Exception ex) { - boolean timeToReport = doneImpl(ex); - if (timeToReport) { - reportResult(); - } - } - - public synchronized void addOnStartException(Exception ex) { - exceptions.add(ex); - } - - private synchronized boolean doneImpl(Exception ex) { - if (ex != null) { - exceptions.add(ex); - } - plannedNumber--; - if (plannedNumber == 0) { - if (!alreadyReported) { - alreadyReported = true; - return true; - } - } - return false; - } - - private void reportResult() { - IStatus status; - if (exceptions.isEmpty()) { - status = new Status(IStatus.OK, ChromiumDebugPlugin.PLUGIN_ID, - "Breakpoint synchronization done: " + reportBuilder.build(), null); //$NON-NLS-1$ - } else { - IStatus[] subStatuses = new IStatus[exceptions.size()]; - for (int i = 0 ; i < subStatuses.length; i++) { - subStatuses[i] = new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID, - exceptions.get(i).getMessage(), exceptions.get(i)); - } - status = new MultiStatus(ChromiumDebugPlugin.PLUGIN_ID, IStatus.ERROR, subStatuses, - "Breakpoint synchronization errors", null); //$NON-NLS-1$ - } - if (callback != null) { - callback.onDone(status); - } - } - } - - private static class PlannedTaskHelper implements SyncCallback { - private final StatusBuilder statusBuilder; - private volatile Exception exception = null; - PlannedTaskHelper(StatusBuilder statusBuilder) { - this.statusBuilder = statusBuilder; - } - void registerSelf(RelayOk relayOk) { - statusBuilder.plan(relayOk); - } - public void callbackDone(RuntimeException e) { - if (e != null) { - exception = e; - } - statusBuilder.done(exception); - } - void setException(Exception ex) { - exception = ex; - } - } - - /** - * A class that contains several conunters. - */ - private static class ReportBuilder { - enum Property { - LINKED, - CREATED_LOCALLY, - DELETED_LOCALLY, - CREATED_ON_REMOTE, - DELETED_ON_REMOTE; - String getVisibleName() { - return toString(); - } - } - - enum Problem { - UNRESOLVED_REMOTE_BREAKPOINT; - String getVisibleName() { - return toString(); - } - } - - private final Direction direction; - private final Map counters; - private final Map> problems; - - ReportBuilder(Direction direction) { - this.direction = direction; - counters = new EnumMap(Property.class); - for (Property property : Property.class.getEnumConstants()) { - counters.put(property, new AtomicInteger(0)); - } - problems = new HashMap>(1); - } - - public void increment(Property property) { - counters.get(property).addAndGet(1); - } - - public synchronized void addProblem(Problem problem, String message) { - List list = getSafe(problems, problem); - if (list == null) { - list = new ArrayList(); - problems.put(problem, list); - } - list.add(message); - } - - public String build() { - StringBuilder builder = new StringBuilder(); - builder.append("direction=").append(direction); //$NON-NLS-1$ - for (Map.Entry en : counters.entrySet()) { - int number = en.getValue().get(); - if (number == 0) { - continue; - } - builder.append(" ").append(en.getKey().getVisibleName()); //$NON-NLS-1$ - builder.append("=").append(number); //$NON-NLS-1$ - } - if (!problems.isEmpty()) { - builder.append('\n').append(problems.toString()); - } - return builder.toString(); - } - } - - /** - * A handler for properties of breakpoint type B that helps reading them. - */ - private static abstract class PropertyHandler { - /** @return vm resource name or null */ - abstract VmResourceRef getVmResourceRef(B breakpoint); - /** @return 0-based number */ - abstract long getLineNumber(B breakpoint); - } - - private final PropertyHandler uiBreakpointHandler = - new PropertyHandler() { - @Override - long getLineNumber(ChromiumLineBreakpoint chromiumLineBreakpoint) { - int lineNumber; - try { - // TODO(peter.rybin): Consider supporting inline scripts here. - return chromiumLineBreakpoint.getLineNumber() - 1; - } catch (CoreException e) { - throw new RuntimeException(e); - } - } - - @Override - VmResourceRef getVmResourceRef(ChromiumLineBreakpoint chromiumLineBreakpoint) { - IMarker marker = chromiumLineBreakpoint.getMarker(); - if (marker == null) { - return null; - } - IResource resource = marker.getResource(); - if (resource instanceof IFile == false) { - return null; - } - IFile file = (IFile) resource; - try { - return sourceDirector.findVmResourceRef(file); - } catch (CoreException e) { - throw new RuntimeException("Failed to read script name from breakpoint", e); //$NON-NLS-1$ - } - } - }; - - private static final PropertyHandler sdkBreakpointHandler = - new PropertyHandler() { - @Override - long getLineNumber(Breakpoint breakpoint) { - return breakpoint.getLineNumber(); - } - - @Override - VmResourceRef getVmResourceRef(Breakpoint breakpoint) { - return breakpoint.getTarget().accept(resourceRefVisitor); - } - - private final Breakpoint.Target.Visitor resourceRefVisitor = - new BreakpointTypeExtension.ScriptRegExpSupport.Visitor() { - @Override - public VmResourceRef visitScriptName(String scriptName) { - return VmResourceRef.forVmResourceId(new VmResourceId(scriptName, null)); - } - - @Override - public VmResourceRef visitScriptId(Object scriptId) { - return VmResourceRef.forVmResourceId(new VmResourceId(null, scriptId)); - } - - @Override - public VmResourceRef visitRegExp(String regExp) { - if (regExp == null) { - return null; - } - ScriptNamePattern pattern = new ScriptNamePattern(regExp); - return VmResourceRef.forRegExpBased(pattern); - } - - @Override - public VmResourceRef visitUnknown(Breakpoint.Target target) { - return null; - } - }; - }; - - /** - * A helping structure that holds field of complicated type. - */ - private static class SortedBreakpoints { - final Map> data; - - SortedBreakpoints(Map> data) { - this.data = data; - } - } - - /** - * Put all breakpoints into map script_name -> line_number -> breakpoint. - */ - private static SortedBreakpoints sortBreakpoints(Collection breakpoints, - PropertyHandler handler) { - Map> result = new HashMap>(); - for (B breakpoint : breakpoints) { - VmResourceRef vmResourceRef = handler.getVmResourceRef(breakpoint); - if (vmResourceRef == null) { - continue; - } - Map subMap = getSafe(result, vmResourceRef); - if (subMap == null) { - subMap = new HashMap(3); - result.put(vmResourceRef, subMap); - } - long line = handler.getLineNumber(breakpoint); - // For simplicity we ignore multiple breakpoints on the same line. - subMap.put(line, breakpoint); - } - return new SortedBreakpoints(result); - } - - /** - * A class that implements merge operation for a particular complete/incomplete pair of values. - */ - private static abstract class Merger { - abstract void onlyFirst(V1 v1); - abstract void onlySecond(V2 v2); - abstract void both(V1 v1, V2 v2); - } - - /** - * Merges values of 2 maps. - * @param map2 must implement {@link Map#remove} method. - */ - private static void mergeMaps(Map map1, Map map2, - Merger merger) { - for (Map.Entry en : map1.entrySet()) { - V2 v2 = removeSafe(map2, en.getKey()); - if (v2 == null) { - merger.onlyFirst(en.getValue()); - } else { - merger.both(en.getValue(), v2); - } - } - for (V2 v2 : map2.values()) { - merger.onlySecond(v2); - } - } - - private static void mergeBreakpoints(final Merger perBreakpointMerger, - SortedBreakpoints side1, SortedBreakpoints side2) { - Merger, Map> perScriptMerger = - new Merger, Map>() { - @Override - void both(Map v1, Map v2) { - mergeMaps(v1, v2, perBreakpointMerger); - } - - @Override - void onlyFirst(Map v1) { - mergeMaps(v1, Collections.emptyMap(), perBreakpointMerger); - } - - @Override - void onlySecond(Map v2) { - mergeMaps(Collections.emptyMap(), v2, perBreakpointMerger); - } - }; - mergeMaps(side1.data, side2.data, perScriptMerger); - } - - - private static Collection readSdkBreakpoints(JavascriptVm javascriptVm) { - class CallbackImpl implements JavascriptVm.ListBreakpointsCallback { - public void failure(Exception exception) { - problem = exception; - } - - public void success(Collection breakpoints) { - result = breakpoints; - } - Collection getResult() { - if (problem != null) { - throw new RuntimeException("Failed to synchronize breakpoints", problem); //$NON-NLS-1$ - } - return result; - } - Exception problem = null; - Collection result = null; - } - - CallbackImpl callback = new CallbackImpl(); - CallbackSemaphore callbackSemaphore = new CallbackSemaphore(); - - RelayOk relayOk = javascriptVm.listBreakpoints(callback, callbackSemaphore); - boolean res = callbackSemaphore.tryAcquireDefault(relayOk); - if (!res) { - throw new RuntimeException("Timeout"); //$NON-NLS-1$ - } - - return callback.getResult(); - } - - private ChromiumBreakpointsFiltered getUiBreakpoints() { - IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); - final Set lineBreakpoints = new HashSet(); - final List exceptionBreakpoints = - new ArrayList(2); - - for (IBreakpoint breakpoint : - breakpointManager.getBreakpoints(VProjectWorkspaceBridge.DEBUG_MODEL_ID)) { - { - ChromiumLineBreakpoint chromiumLineBreakpoint = - ChromiumBreakpointAdapter.tryCastBreakpoint(breakpoint); - if (chromiumLineBreakpoint != null) { - lineBreakpoints.add(chromiumLineBreakpoint); - continue; - } - } - { - ChromiumExceptionBreakpoint chromiumExceptionBreakpoint = - ChromiumExceptionBreakpoint.tryCastBreakpoint(breakpoint); - if (chromiumExceptionBreakpoint != null) { - exceptionBreakpoints.add(chromiumExceptionBreakpoint); - continue; - } - } - } - - return new ChromiumBreakpointsFiltered() { - @Override public Set getLineBreakpoints() { - return lineBreakpoints; - } - @Override public Collection getExceptionBreakpoints() { - return exceptionBreakpoints; - } - }; - } - - private interface ChromiumBreakpointsFiltered { - // We need this method to return Set for future purposes. - Set getLineBreakpoints(); - Collection getExceptionBreakpoints(); - } - - public static class ProtocolNotSupportedOnRemote extends Exception { - ProtocolNotSupportedOnRemote() { - } - ProtocolNotSupportedOnRemote(String message, Throwable cause) { - super(message, cause); - } - ProtocolNotSupportedOnRemote(String message) { - super(message); - } - ProtocolNotSupportedOnRemote(Throwable cause) { - super(cause); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointAdapter.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointAdapter.java deleted file mode 100644 index ee939e6b..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointAdapter.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - - -import org.eclipse.debug.core.model.IBreakpoint; - -/** - * Implements breakpoint adapter for breakpoints provided by org.chromium.debug.* - */ -public class ChromiumBreakpointAdapter { - public static ChromiumLineBreakpoint tryCastBreakpoint(IBreakpoint breakpoint) { - if (!supportsBreakpoint(breakpoint)) { - return null; - } - if (breakpoint instanceof ChromiumLineBreakpoint == false) { - return null; - } - return (ChromiumLineBreakpoint) breakpoint; - } - - private static boolean supportsBreakpoint(IBreakpoint breakpoint) { - return VProjectWorkspaceBridge.DEBUG_MODEL_ID.equals(breakpoint.getModelIdentifier()); - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointWBAFactory.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointWBAFactory.java deleted file mode 100644 index 7ddd28cb..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumBreakpointWBAFactory.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.model.IWorkbenchAdapter; - -/** - * An IWorkbenchAdapter factory for ChromiumLineBreakpoints. - */ -public class ChromiumBreakpointWBAFactory implements IAdapterFactory { - - protected static final Object[] EMPTY_CHILDREN = new Object[0]; - - @SuppressWarnings("unchecked") - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adapterType != IWorkbenchAdapter.class || - !(adaptableObject instanceof ChromiumLineBreakpoint)) { - return null; - } - return new IWorkbenchAdapter() { - - public Object[] getChildren(Object o) { - return EMPTY_CHILDREN; - } - - public ImageDescriptor getImageDescriptor(Object object) { - return null; - } - - public String getLabel(Object o) { - ChromiumLineBreakpoint bp = (ChromiumLineBreakpoint) o; - try { - return bp.getMarker().getAttribute(IMarker.MESSAGE).toString(); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - } - return null; - } - - public Object getParent(Object o) { - return null; - } - }; - } - - @SuppressWarnings("unchecked") - public Class[] getAdapterList() { - return new Class[] { IWorkbenchAdapter.class }; - } - -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumExceptionBreakpoint.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumExceptionBreakpoint.java deleted file mode 100644 index d06b0dda..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumExceptionBreakpoint.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.Breakpoint; -import org.eclipse.debug.core.model.IBreakpoint; - -/** - * JavaScript exception breakpoint. It always stops for uncaught breakpoints, - * and optionally stops on caught breakpoints (see 'include caught' property). - */ -public class ChromiumExceptionBreakpoint extends Breakpoint { - /** Include caught */ - private static final String INCLUDE_CAUGHT_ATTR = - ChromiumDebugPlugin.PLUGIN_ID + ".includeCaught"; //$NON-NLS-1$ - - public ChromiumExceptionBreakpoint() { - } - - public ChromiumExceptionBreakpoint(final IResource resource, - final boolean includingCaught, final String modelId) throws DebugException { - IWorkspaceRunnable runnable = new IWorkspaceRunnable() { - public void run(IProgressMonitor monitor) throws CoreException { - IMarker marker = resource.createMarker(ChromiumDebugPlugin.EXCEPTION_BP_MARKER); - setMarker(marker); - marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE); - marker.setAttribute(IBreakpoint.ID, modelId); - marker.setAttribute(IMarker.MESSAGE, - Messages.ChromiumExceptionBreakpoint_MessageMarkerFormat); - } - }; - run(getMarkerRule(resource), runnable); - } - - public void setIncludeCaught(boolean value) throws CoreException { - try { - setAttribute(INCLUDE_CAUGHT_ATTR, value); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - } - } - - public boolean getIncludeCaught() { - return getMarker().getAttribute(INCLUDE_CAUGHT_ATTR, false); - } - - @Override - public String getModelIdentifier() { - return getMarker().getAttribute(IBreakpoint.ID, ""); //$NON-NLS-1$ - } - - public static ChromiumExceptionBreakpoint tryCastBreakpoint(IBreakpoint breakpoint) { - if (breakpoint instanceof ChromiumExceptionBreakpoint == false) { - return null; - } - return (ChromiumExceptionBreakpoint) breakpoint; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumLineBreakpoint.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumLineBreakpoint.java deleted file mode 100644 index 52b8373f..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ChromiumLineBreakpoint.java +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import static org.chromium.sdk.util.BasicUtil.containsSafe; -import static org.chromium.sdk.util.BasicUtil.removeSafe; - -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; -import java.util.Set; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.ScriptNameManipulator.ScriptNamePattern; -import org.chromium.debug.core.sourcemap.SourcePosition; -import org.chromium.debug.core.sourcemap.SourcePositionMap; -import org.chromium.debug.core.sourcemap.SourcePositionMap.TranslateDirection; -import org.chromium.sdk.Breakpoint; -import org.chromium.sdk.Breakpoint.Target; -import org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport; -import org.chromium.sdk.IgnoreCountBreakpointExtension; -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.JavascriptVm.BreakpointCallback; -import org.chromium.sdk.RelayOk; -import org.chromium.sdk.SyncCallback; -import org.chromium.sdk.util.BasicUtil; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.LineBreakpoint; -import org.eclipse.osgi.util.NLS; - -/** - * JavaScript line breakpoint. - */ -public class ChromiumLineBreakpoint extends LineBreakpoint { - - /** Ignore count */ - private static final String IGNORE_COUNT_ATTR = ChromiumDebugPlugin.PLUGIN_ID + ".ignoreCount"; //$NON-NLS-1$ - - /** Condition */ - private static final String CONDITION_ATTR = ChromiumDebugPlugin.PLUGIN_ID + ".condition"; //$NON-NLS-1$ - - /** - * Default constructor is required for the breakpoint manager to re-create - * persisted breakpoints. After instantiating a breakpoint, the setMarker - * method is called to restore this breakpoint's attributes. - */ - public ChromiumLineBreakpoint() { - } - - /** - * Constructs a line breakpoint on the given resource at the given line number - * (line number is 1-based). - * - * @param resource file on which to set the breakpoint - * @param lineNumber 1-based line number of the breakpoint - * @throws CoreException if unable to create the breakpoint - */ - public ChromiumLineBreakpoint(final IResource resource, final int lineNumber, - final String modelId) throws CoreException { - IWorkspaceRunnable runnable = new IWorkspaceRunnable() { - public void run(IProgressMonitor monitor) throws CoreException { - IMarker marker = resource.createMarker(ChromiumDebugPlugin.BP_MARKER); - setMarker(marker); - marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE); - marker.setAttribute(IMarker.LINE_NUMBER, lineNumber); - marker.setAttribute(IBreakpoint.ID, modelId); - marker.setAttribute(IMarker.MESSAGE, NLS.bind( - Messages.JsLineBreakpoint_MessageMarkerFormat, resource.getName(), lineNumber)); - } - }; - run(getMarkerRule(resource), runnable); - } - - @Override - public boolean isEnabled() { - try { - return super.isEnabled(); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - return false; - } - } - - private void setMarkerAttribute(String attributeName, Object value) { - try { - setAttribute(attributeName, value); - } catch (CoreException e) { - ChromiumDebugPlugin.log(e); - } - } - - - public void setCondition(String condition) throws CoreException { - setMarkerAttribute(CONDITION_ATTR, condition); - } - - public String getCondition() { - return getMarker().getAttribute(CONDITION_ATTR, (String) null); - } - - public String getModelIdentifier() { - return getMarker().getAttribute(IBreakpoint.ID, ""); - } - - public IgnoreCountData getIgnoreCountData() { - String dataStr = getMarker().getAttribute(IGNORE_COUNT_ATTR, ""); - return IgnoreCountData.parseString(dataStr); - } - - public void setIgnoreCountData(IgnoreCountData data) throws CoreException { - getMarker().setAttribute(IGNORE_COUNT_ATTR, data.getStringRepresentation()); - } - - /** - * @return ignore count number or {@link Breakpoint#EMPTY_VALUE} based on state - */ - public int getEffectiveIgnoreCount() { - IgnoreCountData data = getIgnoreCountData(); - return data.getEffectiveValue(); - } - - /** - * Resets ignore count so that it's effective value becomes {@link Breakpoint#EMPTY_VALUE}, - * but the change does not cause update back to remote VM. - */ - public void silentlyResetIgnoreCount() throws CoreException { - IgnoreCountData data = getIgnoreCountData(); - if (data.getState() == IgnoreCountData.State.RESET || data.getValue() <= 0) { - return; - } - data.setState(IgnoreCountData.State.RESET); - setIgnoreCountData(data); - } - - /** - * Returns set of properties that have changed comparing to the state saved in delta parameter. - * Doesn't enumerate properties that were changed 'silently' - * (see {@link #silentlyResetIgnoreCount()}). - */ - public Set getChangedProperty(IMarkerDelta delta) { - Set result = EnumSet.noneOf(MutableProperty.class); - - IMarker marker = getMarker(); - if (marker.getAttribute(IBreakpoint.ENABLED, Boolean.TRUE) != - delta.getAttribute(IBreakpoint.ENABLED, Boolean.TRUE)) { - result.add(MutableProperty.ENABLED); - } - if (!BasicUtil.eq(marker.getAttribute(CONDITION_ATTR, (String) null), - delta.getAttribute(CONDITION_ATTR, (String) null))) { - result.add(MutableProperty.CONDITION); - } - { - IgnoreCountData currentData = - IgnoreCountData.parseString(marker.getAttribute(IGNORE_COUNT_ATTR, "")); - IgnoreCountData oldData = - IgnoreCountData.parseString(delta.getAttribute(IGNORE_COUNT_ATTR, "")); - boolean differs; - if (currentData.getState() == IgnoreCountData.State.RESET) { - // Ignore all changes while we are in reset state. - differs = false; - } else { - differs = currentData.getEffectiveValue() != oldData.getEffectiveValue(); - } - if (differs) { - result.add(MutableProperty.IGNORE_COUNT); - } - } - - return result; - } - - public enum MutableProperty { - ENABLED, CONDITION, IGNORE_COUNT - } - - /** - * A helper that propagates changes in Eclipse Debugger breakpoints (i.e. - * {@link ChromiumLineBreakpoint}) to ChromeDevTools SDK breakpoints. Note that - * {@link ChromiumLineBreakpoint} can't do it itself, because it may correspond to several - * SDK {@link JavascriptVm}'s simultaneously. - */ - public static class Helper { - // TODO: rename 'remove' -> 'remote'. - public interface CreateOnRemoveCallback { - void success(Breakpoint breakpoint); - void failure(String errorMessage); - } - - public static RelayOk createOnRemote(final ChromiumLineBreakpoint uiBreakpoint, - VmResourceRef vmResourceRef, final ConnectedTargetData connectedTargetData, - final CreateOnRemoveCallback createOnRemoveCallback, - SyncCallback syncCallback) throws CoreException { - final JavascriptVm javascriptVm = connectedTargetData.getJavascriptVm(); - - // ILineBreakpoint lines are 1-based while V8 lines are 0-based - final int line = (uiBreakpoint.getLineNumber() - 1); - final int column = 0; - - BreakpointCallback callback = new BreakpointCallback() { - public void success(Breakpoint sdkBreakpoint) { - createOnRemoveCallback.success(sdkBreakpoint); - } - public void failure(String errorMessage) { - createOnRemoveCallback.failure(errorMessage); - } - }; - - class SdkParams { - SdkParams(Target target, int line, int column) { - this.target = target; - this.line = line; - this.column = column; - } - - final Breakpoint.Target target; - final int line; - final int column; - } - - SdkParams sdkParams = vmResourceRef.accept(new VmResourceRef.Visitor() { - @Override - public SdkParams visitRegExpBased(ScriptNamePattern scriptNamePattern) { - // TODO: support source mapping perhaps. - - ScriptRegExpSupport scriptRegExpSupport = - javascriptVm.getBreakpointTypeExtension().getScriptRegExpSupport(); - if (scriptRegExpSupport == null) { - // TODO: check earlier in UI. - throw new RuntimeException("Script RegExp is not supported by VM"); - } - - final Breakpoint.Target targetValue = - scriptRegExpSupport.createTarget(scriptNamePattern.getJavaScriptRegExp()); - return new SdkParams(targetValue, line, column); - } - - @Override - public SdkParams visitResourceId(VmResourceId resourceId) { - SourcePositionMap map = connectedTargetData.getSourcePositionMap(); - SourcePosition vmPosition = - map.translatePosition(resourceId, line, column,TranslateDirection.USER_TO_VM); - final int vmLine = vmPosition.getLine(); - final int vmColumn = vmPosition.getColumn(); - final Breakpoint.Target target; - VmResourceId vmSideVmResourceId = vmPosition.getId(); - if (vmSideVmResourceId.getId() == null) { - target = new Breakpoint.Target.ScriptName(vmSideVmResourceId.getName()); - } else { - target = new Breakpoint.Target.ScriptId(vmSideVmResourceId.getId()); - } - - return new SdkParams(target, vmLine, vmColumn); - } - }); - - IgnoreCountBreakpointExtension extension = javascriptVm.getIgnoreCountBreakpointExtension(); - if (extension == null) { - if (uiBreakpoint.getEffectiveIgnoreCount() != Breakpoint.EMPTY_VALUE) { - ChromiumDebugPlugin.log( - new Exception("Failed to set breakpoint ignore count as it is not supported by VM")); - } - return javascriptVm.setBreakpoint( - sdkParams.target, - sdkParams.line, - sdkParams.column, - uiBreakpoint.isEnabled(), - uiBreakpoint.getCondition(), - callback, syncCallback); - } else { - return extension.setBreakpoint( - javascriptVm, - sdkParams.target, - sdkParams.line, - sdkParams.column, - uiBreakpoint.isEnabled(), - uiBreakpoint.getCondition(), - uiBreakpoint.getEffectiveIgnoreCount(), - callback, syncCallback); - } - } - - public static void updateOnRemote(final Breakpoint sdkBreakpoint, - final ChromiumLineBreakpoint uiBreakpoint, - Set propertyDelta) throws CoreException { - - if (propertyDelta.contains(MutableProperty.ENABLED)) { - sdkBreakpoint.setEnabled(uiBreakpoint.isEnabled()); - } - if (propertyDelta.contains(MutableProperty.CONDITION)) { - sdkBreakpoint.setCondition(uiBreakpoint.getCondition()); - } - sdkBreakpoint.flush(null, null); - - if (propertyDelta.contains(MutableProperty.IGNORE_COUNT)) { - // Ignore count is a transient property and doesn't need flush. - IgnoreCountBreakpointExtension extension = - sdkBreakpoint.getIgnoreCountBreakpointExtension(); - if (extension == null) { - ChromiumDebugPlugin.log( - new Exception("Failed to set breakpoint ignore count as it is not supported by VM")); - } else { - extension.setIgnoreCount(sdkBreakpoint, uiBreakpoint.getEffectiveIgnoreCount(), - null, null); - } - } - } - - public static ChromiumLineBreakpoint createLocal(Breakpoint sdkBreakpoint, - IBreakpointManager breakpointManager, IFile resource, int script_line_offset, - String debugModelId) throws CoreException { - ChromiumLineBreakpoint uiBreakpoint = new ChromiumLineBreakpoint(resource, - (int) sdkBreakpoint.getLineNumber() + 1 + script_line_offset, - debugModelId); - uiBreakpoint.setCondition(sdkBreakpoint.getCondition()); - uiBreakpoint.setEnabled(sdkBreakpoint.isEnabled()); - ignoreList.add(uiBreakpoint); - try { - breakpointManager.addBreakpoint(uiBreakpoint); - } finally { - ignoreList.remove(uiBreakpoint); - } - return uiBreakpoint; - } - } - - private static final BreakpointIgnoreList ignoreList = new BreakpointIgnoreList(); - - public static BreakpointIgnoreList getIgnoreList() { - return ignoreList; - } - - public static class BreakpointIgnoreList { - private final List list = new ArrayList(1); - - public boolean contains(ChromiumLineBreakpoint breakpoint) { - return containsSafe(list, breakpoint); - } - - public void remove(ChromiumLineBreakpoint lineBreakpoint) { - boolean res = removeSafe(list, lineBreakpoint); - if (!res) { - throw new IllegalStateException(); - } - } - - public void add(ChromiumLineBreakpoint lineBreakpoint) { - if (containsSafe(list, lineBreakpoint)) { - throw new IllegalStateException(); - } - list.add(lineBreakpoint); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectedTargetData.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectedTargetData.java deleted file mode 100644 index 43a40a42..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectedTargetData.java +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.Collection; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.model.DebugTargetImpl.ListenerBlock; -import org.chromium.debug.core.model.DebugTargetImpl.State; -import org.chromium.debug.core.sourcemap.PositionMapBuilderImpl; -import org.chromium.debug.core.sourcemap.SourcePositionMap; -import org.chromium.debug.core.sourcemap.SourcePositionMapBuilder; -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.chromium.sdk.DebugContext; -import org.chromium.sdk.DebugEventListener; -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.Script; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchListener; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDisconnect; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.core.model.ITerminate; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.osgi.util.NLS; - -/** - * Contains state and behavior of 'connected' {@link DebugTargetImpl}. Its inner implementation of - * {@link DebugTargetImpl#State} is for {@link DebugTargetImpl} only and is available externally - * only at construction. The class can be used - * only after {@link #setVmEmbedder} was called. Listeners can be used from the - * beginning, but they are blocking until {@link #listenerBlock} is unblocked which is done - * externally after {@link #setVmEmbedder} is called. - *

- * It corresponds to 'connected' state of target and post-terminated state. - */ -public class ConnectedTargetData { - - /** - * Creates instance and returns its inner state class. This is the only moment when inner - * state class gets available outside the class. - * @param listenerBlock blocks 2 event listeners to let all infrastructure get initialized - * @return inner state of data that provides getter to the data itself. - */ - static TargetInnerState create(DebugTargetImpl debugTargetImpl, ListenerBlock listenerBlock) { - ConnectedTargetData data = new ConnectedTargetData(debugTargetImpl, listenerBlock); - - // No public getter for stateImpl. We expose state only to one who creates us. - return data.debugTargetState; - } - - private final DebugTargetImpl debugTargetImpl; - private final TargetInnerState debugTargetState = new TargetInnerState(); - private final JavascriptThread singleThread; - private final JavascriptThread[] threadArray; - private final SourcePositionMapBuilder sourcePositionMapBuilder = new PositionMapBuilderImpl(); - private final ListenerBlock listenerBlock; - private final DebugEventListenerImpl debugEventListener = new DebugEventListenerImpl(); - - private JavascriptVmEmbedder vmEmbedder = null; - private WorkspaceBridge workspaceRelations = null; - - private volatile boolean isDisconnected = false; - - private ConnectedTargetData(DebugTargetImpl debugTargetImpl, ListenerBlock listenerBlock) { - this.debugTargetImpl = debugTargetImpl; - this.singleThread = new JavascriptThread(this); - this.threadArray = new JavascriptThread[] { singleThread }; - this.listenerBlock = listenerBlock; - } - - void setVmEmbedder(JavascriptVmEmbedder vmEmbedder) { - ConnectedTargetData.this.vmEmbedder = vmEmbedder; - - initWorkspaceRelations(); - } - - public void initListeners() { - IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); - breakpointManager.addBreakpointListener(debugTargetState.getBreakpointListner()); - breakpointManager.addBreakpointManagerListener(workspaceRelations.getBreakpointHandler()); - workspaceRelations.getBreakpointHandler().initBreakpointManagerListenerState( - breakpointManager); - - workspaceRelations.startInitialization(); - } - - public JavascriptVmEmbedder getJavascriptEmbedder() { - return vmEmbedder; - } - - public JavascriptVm getJavascriptVm() { - return getJavascriptEmbedder().getJavascriptVm(); - } - - void fireBecameConnectedEvents() { - setDisconnected(false); - DebugTargetImpl.fireDebugEvent(new DebugEvent(debugTargetImpl, DebugEvent.CHANGE)); - fireEventForThread(DebugEvent.CREATE, DebugEvent.UNSPECIFIED); - } - - void fireResumeEvent(int detail) { - fireEventForThread(DebugEvent.RESUME, detail); - DebugTargetImpl.fireDebugEvent(new DebugEvent(debugTargetImpl, DebugEvent.RESUME, detail)); - } - - public Collection getVmResource(IFile resource) throws CoreException { - return workspaceRelations.findVmResourcesFromWorkspaceFile(resource); - } - - private final VmStatusListenerImpl vmStatusListener = new VmStatusListenerImpl(); - - private class VmStatusListenerImpl implements DebugEventListener.VmStatusListener { - private String currentRequest = null; - private int numberOfEnqueued; - - public synchronized void busyStatusChanged(String currentRequest, int numberOfEnqueued) { - this.currentRequest = currentRequest; - this.numberOfEnqueued = numberOfEnqueued; - DebugTargetImpl.fireDebugEvent(new DebugEvent(debugTargetImpl, DebugEvent.CHANGE)); - } - - public synchronized String getStatusString() { - if (currentRequest == null) { - return null; - } - return NLS.bind(Messages.DebugTargetImpl_BUSY_WITH, currentRequest, numberOfEnqueued); - } - } - - public void synchronizeBreakpoints(BreakpointSynchronizer.Direction direction, - BreakpointSynchronizer.Callback callback) { - workspaceRelations.synchronizeBreakpoints(direction, callback); - } - - public DebugEventListenerImpl getDebugEventListener() { - return debugEventListener; - } - - public JavascriptVmEmbedder.Listener getEmbedderListener() { - return embedderListener; - } - - public WorkspaceBridge getWorkspaceRelations() { - return workspaceRelations; - } - - public SourcePositionMap getSourcePositionMap() { - return sourcePositionMapBuilder.getSourcePositionMap(); - } - - public SourcePositionMapBuilder getSourcePositionMapBuilder() { - return sourcePositionMapBuilder; - } - - public SourceWrapSupport getSourceWrapSupport() { - return debugTargetImpl.getSourceWrapSupport(); - } - - public DebugTargetImpl getDebugTarget() { - return debugTargetImpl; - } - - public String getName() { - return debugTargetState.getName(); - } - - private JavascriptThread getThread() { - return disconnectAspect.isDisconnected() - ? null - : singleThread; - } - - private void fireEventForThread(int kind, int detail) { - try { - IThread[] threads = debugTargetState.getThreads(); - if (threads.length > 0) { - DebugTargetImpl.fireDebugEvent(new DebugEvent(threads[0], kind, detail)); - } - } catch (DebugException e) { - // Actually, this is not thrown in our getThreads() - return; - } - } - - private void fireTerminateEvent() { - // TODO(peter.rybin): from Alexander Pavlov: I think you need to fire a terminate event after - // this line, for consolePseudoProcess if one is not null. - - // Do not report on threads -- the children are gone when terminated. - DebugTargetImpl.fireDebugEvent( - new DebugEvent(debugTargetImpl, DebugEvent.TERMINATE, DebugEvent.UNSPECIFIED)); - DebugTargetImpl.fireDebugEvent( - new DebugEvent(debugTargetImpl.getLaunch(), DebugEvent.TERMINATE, DebugEvent.UNSPECIFIED)); - } - - void fireSuspendEvent(int detail) { - fireEventForThread(DebugEvent.SUSPEND, detail); - DebugTargetImpl.fireDebugEvent(new DebugEvent(debugTargetImpl, DebugEvent.SUSPEND, detail)); - } - - private void setDisconnected(boolean disconnected) { - isDisconnected = disconnected; - } - - boolean isDisconnected() { - return isDisconnected; - } - - private void initWorkspaceRelations() { - ConnectedTargetData.this.workspaceRelations = - debugTargetImpl.getWorkspaceBridgeFactory().attachedToVm(ConnectedTargetData.this, - vmEmbedder.getJavascriptVm()); - - // We'd like to know when launch is removed to remove our project. - DebugPlugin.getDefault().getLaunchManager().addLaunchListener(new ILaunchListener() { - public void launchAdded(ILaunch launch) { - } - public void launchChanged(ILaunch launch) { - } - // TODO(peter.rybin): maybe have one instance of listener for all targets? - public void launchRemoved(ILaunch launch) { - if (launch != debugTargetImpl.getLaunch()) { - return; - } - DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); - workspaceRelations.launchRemoved(); - } - }); - } - - private final IDisconnect disconnectAspect = new IDisconnect() { - public boolean canDisconnect() { - return !isDisconnected(); - } - - public void disconnect() throws DebugException { - if (!canDisconnect()) { - return; - } - workspaceRelations.beforeDetach(); - if (!vmEmbedder.getJavascriptVm().detach()) { - ChromiumDebugPlugin.logWarning(Messages.DebugTargetImpl_BadResultWhileDisconnecting); - } - // This is a duplicated call to disconnected(). - // The primary one comes from V8DebuggerToolHandler#onDebuggerDetached - // but we want to make sure the target becomes disconnected even if - // there is a browser failure and it does not respond. - debugEventListener.disconnected(); - } - - public boolean isDisconnected() { - return isDisconnected; - } - }; - - private final ITerminate terminateAspect = new ITerminate() { - public boolean canTerminate() { - return !isTerminated(); - } - - public boolean isTerminated() { - return disconnectAspect.isDisconnected(); - } - - public void terminate() throws DebugException { - disconnectAspect.disconnect(); - } - }; - - private final JavascriptVmEmbedder.Listener embedderListener = - new JavascriptVmEmbedder.Listener() { - public void reset() { - listenerBlock.waitUntilReady(); - workspaceRelations.handleVmResetEvent(); - DebugTargetImpl.fireDebugEvent( - new DebugEvent(debugTargetImpl, DebugEvent.CHANGE, DebugEvent.CONTENT)); - } - public void closed() { - debugEventListener.disconnected(); - } - }; - - private class DebugEventListenerImpl implements DebugEventListener { - - public void disconnected() { - if (!disconnectAspect.isDisconnected()) { - setDisconnected(true); - DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener( - workspaceRelations.getBreakpointHandler()); - DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener( - debugTargetImpl); - fireTerminateEvent(); - -// final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("STANDALONE_V8"); -// ChromiumDebugPluginUtil.deleteVirtualProjectAsync(project); - } - } - - public void resumed() { - listenerBlock.waitUntilReady(); - singleThread.getRemoteEventListener().resumed(null); - } - - public void suspended(DebugContext context) { - listenerBlock.waitUntilReady(); - singleThread.getRemoteEventListener().suspended(context); - } - - public void scriptLoaded(Script newScript) { - listenerBlock.waitUntilReady(); - workspaceRelations.scriptLoaded(newScript); - } - - public void scriptCollected(Script script) { - listenerBlock.waitUntilReady(); - workspaceRelations.scriptCollected(script); - } - - public void scriptContentChanged(Script newScript) { - listenerBlock.waitUntilReady(); - workspaceRelations.reloadScript(newScript); - } - - public VmStatusListener getVmStatusListener() { - return vmStatusListener; - } - } - - class TargetInnerState extends State { - @Override - boolean supportsBreakpoint(IBreakpoint breakpoint) { - return workspaceRelations.getBreakpointHandler().supportsBreakpoint(breakpoint); - } - - @Override - String getVmStatus() { - if (isDisconnected) { - return null; - } - return vmStatusListener.getStatusString(); - } - - @Override - IThread[] getThreads() throws DebugException { - return disconnectAspect.isDisconnected() - ? DebugTargetImpl.EMPTY_THREADS - : threadArray; - } - - @Override - ConnectedTargetData getConnectedTargetDataOrNull() { - return getConnectedTargetData(); - } - - ConnectedTargetData getConnectedTargetData() { - return ConnectedTargetData.this; - } - - @Override - ISuspendResume getSuspendResume() { - return singleThread.getSuspendResumeAspect(); - } - - @Override - ITerminate getTerminate() { - return terminateAspect; - } - - @Override - IDisconnect getDisconnect() { - return disconnectAspect; - } - - @Override - String getName() { - JavascriptVmEmbedder vmEmbedder = getJavascriptEmbedder(); - return vmEmbedder.getTargetName(); - } - - @Override - EvaluateContext getEvaluateContext() { - return getThread().getEvaluateContext(); - } - - @Override - IBreakpointListener getBreakpointListner() { - return workspaceRelations.getBreakpointHandler(); - } - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectionLoggerImpl.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectionLoggerImpl.java deleted file mode 100644 index 15037a8e..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConnectionLoggerImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.io.IOException; -import java.io.Writer; - -import org.chromium.sdk.ConnectionLogger; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.model.ITerminate; - -/** - * Connection logger that writes both incoming and outgoing streams into - * logWriter with simple annotations. - */ -public class ConnectionLoggerImpl implements ConnectionLogger { - /** - * Additional interface logger sends its output to. - */ - public interface LogLifecycleListener { - /** - * Notifies about logging start. Before this call {@link ConnectionLoggerImpl} - * is considered to be simply garbage-collectible. After this call - * {@link ConnectionLoggerImpl} must call {@link #logClosed()}. - * - * @param connectionLogger instance of host {@link ConnectionLoggerImpl}, which is nice - * to have because theoretically we may receive this call before constructor of - * {@link ConnectionLoggerImpl} returned - */ - void logStarted(ConnectionLoggerImpl connectionLogger); - - /** - * Notifies about log stream being closed. Technically, last messages may arrive - * even after this. It is supposed that log representation may be closed on this call - * because we are not 100% accurate. - */ - void logClosed(); - } - - - public ConnectionLoggerImpl(Writer logWriter, LogLifecycleListener lifecycleListener) { - this.logWriter = logWriter; - this.lifecycleListener = lifecycleListener; - } - - /** - * We mix 2 streams into a single console. This type helps to annotate them textually. - */ - private static abstract class StreamId { - abstract String getStreamName(); - } - - @Override - public StreamListener getIncomingStreamListener() { - StreamId streamId = new StreamId() { - public String getStreamName() { - return Messages.ConnectionLoggerImpl_ReceivedFromChrome; - } - }; - return new StreamListenerImpl(streamId); - } - - @Override - public StreamListener getOutgoingStreamListener() { - StreamId streamId = new StreamId() { - public String getStreamName() { - return Messages.ConnectionLoggerImpl_SentToChrome; - } - }; - return new StreamListenerImpl(streamId); - } - - private class StreamListenerImpl implements StreamListener { - private final StreamId streamId; - - private StreamListenerImpl(StreamId streamId) { - this.streamId = streamId; - } - - @Override - public void addContent(CharSequence text) { - writeToLog(text, streamId); - flushLogWriter(); - } - - @Override - public void addSeparator() { - writeToLog(MESSAGE_SEPARATOR, streamId); - flushLogWriter(); - } - } - - public void start() { - lifecycleListener.logStarted(this); - } - - public void handleEos() { - isClosed = true; - lifecycleListener.logClosed(); - } - - public ITerminate getConnectionTerminate() { - return connectionTerminate; - } - - public void setConnectionCloser(ConnectionCloser connectionCloser) { - this.connectionCloser = connectionCloser; - } - - private synchronized void writeToLog(CharSequence str, StreamId streamId) { - try { - printHead(streamId); - logWriter.append(str); - } catch (IOException e) { - DebugPlugin.log(e); - } - } - private void printHead(StreamId streamId) throws IOException { - if (lastSource != streamId) { - if (lastSource != null) { - logWriter.append('\n'); - } - logWriter.append("> ").append(streamId.getStreamName()).append('\n'); //$NON-NLS-1$ - lastSource = streamId; - } - } - private void flushLogWriter() { - try { - logWriter.flush(); - } catch (IOException e) { - DebugPlugin.log(e); - } - } - - private final Writer logWriter; - private final LogLifecycleListener lifecycleListener; - private StreamId lastSource = null; - private volatile ConnectionCloser connectionCloser = null; - private volatile boolean isClosed = false; - - private final ITerminate connectionTerminate = new ITerminate() { - public boolean canTerminate() { - return !isClosed && connectionCloser != null; - } - - public boolean isTerminated() { - return isClosed; - } - - public void terminate() { - ConnectionCloser connectionCloser0 = ConnectionLoggerImpl.this.connectionCloser; - if (connectionCloser0 == null) { - throw new IllegalStateException(); - } - connectionCloser0.closeConnection(); - } - }; - - private static final String MESSAGE_SEPARATOR = Messages.ConnectionLoggerImpl_MessageSeparator; -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConsolePseudoProcess.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConsolePseudoProcess.java deleted file mode 100644 index ac550549..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/ConsolePseudoProcess.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.io.StringWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.PlatformObject; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.IStreamListener; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStreamMonitor; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.debug.core.model.ITerminate; - -/** - * This process corresponds to a Debugger-Chrome connection and its main - * purpose is to expose connection log (see process console in UI). - */ -public class ConsolePseudoProcess extends PlatformObject implements IProcess { - - private final ILaunch launch; - private final Retransmitter outputMonitor; - private final ITerminate connectionTerminate; - private final String name; - private Map attributes = null; - - private final IStreamsProxy streamsProxy = new IStreamsProxy() { - public IStreamMonitor getErrorStreamMonitor() { - return NullStreamMonitor.INSTANCE; - } - public IStreamMonitor getOutputStreamMonitor() { - return outputMonitor; - } - public void write(String input) { - // ignore - } - }; - - /** - * Constructs a ConsolePseudoProcess, adding this process to the given launch. - * - * @param launch the parent launch of this process - * @param name the label used for this process - */ - public ConsolePseudoProcess(ILaunch launch, String name, Retransmitter retransmitter, - ITerminate connectionTerminate) { - this.launch = launch; - this.name = name; - this.outputMonitor = retransmitter; - outputMonitor.consolePseudoProcess = this; - this.connectionTerminate = connectionTerminate; - - this.launch.addProcess(this); - fireCreationEvent(); - } - - /** - * @return writer which directs its contents to process console - */ - public Writer getOutputWriter() { - return outputMonitor; - } - - public String getLabel() { - return name; - } - - public ILaunch getLaunch() { - return launch; - } - - public boolean isTerminated() { - return connectionTerminate.isTerminated(); - } - - public void terminate() throws DebugException { - connectionTerminate.terminate(); - } - - public boolean canTerminate() { - return connectionTerminate.canTerminate(); - } - - public IStreamsProxy getStreamsProxy() { - return streamsProxy; - } - - /* - * We do not expect intensive usage of attributes for this class. In fact, other option was to - * keep this method no-op. - */ - public synchronized void setAttribute(String key, String value) { - if (attributes == null) { - attributes = new HashMap(1); - } - String origVal = attributes.get(key); - if (origVal != null && origVal.equals(value)) { - return; - } - - attributes.put(key, value); - fireChangeEvent(); - } - - /* - * We do not expect intensive usage of attributes for this class. In fact, other option was to - * put a stub here. - */ - public synchronized String getAttribute(String key) { - if (attributes == null) { - return null; - } - return attributes.get(key); - } - - public int getExitValue() throws DebugException { - if (isTerminated()) { - return 0; - } - throw new DebugException(new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID, - "Process hasn't been terminated yet")); //$NON-NLS-1$ - } - - private void fireCreationEvent() { - fireEvent(new DebugEvent(this, DebugEvent.CREATE)); - } - - private void fireEvent(DebugEvent event) { - DebugPlugin manager = DebugPlugin.getDefault(); - if (manager != null) { - manager.fireDebugEventSet(new DebugEvent[] { event }); - } - } - - private void fireTerminateEvent() { - outputMonitor.flush(); - fireEvent(new DebugEvent(this, DebugEvent.TERMINATE)); - } - - private void fireChangeEvent() { - fireEvent(new DebugEvent(this, DebugEvent.CHANGE)); - } - - @Override - public Object getAdapter(Class adapter) { - if (adapter.equals(IProcess.class)) { - return this; - } - if (adapter.equals(ILaunch.class)) { - return getLaunch(); - } - if (adapter.equals(ILaunchConfiguration.class)) { - return getLaunch().getLaunchConfiguration(); - } - return super.getAdapter(adapter); - } - - - private static class NullStreamMonitor implements IStreamMonitor { - public void addListener(IStreamListener listener) { - } - public String getContents() { - return null; - } - public void removeListener(IStreamListener listener) { - } - static final NullStreamMonitor INSTANCE = new NullStreamMonitor(); - } - - /** - * Responsible for getting text as {@link Writer} and retransmitting it - * as {@link IStreamMonitor} to whoever is interested. - * However in its initial state it only receives signal (the text) and saves it in a buffer. - * For {@link Retransmitter} to start giving the signal away one should - * call {@link #startFlushing} method. - */ - public static class Retransmitter extends Writer implements IStreamMonitor { - private StringWriter writer = new StringWriter(); - private boolean isFlushing = false; - private final List listeners = new ArrayList(2); - private volatile ConsolePseudoProcess consolePseudoProcess = null; - - public synchronized void addListener(IStreamListener listener) { - listeners.add(listener); - } - - public String getContents() { - return null; - } - - public synchronized void removeListener(IStreamListener listener) { - listeners.remove(listener); - } - - @Override - public synchronized void flush() { - if (!isFlushing) { - return; - } - String text = writer.toString(); - int lastLinePos; - final boolean flushOnlyFullLines = true; - if (flushOnlyFullLines) { - int pos = text.lastIndexOf('\n'); - if (pos == -1) { - // No full line in the buffer. - return; - } - lastLinePos = pos + 1; - } else { - lastLinePos = text.length(); - } - String readyText = text.substring(0, lastLinePos); - writer = new StringWriter(); - if (lastLinePos != text.length()) { - String rest = text.substring(lastLinePos); - writer.append(rest); - } - for (IStreamListener listener : listeners) { - listener.streamAppended(readyText, this); - } - } - - @Override - public synchronized void close() { - // do nothing - } - - @Override - public synchronized void write(char[] cbuf, int off, int len) { - writer.write(cbuf, off, len); - } - - public synchronized void startFlushing() { - isFlushing = true; - flush(); - } - - public void processClosed() { - ConsolePseudoProcess consolePseudoProcess0 = this.consolePseudoProcess; - if (consolePseudoProcess0 != null) { - consolePseudoProcess0.fireTerminateEvent(); - } - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugElementImpl.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugElementImpl.java deleted file mode 100755 index 3c18fd8c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugElementImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.model.JavascriptThread.SuspendedState; -import org.eclipse.core.runtime.PlatformObject; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IDebugElement; - -/** - * A generic IDebugElement implementation. It holds a familiy of more specialized - * base classes. - */ -public abstract class DebugElementImpl extends PlatformObject implements IDebugElement { - public abstract DebugTargetImpl getDebugTarget(); - - public ILaunch getLaunch() { - return getDebugTarget().getLaunch(); - } - - public String getModelIdentifier() { - return getDebugTarget().getChromiumModelIdentifier(); - } - - @Override - public Object getAdapter(Class adapter) { - if (adapter == IDebugElement.class) { - return this; - } - return super.getAdapter(adapter); - } - - /** - * An abstract base class for debug element that refers to {@link ConnectedTargetData}. - * It declares no data field. - */ - public static abstract class WithConnectedBase extends DebugElementImpl { - @Override - public DebugTargetImpl getDebugTarget() { - return getConnectedData().getDebugTarget(); - } - - public abstract ConnectedTargetData getConnectedData(); - } - - /** - * A base class for debug element that refers to {@link ConnectedTargetData}. - */ - public static class WithConnected extends WithConnectedBase { - private final ConnectedTargetData connectedTargetData; - - public WithConnected(ConnectedTargetData connectedTargetData) { - this.connectedTargetData = connectedTargetData; - } - - @Override - public ConnectedTargetData getConnectedData() { - return connectedTargetData; - } - } - - /** - * An abstract base class for debug element that refers to - * {@link JavascriptThread.SuspendedState}. It declares no data field. - */ - public static abstract class WithSuspendedBase extends WithConnectedBase { - public ConnectedTargetData getConnectedData() { - return getSuspendedState().getThread().getConnectedData(); - } - - public abstract JavascriptThread.SuspendedState getSuspendedState(); - } - - /** - * A base class for debug element that refers to {@link JavascriptThread.SuspendedState}. - */ - public static class WithSuspended extends WithSuspendedBase { - private final JavascriptThread.SuspendedState suspendedState; - - public WithSuspended(JavascriptThread.SuspendedState suspendedState) { - this.suspendedState = suspendedState; - } - - @Override - public SuspendedState getSuspendedState() { - return suspendedState; - } - } - - /** - * An abstract base class for debug element that refers to {@link EvaluateContext}. - * It declares no data field. - */ - public static abstract class WithEvaluateBase extends WithSuspendedBase { - @Override - public SuspendedState getSuspendedState() { - return getEvaluateContext().getThreadSuspendedState(); - } - - public abstract EvaluateContext getEvaluateContext(); - } - - /** - * A base class for debug element that refers to {@link EvaluateContext}. - */ - public static class WithEvaluate extends WithEvaluateBase { - private final EvaluateContext evaluateContext; - - public WithEvaluate(EvaluateContext evaluateContext) { - this.evaluateContext = evaluateContext; - } - - @Override - public EvaluateContext getEvaluateContext() { - return evaluateContext; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugTargetImpl.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugTargetImpl.java deleted file mode 100755 index 01b829b8..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/DebugTargetImpl.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.ArrayList; -import java.util.List; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.model.BreakpointSynchronizer.Direction; -import org.chromium.sdk.util.Destructable; -import org.chromium.sdk.util.DestructingGuard; -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IDisconnect; -import org.eclipse.debug.core.model.IMemoryBlock; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.core.model.ITerminate; -import org.eclipse.debug.core.model.IThread; - -/** - * An IDebugTarget implementation for remote JavaScript debugging. - * This class is essentially a thin wrapper that uses its internal state object - * as implementation. The at first target is in 'initialize' state, later - * it should transfer into 'normal' state. - */ - -public class DebugTargetImpl extends DebugElementImpl implements IDebugTarget { - /** - * Loads browser tabs, consults the {@code selector} which of the tabs to - * attach to, and if any has been selected, requests an attachment to the tab. - * - * @param debugTargetImpl target that is attached - * @param remoteServer embedding application we are connected with - * @param destructingGuard guard that should gain any destructable value -- a caller - * will dispose everything if this method fails - * @param attachCallback to invoke on successful attachment, can fail to be called - * @param monitor to report the progress to - * @return false if user canceled attach (via tab selection dialog) or true otherwise - */ - public static boolean attach(DebugTargetImpl debugTargetImpl, - JavascriptVmEmbedder.ConnectionToRemote remoteServer, - DestructingGuard destructingGuard, Runnable attachCallback, - IProgressMonitor monitor) throws CoreException { - - monitor.beginTask("", 2); //$NON-NLS-1$ - JavascriptVmEmbedder.VmConnector connector = remoteServer.selectVm(); - if (connector == null) { - return false; - } - - monitor.worked(1); - - ConnectedTargetData.TargetInnerState connectedState; - ConnectedTargetData connectedData; - - ListenerBlock listenerBlock = new ListenerBlock(); - try { - connectedState = ConnectedTargetData.create(debugTargetImpl, listenerBlock); - connectedData = connectedState.getConnectedTargetData(); - - final JavascriptVmEmbedder embedder = connector.attach(connectedData.getEmbedderListener(), - connectedData.getDebugEventListener()); - // From this moment V8 may call our listeners. We block them by listenerBlock for a while. - - Destructable embedderDestructor = new Destructable() { - public void destruct() { - embedder.getJavascriptVm().detach(); - } - }; - - destructingGuard.addValue(embedderDestructor); - - connectedData.setVmEmbedder(embedder); - - debugTargetImpl.setInnerState(connectedState); - - connectedData.fireBecameConnectedEvents(); - - listenerBlock.setProperlyInitialized(); - } finally { - listenerBlock.unblock(); - } - - connectedData.initListeners(); - - try { - if (attachCallback != null) { - attachCallback.run(); - } - } catch (Exception e) { - ChromiumDebugPlugin.log(e); - } - - return true; - } - - /** - * Defines an actual state of target. It is who implements virtually all operations - * of {@link DebugTargetImpl}. - */ - static abstract class State { - abstract ITerminate getTerminate(); - abstract ISuspendResume getSuspendResume(); - abstract IDisconnect getDisconnect(); - abstract IBreakpointListener getBreakpointListner(); - abstract IThread[] getThreads() throws DebugException; - abstract String getName(); - abstract String getVmStatus(); - abstract boolean supportsBreakpoint(IBreakpoint breakpoint); - abstract EvaluateContext getEvaluateContext(); - abstract ConnectedTargetData getConnectedTargetDataOrNull(); - } - - static final IThread[] EMPTY_THREADS = new IThread[0]; - - private final WorkspaceBridge.Factory workspaceBridgeFactory; - - private final SourceWrapSupport sourceWrapSupport; - - private final ILaunch launch; - private final BreakpointSynchronizer.Direction presetSyncDirection; - private volatile State currentState = new TargetInitializeState(this); - - public DebugTargetImpl(ILaunch launch, WorkspaceBridge.Factory workspaceBridgeFactory, - SourceWrapSupport sourceWrapSupport, BreakpointSynchronizer.Direction presetSyncDirection) { - this.launch = launch; - this.workspaceBridgeFactory = workspaceBridgeFactory; - this.sourceWrapSupport = sourceWrapSupport; - this.presetSyncDirection = presetSyncDirection; - } - - public void fireTargetCreated() { - fireDebugEvent(new DebugEvent(this, DebugEvent.CREATE)); - } - - void setInnerState(State state) { - currentState = state; - } - - ConnectedTargetData getConnectedDataOrNull() { - return currentState.getConnectedTargetDataOrNull(); - } - - WorkspaceBridge.Factory getWorkspaceBridgeFactory() { - return workspaceBridgeFactory; - } - - @Override - public DebugTargetImpl getDebugTarget() { - return this; - } - - @Override - public ILaunch getLaunch() { - return launch; - } - - @Override - public boolean canTerminate() { - return currentState.getTerminate().canTerminate(); - } - - @Override - public boolean isTerminated() { - return currentState.getTerminate().isTerminated(); - } - - @Override - public void terminate() throws DebugException { - currentState.getTerminate().terminate(); - } - - @Override - public boolean canResume() { - return currentState.getSuspendResume().canResume(); - } - - @Override - public boolean canSuspend() { - return currentState.getSuspendResume().canSuspend(); - } - - @Override - public boolean isSuspended() { - return currentState.getSuspendResume().isSuspended(); - } - - @Override - public void resume() throws DebugException { - currentState.getSuspendResume().resume(); - } - - @Override - public void suspend() throws DebugException { - currentState.getSuspendResume().suspend(); - } - - @Override - public void breakpointAdded(IBreakpoint breakpoint) { - currentState.getBreakpointListner().breakpointAdded(breakpoint); - } - - @Override - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { - currentState.getBreakpointListner().breakpointRemoved(breakpoint, delta); - } - - @Override - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { - currentState.getBreakpointListner().breakpointChanged(breakpoint, delta); - } - - @Override - public boolean canDisconnect() { - return currentState.getDisconnect().canDisconnect(); - } - - @Override - public void disconnect() throws DebugException { - currentState.getDisconnect().disconnect(); - } - - @Override - public boolean isDisconnected() { - return currentState.getDisconnect().isDisconnected(); - } - - @Override - public boolean supportsStorageRetrieval() { - return false; - } - - @Override - public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException { - return null; - } - - @Override - public IProcess getProcess() { - return null; - } - - @Override - public IThread[] getThreads() throws DebugException { - return currentState.getThreads(); - } - - @Override - public boolean hasThreads() throws DebugException { - return getThreads().length != 0; - } - - @Override - public String getName() { - return currentState.getName(); - } - - @Override - public boolean supportsBreakpoint(IBreakpoint breakpoint) { - return currentState.supportsBreakpoint(breakpoint); - } - - public String getChromiumModelIdentifier() { - return workspaceBridgeFactory.getDebugModelIdentifier(); - } - - public WorkspaceBridge.JsLabelProvider getLabelProvider() { - return workspaceBridgeFactory.getLabelProvider(); - } - - public String getVmStatus() { - return currentState.getVmStatus(); - } - - public ConnectedTargetData getConnectedOrNull() { - return currentState.getConnectedTargetDataOrNull(); - } - - public SourceWrapSupport getSourceWrapSupport() { - return sourceWrapSupport; - } - - @SuppressWarnings("unchecked") - @Override - public Object getAdapter(Class adapter) { - if (adapter == EvaluateContext.class) { - return currentState.getEvaluateContext(); - } else if (adapter == ILaunch.class) { - return this.launch; - } - return super.getAdapter(adapter); - } - - public static List getAllConnectedTargetDatas() { - IDebugTarget[] array = DebugPlugin.getDefault().getLaunchManager().getDebugTargets(); - List result = new ArrayList(array.length); - for (IDebugTarget target : array) { - if (target instanceof DebugTargetImpl == false) { - continue; - } - if (target.getLaunch().isTerminated()) { - continue; - } - DebugTargetImpl debugTargetImpl = (DebugTargetImpl) target; - - ConnectedTargetData connectedData = debugTargetImpl.getConnectedDataOrNull(); - - if (connectedData == null) { - continue; - } - - result.add(connectedData); - } - return result; - } - - static class ListenerBlock { - private volatile boolean isBlocked = true; - private volatile boolean hasBeenProperlyInitialized = false; - private final Object monitor = new Object(); - void waitUntilReady() { - if (isBlocked) { - synchronized (monitor) { - while (isBlocked) { - try { - monitor.wait(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - } - } - if (!hasBeenProperlyInitialized) { - throw new RuntimeException("DebugTarget has not been properly initialized"); //$NON-NLS-1$ - } - } - void setProperlyInitialized() { - hasBeenProperlyInitialized = true; - } - void unblock() { - isBlocked = false; - synchronized (monitor) { - monitor.notifyAll(); - } - } - } - - /** - * Fires a debug event - * - * @param event to be fired - */ - public static void fireDebugEvent(DebugEvent event) { - DebugPlugin debugPlugin = DebugPlugin.getDefault(); - if (debugPlugin != null) { - debugPlugin.fireDebugEventSet(new DebugEvent[] { event }); - } - } - - public BreakpointSynchronizer.Direction getPresetSyncDirection() { - return presetSyncDirection; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/EvaluateContext.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/EvaluateContext.java deleted file mode 100644 index 6b304c33..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/EvaluateContext.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.sdk.JsEvaluateContext; - -/** - * Projection of {@link JsEvaluateContext} into Eclipse world. - */ -public class EvaluateContext { - private final JsEvaluateContext jsEvaluateContext; - private final JavascriptThread.SuspendedState threadState; - - EvaluateContext(JsEvaluateContext jsEvaluateContext, - JavascriptThread.SuspendedState threadState) { - this.jsEvaluateContext = jsEvaluateContext; - this.threadState = threadState; - } - - public JsEvaluateContext getJsEvaluateContext() { - return jsEvaluateContext; - } - - public JavascriptThread.SuspendedState getThreadSuspendedState() { - return threadState; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/HardcodedSourceWrapProvider.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/HardcodedSourceWrapProvider.java deleted file mode 100644 index daa80bd9..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/HardcodedSourceWrapProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import org.eclipse.osgi.util.NLS; -import org.json.simple.JSONObject; - -/** - * Provides a set of standard known source wrappers (for example for Node.JS). - */ -public class HardcodedSourceWrapProvider implements IPredefinedSourceWrapProvider { - @Override - public Collection getWrappers() { - return entries; - } - - private final List entries = - Arrays.asList(new NodeJsStandardEntry(), new NodeJsWithDefinedEntry()); - - private static abstract class NodeJsBase extends Entry { - protected static final String SUFFIX = "\n});"; //$NON-NLS-1$ - - private final String prefix; - - NodeJsBase(String id, String name, String prefix) { - super(id, new SourceWrapSupport.StringBasedWrapper(name, prefix, SUFFIX)); - this.prefix = prefix; - } - - @Override - public String getHumanDescription() { - JSONObject object = new JSONObject(); - object.put("prefix", prefix); //$NON-NLS-1$ - object.put("suffix", SUFFIX); //$NON-NLS-1$ - - return NLS.bind(Messages.HardcodedSourceWrapProvider_DESCRIPTION, getSpecialization(), - object.toJSONString()); - } - - protected abstract String getSpecialization(); - } - - private static class NodeJsStandardEntry extends NodeJsBase { - private static final String NAME = Messages.HardcodedSourceWrapProvider_STANDARD; - // As defined at https://github.com/joyent/node.git - // commit fc025f878a0b7a5bbb5810005da3e09cb856b773 Jan 31, 2010 (version 0.1.29) - private static final String PREFIX = - "(function (exports, require, module, __filename, __dirname) { "; //$NON-NLS-1$ - - NodeJsStandardEntry() { - super(NodeJsStandardEntry.class.getName(), NAME, PREFIX); - } - - @Override - protected String getSpecialization() { - return Messages.HardcodedSourceWrapProvider_STANDARD_2; - } - } - - private static class NodeJsWithDefinedEntry extends NodeJsBase { - private static final String NAME = Messages.HardcodedSourceWrapProvider_WITH_DEFINED_2; - // As defined at https://github.com/joyent/node.git between commits: - // 703a1ffe52b66972f38db19fb68e0f70c3dd2631 Jul 29, 2011 (version 0.5.3) - // 9967c369c9272335bb0343558673b689725c6d7c Jun 12, 2011 (version 0.5.0) - private static final String PREFIX = - "(function (exports, require, module, __filename, __dirname, define) { "; //$NON-NLS-1$ - - NodeJsWithDefinedEntry() { - super(NodeJsWithDefinedEntry.class.getName(), NAME, PREFIX); - } - - @Override - protected String getSpecialization() { - return Messages.HardcodedSourceWrapProvider_WITH_DEFINED; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IPredefinedSourceWrapProvider.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IPredefinedSourceWrapProvider.java deleted file mode 100644 index 712b7986..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IPredefinedSourceWrapProvider.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.RegistryFactory; - -/** - * Provides a collection of source wrappers. They are predefined and immutable. - */ -public interface IPredefinedSourceWrapProvider { - Collection getWrappers(); - - /** - * Describes source wrapper. - */ - abstract class Entry { - private final String id; - private final SourceWrapSupport.Wrapper wrapper; - - public Entry(String id, SourceWrapSupport.Wrapper wrapper) { - this.id = id; - this.wrapper = wrapper; - } - - /** - * @return a unique id of the source wrap entry (fully qualified name is recommended) - */ - public String getId() { - return id; - } - - /** - * @return an instance of source wrapper - */ - public SourceWrapSupport.Wrapper getWrapper() { - return wrapper; - } - - /** - * @return a human-readable wrapper description that can be used in UI - */ - public abstract String getHumanDescription(); - } - - /** - * Provides a standard mean of accessing instance of this interface. It uses - * Eclipse/OSGI extension registry. - */ - class Access { - public static final String EXTENSION_POINT_ID = - "org.chromium.debug.core.model_IPredefinedSourceWrapProvider"; - public static final String ELEMENT_NAME = "wrap-provider"; - public static final String CLASS_PROPERTY = "class"; - - /** - * @return all entries from all providers in for of id-to-entry map - */ - public static Map getEntries() { - return ENTRY_MAP; - } - - private static final Map ENTRY_MAP; - static { - ENTRY_MAP = new HashMap(); - for (IPredefinedSourceWrapProvider provider : getProviders()) { - for (IPredefinedSourceWrapProvider.Entry entry : provider.getWrappers()) { - ENTRY_MAP.put(entry.getId(), entry); - } - } - } - - /** - * Provides a standard mean of getting an instances of interface. It uses - * Eclipse/OSGI extension registry. - */ - private static Collection getProviders() { - List result = new ArrayList(); - IExtensionPoint extensionPoint = RegistryFactory.getRegistry().getExtensionPoint( - EXTENSION_POINT_ID); - IExtension[] extensions = extensionPoint.getExtensions(); - - for (IExtension extension : extensions) { - for (IConfigurationElement element : extension.getConfigurationElements()) { - if (!ELEMENT_NAME.equals(element.getName())) { - continue; - } - Object obj; - try { - obj = element.createExecutableExtension(CLASS_PROPERTY); - } catch (CoreException e) { - throw new RuntimeException(e); - } - IPredefinedSourceWrapProvider provider = (IPredefinedSourceWrapProvider) obj; - result.add(provider); - } - } - return result; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IgnoreCountData.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IgnoreCountData.java deleted file mode 100644 index efde8e30..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/IgnoreCountData.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.chromium.debug.core.model; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.sdk.Breakpoint; - -/** - * A structure used to store ignore count parameter. It contains integer 'value' and - * additional field 'state' (see the enum). - */ -public class IgnoreCountData { - public static IgnoreCountData parseString(String input) { - int separatorPos = input.indexOf('/'); - String valueStr; - String stateStr; - if (separatorPos == -1) { - valueStr = input; - stateStr = null; - } else { - valueStr = input.substring(0, separatorPos); - stateStr = input.substring(separatorPos + 1); - } - int value; - if (valueStr.isEmpty()) { - value = Breakpoint.EMPTY_VALUE; - } else { - try { - value = Integer.parseInt(valueStr); - } catch (NumberFormatException e) { - ChromiumDebugPlugin.log(new Exception("Failed to parse ignore count value: " + input, e)); - value = Breakpoint.EMPTY_VALUE; - } - } - - IgnoreCountData.State state; - if (stateStr == null) { - if (value == Breakpoint.EMPTY_VALUE) { - state = State.DISABLED; - } else { - state = State.ENABLED; - } - } else { - try { - state = State.valueOf(stateStr); - } catch (IllegalArgumentException e) { - ChromiumDebugPlugin.log(new Exception("Failed to parse ignore count value: " + input, e)); - state = State.ENABLED; - } - } - return new IgnoreCountData(value, state); - } - - private int value; - private IgnoreCountData.State state; - - public IgnoreCountData(int value, IgnoreCountData.State state) { - this.value = value; - this.state = state; - } - public int getValue() { - return value; - } - public void setValue(int value) { - this.value = value; - } - - public int getEffectiveValue() { - if (state == IgnoreCountData.State.ENABLED) { - return value; - } else { - return Breakpoint.EMPTY_VALUE; - } - } - - public IgnoreCountData.State getState() { - return state; - } - public void setState(IgnoreCountData.State state) { - this.state = state; - } - public String getStringRepresentation() { - return value + "/" + state.toString(); - } - - /** - * Additional field of the ignore count data. It modulates semantics of the numeric 'value'. - */ - public enum State { - /** - * User has set ignore count for the breakpoint, value stores the number. - */ - ENABLED, - - /** - * User has disabled ignore count, value stores last used number and is visible - * in 'properties' dialog. - */ - DISABLED, - - /** - * IDE has disabled ignore count because debugger finally has stopped on the breakpoint. - * This differs from {@link #DISABLED} only to give breakpoint handler a hint that this - * change mustn't be applied to SDK. - */ - RESET - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavaScriptFormatter.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavaScriptFormatter.java deleted file mode 100644 index 65b29811..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavaScriptFormatter.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.RegistryFactory; - -/** - * Provides a format operation for JavaScript source text. Result is optimized for - * future position translation operation. - *

- * A particular implementation of adapter should be registered as an extension. - */ -public interface JavaScriptFormatter { - - Result format(String sourceString); - - /** - * Represents formatting result. It contains a formatted text and a mapping - * between original and formatted versions. - */ - interface Result { - String getFormattedText(); - - StringMappingData getInputTextData(); - StringMappingData getFormattedTextData(); - } - - /** - * Provides a standard mean of getting a single implementation of this interface. It uses - * Eclipse/OSGI extension registry. - */ - class Access { - public static final String EXTENSION_POINT_ID = - "org.chromium.debug.core.model_JavaScriptFormatter"; - public static final String ELEMENT_NAME = "formatter"; - public static final String CLASS_PROPERTY = "class"; - - /** - * @return an instance of (any random) implementation of {@link JavaScriptFormatter} or null - */ - public static JavaScriptFormatter getInstance() { - IExtensionPoint extensionPoint = RegistryFactory.getRegistry().getExtensionPoint( - EXTENSION_POINT_ID); - IExtension[] extensions = extensionPoint.getExtensions(); - - for (IExtension extension : extensions) { - for (IConfigurationElement element : extension.getConfigurationElements()) { - if (!ELEMENT_NAME.equals(element.getName())) { - continue; - } - Object obj; - try { - obj = element.createExecutableExtension(CLASS_PROPERTY); - } catch (CoreException e) { - throw new RuntimeException(e); - } - return (JavaScriptFormatter) obj; - } - } - return null; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptThread.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptThread.java deleted file mode 100644 index 51873f14..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptThread.java +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import static org.chromium.sdk.util.BasicUtil.toArray; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.atomic.AtomicReference; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.sdk.Breakpoint; -import org.chromium.sdk.CallFrame; -import org.chromium.sdk.DebugContext; -import org.chromium.sdk.DebugContext.StepAction; -import org.chromium.sdk.ExceptionData; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.debug.core.model.IVariable; - -/** - * This class represents the only Chromium V8 VM thread. - */ -public class JavascriptThread extends DebugElementImpl.WithConnected - implements IThread, IAdaptable { - - private final RemoteEventListener remoteEventListener = new RemoteEventListener(); - - private volatile StepState currentStepState = new RunningState(ResumeReason.UNSPECIFIED); - private final Object currentStepStateMonitor = new Object(); - - private volatile SuspendReason expectedSuspendReason = SuspendReason.UNSPECIFIED; - - /** - * Holds 'suspended' state of the thread. As such has a getter to {@link DebugContext}. - * It also keep references to basic enclosing objects. - */ - public interface SuspendedState { - JavascriptThread getThread(); - - DebugContext getDebugContext(); - - /** - * Unsafe asynchronous getter: may return false, while the actual value has become true. - */ - boolean isDismissed(); - } - - /** - * Visitor that is used to describe thread state in UI. It doesn't expose too much of internals. - */ - public interface StateVisitor { - R visitResumed(ResumeReason resumeReason); - R visitSuspended(IBreakpoint[] breakpoints, ExceptionData exceptionData); - } - - /** - * Constructs a new thread for the given target - * - * @param connectedTargetData this thread is created for - */ - public JavascriptThread(ConnectedTargetData connectedTargetData) { - super(connectedTargetData); - } - - /** - * @return a separated interface for all remote events dispatching - */ - RemoteEventListener getRemoteEventListener() { - return remoteEventListener; - } - - ISuspendResume getSuspendResumeAspect() { - return suspendResumeAspect; - } - - public StackFrameBase[] getStackFrames() throws DebugException { - return currentStepState.getStackFrames(); - } - - /** - * @return expose some information about thread state for UI presentation - */ - public R describeState(StateVisitor visitor) { - return currentStepState.describeState(visitor); - } - - private static StackFrameBase[] wrapStackFrames(JavascriptThread.SuspendedState threadState) { - DebugContext debugContext = threadState.getDebugContext(); - List jsFrames = debugContext.getCallFrames(); - List result = new ArrayList(jsFrames.size() + 1); - - ExceptionData exceptionData = debugContext.getExceptionData(); - if (exceptionData != null) { - // Add fake 'throw exception' frame. - EvaluateContext evaluateContext = - new EvaluateContext(debugContext.getGlobalEvaluateContext(), threadState); - result.add(new ExceptionStackFrame(evaluateContext, exceptionData)); - } - for (CallFrame jsFrame : jsFrames) { - result.add(new StackFrame(threadState, jsFrame)); - } - return toArray(result, StackFrameBase.class); - } - - /** - * A fake stackframe that represents 'throwing exception'. It's a frame that holds an exception - * as its only variable. This might be the only means to expose exception value to user because - * exception may be raised with no frames on stack (e.g. compile error). - */ - private static class ExceptionStackFrame extends StackFrameBase { - private final IVariable[] variables; - private final ExceptionData exceptionData; - - private ExceptionStackFrame(EvaluateContext evaluateContext, ExceptionData exceptionData) { - super(evaluateContext); - this.exceptionData = exceptionData; - - Variable variable = Variable.forException(evaluateContext, exceptionData); - variables = new IVariable[] { variable }; - } - - @Override - public IVariable[] getVariables() throws DebugException { - return variables; - } - - @Override - public boolean hasVariables() throws DebugException { - return variables.length > 0; - } - - @Override - public int getLineNumber() throws DebugException { - return -1; - } - - @Override - public int getCharStart() throws DebugException { - return -1; - } - - @Override - public int getCharEnd() throws DebugException { - return getCharStart(); - } - - @Override - public String getName() throws DebugException { - return ""; - } - - @Override - Object getObjectForEquals() { - return exceptionData; - } - - @Override - boolean isRegularFrame() { - return false; - } - } - - public boolean hasStackFrames() throws DebugException { - return isSuspended(); - } - - public int getPriority() throws DebugException { - return 0; - } - - public IStackFrame getTopStackFrame() throws DebugException { - // Do not return frames[0] if it's a fake 'exception throwing' frame. - StackFrameBase[] frames = getStackFrames(); - if (frames.length == 0) { - return null; - } - if (frames[0].isRegularFrame()) { - return frames[0]; - } - if (frames.length == 1) { - return null; - } - return frames[1]; - } - - public String getName() throws DebugException { - return getDebugTarget().getLabelProvider().getThreadLabel(this); - } - - public IBreakpoint[] getBreakpoints() { - return currentStepState.getBreakpoints(); - } - - public boolean canResume() { - return suspendResumeAspect.canResume(); - } - - public boolean canSuspend() { - return suspendResumeAspect.canSuspend(); - } - - public boolean isSuspended() { - return suspendResumeAspect.isSuspended(); - } - - public void resume() throws DebugException { - suspendResumeAspect.resume(); - } - - public void suspend() throws DebugException { - suspendResumeAspect.suspend(); - } - - public boolean canStepInto() { - return currentStepState.canStep(); - } - - public boolean canStepOver() { - return currentStepState.canStep(); - } - - public boolean canStepReturn() { - return currentStepState.canStep(); - } - - public boolean isStepping() { - return currentStepState.isStepping(); - } - - public void stepInto() throws DebugException { - currentStepState.step(StepAction.IN, ResumeReason.STEP_INTO); - } - - public void stepOver() throws DebugException { - currentStepState.step(StepAction.OVER, ResumeReason.STEP_OVER); - } - - public void stepReturn() throws DebugException { - currentStepState.step(StepAction.OUT, ResumeReason.STEP_RETURN); - } - - public boolean canTerminate() { - return getDebugTarget().canTerminate(); - } - - public boolean isTerminated() { - return getDebugTarget().isTerminated(); - } - - public void terminate() throws DebugException { - getDebugTarget().terminate(); - } - - EvaluateContext getEvaluateContext() { - return currentStepState.getEvaluateContext(); - } - - @Override - @SuppressWarnings("unchecked") - public Object getAdapter(Class adapter) { - if (adapter == EvaluateContext.class) { - return getEvaluateContext(); - } - return super.getAdapter(adapter); - } - - class RemoteEventListener { - - void suspended(DebugContext context) { - SuspendedStateImpl suspendedState; - synchronized (currentStepStateMonitor) { - if (currentStepState.isSuspended()) { - throw new IllegalStateException("Already in suspended state"); - } - suspendedState = new SuspendedStateImpl(context); - currentStepState = suspendedState; - } - - WorkspaceBridge workspaceRelations = getConnectedData().getWorkspaceRelations(); - - Collection uiBreakpointsHit; - SuspendReason suspendedReason; - - if (context.getState() == DebugContext.State.EXCEPTION) { - uiBreakpointsHit = - workspaceRelations.getBreakpointHandler().exceptionBreakpointHit( - context.getExceptionData().isUncaught()); - suspendedReason = SuspendReason.BREAKPOINT; - } else { - Collection sdkBreakpointsHit = context.getBreakpointsHit(); - uiBreakpointsHit = - workspaceRelations.getBreakpointHandler().breakpointsHit(sdkBreakpointsHit); - if (sdkBreakpointsHit.isEmpty()) { - suspendedReason = expectedSuspendReason; - } else { - suspendedReason = SuspendReason.BREAKPOINT; - } - } - - suspendedState.setBreakpoints(uiBreakpointsHit); - - int suspendedDetail; - if (suspendedReason == null) { - suspendedDetail = DebugEvent.UNSPECIFIED; - } else { - suspendedDetail = suspendedReason.detailCode; - } - getConnectedData().fireSuspendEvent(suspendedDetail); - } - - void resumed(ResumeReason resumeReason) { - synchronized (currentStepStateMonitor) { - if (!currentStepState.isSuspended()) { - // Ignore. - return; - } - if (resumeReason == null) { - resumeReason = ResumeReason.UNSPECIFIED; - } - currentStepState.dismiss(); - currentStepState = new RunningState(resumeReason); - } - getConnectedData().fireResumeEvent(resumeReason.detailCode); - } - - } - - private static abstract class StepState { - abstract EvaluateContext getEvaluateContext(); - - abstract IBreakpoint[] getBreakpoints(); - - abstract StackFrameBase[] getStackFrames(); - - abstract boolean isSuspended(); - abstract void resume(); - abstract boolean canSuspend(); - abstract void suspend(); - - abstract boolean isStepping(); - abstract void step(StepAction stepAction, ResumeReason resumeReason); - abstract boolean canStep(); - - abstract R describeState(StateVisitor visitor); - - abstract void dismiss(); - } - - private class RunningState extends StepState { - private final ResumeReason resumeReason; - - RunningState(ResumeReason resumeReason) { - this.resumeReason = resumeReason; - } - - @Override boolean isSuspended() { - return false; - } - - @Override boolean canSuspend() { - return true; - } - - @Override - void suspend() { - expectedSuspendReason = SuspendReason.CLIENT_REQUEST; - getConnectedData().getJavascriptVm().suspend(null); - } - - @Override StackFrameBase[] getStackFrames() { - return EMPTY_FRAMES; - } - - @Override IBreakpoint[] getBreakpoints() { - return EMPTY_BREAKPOINTS; - } - - @Override boolean isStepping() { - return resumeReason.isStepping; - } - - @Override boolean canStep() { - return false; - } - - @Override void step(StepAction stepAction, ResumeReason resumeReason) { - // Ignore. - } - - @Override void resume() { - // Ignore. - } - - @Override EvaluateContext getEvaluateContext() { - return null; - } - - @Override void dismiss() { - } - - @Override - R describeState(StateVisitor visitor) { - return visitor.visitResumed(resumeReason); - } - } - - private class SuspendedStateImpl extends StepState implements SuspendedState { - private final DebugContext context; - private volatile boolean isDismissed = false; - - /** - * Breakpoints this thread is suspended at or empty array if none. - */ - private volatile IBreakpoint[] breakpoints = EMPTY_BREAKPOINTS; - - /** - * Cached stack - */ - private final AtomicReference stackFrames = - new AtomicReference(null); - - SuspendedStateImpl(DebugContext context) { - this.context = context; - } - - @Override public JavascriptThread getThread() { - return JavascriptThread.this; - } - - @Override public DebugContext getDebugContext() { - return context; - } - - @Override void dismiss() { - isDismissed = true; - } - - @Override public boolean isDismissed() { - return isDismissed; - } - - void setBreakpoints(Collection uiBreakpoints) { - this.breakpoints = toArray(uiBreakpoints, IBreakpoint.class); - } - - @Override boolean isSuspended() { - return true; - } - - @Override boolean canSuspend() { - return false; - } - - @Override void suspend() { - // Ignore. - } - - @Override boolean canStep() { - return true; - } - - @Override - void resume() { - continueVm(StepAction.CONTINUE, ResumeReason.CLIENT_REQUEST, SuspendReason.UNSPECIFIED); - } - - @Override - void step(StepAction stepAction, ResumeReason resumeReason) { - continueVm(stepAction, resumeReason, SuspendReason.STEP_END); - } - - private void continueVm(StepAction stepAction, final ResumeReason resumeReason, - SuspendReason futureSuspendReason) { - expectedSuspendReason = futureSuspendReason; - - DebugContext.ContinueCallback callback = new DebugContext.ContinueCallback() { - @Override public void success() { - remoteEventListener.resumed(resumeReason); - } - - @Override public void failure(String errorMessage) { - ChromiumDebugPlugin.log(new Exception("Failed to resume: " + errorMessage)); - } - }; - - context.continueVm(stepAction, 1, callback); - } - - @Override - StackFrameBase[] getStackFrames() { - StackFrameBase[] result = stackFrames.get(); - if (result == null) { - result = wrapStackFrames(this); - stackFrames.compareAndSet(null, result); - result = stackFrames.get(); - } - return result; - } - - @Override IBreakpoint[] getBreakpoints() { - return breakpoints; - } - - @Override boolean isStepping() { - return false; - } - - @Override EvaluateContext getEvaluateContext() { - return new EvaluateContext(context.getGlobalEvaluateContext(), this); - } - - @Override - R describeState(StateVisitor visitor) { - return visitor.visitSuspended(breakpoints, context.getExceptionData()); - } - } - - private final ISuspendResume suspendResumeAspect = new ISuspendResume() { - @Override public boolean canResume() { - return !isDisconnected() && isSuspended(); - } - - @Override public boolean isSuspended() { - return !isDisconnected() && currentStepState.isSuspended(); - } - - @Override public void resume() throws DebugException { - currentStepState.resume(); - } - - @Override public boolean canSuspend() { - return !isDisconnected() && currentStepState.canSuspend(); - } - - @Override public void suspend() throws DebugException { - currentStepState.suspend(); - } - - private boolean isDisconnected() { - return getConnectedData().isDisconnected(); - } - }; - - /** - * Wraps Eclipse mixed-up constants in a dedicated enum type. - */ - public enum ResumeReason { - STEP_INTO(DebugEvent.STEP_INTO, true), - STEP_OVER(DebugEvent.STEP_OVER, true), - STEP_RETURN(DebugEvent.STEP_RETURN, true), - CLIENT_REQUEST(DebugEvent.CLIENT_REQUEST, false), - UNSPECIFIED(DebugEvent.UNSPECIFIED, false); - - private final int detailCode; - private final boolean isStepping; - - ResumeReason(int detailCode, boolean isStepping) { - this.detailCode = detailCode; - this.isStepping = isStepping; - } - } - - /** - * Wraps Eclipse mixed-up constants in a dedicated enum type. - */ - private enum SuspendReason { - STEP_END(DebugEvent.STEP_END), - CLIENT_REQUEST(DebugEvent.CLIENT_REQUEST), - BREAKPOINT(DebugEvent.BREAKPOINT), - UNSPECIFIED(DebugEvent.UNSPECIFIED); - - final int detailCode; - - SuspendReason(int detailCode) { - this.detailCode = detailCode; - } - } - - private static final StackFrame[] EMPTY_FRAMES = new StackFrame[0]; - private static final IBreakpoint[] EMPTY_BREAKPOINTS = new IBreakpoint[0]; -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedder.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedder.java deleted file mode 100644 index 340953f8..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.ScriptNameManipulator; -import org.chromium.sdk.DebugEventListener; -import org.chromium.sdk.JavascriptVm; -import org.eclipse.core.runtime.CoreException; - -/** - * Abstraction of application embedding JavaScript VM. Technically subtypes - * of {@code JavascriptVm} describe embedding application themselves. - * This interface simply holds reference to {@code JavascriptVm} and adapts - * various subtypes of {@code JavascriptVm} to a uniform interface - * suitable for {@code DebugTargetImpl}. Notably, it has polymorphous method - * {@code #attach(Listener, DebugEventListener)}, which {@code JavascriptVm} - * lacks. - */ -public interface JavascriptVmEmbedder { - - /** - * First intermediate object that corresponds to already connected server. - * This does not refer to a particular Javascript VM though: - * the server may contain several VMs to choose from. - */ - interface ConnectionToRemote { - /** - * This method performs selecting a particular Javascript VM. This is - * likely to be a user-assisted activity, so this method may block - * indefinitely. - * @return null if no VM has been chosen and we should cancel the operation - */ - VmConnector selectVm() throws CoreException; - - void disposeConnection(); - } - - /** - * Intermediate object that works as an intermediate factory - * for {@code JavascriptVmEmbedder}. - */ - interface VmConnector { - JavascriptVmEmbedder attach(Listener embedderListener, DebugEventListener debugEventListener) - throws CoreException; - } - - /** - * @return not null - */ - JavascriptVm getJavascriptVm(); - - String getTargetName(); - - String getThreadName(); - - /** - * @return script name manipulator that knows the schema of script names in this JavaScript VM - */ - ScriptNameManipulator getScriptNameManipulator(); - - /** - * Listener that should handle embedder-specific events. - * TODO(peter.rybin): clean-up this interface; maybe decrease number of - * methods. - */ - interface Listener { - /** - * State of VM has been reset. All scripts might have been changed, name of - * target and thread might have been changed. E.g. browser tab might have - * been navigated from one url to another. - */ - void reset(); - - void closed(); - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedderFactory.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedderFactory.java deleted file mode 100644 index 1e6f4007..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/JavascriptVmEmbedderFactory.java +++ /dev/null @@ -1,452 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import static org.chromium.sdk.util.BasicUtil.join; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.MessageFormat; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.ScriptNameManipulator; -import org.chromium.debug.core.util.JavaScriptRegExpSupport; -import org.chromium.sdk.Browser; -import org.chromium.sdk.Browser.TabConnector; -import org.chromium.sdk.Browser.TabFetcher; -import org.chromium.sdk.BrowserFactory; -import org.chromium.sdk.BrowserTab; -import org.chromium.sdk.ConnectionLogger; -import org.chromium.sdk.DebugEventListener; -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.StandaloneVm; -import org.chromium.sdk.TabDebugEventListener; -import org.chromium.sdk.UnsupportedVersionException; -import org.chromium.sdk.wip.WipBackend; -import org.chromium.sdk.wip.WipBrowser; -import org.chromium.sdk.wip.WipBrowser.WipTabConnector; -import org.chromium.sdk.wip.WipBrowserFactory; -import org.chromium.sdk.wip.WipBrowserTab; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Status; - -public class JavascriptVmEmbedderFactory { - public static JavascriptVmEmbedder.ConnectionToRemote connectToChromeDevTools(String host, - int port, NamedConnectionLoggerFactory connectionLoggerFactory, - final TabSelector tabSelector) throws CoreException { - - SocketAddress address = new InetSocketAddress(host, port); - final Browser browser = browserCache.getOrCreateBrowser(address, connectionLoggerFactory); - - return connect(browser, tabSelector); - } - - public static JavascriptVmEmbedder.ConnectionToRemote connectToWipBrowser(String host, int port, - WipBackend backend, - final NamedConnectionLoggerFactory browserLoggerFactory, - final NamedConnectionLoggerFactory tabLoggerFactory, - WipTabSelector tabSelector) throws CoreException { - - InetSocketAddress address = new InetSocketAddress(host, port); - WipBrowserFactory.LoggerFactory factory = new WipBrowserFactory.LoggerFactory() { - @Override - public ConnectionLogger newBrowserConnectionLogger() { - return browserLoggerFactory.createLogger("Connection to browser"); - } - - @Override - public ConnectionLogger newTabConnectionLogger() { - return browserLoggerFactory.createLogger("Connection to tab"); - } - }; - - final WipBrowser browser = - WipBrowserFactory.INSTANCE.createBrowser(address, factory); - - return connectWip(browser, backend, tabSelector); - } - - private static JavascriptVmEmbedder.ConnectionToRemote connect(Browser browser, - final TabSelector tabSelector) throws CoreException { - - final TabFetcher tabFetcher; - try { - tabFetcher = browser.createTabFetcher(); - } catch (UnsupportedVersionException e) { - throw newCoreException(e); - } catch (IOException e) { - throw newCoreException(e); - } - - return new JavascriptVmEmbedder.ConnectionToRemote() { - public JavascriptVmEmbedder.VmConnector selectVm() throws CoreException { - Browser.TabConnector targetTabConnector; - try { - targetTabConnector = tabSelector.selectTab(tabFetcher); - } catch (IOException e) { - throw newCoreException("Failed to get tabs for debugging", e); - } - if (targetTabConnector == null) { - return null; - } - - return new EmbeddingTabConnectorImpl(targetTabConnector); - } - - public void disposeConnection() { - tabFetcher.dismiss(); - } - }; - } - - private static JavascriptVmEmbedder.ConnectionToRemote connectWip(final WipBrowser browser, - final WipBackend backend, final WipTabSelector tabSelector) throws CoreException { - return new JavascriptVmEmbedder.ConnectionToRemote() { - public JavascriptVmEmbedder.VmConnector selectVm() throws CoreException { - WipTabSelector.BrowserAndBackend browserAndBackend = - new WipTabSelector.BrowserAndBackend() { - @Override public WipBrowser getBrowser() { - return browser; - } - @Override public WipBackend getBackend() { - return backend; - } - }; - WipBrowser.WipTabConnector targetTabConnector; - try { - targetTabConnector = tabSelector.selectTab(browserAndBackend); - } catch (IOException e) { - throw newCoreException("Failed to get tabs for debugging", e); - } - if (targetTabConnector == null) { - return null; - } - - return new WipEmbeddingTabConnector(targetTabConnector, backend.getId()); - } - - public void disposeConnection() { - } - }; - } - - private static abstract class EmbeddingTabConnectorBase - implements JavascriptVmEmbedder.VmConnector { - private final TC targetTabConnector; - - EmbeddingTabConnectorBase(TC targetTabConnector) { - this.targetTabConnector = targetTabConnector; - } - - protected TC getTabConnector() { - return targetTabConnector; - } - - public JavascriptVmEmbedder attach(final JavascriptVmEmbedder.Listener embedderListener, - final DebugEventListener debugEventListener) throws CoreException { - TabDebugEventListener tabDebugEventListener = new TabDebugEventListener() { - public DebugEventListener getDebugEventListener() { - return debugEventListener; - } - public void closed() { - embedderListener.closed(); - } - public void navigated(String newUrl) { - embedderListener.reset(); - } - }; - - return attach(tabDebugEventListener); - } - - protected abstract JavascriptVmEmbedder attach(TabDebugEventListener tabDebugEventListener) - throws CoreException; - - protected static abstract class EmbedderBase implements JavascriptVmEmbedder { - @Override - public ScriptNameManipulator getScriptNameManipulator() { - return BROWSER_SCRIPT_NAME_MANIPULATOR; - } - } - - private static final ScriptNameManipulator BROWSER_SCRIPT_NAME_MANIPULATOR = - new ScriptNameManipulator() { - @Override - public FilePath getFileName(String scriptName) { - String filePath; - try { - URI uri = new URI(scriptName); - filePath = uri.getPath(); - } catch (URISyntaxException e) { - filePath = scriptName; - } - return new StringBasedFileName(filePath); - } - - @Override - public ScriptNamePattern createPattern(List components) { - String pathString = join(components, "/"); - return new ScriptNamePattern( - JavaScriptRegExpSupport.encodeLiteral(pathString) + "/?($|\\?)"); - } - }; - } - - private static class EmbeddingTabConnectorImpl - extends EmbeddingTabConnectorBase { - EmbeddingTabConnectorImpl(TabConnector targetTabConnector) { - super(targetTabConnector); - } - - @Override - protected JavascriptVmEmbedder attach(TabDebugEventListener tabDebugEventListener) - throws CoreException { - final BrowserTab browserTab; - try { - browserTab = getTabConnector().attach(tabDebugEventListener); - } catch (IOException e) { - throw newCoreException("Failed to connect to browser tab", e); - } - return new EmbedderBase() { - public JavascriptVm getJavascriptVm() { - return browserTab; - } - - public String getTargetName() { - return Messages.DebugTargetImpl_TargetName; - } - - - public String getThreadName() { - return browserTab.getUrl(); - } - }; - } - } - - private static class WipEmbeddingTabConnector - extends EmbeddingTabConnectorBase { - private final String backendId; - - WipEmbeddingTabConnector(WipTabConnector targetTabConnector, String backendId) { - super(targetTabConnector); - this.backendId = backendId; - } - - @Override - protected JavascriptVmEmbedder attach(TabDebugEventListener tabDebugEventListener) - throws CoreException { - final WipBrowserTab browserTab; - try { - browserTab = getTabConnector().attach(tabDebugEventListener); - } catch (IOException e) { - throw newCoreException("Failed to connect to browser tab: " + e.getMessage(), e); - } - return new EmbedderBase() { - public JavascriptVm getJavascriptVm() { - return browserTab.getJavascriptVm(); - } - - public String getTargetName() { - return Messages.DebugTargetImpl_TargetName + " # " + backendId; - } - - public String getThreadName() { - return browserTab.getUrl(); - } - }; - } - } - - public static JavascriptVmEmbedder.ConnectionToRemote connectToStandalone(String host, int port, - NamedConnectionLoggerFactory connectionLoggerFactory) { - SocketAddress address = new InetSocketAddress(host, port); - ConnectionLogger connectionLogger = - connectionLoggerFactory.createLogger(address.toString()); - final StandaloneVm standaloneVm = BrowserFactory.getInstance().createStandalone(address, - connectionLogger); - - return new JavascriptVmEmbedder.ConnectionToRemote() { - public JavascriptVmEmbedder.VmConnector selectVm() { - return new JavascriptVmEmbedder.VmConnector() { - public JavascriptVmEmbedder attach(JavascriptVmEmbedder.Listener embedderListener, - DebugEventListener debugEventListener) - throws CoreException { - embedderListener = null; - //+ @since 0.9 modified exception message string - String ERROR_STRING = "Nodeclipse/chromedevtools failed to connect to Standalone V8 VM " - +"( Check Help (F1) and Support http://www.nodeclipse.org/#support )\n. Info:"; - try { - standaloneVm.attach(debugEventListener); - } catch (IOException e) { - throw newCoreException(ERROR_STRING, e); - } catch (UnsupportedVersionException e) { - throw newCoreException(ERROR_STRING, e); - } - return new JavascriptVmEmbedder() { - public JavascriptVm getJavascriptVm() { - return standaloneVm; - } - public String getTargetName() { - String embedderName = standaloneVm.getEmbedderName(); - String vmVersion = standaloneVm.getVmVersion(); - String disconnectReason = standaloneVm.getDisconnectReason(); - String targetTitle; - if (embedderName == null) { - targetTitle = ""; //$NON-NLS-1$ - } else { - targetTitle = MessageFormat.format( - Messages.JavascriptVmEmbedderFactory_TargetName0, embedderName, vmVersion); - } - boolean isAttached = standaloneVm.isAttached(); - if (!isAttached) { - String disconnectMessage; - if (disconnectReason == null) { - disconnectMessage = Messages.JavascriptVmEmbedderFactory_Terminated; - } else { - disconnectMessage = MessageFormat.format( - Messages.JavascriptVmEmbedderFactory_TerminatedWithReason, - disconnectReason); - } - targetTitle = "<" + disconnectMessage + "> " + targetTitle; - } - return targetTitle; - } - public String getThreadName() { - return ""; //$NON-NLS-1$ - } - - @Override - public ScriptNameManipulator getScriptNameManipulator() { - return STANDALONE_SCRIPT_NAME_MANIPULATOR; - } - }; - } - }; - } - - public void disposeConnection() { - // Nothing to do. We do not take connection for ConnectionToRemote. - } - }; - } - - private static final ScriptNameManipulator STANDALONE_SCRIPT_NAME_MANIPULATOR = - new ScriptNameManipulator() { - @Override - public FilePath getFileName(String scriptName) { - return new StringBasedFileName(scriptName); - } - - @Override - public ScriptNamePattern createPattern(List components) { - String pathString = join(components, "/"); - return new ScriptNamePattern(JavaScriptRegExpSupport.encodeLiteral(pathString) + "/?$"); - } - }; - - private static CoreException newCoreException(String message, Throwable cause) { - return new CoreException( - new Status(Status.ERROR, ChromiumDebugPlugin.PLUGIN_ID, message, cause)); - } - private static CoreException newCoreException(Exception e) { - return new CoreException( - new Status(Status.ERROR, ChromiumDebugPlugin.PLUGIN_ID, - "Failed to connect to the remote browser", e)); - } - - private static final BrowserCache browserCache = new BrowserCache(); - /** - * Cache of browser instances. - */ - private static class BrowserCache { - - /** - * Tries to return already created instance of Browser connected to {@code address} - * or create new instance. - * However, it creates a new instance each time that {@code ConnectionLogger} is not null - * (because you cannot add connection logger to existing connection). - * @throws CoreException if browser can't be created because of conflict with connectionLogger - */ - synchronized Browser getOrCreateBrowser(final SocketAddress address, - final NamedConnectionLoggerFactory connectionLoggerFactory) throws CoreException { - Browser result = address2Browser.get(address); - if (result == null) { - - ConnectionLogger.Factory wrappedFactory = new ConnectionLogger.Factory() { - public ConnectionLogger newConnectionLogger() { - return connectionLoggerFactory.createLogger(address.toString()); - } - }; - result = createBrowserImpl(address, wrappedFactory); - - address2Browser.put(address, result); - } - return result; - } - private Browser createBrowserImpl(SocketAddress address, - ConnectionLogger.Factory connectionLoggerFactory) { - return BrowserFactory.getInstance().create(address, connectionLoggerFactory); - } - - private final Map address2Browser = - new HashMap(); - } - - private static class StringBasedFileName implements ScriptNameManipulator.FilePath { - private final String fullName; - private final int lastPos; - - public StringBasedFileName(String fullName) { - this.fullName = fullName; - this.lastPos = fullName.lastIndexOf('/'); - } - - @Override - public Iterator iterator() { - return new Iterator() { - private int currentPos = lastPos; - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public String next() { - int nextPos = fullName.lastIndexOf('/', currentPos - 1); - String result; - if (nextPos == -1) { - result = fullName.substring(0, currentPos); - } else { - result = fullName.substring(nextPos + 1, currentPos); - } - currentPos = nextPos; - return result; - } - - @Override - public boolean hasNext() { - return currentPos != -1; - } - }; - } - - @Override - public String getLastComponent() { - if (lastPos == -1) { - return fullName; - } else { - return fullName.substring(lastPos + 1); - } - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchInitializationProcedure.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchInitializationProcedure.java deleted file mode 100644 index 84ad5bba..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchInitializationProcedure.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.util.ProgressUtil; -import org.chromium.debug.core.util.ProgressUtil.MonitorWrapper; -import org.chromium.debug.core.util.ProgressUtil.Stage; -import org.chromium.sdk.CallbackSemaphore; -import org.chromium.sdk.RelayOk; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.osgi.util.NLS; - -/** - * Does several things we need on debug session start. This procedure works asynchronously while - * user may already start his debug activity. - */ -class LaunchInitializationProcedure { - static void startAsync(VProjectWorkspaceBridge workspaceBridge, - BreakpointSynchronizer.Direction presetDirection) { - final LaunchInitializationProcedure procedure = - new LaunchInitializationProcedure(workspaceBridge, presetDirection); - - ILaunch launch = workspaceBridge.getConnectedTargetData().getDebugTarget().getLaunch(); - final String jobName = NLS.bind(Messages.LaunchInitializationProcedure_JOB_NAME, - launch.getLaunchConfiguration().getName()); - Job job = new Job(jobName) { - @Override - protected IStatus run(IProgressMonitor monitor) { - return procedure.execute(monitor); - } - }; - job.schedule(); - } - - private final VProjectWorkspaceBridge workspaceBridge; - private final BreakpointSynchronizer.Direction presetDirection; - - private LaunchInitializationProcedure(VProjectWorkspaceBridge workspaceBridge, - BreakpointSynchronizer.Direction presetDirection) { - this.workspaceBridge = workspaceBridge; - this.presetDirection = presetDirection; - } - - /** - * A list of tasks for progress monitor. - */ - private interface WorkPlan { - Stage PREINIT = new Stage(Messages.LaunchInitializationProcedure_UPDATE_DEBUGGER_STATE, 0.1f); - Stage SET_OPTIONS = new Stage(Messages.LaunchInitializationProcedure_SET_OPTIONS, 1f); - Stage LOAD_SCRIPTS = new Stage(Messages.LaunchInitializationProcedure_LOAD_SCRIPTS, 1f); - Stage SYNCHRONIZE_BREAKPOINTS = - new Stage(Messages.LaunchInitializationProcedure_SYNCHRONIZE_BREAKPOINTS, 1f); - - boolean IS_INITIZALIZED = ProgressUtil.layoutProgressPlan(PREINIT, SET_OPTIONS, LOAD_SCRIPTS, - SYNCHRONIZE_BREAKPOINTS); - } - - private IStatus execute(IProgressMonitor monitor) { - ConnectedTargetData connectedTargetData = workspaceBridge.getConnectedTargetData(); - - MonitorWrapper monitorWrapper = new MonitorWrapper(monitor, ""); //$NON-NLS-1$ - - monitorWrapper.beginTask(); - try { - WorkPlan.PREINIT.start(monitorWrapper); - // Nothing here right now. - WorkPlan.PREINIT.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - WorkPlan.SET_OPTIONS.start(monitorWrapper); - // Not implemented yet - WorkPlan.SET_OPTIONS.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - WorkPlan.LOAD_SCRIPTS.start(monitorWrapper); - workspaceBridge.reloadScriptsAtStart(); - WorkPlan.LOAD_SCRIPTS.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - synchronizeBreakpoints( - WorkPlan.SYNCHRONIZE_BREAKPOINTS.createSubMonitorWrapper(monitorWrapper)); - - } finally { - monitorWrapper.done(); - } - return Status.OK_STATUS; - } - - /** - * A list of tasks for breakpoint synchronization subprocess. - */ - private interface BreakpointsWorkPlan { - Stage ANALYZE = new Stage(null, 1f); - Stage REMOTE_CHANGES = new Stage(null, 1f); - - boolean IS_LAYOUTED = ProgressUtil.layoutProgressPlan(ANALYZE, REMOTE_CHANGES); - } - - private void synchronizeBreakpoints(MonitorWrapper monitor) { - monitor.beginTask(); - try { - BreakpointsWorkPlan.ANALYZE.start(monitor); - - DebugTargetImpl debugTarget = workspaceBridge.getConnectedTargetData().getDebugTarget(); - ILaunchConfiguration launchConfiguration = debugTarget.getLaunch().getLaunchConfiguration(); - - BreakpointSynchronizer.Direction direction; - if (presetDirection == null) { - try { - direction = LaunchParams.readBreakpointSyncDirection(launchConfiguration); - } catch (CoreException e) { - ChromiumDebugPlugin.log( - new Exception("Failed to read breakpoint synchronization direction " + //$NON-NLS-1$ - "from launch configuration " + launchConfiguration.getName(), e)); //$NON-NLS-1$ - direction = null; - } - } else { - direction = presetDirection; - } - - if (direction == null) { - return; - } - final CallbackSemaphore callbackSemaphore = new CallbackSemaphore(); - BreakpointSynchronizer.Callback callback = new BreakpointSynchronizer.Callback() { - public void onDone(IStatus status) { - callbackSemaphore.callbackDone(null); - } - }; - workspaceBridge.getBreakpointSynchronizer().syncBreakpoints(direction, callback); - RelayOk relayOk = SYNCHRONIZER_MUST_RELAY_OK; - checkIsCanceled(monitor); - - BreakpointsWorkPlan.ANALYZE.finish(monitor); - - BreakpointsWorkPlan.REMOTE_CHANGES.start(monitor); - callbackSemaphore.tryAcquireDefault(relayOk); - BreakpointsWorkPlan.REMOTE_CHANGES.finish(monitor); - - } finally { - monitor.done(); - } - } - - private static void checkIsCanceled(MonitorWrapper monitor) { - if (monitor.isCanceled()) { - throw new OperationCanceledException(); - } - } - - private static final RelayOk SYNCHRONIZER_MUST_RELAY_OK = new RelayOk() {}; -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchParams.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchParams.java deleted file mode 100644 index 02742f42..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LaunchParams.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.model.BreakpointSynchronizer.Direction; -import org.chromium.debug.core.util.MementoFormat; -import org.chromium.debug.core.util.MementoFormat.ParserException; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.ILaunchConfiguration; - -public class LaunchParams { - - /** Launch configuration attribute (debug host). */ - public static final String CHROMIUM_DEBUG_HOST = "debug_host"; //$NON-NLS-1$ - - /** Launch configuration attribute (debug port). */ - public static final String CHROMIUM_DEBUG_PORT = "debug_port"; //$NON-NLS-1$ - - public static final String ADD_NETWORK_CONSOLE = "add_network_console"; //$NON-NLS-1$ - - public static final String BREAKPOINT_SYNC_DIRECTION = - "breakpoint_startup_sync_direction"; //$NON-NLS-1$ - - public static final String SOURCE_LOOKUP_MODE = "source_lookup_mode"; //$NON-NLS-1$ - - public static final String WIP_BACKEND_ID = "wip_backend_id"; //$NON-NLS-1$ - - // PREDEFINED_SOURCE_WRAPPER_IDS see below. - - public enum LookupMode { - EXACT_MATCH() { - @Override public R accept(Visitor visitor) { - return visitor.visitExactMatch(); - } - }, - AUTO_DETECT() { - @Override public R accept(Visitor visitor) { - return visitor.visitAutoDetect(); - } - }; - - public abstract R accept(Visitor visitor); - - public interface Visitor { - R visitExactMatch(); - R visitAutoDetect(); - } - - public static final LookupMode DEFAULT_VALUE = EXACT_MATCH; - - public static final ValueConverter STRING_CONVERTER = - new ValueConverter() { - @Override - public - String encode(LookupMode logical) { - return logical.toString(); - } - - @Override - public - LookupMode decode(String persistent) throws CoreException { - try { - return LookupMode.valueOf(persistent); - } catch (IllegalArgumentException e) { - Status status = new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID, - "Failed to parse lookup mode value", e); - throw new CoreException(status); - } - } - }; - } - - public static abstract class ValueConverter { - public abstract P encode(L logical); - public abstract L decode(P persistent) throws CoreException; - - @SuppressWarnings("unchecked") - public - static ValueConverter getTrivial() { - return (Trivial) Trivial.INSTANCE; - } - - private static class Trivial extends ValueConverter { - @Override public T encode(T logical) { - return logical; - } - - @Override public T decode(T persistent) { - return persistent; - } - private static final Trivial INSTANCE = new Trivial(); - } - } - - - public static class BreakpointOption { - private final String label; - private final Direction direction; - - BreakpointOption(String label, Direction direction) { - this.label = label; - this.direction = direction; - } - - public Direction getDirection() { - return direction; - } - - public String getDirectionStringValue() { - if (direction == null) { - return ""; - } else { - return direction.toString(); - } - } - - public String getLabel() { - return label; - } - } - - public static Direction readBreakpointSyncDirection(ILaunchConfiguration launchConfiguration) - throws CoreException { - String breakpointOptionString = - launchConfiguration.getAttribute(BREAKPOINT_SYNC_DIRECTION, (String)null); - int optionIndex = findBreakpointOption(breakpointOptionString); - return BREAKPOINT_OPTIONS.get(optionIndex).getDirection(); - } - - public final static List BREAKPOINT_OPTIONS = Arrays.asList( - new BreakpointOption(Messages.LaunchParams_MERGE_OPTION, Direction.MERGE), - new BreakpointOption(Messages.LaunchParams_RESET_REMOTE_OPTION, - Direction.RESET_REMOTE), - new BreakpointOption(Messages.LaunchParams_NONE_OPTION, null)); - - public static int findBreakpointOption(String optionText) { - int res; - res = findBreakpointOptionRaw(optionText); - if (res != -1) { - return res; - } - res = findBreakpointOptionRaw(null); - if (res != -1) { - return res; - } - throw new RuntimeException("Failed to find breakpoint option"); //$NON-NLS-1$ - } - - private static int findBreakpointOptionRaw(String optionText) { - Direction direction; - if (optionText == null || optionText.length() == 0) { - direction = null; - } else { - try { - direction = Direction.valueOf(optionText); - } catch (IllegalArgumentException e) { - ChromiumDebugPlugin.log( - new Exception("Failed to parse breakpoint synchronization option", e)); //$NON-NLS-1$ - return -1; - } - } - for (int i = 0; i < BREAKPOINT_OPTIONS.size(); i++) { - if (BREAKPOINT_OPTIONS.get(i).getDirection() == direction) { - return i; - } - } - return -1; - } - - public static class PredefinedSourceWrapperIds { - public static String CONFIG_PROPERTY = "predefined_source_wrapperd_ids"; //$NON-NLS-1$ - - public static final ValueConverter> CONVERTER = - new ValueConverter>() { - @Override - public String encode(List logical) { - StringBuilder builder = new StringBuilder(); - List list = new ArrayList(logical); - Collections.sort(list); - for (String id : list) { - MementoFormat.encodeComponent(id, builder); - } - return builder.toString(); - } - - @Override - public List decode(String persistent) throws CoreException { - List result = new ArrayList(); - MementoFormat.Parser parser = new MementoFormat.Parser(persistent); - while (parser.hasMore()) { - try { - result.add(parser.nextComponent()); - } catch (ParserException e) { - throw new RuntimeException("Failed to read config value '" + persistent + "'", e); - } - } - return result; - } - }; - - public static List resolveEntries( - ILaunchConfiguration config) throws CoreException { - String attributeValue = config.getAttribute( - LaunchParams.PredefinedSourceWrapperIds.CONFIG_PROPERTY, ""); - List predefinedWrapperIds = - LaunchParams.PredefinedSourceWrapperIds.CONVERTER.decode(attributeValue); - Map entries = - IPredefinedSourceWrapProvider.Access.getEntries(); - List result = - new ArrayList(predefinedWrapperIds.size()); - for (String id : predefinedWrapperIds) { - IPredefinedSourceWrapProvider.Entry entry = entries.get(id); - if (entry == null) { - throw new CoreException(new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID, - "Failed to find source wrapper by id '" + id + "'")); - } - result.add(entry); - } - return result; - } - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LineBreakpointAdapter.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LineBreakpointAdapter.java deleted file mode 100755 index b517aab5..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/LineBreakpointAdapter.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.ILineBreakpoint; -import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.texteditor.ITextEditor; - -/** - * Adapter to create breakpoints in JS files. - */ -public abstract class LineBreakpointAdapter implements IToggleBreakpointsTarget { - - public static class ForVirtualProject extends LineBreakpointAdapter { - @Override - protected ITextEditor getEditor(IWorkbenchPart part) { - return getEditorStatic(part); - } - - public static ITextEditor getEditorStatic(IWorkbenchPart part) { - if (part instanceof ITextEditor) { - ITextEditor editorPart = (ITextEditor) part; - IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class); - if (resource != null && - ChromiumDebugPluginUtil.SUPPORTED_EXTENSIONS.contains(resource.getFileExtension())) { - return editorPart; - } - } - return null; - } - - @Override - protected String getDebugModelId() { - return VProjectWorkspaceBridge.DEBUG_MODEL_ID; - } - } - - public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) - throws CoreException { - ITextEditor textEditor = getEditor(part); - if (textEditor != null) { - IResource resource = (IResource) textEditor.getEditorInput().getAdapter(IResource.class); - ITextSelection textSelection = (ITextSelection) selection; - int lineNumber = textSelection.getStartLine(); - IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints( - getDebugModelId()); - for (int i = 0; i < breakpoints.length; i++) { - IBreakpoint breakpoint = breakpoints[i]; - if (resource.equals(breakpoint.getMarker().getResource())) { - if (((ILineBreakpoint) breakpoint).getLineNumber() == lineNumber + 1) { - // remove - breakpoint.delete(); - return; - } - } - } - - // Line numbers start with 0 in V8, with 1 in Eclipse. - ChromiumLineBreakpoint lineBreakpoint = new ChromiumLineBreakpoint(resource, lineNumber + 1, - getDebugModelId()); - DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint); - } - } - - public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) { - return getEditor(part) != null; - } - - /** - * Returns the editor being used to edit a PDA file, associated with the given - * part, or null if none. - * @param part workbench part - * @return the editor being used to edit a PDA file, associated with the given - * part, or null if none - */ - protected abstract ITextEditor getEditor(IWorkbenchPart part); - - protected abstract String getDebugModelId(); - - public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) - throws CoreException { - // TODO(apavlov): Implement method breakpoints if feasible. - } - - public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) { - // TODO(apavlov): Implement method breakpoints if feasible. - return true; - } - - public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) - throws CoreException { - // TODO(apavlov): Implement watchpoints if feasible. - } - - public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) { - // TODO(apavlov): Implement watchpoints if feasible. - return false; - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Messages.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Messages.java deleted file mode 100755 index 0dd83e3a..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/Messages.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import org.eclipse.osgi.util.NLS; - -/** - * NLS messages for the package. - */ -public class Messages extends NLS { - private static final String BUNDLE_NAME = - "org.chromium.debug.core.model.messages"; //$NON-NLS-1$ - - public static String ChromiumExceptionBreakpoint_MessageMarkerFormat; - - public static String ChromiumTabSelectionDialog_DialogTitle; - - public static String ChromiumTabSelectionDialog_IdColumnName; - - public static String ChromiumTabSelectionDialog_TableTitle; - - public static String ChromiumTabSelectionDialog_UrlColumnName; - - public static String ConnectionLoggerImpl_MessageSeparator; - - public static String ConnectionLoggerImpl_ReceivedFromChrome; - - public static String ConnectionLoggerImpl_SentToChrome; - - public static String DebugTargetImpl_BadResultWhileDisconnecting; - - public static String DebugTargetImpl_BUSY_WITH; - - public static String DebugTargetImpl_CannotStartMultipleDebuggers; - - public static String DebugTargetImpl_Caught; - - public static String DebugTargetImpl_FailedToStartSocketConnection; - - public static String DebugTargetImpl_LogExceptionFormat; - - public static String DebugTargetImpl_TARGET_NAME_PATTERN; - - public static String DebugTargetImpl_TargetName; - - public static String DebugTargetImpl_Uncaught; - - public static String DebugTargetImpl_Unknown; - - public static String HardcodedSourceWrapProvider_DESCRIPTION; - - public static String HardcodedSourceWrapProvider_WITH_DEFINED; - - public static String HardcodedSourceWrapProvider_STANDARD; - - public static String HardcodedSourceWrapProvider_STANDARD_2; - - public static String HardcodedSourceWrapProvider_WITH_DEFINED_2; - - public static String JavascriptVmEmbedderFactory_TargetName0; - - public static String JavascriptVmEmbedderFactory_Terminated; - - public static String JavascriptVmEmbedderFactory_TerminatedWithReason; - - public static String JsLineBreakpoint_MessageMarkerFormat; - - public static String JsThread_ThreadLabelFormat; - - public static String JsThread_ThreadLabelRunning; - - public static String JsThread_ThreadLabelSuspended; - - public static String JsThread_ThreadLabelSuspendedExceptionFormat; - - public static String LaunchInitializationProcedure_JOB_NAME; - - public static String LaunchInitializationProcedure_LOAD_SCRIPTS; - - public static String LaunchInitializationProcedure_SET_OPTIONS; - - public static String LaunchInitializationProcedure_SYNCHRONIZE_BREAKPOINTS; - - public static String LaunchInitializationProcedure_UPDATE_DEBUGGER_STATE; - - public static String LaunchParams_MERGE_OPTION; - - public static String LaunchParams_NONE_OPTION; - - public static String LaunchParams_RESET_REMOTE_OPTION; - - public static String MockUpResourceWriter_NOT_A_JAVASCRIPT; - - public static String MockUpResourceWriter_SCRIPT_WITHOUT_TEXT; - - public static String MockUpResourceWriter_SCRIPTS_OVERLAPPED; - - public static String ResourceManager_UnnamedScriptName; - - public static String StackFrame_NameFormat; - - public static String StackFrame_UnknownScriptName; - - public static String TargetInitializeState_INITIALIZING; - - public static String TargetInitializeState_TERMINATED; - - public static String Variable_CANNOT_BUILD_EXPRESSION; - - public static String Variable_NotScalarOrObjectFormat; - - public static String Variable_NullTypeForAVariable; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } -} diff --git a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/MockUpResourceWriter.java b/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/MockUpResourceWriter.java deleted file mode 100644 index dc2e9c4c..00000000 --- a/chromedevtools/plugins/org.chromium.debug.core/src/org/chromium/debug/core/model/MockUpResourceWriter.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.debug.core.model; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; - -import org.chromium.sdk.Script; -import org.eclipse.osgi.util.NLS; - -/** - * Creates from a set of scripts a mock-up of full resource (scripts are positioned according - * to their line numbers and the whitespace is filled with text pattern). - */ -class MockUpResourceWriter { - static String writeScriptSource(Collection - - - - - -


- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Constant Field Values

-
-
-Contents - - - - - - -
-org.chromium.*
- -

- - - - - - - - - - - - - - - - - -
org.chromium.sdk.Breakpoint
-public static final intEMPTY_VALUE-1
-public static final longINVALID_ID-1L
- -

- -

- - - - - - - - - - - - -
org.chromium.sdk.CallbackSemaphore
-public static final longOPERATION_TIMEOUT_MS120000L
- -

- -

- - - - - - - - - - - - -
org.chromium.sdk.IgnoreCountBreakpointExtension
-public static final intEMPTY_VALUE-1
- -

- -

- - - - - - - - - - - - -
org.chromium.sdk.TextStreamPosition
-public static final intNO_POSITION-1
- -

- -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/deprecated-list.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/deprecated-list.html deleted file mode 100644 index a441db0d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/deprecated-list.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -Deprecated List - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Deprecated API

-
-
-Contents - - - - - - - - - -
-Deprecated Methods
org.chromium.sdk.DebugContext.continueVm(DebugContext.StepAction, int, DebugContext.ContinueCallback) -
-          see DebugContext.continueVm(StepAction, int, ContinueCallback, SyncCallback) 
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/help-doc.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/help-doc.html deleted file mode 100644 index 6407e7c7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/help-doc.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - -API Help - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-How This API Document Is Organized

-
-This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

-Overview

-
- -

-The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

-

-Package

-
- -

-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    -
  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types
-
-

-Class/Interface

-
- -

-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    -
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description -

    -

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary -

    -

  • Field Detail
  • Constructor Detail
  • Method Detail
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
- -

-Annotation Type

-
- -

-Each annotation type has its own separate page with the following sections:

    -
  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail
-
- -

-Enum

-
- -

-Each enum has its own separate page with the following sections:

    -
  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail
-
-

-Use

-
-Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
-

-Tree (Class Hierarchy)

-
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    -
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
-
-

-Deprecated API

-
-The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-

-Index

-
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-

-Prev/Next

-These links take you to the next or previous class, interface, package, or related page.

-Frames/No Frames

-These links show and hide the HTML frames. All pages are available with or without frames. -

-

-Serialized Form

-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -

-

-Constant Field Values

-The Constant Field Values page lists the static final fields and their values. -

- - -This help file applies to API documentation generated using the standard doclet. - -
-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-1.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-1.html deleted file mode 100644 index 2d146e78..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-1.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - -A-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-A

-
-
accept(Breakpoint.Target.Visitor<R>) - -Method in class org.chromium.sdk.Breakpoint.Target -
Dispatches call on the actual Target type. -
accept(Breakpoint.Target.Visitor<R>) - -Method in class org.chromium.sdk.Breakpoint.Target.ScriptId -
  -
accept(Breakpoint.Target.Visitor<R>) - -Method in class org.chromium.sdk.Breakpoint.Target.ScriptName -
  -
acquireDefault(RelayOk) - -Method in class org.chromium.sdk.CallbackSemaphore -
  -
addContent(CharSequence) - -Method in interface org.chromium.sdk.ConnectionLogger.StreamListener -
  -
addSeparator() - -Method in interface org.chromium.sdk.ConnectionLogger.StreamListener -
  -
addSubOperation() - -Method in class org.chromium.sdk.util.AsyncFutureMerger -
Registers a new sub-operation. -
addValue(Destructable) - -Method in class org.chromium.sdk.util.DestructingGuard -
Adds another value that should be destructed. -
asArray() - -Method in interface org.chromium.sdk.JsObject -
  -
asAsyncOperation() - -Method in class org.chromium.sdk.util.AsyncFuture.SyncOperation -
  -
asFunction() - -Method in interface org.chromium.sdk.JsObject -
  -
asObject() - -Method in interface org.chromium.sdk.JsValue -
Return this value cast to JsObject or null if this value - is not an object. -
asObjectProperty() - -Method in interface org.chromium.sdk.JsVariable -
Returns object property data if variable is an object property and its descriptor - is available. -
asOldFunction() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionNode -
  -
asSyncCallback() - -Method in class org.chromium.sdk.util.RelaySyncCallback.Guard -
  -
asWithScope() - -Method in interface org.chromium.sdk.JsScope -
  -
AsyncFuture<T> - Class in org.chromium.sdk.util
Represents a result of asynchronous operation.
AsyncFuture() - -Constructor for class org.chromium.sdk.util.AsyncFuture -
  -
AsyncFuture.Callback<RES> - Interface in org.chromium.sdk.util
A callback used in operation and in AsyncFuture.getAsync(org.chromium.sdk.util.AsyncFuture.Callback, org.chromium.sdk.SyncCallback) method.
AsyncFuture.Operation<RES> - Interface in org.chromium.sdk.util
An operation that asynchronously results in a value of type RES.
AsyncFuture.SyncOperation<RES> - Class in org.chromium.sdk.util
Helper class that presents operation meant to be executed synchronously in the current thread - as an asynchronous AsyncFuture.Operation suitable for AsyncFuture.
AsyncFuture.SyncOperation() - -Constructor for class org.chromium.sdk.util.AsyncFuture.SyncOperation -
  -
AsyncFutureMerger<T> - Class in org.chromium.sdk.util
A class that provides an AsyncFuture for a group operation: one that consists of any - number of sub-operations and completes once all of them have completed.
AsyncFutureMerger() - -Constructor for class org.chromium.sdk.util.AsyncFutureMerger -
  -
AsyncFutureRef<T> - Class in org.chromium.sdk.util
A wrapper around AtomicReference and AsyncFuture that makes the source code - cleaner and shorter.
AsyncFutureRef() - -Constructor for class org.chromium.sdk.util.AsyncFutureRef -
  -
attach(TabDebugEventListener) - -Method in interface org.chromium.sdk.Browser.TabConnector -
Attaches to the related tab debugger. -
attach(DebugEventListener) - -Method in interface org.chromium.sdk.StandaloneVm -
Connects to the target VM. -
attach(TabDebugEventListener) - -Method in interface org.chromium.sdk.wip.WipBrowser.WipTabConnector -
Attaches to the related tab debugger. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-10.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-10.html deleted file mode 100644 index 3a2ec108..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-10.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - -J-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-J

-
-
JavascriptVm - Interface in org.chromium.sdk
Abstraction of a remote JavaScript virtual machine.
JavascriptVm.BreakpointCallback - Interface in org.chromium.sdk
A callback for breakpoint-related requests.
JavascriptVm.ExceptionCatchMode - Enum in org.chromium.sdk
Defines when VM will break on exception throw (before stack unwind happened).
JavascriptVm.ListBreakpointsCallback - Interface in org.chromium.sdk
 
JavascriptVm.ScriptsCallback - Interface in org.chromium.sdk
A callback for retrieving scripts.
JavascriptVm.SuspendCallback - Interface in org.chromium.sdk
A callback for suspend request.
join(Iterable<? extends String>, String) - -Static method in class org.chromium.sdk.util.BasicUtil -
Implementation of traditional join operation. -
JsArray - Interface in org.chromium.sdk
Extends JsObject interface by adding methods for handling array elements.
JsEvaluateContext - Interface in org.chromium.sdk
A context in which watch expressions may be evaluated.
JsEvaluateContext.EvaluateCallback - Interface in org.chromium.sdk
A callback for the "evaluate" request.
JsFunction - Interface in org.chromium.sdk
Extends JsObject interface with the methods for function-specific properties.
JsObject - Interface in org.chromium.sdk
A compound JsValue that has zero or more properties.
JsObjectProperty - Interface in org.chromium.sdk
Exposes additional data if variable is a property of object and its property descriptor - is available.
JsScope - Interface in org.chromium.sdk
An object that represents a scope in JavaScript.
JsScope.Type - Enum in org.chromium.sdk
 
JsScope.WithScope - Interface in org.chromium.sdk
Subtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject).
JsValue - Interface in org.chromium.sdk
An object that represents a browser JavaScript VM variable value (compound or - atomic.)
JsValue.ReloadBiggerCallback - Interface in org.chromium.sdk
 
JsValue.Type - Enum in org.chromium.sdk
Type of a JavaScript value.
JsVariable - Interface in org.chromium.sdk
An object that represents a variable in a browser JavaScript VM call frame.
JsVariable.SetValueCallback - Interface in org.chromium.sdk
A callback to use while setting a variable value.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-11.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-11.html deleted file mode 100644 index ee95b07b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-11.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -L-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-L

-
-
LazyConstructable<T> - Class in org.chromium.sdk.util
Holds a value yet-to-be-constructed.
LazyConstructable(LazyConstructable.Factory<T>) - -Constructor for class org.chromium.sdk.util.LazyConstructable -
  -
LazyConstructable.Factory<T> - Interface in org.chromium.sdk.util
 
length() - -Method in interface org.chromium.sdk.JsArray -
  -
listBreakpoints(JavascriptVm.ListBreakpointsCallback, SyncCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Asynchronously reads breakpoints from remote VM. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-12.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-12.html deleted file mode 100644 index ff08a028..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-12.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -M-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-M

-
-
MethodIsBlockingException - Exception in org.chromium.sdk.util
Signals that a deadlock was about to happen.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-13.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-13.html deleted file mode 100644 index c6fc93a7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-13.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - -N-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-N

-
-
navigated(String) - -Method in interface org.chromium.sdk.TabDebugEventListener -
Reports a navigation event on the target tab. -
newBrowserConnectionLogger() - -Method in interface org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory -
  -
newChildren() - -Method in interface org.chromium.sdk.UpdatableScript.OldFunctionNode -
  -
newConnectionLogger() - -Method in interface org.chromium.sdk.ConnectionLogger.Factory -
Creates new instance of ConnectionLogger. -
newGuard() - -Method in class org.chromium.sdk.util.RelaySyncCallback -
  -
newTabConnectionLogger() - -Method in interface org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory -
  -
NO_POSITION - -Static variable in interface org.chromium.sdk.TextStreamPosition -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-14.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-14.html deleted file mode 100644 index e414602c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-14.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - -O-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-O

-
-
onSignal(S, Exception) - -Method in interface org.chromium.sdk.util.SignalRelay.Callback -
Called from the thread that initiated a broadcast (i.e. -
OPERATION_TIMEOUT_MS - -Static variable in class org.chromium.sdk.CallbackSemaphore -
  -
org.chromium.sdk - package org.chromium.sdk
Main package of ChromDevTools SDK API.
org.chromium.sdk.util - package org.chromium.sdk.util
 
org.chromium.sdk.wip - package org.chromium.sdk.wip
Contains all WIP-specific interfaces.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-15.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-15.html deleted file mode 100644 index 463d2da4..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-15.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -P-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-P

-
-
parseString(String) - -Static method in class org.chromium.sdk.Version -
Parses string as version as far as it is dot-delimited integer numbers. -
PermanentRemoteValueMapping - Interface in org.chromium.sdk.wip
A RemoteValueMapping that outlives suspend/resume cycle of debugger.
previewSetSource(String, UpdatableScript.UpdateCallback, SyncCallback) - -Method in interface org.chromium.sdk.UpdatableScript -
Same as UpdatableScript.setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-16.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-16.html deleted file mode 100644 index f7cfb77c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-16.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - -R-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-R

-
-
reinitializeReference(AtomicReference<AsyncFuture<T>>, AsyncFuture.Operation<T>) - -Static method in class org.chromium.sdk.util.AsyncFuture -
Initializes the reference with the a new instance of AsyncFuture. -
reinitializeRunning(AsyncFuture.Operation<T>) - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
RelayOk - Interface in org.chromium.sdk
A symbolic interface that means "callback has been accepted and will be called sooner or later".
RelaySyncCallback - Class in org.chromium.sdk.util
A utility class for handling SyncCallback in chained asynchronous operations.
RelaySyncCallback(SyncCallback) - -Constructor for class org.chromium.sdk.util.RelaySyncCallback -
  -
RelaySyncCallback.Guard - Class in org.chromium.sdk.util
Responsible for calling SyncCallback unless - operation has been successfully relayed to the next step.
RelaySyncCallback.Guard() - -Constructor for class org.chromium.sdk.util.RelaySyncCallback.Guard -
  -
reloadHeavyValue(JsValue.ReloadBiggerCallback, SyncCallback) - -Method in interface org.chromium.sdk.JsValue -
Asynchronously reloads object value with extended size limit. -
RemoteValueMapping - Interface in org.chromium.sdk
Represents a technical scope that manages remote value representation in debugger.
removeSafe(Map<K, V>, K) - -Static method in class org.chromium.sdk.util.BasicUtil -
Type-safe wrapper for Map.remove(Object) method. -
removeSafe(Collection<V>, V) - -Static method in class org.chromium.sdk.util.BasicUtil -
Type-safe wrapper for Collection.remove(Object) method. -
restartFrame(CallFrame, GenericCallback<Boolean>, SyncCallback) - -Method in interface org.chromium.sdk.RestartFrameExtension -
Restarts a frame (all frames above are dropped from the stack, this frame is started over). -
RestartFrameExtension - Interface in org.chromium.sdk
An extension to CallFrame API that supports restart frame operation.
resumed() - -Method in interface org.chromium.sdk.DebugEventListener -
Reports the browser JavaScript virtual machine has resumed. -
runSync() - -Method in class org.chromium.sdk.util.AsyncFuture.SyncOperation -
Does whatever tasks the operation requires. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-17.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-17.html deleted file mode 100644 index e079fec0..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-17.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - -S-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-S

-
-
Script - Interface in org.chromium.sdk
An objects that holds data for a "script" which is a part of a resource - loaded into the browser, identified by its original document URL, line offset - in the original document, and the line count this script spans.
Script.Type - Enum in org.chromium.sdk
Denotes a script type.
scriptCollected(Script) - -Method in interface org.chromium.sdk.DebugEventListener -
Reports that the script has been collected and is no longer used in VM. -
scriptContentChanged(Script) - -Method in interface org.chromium.sdk.DebugEventListener -
Reports that script source has been altered in remote VM. -
scriptLoaded(Script) - -Method in interface org.chromium.sdk.DebugEventListener -
Reports that a new script has been loaded into a tab. -
sendSignal(SIGNAL, Exception) - -Method in class org.chromium.sdk.util.SignalRelay -
  -
setBreakOnException(JavascriptVm.ExceptionCatchMode, GenericCallback<JavascriptVm.ExceptionCatchMode>, SyncCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Controls whether VM stops on exceptions. -
setBreakpoint(JavascriptVm, Breakpoint.Target, int, int, boolean, String, int, JavascriptVm.BreakpointCallback, SyncCallback) - -Method in interface org.chromium.sdk.IgnoreCountBreakpointExtension -
Sets a breakpoint with the specified parameters. -
setBreakpoint(Breakpoint.Target, int, int, boolean, String, JavascriptVm.BreakpointCallback, SyncCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Sets a breakpoint with the specified parameters. -
setCondition(String) - -Method in interface org.chromium.sdk.Breakpoint -
Sets the breakpoint condition as plain JavaScript (null to clear). -
setConnectionCloser(ConnectionLogger.ConnectionCloser) - -Method in interface org.chromium.sdk.ConnectionLogger -
Connection may allow the logger to close it. -
setEnabled(boolean) - -Method in interface org.chromium.sdk.Breakpoint -
Sets whether this breakpoint is enabled. -
setIgnoreCount(Breakpoint, int, GenericCallback<Void>, SyncCallback) - -Method in interface org.chromium.sdk.IgnoreCountBreakpointExtension -
Sets the ignore count for this breakpoint (EMPTY_VALUE to clear). -
setSourceOnRemote(String, UpdatableScript.UpdateCallback, SyncCallback) - -Method in interface org.chromium.sdk.UpdatableScript -
Demands that script text should be replaced with a new one if possible. -
setValue(String, JsVariable.SetValueCallback) - -Method in interface org.chromium.sdk.JsVariable -
Sets a new value for this variable. -
SignalRelay<SIGNAL> - Class in org.chromium.sdk.util
A node in a network that broadcasts some signal among all its peers one time.
SignalRelay(SignalRelay.Callback<SIGNAL>) - -Constructor for class org.chromium.sdk.util.SignalRelay -
  -
SignalRelay.AlreadySignalledException - Exception in org.chromium.sdk.util
 
SignalRelay.Callback<S> - Interface in org.chromium.sdk.util
An interface to notify a user about a received signal.
SignalRelay.SignalConverter<FROM,TO> - Interface in org.chromium.sdk.util
A converter that translates signals from one type to another so that unrelated resources - could co-work.
StandaloneVm - Interface in org.chromium.sdk
Abstraction of a remote JavaScript virtual machine which is embedded into - some application and accessed via TCP/IP connection to a port opened by - DebuggerAgent.
start() - -Method in interface org.chromium.sdk.ConnectionLogger -
Notifies logger that actual transmission is starting. -
start(AsyncFuture.Callback<RES>, SyncCallback) - -Method in interface org.chromium.sdk.util.AsyncFuture.Operation -
Starts the operation. -
subOperationDone(T) - -Method in class org.chromium.sdk.util.AsyncFutureMerger -
Registers a sub-operation completion and saves its result. -
subOperationDoneSync(RuntimeException) - -Method in class org.chromium.sdk.util.AsyncFutureMerger -
Additionally registers a sub-operation completion. -
success() - -Method in interface org.chromium.sdk.DebugContext.ContinueCallback -
  -
success(Breakpoint) - -Method in interface org.chromium.sdk.JavascriptVm.BreakpointCallback -
  -
success(Collection<? extends Breakpoint>) - -Method in interface org.chromium.sdk.JavascriptVm.ListBreakpointsCallback -
  -
success(Collection<Script>) - -Method in interface org.chromium.sdk.JavascriptVm.ScriptsCallback -
This method provides a synchronous access to script collection. -
success() - -Method in interface org.chromium.sdk.JavascriptVm.SuspendCallback -
Signals that command successfully finished. -
success(JsVariable) - -Method in interface org.chromium.sdk.JsEvaluateContext.EvaluateCallback -
  -
success() - -Method in interface org.chromium.sdk.JsVariable.SetValueCallback -
  -
success(Object, UpdatableScript.ChangeDescription) - -Method in interface org.chromium.sdk.UpdatableScript.UpdateCallback -
Script text change has succeeded or was successfully pre-calculated (in preview mode). -
success(T) - -Method in interface org.chromium.sdk.util.GenericCallback -
  -
suspend(JavascriptVm.SuspendCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Tries to suspend VM. -
suspended(DebugContext) - -Method in interface org.chromium.sdk.DebugEventListener -
Reports the browser JavaScript virtual machine has suspended (on hitting - breakpoints or a step end). -
SyncCallback - Interface in org.chromium.sdk
Secondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-18.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-18.html deleted file mode 100644 index fb1cac4c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-18.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - -T-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-T

-
-
TabDebugEventListener - Interface in org.chromium.sdk
This interface is used by the SDK to report browser-related debug - events for a certain tab to the clients.
TextStreamPosition - Interface in org.chromium.sdk
A structure that defines position within text stream (file).
toArray(Collection<? extends T>, Class<T>) - -Static method in class org.chromium.sdk.util.BasicUtil -
Convenient method wrapping Collection.toArray(). -
toSparseArray() - -Method in interface org.chromium.sdk.JsArray -
  -
toString() - -Method in class org.chromium.sdk.Version -
  -
tryAcquire(long, TimeUnit) - -Method in class org.chromium.sdk.CallbackSemaphore -
Tries to acquire the semaphore. -
tryAcquireDefault(RelayOk) - -Method in class org.chromium.sdk.CallbackSemaphore -
Tries to acquire semaphore with some reasonable default timeout. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-19.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-19.html deleted file mode 100644 index d99db2bc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-19.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -U-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-U

-
-
UnsupportedVersionException - Exception in org.chromium.sdk
This exception is thrown if the SDK protocol version is not compatible with - that supported by the browser.
UnsupportedVersionException(Version, Version) - -Constructor for exception org.chromium.sdk.UnsupportedVersionException -
  -
UnsupportedVersionException(Version, Version, String) - -Constructor for exception org.chromium.sdk.UnsupportedVersionException -
  -
UpdatableScript - Interface in org.chromium.sdk
This interface is a part of Script interface.
UpdatableScript.ChangeDescription - Interface in org.chromium.sdk
An interface that explains what has happened/going to happen within script update action.
UpdatableScript.ChangeStatus - Enum in org.chromium.sdk
 
UpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>> - Interface in org.chromium.sdk
A basic element of function change tree.
UpdatableScript.FunctionPositions - Interface in org.chromium.sdk
 
UpdatableScript.NewFunctionNode - Interface in org.chromium.sdk
Represents a brand new function in the changed script, that has no corresponding old function.
UpdatableScript.OldFunctionNode - Interface in org.chromium.sdk
Represents an old function in the changed script.
UpdatableScript.TextualDiff - Interface in org.chromium.sdk
 
UpdatableScript.UpdateCallback - Interface in org.chromium.sdk
 
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-2.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-2.html deleted file mode 100644 index b190a6c5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-2.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -B-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-B

-
-
BasicUtil - Class in org.chromium.sdk.util
Utilities for safe using collections and several small methods missing in standard Java library.
BasicUtil() - -Constructor for class org.chromium.sdk.util.BasicUtil -
  -
bind(SignalRelay<OPPOSITE>, SignalRelay.SignalConverter<SIGNAL, OPPOSITE>, SignalRelay.SignalConverter<OPPOSITE, SIGNAL>) - -Method in class org.chromium.sdk.util.SignalRelay -
Binds this node to a peer node. -
Breakpoint - Interface in org.chromium.sdk
A breakpoint in the browser JavaScript virtual machine.
Breakpoint.Target - Class in org.chromium.sdk
A reference to some JavaScript text that you can set breakpoints on.
Breakpoint.Target() - -Constructor for class org.chromium.sdk.Breakpoint.Target -
  -
Breakpoint.Target.ScriptId - Class in org.chromium.sdk
A target that refers to a script by its id.
Breakpoint.Target.ScriptId(Object) - -Constructor for class org.chromium.sdk.Breakpoint.Target.ScriptId -
  -
Breakpoint.Target.ScriptName - Class in org.chromium.sdk
A target that refers to a script by its name.
Breakpoint.Target.ScriptName(String) - -Constructor for class org.chromium.sdk.Breakpoint.Target.ScriptName -
  -
Breakpoint.Target.Visitor<R> - Interface in org.chromium.sdk
 
BreakpointTypeExtension - Interface in org.chromium.sdk
An extension to supported breakpoint target types.
BreakpointTypeExtension.FunctionSupport - Interface in org.chromium.sdk
Supports targets that refer to function text in form of function-returning - JavaScript expression.
BreakpointTypeExtension.FunctionSupport.Visitor<R> - Interface in org.chromium.sdk
Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
BreakpointTypeExtension.ScriptRegExpSupport - Interface in org.chromium.sdk
Supports targets that refer to a script by a 'regexp' of its name.
BreakpointTypeExtension.ScriptRegExpSupport.Visitor<R> - Interface in org.chromium.sdk
Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
Browser - Interface in org.chromium.sdk
An "entry point" of the SDK.
Browser.TabConnector - Interface in org.chromium.sdk
Tab list item that is fetched from browser.
Browser.TabFetcher - Interface in org.chromium.sdk
Helps to fetch currently opened browser tabs.
BrowserFactory - Class in org.chromium.sdk
A factory for Browser instances.
BrowserFactory() - -Constructor for class org.chromium.sdk.BrowserFactory -
  -
BrowserTab - Interface in org.chromium.sdk
A lightweight abstraction of a remote Browser tab.
busyStatusChanged(String, int) - -Method in interface org.chromium.sdk.DebugEventListener.VmStatusListener -
Reports a new status of remote VM. -
ByteToCharConverter - Class in org.chromium.sdk.util
A stateful converter from bytes to characters according to a specified Charset.
ByteToCharConverter(Charset) - -Constructor for class org.chromium.sdk.util.ByteToCharConverter -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-20.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-20.html deleted file mode 100644 index 8b3def69..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-20.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -V-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-V

-
-
valueOf(String) - -Static method in enum org.chromium.sdk.DebugContext.State -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.DebugContext.StepAction -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.JavascriptVm.ExceptionCatchMode -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.JsScope.Type -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.JsValue.Type -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.Script.Type -
Returns the enum constant of this type with the specified name. -
valueOf(String) - -Static method in enum org.chromium.sdk.UpdatableScript.ChangeStatus -
Returns the enum constant of this type with the specified name. -
values() - -Static method in enum org.chromium.sdk.DebugContext.State -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.DebugContext.StepAction -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.JavascriptVm.ExceptionCatchMode -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.JsScope.Type -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.JsValue.Type -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.Script.Type -
Returns an array containing the constants of this enum type, in -the order they are declared. -
values() - -Static method in enum org.chromium.sdk.UpdatableScript.ChangeStatus -
Returns an array containing the constants of this enum type, in -the order they are declared. -
Version - Class in org.chromium.sdk
An object that describes a number-based version.
Version(Integer...) - -Constructor for class org.chromium.sdk.Version -
Constructs an immutable Version instance given the numeric components of version. -
Version(List<Integer>, String) - -Constructor for class org.chromium.sdk.Version -
Constructs an immutable Version instance given the numeric components of version and optional - text component. -
visitFunction(String) - -Method in interface org.chromium.sdk.BreakpointTypeExtension.FunctionSupport.Visitor -
  -
visitRegExp(String) - -Method in interface org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport.Visitor -
  -
visitScriptId(Object) - -Method in interface org.chromium.sdk.Breakpoint.Target.Visitor -
  -
visitScriptName(String) - -Method in interface org.chromium.sdk.Breakpoint.Target.Visitor -
  -
visitUnknown(Breakpoint.Target) - -Method in interface org.chromium.sdk.Breakpoint.Target.Visitor -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-21.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-21.html deleted file mode 100644 index dca28bc1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-21.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -W-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-W

-
-
WipBackend - Interface in org.chromium.sdk.wip
Abstract interface to WIP implementation, that is delivered in a separate library.
WipBackend.Factory - Interface in org.chromium.sdk.wip
Used to dynamically instantiate WipBackend.
WipBrowser - Interface in org.chromium.sdk.wip
WIP interface to browser similar to Browser.
WipBrowser.WipTabConnector - Interface in org.chromium.sdk.wip
 
WipBrowserFactory - Interface in org.chromium.sdk.wip
A factory for connections via WebInspector protocol (WIP).
WipBrowserFactory.LoggerFactory - Interface in org.chromium.sdk.wip
 
WipBrowserTab - Interface in org.chromium.sdk.wip
An abstraction of a remote Browser tab.
WipJavascriptVm - Interface in org.chromium.sdk.wip
WIP-specific extension to JavascriptVm.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-3.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-3.html deleted file mode 100644 index 99300fbc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-3.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - -C-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-C

-
-
callbackDone(RuntimeException) - -Method in class org.chromium.sdk.CallbackSemaphore -
Implementation of SyncCallback#callbackDone(RuntimeException). -
callbackDone(RuntimeException) - -Method in interface org.chromium.sdk.SyncCallback -
  -
CallbackSemaphore - Class in org.chromium.sdk
Convenient implementation of SyncCallback.
CallbackSemaphore() - -Constructor for class org.chromium.sdk.CallbackSemaphore -
  -
CallFrame - Interface in org.chromium.sdk
An object that represents a browser JavaScript VM call frame.
canRestartFrame(CallFrame) - -Method in interface org.chromium.sdk.RestartFrameExtension -
  -
children() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionNode -
  -
clear(JavascriptVm.BreakpointCallback, SyncCallback) - -Method in interface org.chromium.sdk.Breakpoint -
Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished. -
clearCaches() - -Method in interface org.chromium.sdk.RemoteValueMapping -
Clears local caches that store object properties. -
closeConnection() - -Method in interface org.chromium.sdk.ConnectionLogger.ConnectionCloser -
  -
closed() - -Method in interface org.chromium.sdk.TabDebugEventListener -
Reports a closing event on the target tab. -
compareTo(Version) - -Method in class org.chromium.sdk.Version -
  -
ConnectionLogger - Interface in org.chromium.sdk
Logger facility for the Chromium debugger connection.
ConnectionLogger.ConnectionCloser - Interface in org.chromium.sdk
Interface that gives you control over underlying connection.
ConnectionLogger.Factory - Interface in org.chromium.sdk
Factory for connection logger.
ConnectionLogger.StreamListener - Interface in org.chromium.sdk
Listens to stream data traffic.
construct() - -Method in interface org.chromium.sdk.util.LazyConstructable.Factory -
  -
containsKeySafe(Map<K, V>, K) - -Static method in class org.chromium.sdk.util.BasicUtil -
Type-safe wrapper for Map.containsKey(Object) method. -
containsSafe(Collection<V>, V) - -Static method in class org.chromium.sdk.util.BasicUtil -
Type-safe wrapper for Collection.contains(Object) method. -
continueVm(DebugContext.StepAction, int, DebugContext.ContinueCallback, SyncCallback) - -Method in interface org.chromium.sdk.DebugContext -
Resumes the JavaScript VM execution using a "continue" request. -
continueVm(DebugContext.StepAction, int, DebugContext.ContinueCallback) - -Method in interface org.chromium.sdk.DebugContext -
Deprecated. see DebugContext.continueVm(StepAction, int, ContinueCallback, SyncCallback) -
convert(ByteBuffer) - -Method in class org.chromium.sdk.util.ByteToCharConverter -
  -
convert(FROM) - -Method in interface org.chromium.sdk.util.SignalRelay.SignalConverter -
  -
create(SocketAddress, ConnectionLogger.Factory) - -Method in class org.chromium.sdk.BrowserFactory -
Returns a Browser implementor instance that talks to a browser listening at - socketAddress. -
create(LazyConstructable.Factory<T>) - -Static method in class org.chromium.sdk.util.LazyConstructable -
  -
create(SignalRelay.Callback<T>) - -Static method in class org.chromium.sdk.util.SignalRelay -
  -
create() - -Method in interface org.chromium.sdk.wip.WipBackend.Factory -
  -
createBrowser(InetSocketAddress, WipBrowserFactory.LoggerFactory) - -Method in interface org.chromium.sdk.wip.WipBrowserFactory -
  -
createPermanentValueMapping(String) - -Method in interface org.chromium.sdk.wip.WipJavascriptVm -
Creates new PermanentRemoteValueMapping. -
createStandalone(SocketAddress, ConnectionLogger) - -Method in class org.chromium.sdk.BrowserFactory -
Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - DebuggerAgent opened at socketAddress. -
createTabFetcher() - -Method in interface org.chromium.sdk.Browser -
Establishes the browser connection and checks for the protocol version - supported by the remote, then creates object that downloads list of tabs. -
createTarget(String) - -Method in interface org.chromium.sdk.BreakpointTypeExtension.FunctionSupport -
  -
createTarget(String) - -Method in interface org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-4.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-4.html deleted file mode 100644 index 29b8fc70..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-4.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - -D-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-D

-
-
DebugContext - Interface in org.chromium.sdk
An object that matches the execution state of the browser JavaScript VM while - suspended.
DebugContext.ContinueCallback - Interface in org.chromium.sdk
A callback for the "continue" request.
DebugContext.State - Enum in org.chromium.sdk
The suspension state.
DebugContext.StepAction - Enum in org.chromium.sdk
JavaScript debugger step actions.
DebugEventListener - Interface in org.chromium.sdk
This interface is used by the SDK to report debug events for a certain JavascriptVm to - the clients.
DebugEventListener.VmStatusListener - Interface in org.chromium.sdk
A specialized listener for status of remote VM command queue.
delete(GenericCallback<Void>, SyncCallback) - -Method in interface org.chromium.sdk.wip.PermanentRemoteValueMapping -
Asynchronously deletes mapping on remote VM. -
destruct() - -Method in interface org.chromium.sdk.util.Destructable -
Destructs object wrapped in the interface. -
Destructable - Interface in org.chromium.sdk.util
An interface to destruct some object.
DestructingGuard - Class in org.chromium.sdk.util
Helper class that destructs unfinished objects.
DestructingGuard() - -Constructor for class org.chromium.sdk.util.DestructingGuard -
  -
detach() - -Method in interface org.chromium.sdk.JavascriptVm -
Detaches from the related tab debugger. -
discharge() - -Method in class org.chromium.sdk.util.DestructingGuard -
Confirms that constructing has finished OKAY and no destruction is needed from now. -
discharge(RelayOk) - -Method in class org.chromium.sdk.util.RelaySyncCallback.Guard -
This method should be called when operations was successfully relayed. -
disconnected() - -Method in interface org.chromium.sdk.DebugEventListener -
Reports the debug connection has terminated and JavascriptVm has stopped operating. -
dismiss() - -Method in interface org.chromium.sdk.Browser.TabFetcher -
Should release connection. -
doFinally() - -Method in class org.chromium.sdk.util.DestructingGuard -
This method is supposed to be called from finally clause. -
done() - -Method in interface org.chromium.sdk.JsValue.ReloadBiggerCallback -
  -
done(RES) - -Method in interface org.chromium.sdk.util.AsyncFuture.Callback -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-5.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-5.html deleted file mode 100644 index d7aac14f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-5.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -E-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-E

-
-
EMPTY_VALUE - -Static variable in interface org.chromium.sdk.Breakpoint -
This value is used when the corresponding parameter is absent. -
EMPTY_VALUE - -Static variable in interface org.chromium.sdk.IgnoreCountBreakpointExtension -
This value is used when the corresponding parameter is absent. -
enableBreakpoints(Boolean, GenericCallback<Boolean>, SyncCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Asynchronously enables or disables all breakpoints on remote. -
eq(T, T) - -Static method in class org.chromium.sdk.util.BasicUtil -
Convenience wrapper around Object.equals(Object) method that allows - both left and right to be null. -
equals(Object) - -Method in class org.chromium.sdk.Version -
  -
evaluateAsync(String, Map<String, String>, JsEvaluateContext.EvaluateCallback, SyncCallback) - -Method in interface org.chromium.sdk.JsEvaluateContext -
Asynchronously evaluates an arbitrary JavaScript expression in - the particular context. -
evaluateAsync(JsEvaluateContext, String, Map<String, String>, RemoteValueMapping, JsEvaluateContext.EvaluateCallback, SyncCallback) - -Method in interface org.chromium.sdk.wip.EvaluateToMappingExtension -
Asynchronously evaluates an arbitrary JavaScript expression in - the particular context. -
evaluateGet(JsEvaluateContext.EvaluateCallback, SyncCallback) - -Method in interface org.chromium.sdk.JsObjectProperty -
Asynchronously evaluates property getter and returns property value. -
evaluateSync(String, Map<String, String>, JsEvaluateContext.EvaluateCallback) - -Method in interface org.chromium.sdk.JsEvaluateContext -
Synchronously evaluates an arbitrary JavaScript expression in - the particular context. -
evaluateSync(JsEvaluateContext, String, Map<String, String>, RemoteValueMapping, JsEvaluateContext.EvaluateCallback) - -Method in interface org.chromium.sdk.wip.EvaluateToMappingExtension -
Synchronously evaluates an arbitrary JavaScript expression in - the particular context. -
EvaluateToMappingExtension - Interface in org.chromium.sdk.wip
An extension to evaluate methods, that allows to specify RemoteValueMapping - as an additional argument 'targetMapping'.
ExceptionData - Interface in org.chromium.sdk
A JavaScript exception data holder for exceptions reported by a JavaScript - virtual machine.
execute() - -Method in class org.chromium.sdk.util.AsyncFuture.SyncOperation -
User must call this method immediately after he passed the object to AsyncFuture. -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-6.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-6.html deleted file mode 100644 index bca30a2c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-6.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -F-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-F

-
-
failure(String) - -Method in interface org.chromium.sdk.DebugContext.ContinueCallback -
  -
failure(String) - -Method in interface org.chromium.sdk.JavascriptVm.BreakpointCallback -
  -
failure(Exception) - -Method in interface org.chromium.sdk.JavascriptVm.ListBreakpointsCallback -
  -
failure(String) - -Method in interface org.chromium.sdk.JavascriptVm.ScriptsCallback -
  -
failure(Exception) - -Method in interface org.chromium.sdk.JavascriptVm.SuspendCallback -
  -
failure(String) - -Method in interface org.chromium.sdk.JsEvaluateContext.EvaluateCallback -
  -
failure(String) - -Method in interface org.chromium.sdk.JsVariable.SetValueCallback -
  -
failure(String) - -Method in interface org.chromium.sdk.UpdatableScript.UpdateCallback -
  -
failure(Exception) - -Method in interface org.chromium.sdk.util.GenericCallback -
  -
finish() - -Method in class org.chromium.sdk.util.RelaySyncCallback -
Finish relay by calling SyncCallback. -
finish(SyncCallback) - -Static method in class org.chromium.sdk.util.RelaySyncCallback -
  -
flush(JavascriptVm.BreakpointCallback, SyncCallback) - -Method in interface org.chromium.sdk.Breakpoint -
Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished. -
FunctionScopeExtension - Interface in org.chromium.sdk
An extension to JsFunction API that returns function (closure) hidden scope.
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-7.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-7.html deleted file mode 100644 index 7980ff63..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-7.html +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - -G-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-G

-
-
GenericCallback<T> - Interface in org.chromium.sdk.util
A generic callback used in asynchronous operations that either fail with exception - or return a result.
get(int) - -Method in interface org.chromium.sdk.JsArray -
  -
get() - -Method in class org.chromium.sdk.util.LazyConstructable -
Constructs a value when called first time and returns it to all subsequent calls. -
getAsync(AsyncFuture.Callback<? super T>, SyncCallback) - -Method in class org.chromium.sdk.util.AsyncFuture -
Obtains the operation result. -
getAsync(AsyncFuture.Callback<T>, SyncCallback) - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
getBreakpointsHit() - -Method in interface org.chromium.sdk.DebugContext -
  -
getBreakpointTypeExtension() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
getBrowser() - -Method in interface org.chromium.sdk.BrowserTab -
  -
getBrowser() - -Method in interface org.chromium.sdk.wip.WipBrowserTab -
  -
getCallFrames() - -Method in interface org.chromium.sdk.DebugContext -
  -
getChangeTree() - -Method in interface org.chromium.sdk.UpdatableScript.ChangeDescription -
  -
getChunks() - -Method in interface org.chromium.sdk.UpdatableScript.TextualDiff -
  -
getClassName() - -Method in interface org.chromium.sdk.JsObject -
  -
getColumn() - -Method in interface org.chromium.sdk.TextStreamPosition -
Returns 0-based column number within the line. -
getComponents() - -Method in class org.chromium.sdk.Version -
  -
getCondition() - -Method in interface org.chromium.sdk.Breakpoint -
  -
getCreatedScriptName() - -Method in interface org.chromium.sdk.UpdatableScript.ChangeDescription -
  -
getDebugEventListener() - -Method in interface org.chromium.sdk.TabDebugEventListener -
Every TabDebugEventListener should aggregate - DebugEventListener. -
getDefaultRemoteValueMapping() - -Method in interface org.chromium.sdk.DebugContext -
  -
getDescription() - -Method in interface org.chromium.sdk.wip.WipBackend -
  -
getDisconnectReason() - -Method in interface org.chromium.sdk.StandaloneVm -
  -
getEmbedderName() - -Method in interface org.chromium.sdk.StandaloneVm -
  -
getEnd() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionPositions -
  -
getEndLine() - -Method in interface org.chromium.sdk.Script -
  -
getEvaluateContext() - -Method in interface org.chromium.sdk.CallFrame -
  -
getEvaluateContext() - -Method in interface org.chromium.sdk.wip.PermanentRemoteValueMapping -
Returns JsEvaluateContext that is tied with this RemoteValueMapping. -
getEvaluateWithDestinationMappingExtension() - -Method in interface org.chromium.sdk.wip.WipJavascriptVm -
  -
getExceptionData() - -Method in interface org.chromium.sdk.DebugContext -
  -
getExceptionMessage() - -Method in interface org.chromium.sdk.ExceptionData -
  -
getExceptionValue() - -Method in interface org.chromium.sdk.ExceptionData -
  -
getFullyQualifiedName() - -Method in interface org.chromium.sdk.JsVariable -
  -
getFunctionName() - -Method in interface org.chromium.sdk.CallFrame -
  -
getFunctionScopeExtension() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
getFunctionSupport() - -Method in interface org.chromium.sdk.BreakpointTypeExtension -
  -
getFuture() - -Method in class org.chromium.sdk.util.AsyncFutureMerger -
Returns AsyncFuture that provides the group result. -
getGetter() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
getGetterAsFunction() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
getGlobalEvaluateContext() - -Method in interface org.chromium.sdk.DebugContext -
  -
getId() - -Method in interface org.chromium.sdk.Breakpoint -
  -
getId() - -Method in interface org.chromium.sdk.Script -
Returns the script ID as reported by the JavaScript VM debugger. -
getId() - -Method in interface org.chromium.sdk.wip.PermanentRemoteValueMapping -
  -
getId() - -Method in interface org.chromium.sdk.wip.WipBackend -
  -
getIgnoreCountBreakpointExtension() - -Method in interface org.chromium.sdk.Breakpoint -
  -
getIgnoreCountBreakpointExtension() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
getIncomingStreamListener() - -Method in interface org.chromium.sdk.ConnectionLogger -
  -
getInstance() - -Static method in class org.chromium.sdk.BrowserFactory -
Gets a BrowserFactory instance. -
getInternalProperties() - -Method in interface org.chromium.sdk.JsObject -
  -
getJavascriptVm() - -Method in interface org.chromium.sdk.DebugContext -
  -
getJavascriptVm() - -Method in interface org.chromium.sdk.wip.WipBrowserTab -
  -
getLine() - -Method in interface org.chromium.sdk.TextStreamPosition -
Returns 0-based line number within the stream/file. -
getLineNumber() - -Method in interface org.chromium.sdk.Breakpoint -
Returns line number of the breakpoint. -
getLocalVersion() - -Method in exception org.chromium.sdk.UnsupportedVersionException -
  -
getName() - -Method in interface org.chromium.sdk.JsVariable -
  -
getName() - -Method in interface org.chromium.sdk.Script -
  -
getName() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionNode -
  -
getNewPositions() - -Method in interface org.chromium.sdk.UpdatableScript.OldFunctionNode -
  -
getOffset() - -Method in interface org.chromium.sdk.TextStreamPosition -
Returns 0-based offset from the beginning of the stream/file measured in Unicode characters. -
getOpenParenPosition() - -Method in interface org.chromium.sdk.JsFunction -
Returns position of opening parenthesis of function arguments. -
getOutgoingStreamListener() - -Method in interface org.chromium.sdk.ConnectionLogger -
  -
getPositions() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionNode -
  -
getProperties() - -Method in interface org.chromium.sdk.JsObject -
  -
getProperty(String) - -Method in interface org.chromium.sdk.JsObject -
  -
getReceivedSignal() - -Method in class org.chromium.sdk.util.SignalRelay -
  -
getReceiverVariable() - -Method in interface org.chromium.sdk.CallFrame -
  -
getRefId() - -Method in interface org.chromium.sdk.JsObject -
Optionally returns unique id for this object. -
getRelay() - -Method in class org.chromium.sdk.util.RelaySyncCallback.Guard -
  -
getRemoteValueMapping() - -Method in interface org.chromium.sdk.JsObject -
  -
getRemoteVersion() - -Method in exception org.chromium.sdk.UnsupportedVersionException -
  -
getRestartFrameExtension() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
getRootLogger() - -Static method in class org.chromium.sdk.BrowserFactory -
  -
getSafe(Map<K, V>, K) - -Static method in class org.chromium.sdk.util.BasicUtil -
Type-safe wrapper for Map.get(Object) method. -
getScopes(JsFunction) - -Method in interface org.chromium.sdk.FunctionScopeExtension -
  -
getScript() - -Method in interface org.chromium.sdk.CallFrame -
  -
getScript() - -Method in interface org.chromium.sdk.JsFunction -
  -
getScriptRegExpSupport() - -Method in interface org.chromium.sdk.BreakpointTypeExtension -
  -
getScripts(JavascriptVm.ScriptsCallback) - -Method in interface org.chromium.sdk.JavascriptVm -
Returns user scripts loaded into the tab. -
getSetter() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
getSource() - -Method in interface org.chromium.sdk.Script -
  -
getSourceText() - -Method in interface org.chromium.sdk.ExceptionData -
  -
getStacktraceString(Exception) - -Static method in class org.chromium.sdk.util.BasicUtil -
Takes stacktrace string out of exception. -
getStart() - -Method in interface org.chromium.sdk.UpdatableScript.FunctionPositions -
  -
getStartColumn() - -Method in interface org.chromium.sdk.Script -
  -
getStartLine() - -Method in interface org.chromium.sdk.Script -
  -
getState() - -Method in interface org.chromium.sdk.DebugContext -
  -
getStatementStartPosition() - -Method in interface org.chromium.sdk.CallFrame -
  -
getStatus() - -Method in interface org.chromium.sdk.UpdatableScript.OldFunctionNode -
  -
getStatusExplanation() - -Method in interface org.chromium.sdk.UpdatableScript.OldFunctionNode -
  -
getSync() - -Method in class org.chromium.sdk.util.AsyncFuture -
Returns the operation result. -
getSync() - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
getTabs() - -Method in interface org.chromium.sdk.Browser.TabFetcher -
Retrieves all browser tabs currently opened. -
getTabs(WipBackend) - -Method in interface org.chromium.sdk.wip.WipBrowser -
  -
getTarget() - -Method in interface org.chromium.sdk.Breakpoint -
  -
getTextualDiff() - -Method in interface org.chromium.sdk.UpdatableScript.ChangeDescription -
  -
getTitle() - -Method in interface org.chromium.sdk.wip.WipBrowser.WipTabConnector -
  -
getType() - -Method in interface org.chromium.sdk.JsScope -
  -
getType() - -Method in interface org.chromium.sdk.JsValue -
  -
getType() - -Method in interface org.chromium.sdk.Script -
  -
getUrl() - -Method in interface org.chromium.sdk.Browser.TabConnector -
  -
getUrl() - -Method in interface org.chromium.sdk.BrowserTab -
  -
getUrl() - -Method in interface org.chromium.sdk.wip.WipBrowser.WipTabConnector -
  -
getUrl() - -Method in interface org.chromium.sdk.wip.WipBrowserTab -
  -
getUserSyncCallback() - -Method in class org.chromium.sdk.util.RelaySyncCallback -
  -
getValue() - -Method in interface org.chromium.sdk.JsVariable -
Returns the value of this variable. -
getValueString() - -Method in interface org.chromium.sdk.JsValue -
  -
getVariables() - -Method in interface org.chromium.sdk.JsScope -
  -
getVariableScopes() - -Method in interface org.chromium.sdk.CallFrame -
  -
getVersion() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
getVmStatusListener() - -Method in interface org.chromium.sdk.DebugEventListener -
Gets DebugEventListener.VmStatusListener that is considered a part of DebugEventListener. -
getVmVersion() - -Method in interface org.chromium.sdk.StandaloneVm -
  -
getWithArgument() - -Method in interface org.chromium.sdk.JsScope.WithScope -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-8.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-8.html deleted file mode 100644 index d043f5b5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-8.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -H-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-H

-
-
handleEos() - -Method in interface org.chromium.sdk.ConnectionLogger -
Notifies logger that EOS has been received from remote. -
hashCode(Object) - -Static method in class org.chromium.sdk.util.BasicUtil -
Convenience wrapper around Object.hashCode() method that allows - object to be null. -
hashCode() - -Method in class org.chromium.sdk.Version -
  -
hasSource() - -Method in interface org.chromium.sdk.Script -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-9.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-9.html deleted file mode 100644 index 8d93e68f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index-files/index-9.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - -I-Index - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
-

-I

-
-
IgnoreCountBreakpointExtension - Interface in org.chromium.sdk
An extension to breakpoint API that supports 'ignore count' property.
initializeReference(AtomicReference<AsyncFuture<T>>, AsyncFuture.Operation<T>) - -Static method in class org.chromium.sdk.util.AsyncFuture -
Initializes the reference with the a new instance of AsyncFuture if the reference - still holds null. -
initializeReference(AtomicReference<AsyncFuture<T>>, AsyncFuture.Operation<T>, boolean) - -Static method in class org.chromium.sdk.util.AsyncFuture -
Operation may work synchronously. -
initializeRunning(AsyncFuture.Operation<T>) - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
initializeTrivial(AtomicReference<AsyncFuture<T>>, T) - -Static method in class org.chromium.sdk.util.AsyncFuture -
Initializes the reference with the a new instance of AsyncFuture that already - holds a result. -
initializeTrivial(T) - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
INSTANCE - -Static variable in interface org.chromium.sdk.wip.WipBrowserFactory -
  -
INVALID_ID - -Static variable in interface org.chromium.sdk.Breakpoint -
A breakpoint has this ID if it does not reflect an actual breakpoint in a - JavaScript VM debugger. -
InvalidContextException - Exception in org.chromium.sdk
Signals that operation is not available because related DebugContext - is no more valid.
InvalidContextException(Throwable) - -Constructor for exception org.chromium.sdk.InvalidContextException -
  -
isAlreadyAttached() - -Method in interface org.chromium.sdk.Browser.TabConnector -
  -
isAlreadyAttached() - -Method in interface org.chromium.sdk.wip.WipBrowser.WipTabConnector -
  -
isAttached() - -Method in interface org.chromium.sdk.JavascriptVm -
  -
isCollected() - -Method in interface org.chromium.sdk.Script -
  -
isConfigurable() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
isDone() - -Method in class org.chromium.sdk.util.AsyncFuture -
Returns whether the operation is done. -
isDone() - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
isEnabled() - -Method in interface org.chromium.sdk.Breakpoint -
  -
isEnumerable() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
isInitialized() - -Method in class org.chromium.sdk.util.AsyncFutureRef -
  -
isMutable() - -Method in interface org.chromium.sdk.JsVariable -
  -
isObjectType(JsValue.Type) - -Static method in enum org.chromium.sdk.JsValue.Type -
Returns whether type corresponds to a JsObject. -
isReadable() - -Method in interface org.chromium.sdk.JsVariable -
  -
isSignalled() - -Method in class org.chromium.sdk.util.SignalRelay -
  -
isStackModified() - -Method in interface org.chromium.sdk.UpdatableScript.ChangeDescription -
  -
isTruncated() - -Method in interface org.chromium.sdk.JsValue -
  -
isUncaught() - -Method in interface org.chromium.sdk.ExceptionData -
  -
isWritable() - -Method in interface org.chromium.sdk.JsObjectProperty -
  -
-
- - - - - - - - - - - - - - - -
- -
- - - -A B C D E F G H I J L M N O P R S T U V W
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/index.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/index.html deleted file mode 100644 index d690c239..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -Generated Documentation (Untitled) - - - - - - - - - - - -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="overview-summary.html">Non-frame version.</A> - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptId.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptId.html deleted file mode 100644 index b84ec1d6..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptId.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - -Breakpoint.Target.ScriptId - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class Breakpoint.Target.ScriptId

-
-java.lang.Object
-  extended by org.chromium.sdk.Breakpoint.Target
-      extended by org.chromium.sdk.Breakpoint.Target.ScriptId
-
-
-
Enclosing class:
Breakpoint.Target
-
-
-
-
public static class Breakpoint.Target.ScriptId
extends Breakpoint.Target
- - -

-A target that refers to a script by its id. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from class org.chromium.sdk.Breakpoint.Target
Breakpoint.Target.ScriptId, Breakpoint.Target.ScriptName, Breakpoint.Target.Visitor<R>
-  - - - - - - - - - - - -
-Constructor Summary
Breakpoint.Target.ScriptId(java.lang.Object id) - -
-           
-  - - - - - - - - - - - -
-Method Summary
- - - - - -
-<R> R
-
accept(Breakpoint.Target.Visitor<R> visitor) - -
-          Dispatches call on the actual Target type.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-Breakpoint.Target.ScriptId

-
-public Breakpoint.Target.ScriptId(java.lang.Object id)
-
-
- - - - - - - - -
-Method Detail
- -

-accept

-
-public <R> R accept(Breakpoint.Target.Visitor<R> visitor)
-
-
Description copied from class: Breakpoint.Target
-
Dispatches call on the actual Target type. -

-

-
Specified by:
accept in class Breakpoint.Target
-
-
-
Parameters:
visitor - user-provided Breakpoint.Target.Visitor that may also implement some additional - interfaces (for extended types) that is checked on runtime
See Also:
BreakpointTypeExtension
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptName.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptName.html deleted file mode 100644 index 54da427a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.ScriptName.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -Breakpoint.Target.ScriptName - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class Breakpoint.Target.ScriptName

-
-java.lang.Object
-  extended by org.chromium.sdk.Breakpoint.Target
-      extended by org.chromium.sdk.Breakpoint.Target.ScriptName
-
-
-
Enclosing class:
Breakpoint.Target
-
-
-
-
public static class Breakpoint.Target.ScriptName
extends Breakpoint.Target
- - -

-A target that refers to a script by its name. After JavascriptVm.setBreakpoint(org.chromium.sdk.Breakpoint.Target, int, int, boolean, java.lang.String, org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback) - is called, breakpoint will be set on every matching script currently loaded in VM. - E.g. you can safely set a breakpoint before the script is actually loaded. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from class org.chromium.sdk.Breakpoint.Target
Breakpoint.Target.ScriptId, Breakpoint.Target.ScriptName, Breakpoint.Target.Visitor<R>
-  - - - - - - - - - - - -
-Constructor Summary
Breakpoint.Target.ScriptName(java.lang.String name) - -
-           
-  - - - - - - - - - - - -
-Method Summary
- - - - - -
-<R> R
-
accept(Breakpoint.Target.Visitor<R> visitor) - -
-          Dispatches call on the actual Target type.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-Breakpoint.Target.ScriptName

-
-public Breakpoint.Target.ScriptName(java.lang.String name)
-
-
- - - - - - - - -
-Method Detail
- -

-accept

-
-public <R> R accept(Breakpoint.Target.Visitor<R> visitor)
-
-
Description copied from class: Breakpoint.Target
-
Dispatches call on the actual Target type. -

-

-
Specified by:
accept in class Breakpoint.Target
-
-
-
Parameters:
visitor - user-provided Breakpoint.Target.Visitor that may also implement some additional - interfaces (for extended types) that is checked on runtime
See Also:
BreakpointTypeExtension
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.Visitor.html deleted file mode 100644 index dffa7013..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.Visitor.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - -Breakpoint.Target.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Breakpoint.Target.Visitor<R>

-
-
All Known Subinterfaces:
BreakpointTypeExtension.FunctionSupport.Visitor<R>, BreakpointTypeExtension.ScriptRegExpSupport.Visitor<R>
-
-
-
Enclosing class:
Breakpoint.Target
-
-
-
-
public static interface Breakpoint.Target.Visitor<R>
- - -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RvisitScriptId(java.lang.Object scriptId) - -
-           
- RvisitScriptName(java.lang.String scriptName) - -
-           
- RvisitUnknown(Breakpoint.Target target) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-visitScriptName

-
-R visitScriptName(java.lang.String scriptName)
-
-
-
-
-
-
- -

-visitScriptId

-
-R visitScriptId(java.lang.Object scriptId)
-
-
-
-
-
-
- -

-visitUnknown

-
-R visitUnknown(Breakpoint.Target target)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.html deleted file mode 100644 index 8caa9d06..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.Target.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - -Breakpoint.Target - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class Breakpoint.Target

-
-java.lang.Object
-  extended by org.chromium.sdk.Breakpoint.Target
-
-
-
Direct Known Subclasses:
Breakpoint.Target.ScriptId, Breakpoint.Target.ScriptName
-
-
-
Enclosing interface:
Breakpoint
-
-
-
-
public abstract static class Breakpoint.Target
extends java.lang.Object
- - -

-A reference to some JavaScript text that you can set breakpoints on. The reference may - be in form of script name, script id etc. - This type is essentially an Algebraic Type with several cases. Additional cases are provided - in form of optional extensions. -

- -

-

-
See Also:
Breakpoint.Target.ScriptName, -Breakpoint.Target.ScriptId, -BreakpointTypeExtension
-
- -

- - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static classBreakpoint.Target.ScriptId - -
-          A target that refers to a script by its id.
-static classBreakpoint.Target.ScriptName - -
-          A target that refers to a script by its name.
-static interfaceBreakpoint.Target.Visitor<R> - -
-           
-  - - - - - - - - - - -
-Constructor Summary
Breakpoint.Target() - -
-           
-  - - - - - - - - - - - -
-Method Summary
-abstract - - - - -
-<R> R
-
accept(Breakpoint.Target.Visitor<R> visitor) - -
-          Dispatches call on the actual Target type.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-Breakpoint.Target

-
-public Breakpoint.Target()
-
-
- - - - - - - - -
-Method Detail
- -

-accept

-
-public abstract <R> R accept(Breakpoint.Target.Visitor<R> visitor)
-
-
Dispatches call on the actual Target type. -

-

-
Parameters:
visitor - user-provided Breakpoint.Target.Visitor that may also implement some additional - interfaces (for extended types) that is checked on runtime
See Also:
BreakpointTypeExtension
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.html deleted file mode 100644 index cd7a5f87..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Breakpoint.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - -Breakpoint - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Breakpoint

-
-
-
public interface Breakpoint
- - -

-A breakpoint in the browser JavaScript virtual machine. The set* - method invocations will not take effect until - flush(org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback) is called. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static classBreakpoint.Target - -
-          A reference to some JavaScript text that you can set breakpoints on.
- - - - - - - - - - - - - - -
-Field Summary
-static intEMPTY_VALUE - -
-          This value is used when the corresponding parameter is absent.
-static longINVALID_ID - -
-          A breakpoint has this ID if it does not reflect an actual breakpoint in a - JavaScript VM debugger.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkclear(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished.
- RelayOkflush(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished.
- java.lang.StringgetCondition() - -
-           
- longgetId() - -
-           
- IgnoreCountBreakpointExtensiongetIgnoreCountBreakpointExtension() - -
-           
- longgetLineNumber() - -
-          Returns line number of the breakpoint.
- Breakpoint.TargetgetTarget() - -
-           
- booleanisEnabled() - -
-           
- voidsetCondition(java.lang.String condition) - -
-          Sets the breakpoint condition as plain JavaScript (null to clear).
- voidsetEnabled(boolean enabled) - -
-          Sets whether this breakpoint is enabled.
-  -

- - - - - - - - -
-Field Detail
- -

-EMPTY_VALUE

-
-static final int EMPTY_VALUE
-
-
This value is used when the corresponding parameter is absent. -

-

-
See Also:
JavascriptVm.setBreakpoint(org.chromium.sdk.Breakpoint.Target, int, int, boolean, java.lang.String, org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback), -Constant Field Values
-
-
- -

-INVALID_ID

-
-static final long INVALID_ID
-
-
A breakpoint has this ID if it does not reflect an actual breakpoint in a - JavaScript VM debugger. -

-

-
See Also:
Constant Field Values
-
- - - - - - - - -
-Method Detail
- -

-getTarget

-
-Breakpoint.Target getTarget()
-
-
- -
Returns:
where this breakpoint was targeted to (e.g. script with a particular name or - script with specified id)
-
-
-
- -

-getId

-
-long getId()
-
-
- -
Returns:
the breakpoint unique ID or INVALID_ID if breakpoint was deleted
-
-
-
- -

-getLineNumber

-
-long getLineNumber()
-
-
Returns line number of the breakpoint. As source is changed (typically with LiveEdit feature, - and particularly by calling UpdatableScript.setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback)) this value - may become stale. It gets updated when JavascriptVm.listBreakpoints(org.chromium.sdk.JavascriptVm.ListBreakpointsCallback, org.chromium.sdk.SyncCallback) asynchronous - method completes. -

-

- -
Returns:
1-based line number in script source
-
-
-
- -

-isEnabled

-
-boolean isEnabled()
-
-
- -
Returns:
whether this breakpoint is enabled
-
-
-
- -

-setEnabled

-
-void setEnabled(boolean enabled)
-
-
Sets whether this breakpoint is enabled. - Requires subsequent flush(org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback) call. -

-

-
Parameters:
enabled - whether the breakpoint should be enabled
-
-
-
- -

-getCondition

-
-java.lang.String getCondition()
-
-
- -
Returns:
breakpoint condition as plain JavaScript or null if none
-
-
-
- -

-setCondition

-
-void setCondition(java.lang.String condition)
-
-
Sets the breakpoint condition as plain JavaScript (null to clear). - Requires subsequent flush(org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback) call. -

-

-
Parameters:
condition - the new breakpoint condition
-
-
-
- -

-clear

-
-RelayOk clear(JavascriptVm.BreakpointCallback callback,
-              SyncCallback syncCallback)
-
-
Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished. This operation does not require - a flush invocation. -

-

-
Parameters:
callback - to invoke once the operation result is available
-
-
-
- -

-flush

-
-RelayOk flush(JavascriptVm.BreakpointCallback callback,
-              SyncCallback syncCallback)
-
-
Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished. This method must - be called for the set* method invocations to take effect. -

-

-
Parameters:
callback - to invoke once the operation result is available
-
-
-
- -

-getIgnoreCountBreakpointExtension

-
-IgnoreCountBreakpointExtension getIgnoreCountBreakpointExtension()
-
-
- -
Returns:
extension that supports ignore count property of breakpoint, same instance - that JavascriptVm.getBreakpointTypeExtension() returns
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.Visitor.html deleted file mode 100644 index cdb348a3..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.Visitor.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - -BreakpointTypeExtension.FunctionSupport.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BreakpointTypeExtension.FunctionSupport.Visitor<R>

-
-
All Superinterfaces:
Breakpoint.Target.Visitor<R>
-
-
-
Enclosing interface:
BreakpointTypeExtension.FunctionSupport
-
-
-
-
public static interface BreakpointTypeExtension.FunctionSupport.Visitor<R>
extends Breakpoint.Target.Visitor<R>
- - -

-Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- RvisitFunction(java.lang.String expression) - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.Breakpoint.Target.Visitor
visitScriptId, visitScriptName, visitUnknown
-  -

- - - - - - - - -
-Method Detail
- -

-visitFunction

-
-R visitFunction(java.lang.String expression)
-
-
-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.html deleted file mode 100644 index 131cfc69..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.FunctionSupport.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -BreakpointTypeExtension.FunctionSupport - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BreakpointTypeExtension.FunctionSupport

-
-
Enclosing interface:
BreakpointTypeExtension
-
-
-
-
public static interface BreakpointTypeExtension.FunctionSupport
- - -

-Supports targets that refer to function text in form of function-returning - JavaScript expression. - E.g. you can set a breakpoint on the 5th line of user method addressed as - 'PropertiesDialog.prototype.loadData'. - Expression is calculated immediately and never recalculated again. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceBreakpointTypeExtension.FunctionSupport.Visitor<R> - -
-          Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
-  - - - - - - - - - - - -
-Method Summary
- Breakpoint.TargetcreateTarget(java.lang.String expression) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-createTarget

-
-Breakpoint.Target createTarget(java.lang.String expression)
-
-
- -
Returns:
not null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html deleted file mode 100644 index 12af1af4..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -BreakpointTypeExtension.ScriptRegExpSupport.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BreakpointTypeExtension.ScriptRegExpSupport.Visitor<R>

-
-
All Superinterfaces:
Breakpoint.Target.Visitor<R>
-
-
-
Enclosing interface:
BreakpointTypeExtension.ScriptRegExpSupport
-
-
-
-
public static interface BreakpointTypeExtension.ScriptRegExpSupport.Visitor<R>
extends Breakpoint.Target.Visitor<R>
- - -

-Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- RvisitRegExp(java.lang.String regExp) - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.Breakpoint.Target.Visitor
visitScriptId, visitScriptName, visitUnknown
-  -

- - - - - - - - -
-Method Detail
- -

-visitRegExp

-
-R visitRegExp(java.lang.String regExp)
-
-
-
-
-
-
Parameters:
regExp - regular expression pattern (as specified in JavaScript) that will be - used to match script names
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.html deleted file mode 100644 index 6c9cbbc2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.ScriptRegExpSupport.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - -BreakpointTypeExtension.ScriptRegExpSupport - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BreakpointTypeExtension.ScriptRegExpSupport

-
-
Enclosing interface:
BreakpointTypeExtension
-
-
-
-
public static interface BreakpointTypeExtension.ScriptRegExpSupport
- - -

-Supports targets that refer to a script by a 'regexp' of its name. - After JavascriptVm.setBreakpoint(org.chromium.sdk.Breakpoint.Target, int, int, boolean, java.lang.String, org.chromium.sdk.JavascriptVm.BreakpointCallback, org.chromium.sdk.SyncCallback) is - called, breakpoint will be set on every script currently loaded in VM whose name matches. - E.g. you can safely set a breakpoint before the script is actually loaded. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceBreakpointTypeExtension.ScriptRegExpSupport.Visitor<R> - -
-          Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
-  - - - - - - - - - - - -
-Method Summary
- Breakpoint.TargetcreateTarget(java.lang.String regExp) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-createTarget

-
-Breakpoint.Target createTarget(java.lang.String regExp)
-
-
-
Parameters:
regExp - JavaScript RegExp -
Returns:
not null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.html deleted file mode 100644 index b154de03..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BreakpointTypeExtension.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - -BreakpointTypeExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BreakpointTypeExtension

-
-
-
public interface BreakpointTypeExtension
- - -

-An extension to supported breakpoint target types. The extension is put separate because - JavascriptVm may or may not support it (depends on back-end and remote VM). - Each additional breakpoint target type has a dedicated XXXSupport interface and the - corresponding getter. Getter returns null if the type is unsupported by the current - JavascriptVm. The support interface provides target constructor method and - additional visitor subinterface that Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) will recognize. -

- The instance may be obtained by JavascriptVm.getBreakpointTypeExtension(). -

- This API is designed to keep user code fully compilable when new extension is added. - This API doesn't allow to add user target types. -

- -

-


- -

- - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceBreakpointTypeExtension.FunctionSupport - -
-          Supports targets that refer to function text in form of function-returning - JavaScript expression.
-static interfaceBreakpointTypeExtension.ScriptRegExpSupport - -
-          Supports targets that refer to a script by a 'regexp' of its name.
-  - - - - - - - - - - - - - - - -
-Method Summary
- BreakpointTypeExtension.FunctionSupportgetFunctionSupport() - -
-           
- BreakpointTypeExtension.ScriptRegExpSupportgetScriptRegExpSupport() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getFunctionSupport

-
-BreakpointTypeExtension.FunctionSupport getFunctionSupport()
-
-
- -
Returns:
null if 'function' target type is unsupported.
-
-
-
- -

-getScriptRegExpSupport

-
-BreakpointTypeExtension.ScriptRegExpSupport getScriptRegExpSupport()
-
-
- -
Returns:
null if 'regexp' target type is unsupported.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabConnector.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabConnector.html deleted file mode 100644 index 4bb177c9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabConnector.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - -Browser.TabConnector - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Browser.TabConnector

-
-
Enclosing interface:
Browser
-
-
-
-
public static interface Browser.TabConnector
- - -

-Tab list item that is fetched from browser. Connector is either can used to attach to tab or - can be already attached. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- BrowserTabattach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
- java.lang.StringgetUrl() - -
-           
- booleanisAlreadyAttached() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getUrl

-
-java.lang.String getUrl()
-
-
- -
Returns:
tab url that should be shown to user to let him select one tab from list
-
-
-
- -

-isAlreadyAttached

-
-boolean isAlreadyAttached()
-
-
- -
Returns:
true if the tab is already attached at this moment
-
-
-
- -

-attach

-
-BrowserTab attach(TabDebugEventListener listener)
-                  throws java.io.IOException,
-                         MethodIsBlockingException
-
-
Attaches to the related tab debugger. -

-

-
Parameters:
listener - to report the debug events to -
Returns:
null if operation failed -
Throws: -
MethodIsBlockingException - because initialization implies couple of remote calls - (to request version etc) -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabFetcher.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabFetcher.html deleted file mode 100644 index dffc994e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.TabFetcher.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - -Browser.TabFetcher - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Browser.TabFetcher

-
-
Enclosing interface:
Browser
-
-
-
-
public static interface Browser.TabFetcher
- - -

-Helps to fetch currently opened browser tabs. It also holds open connection to - browser. After instance was used #dismiss should be called to release - connection. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voiddismiss() - -
-          Should release connection.
- java.util.List<? extends Browser.TabConnector>getTabs() - -
-          Retrieves all browser tabs currently opened.
-  -

- - - - - - - - -
-Method Detail
- -

-getTabs

-
-java.util.List<? extends Browser.TabConnector> getTabs()
-                                                       throws java.io.IOException,
-                                                              java.lang.IllegalStateException
-
-
Retrieves all browser tabs currently opened. It lists all tabs, including - those already attached. -

-

- -
Returns:
tabs that can be debugged in the associated Browser instance. An - empty list is returned if no tabs are available. -
Throws: -
java.io.IOException - if there was a transport layer failure -
java.lang.IllegalStateException - if this method is called while another - invocation of the same method is in flight, or the Browser instance - is not connected
-
-
-
- -

-dismiss

-
-void dismiss()
-
-
Should release connection. If no browser tabs is attached at the moment, - connection may actually close. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.html deleted file mode 100644 index 60820d3f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Browser.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -Browser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Browser

-
-
-
public interface Browser
- - -

-An "entry point" of the SDK. A Browser instance is usually constructed once - per a debugged browser instance. -

- -

-


- -

- - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceBrowser.TabConnector - -
-          Tab list item that is fetched from browser.
-static interfaceBrowser.TabFetcher - -
-          Helps to fetch currently opened browser tabs.
-  - - - - - - - - - - - -
-Method Summary
- Browser.TabFetchercreateTabFetcher() - -
-          Establishes the browser connection and checks for the protocol version - supported by the remote, then creates object that downloads list of tabs.
-  -

- - - - - - - - -
-Method Detail
- -

-createTabFetcher

-
-Browser.TabFetcher createTabFetcher()
-                                    throws java.io.IOException,
-                                           UnsupportedVersionException
-
-
Establishes the browser connection and checks for the protocol version - supported by the remote, then creates object that downloads list of tabs. -

-

- -
Returns:
new instance of TabFetcher that must be dismissed after use to control - connection use -
Throws: -
java.io.IOException - if there was a transport layer error -
UnsupportedVersionException - if the SDK protocol version is not - compatible with that supported by the browser
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserFactory.html deleted file mode 100644 index 0136ec33..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserFactory.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - -BrowserFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class BrowserFactory

-
-java.lang.Object
-  extended by org.chromium.sdk.BrowserFactory
-
-
-
-
public abstract class BrowserFactory
extends java.lang.Object
- - -

-A factory for Browser instances. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
BrowserFactory() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-abstract  Browsercreate(java.net.SocketAddress socketAddress, - ConnectionLogger.Factory connectionLoggerFactory) - -
-          Returns a Browser implementor instance that talks to a browser listening at - socketAddress.
-abstract  StandaloneVmcreateStandalone(java.net.SocketAddress socketAddress, - ConnectionLogger connectionLogger) - -
-          Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - DebuggerAgent opened at socketAddress.
-static BrowserFactorygetInstance() - -
-          Gets a BrowserFactory instance.
-static java.util.logging.LoggergetRootLogger() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-BrowserFactory

-
-public BrowserFactory()
-
-
- - - - - - - - -
-Method Detail
- -

-getInstance

-
-public static BrowserFactory getInstance()
-
-
Gets a BrowserFactory instance. This method should be overridden by - implementations that want to construct other implementations of - Browser. -

-

- -
Returns:
a BrowserFactory singleton instance
-
-
-
- -

-create

-
-public abstract Browser create(java.net.SocketAddress socketAddress,
-                               ConnectionLogger.Factory connectionLoggerFactory)
-
-
Returns a Browser implementor instance that talks to a browser listening at - socketAddress. Note that you shouldn't try to create several instances - of Browser connecting to the same socketAddress. -

-

-
Parameters:
socketAddress - the browser is listening on
connectionLoggerFactory - provides facility for listening to network - traffic; may be null -
Returns:
a Browser instance for the socketAddress
-
-
-
- -

-createStandalone

-
-public abstract StandaloneVm createStandalone(java.net.SocketAddress socketAddress,
-                                              ConnectionLogger connectionLogger)
-
-
Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - DebuggerAgent opened at socketAddress. -

-

-
Parameters:
socketAddress - V8 DebuggerAgent is listening on
connectionLogger - provides facility for listening to network - traffic; may be null
-
-
-
- -

-getRootLogger

-
-public static java.util.logging.Logger getRootLogger()
-
-
- -
Returns:
SDK root logger that can be used to add handlers or to adjust log level
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserTab.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserTab.html deleted file mode 100644 index f5dfbe5e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/BrowserTab.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - -BrowserTab - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface BrowserTab

-
-
All Superinterfaces:
JavascriptVm
-
-
-
-
public interface BrowserTab
extends JavascriptVm
- - -

-A lightweight abstraction of a remote Browser tab. Each browser tab - corresponds to a Javascript Virtual Machine and is_a {code JavascriptVm}. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JavascriptVm
JavascriptVm.BreakpointCallback, JavascriptVm.ExceptionCatchMode, JavascriptVm.ListBreakpointsCallback, JavascriptVm.ScriptsCallback, JavascriptVm.SuspendCallback
-  - - - - - - - - - - - - - - - - -
-Method Summary
- BrowsergetBrowser() - -
-           
- java.lang.StringgetUrl() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JavascriptVm
detach, enableBreakpoints, getBreakpointTypeExtension, getFunctionScopeExtension, getIgnoreCountBreakpointExtension, getRestartFrameExtension, getScripts, getVersion, isAttached, listBreakpoints, setBreakOnException, setBreakpoint, suspend
-  -

- - - - - - - - -
-Method Detail
- -

-getBrowser

-
-Browser getBrowser()
-
-
-
-
-
- -
Returns:
the "parent" Browser instance
-
-
-
- -

-getUrl

-
-java.lang.String getUrl()
-
-
-
-
-
- -
Returns:
a current URL of the corresponding browser tab
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallFrame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallFrame.html deleted file mode 100644 index 512c3c86..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallFrame.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - -CallFrame - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface CallFrame

-
-
-
public interface CallFrame
- - -

-An object that represents a browser JavaScript VM call frame. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsEvaluateContextgetEvaluateContext() - -
-           
- java.lang.StringgetFunctionName() - -
-           
- JsVariablegetReceiverVariable() - -
-           
- ScriptgetScript() - -
-           
- TextStreamPositiongetStatementStartPosition() - -
-           
- java.util.List<? extends JsScope>getVariableScopes() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getVariableScopes

-
-java.util.List<? extends JsScope> getVariableScopes()
-
-
- -
Returns:
the scopes known in this frame; ordered, innermost first, global scope last
-
-
-
- -

-getReceiverVariable

-
-JsVariable getReceiverVariable()
-                               throws MethodIsBlockingException
-
-
- -
Returns:
the receiver variable known in this frame -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-getScript

-
-Script getScript()
-
-
- -
Returns:
the source script this call frame is associated with; null - if no script is associated with the call frame (e.g. an exception - could have been thrown in a native script)
-
-
-
- -

-getStatementStartPosition

-
-TextStreamPosition getStatementStartPosition()
-
-
- -
Returns:
the start position (absolute) of the current statement in the Script corresponding - to this frame or null if position in not available
-
-
-
- -

-getFunctionName

-
-java.lang.String getFunctionName()
-
-
- -
Returns:
the name of the current function of this frame
-
-
-
- -

-getEvaluateContext

-
-JsEvaluateContext getEvaluateContext()
-
-
- -
Returns:
context for evaluating expressions in scope of this frame
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallbackSemaphore.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallbackSemaphore.html deleted file mode 100644 index 94ee508e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/CallbackSemaphore.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - -CallbackSemaphore - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class CallbackSemaphore

-
-java.lang.Object
-  extended by org.chromium.sdk.CallbackSemaphore
-
-
-
All Implemented Interfaces:
SyncCallback
-
-
-
-
public class CallbackSemaphore
extends java.lang.Object
implements SyncCallback
- - -

-Convenient implementation of SyncCallback. Client may create one, - then call asynchronous command, and finally wait on blocking method - #tryAcquire() or acquireDefault(org.chromium.sdk.RelayOk). -

- Class uses symbolic parameter RelayOk in its methods that suggests that - user should first call some asynchronous method, then pass it to the acquire method. -

- -

-


- -

- - - - - - - - - - - -
-Field Summary
-static longOPERATION_TIMEOUT_MS - -
-           
-  - - - - - - - - - - -
-Constructor Summary
CallbackSemaphore() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidacquireDefault(RelayOk relayOk) - -
-           
- voidcallbackDone(java.lang.RuntimeException e) - -
-          Implementation of SyncCallback#callbackDone(RuntimeException).
- booleantryAcquire(long timeout, - java.util.concurrent.TimeUnit unit) - -
-          Tries to acquire the semaphore.
- booleantryAcquireDefault(RelayOk relayOk) - -
-          Tries to acquire semaphore with some reasonable default timeout.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-OPERATION_TIMEOUT_MS

-
-public static final long OPERATION_TIMEOUT_MS
-
-
-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-CallbackSemaphore

-
-public CallbackSemaphore()
-
-
- - - - - - - - -
-Method Detail
- -

-tryAcquireDefault

-
-public boolean tryAcquireDefault(RelayOk relayOk)
-                          throws MethodIsBlockingException
-
-
Tries to acquire semaphore with some reasonable default timeout. -

-

-
-
-
-
Parameters:
relayOk - symbolic return value from the asynchronous operation that we are waiting for -
Returns:
false if #OPERATION_TIMEOUT_MS was exceeded and we gave up -
Throws: -
MethodIsBlockingException - if called from a callback
-
-
-
- -

-acquireDefault

-
-public void acquireDefault(RelayOk relayOk)
-                    throws MethodIsBlockingException
-
-
-
-
-
-
Parameters:
relayOk - symbolic return value from the asynchronous operation that we are waiting for -
Throws: -
MethodIsBlockingException
-
-
-
- -

-tryAcquire

-
-public boolean tryAcquire(long timeout,
-                          java.util.concurrent.TimeUnit unit)
-                   throws MethodIsBlockingException
-
-
Tries to acquire the semaphore. This method blocks until the semaphore is - released; typically release call comes from a worker thread of - org.chromium.sdk, the same thread that may call all other callbacks. - It is vital not to call this method from any callback of org.chromium.sdk, - because it's a sure deadlock. - To prevent, this the method declares throwing - MethodIsBlockingException which is symbolically thrown whenever - someone violates this rule (i.e. invokes this method from a callback). - Though currently nobody actually throws it, such declarations help to - track blocking methods. -

-

-
-
-
- -
Returns:
false if timeout was exceeded and we gave up -
Throws: -
MethodIsBlockingException - if called from a callback
-
-
-
- -

-callbackDone

-
-public void callbackDone(java.lang.RuntimeException e)
-
-
Implementation of SyncCallback#callbackDone(RuntimeException). -

-

-
Specified by:
callbackDone in interface SyncCallback
-
-
-
Parameters:
e - an exception main callback raised or null if none is reported
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.ConnectionCloser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.ConnectionCloser.html deleted file mode 100644 index 5d7629ac..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.ConnectionCloser.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -ConnectionLogger.ConnectionCloser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface ConnectionLogger.ConnectionCloser

-
-
Enclosing interface:
ConnectionLogger
-
-
-
-
public static interface ConnectionLogger.ConnectionCloser
- - -

-Interface that gives you control over underlying connection. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voidcloseConnection() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-closeConnection

-
-void closeConnection()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.Factory.html deleted file mode 100644 index 6783b626..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.Factory.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -ConnectionLogger.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface ConnectionLogger.Factory

-
-
Enclosing interface:
ConnectionLogger
-
-
-
-
public static interface ConnectionLogger.Factory
- - -

-Factory for connection logger. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- ConnectionLoggernewConnectionLogger() - -
-          Creates new instance of ConnectionLogger.
-  -

- - - - - - - - -
-Method Detail
- -

-newConnectionLogger

-
-ConnectionLogger newConnectionLogger()
-
-
Creates new instance of ConnectionLogger. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.StreamListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.StreamListener.html deleted file mode 100644 index 6218aa56..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.StreamListener.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -ConnectionLogger.StreamListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface ConnectionLogger.StreamListener

-
-
Enclosing interface:
ConnectionLogger
-
-
-
-
public static interface ConnectionLogger.StreamListener
- - -

-Listens to stream data traffic. Traffic is a series of CharSequences and - separators. It is a connection's responsibility to convert actual bytes transmitted into - characters and separators. Connection should try to make output human-readable. - All calls to the interface must be serialized (for example, but not necessarily, made from - a single thread). -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidaddContent(java.lang.CharSequence text) - -
-           
- voidaddSeparator() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-addContent

-
-void addContent(java.lang.CharSequence text)
-
-
-
-
-
-
- -

-addSeparator

-
-void addSeparator()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.html deleted file mode 100644 index f72a7e96..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ConnectionLogger.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - -ConnectionLogger - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface ConnectionLogger

-
-
-
public interface ConnectionLogger
- - -

-Logger facility for the Chromium debugger connection. It can eavesdrop both - incoming and outgoing streams and log them somewhere. - ConnectionLogger instance is not reconnectable. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceConnectionLogger.ConnectionCloser - -
-          Interface that gives you control over underlying connection.
-static interfaceConnectionLogger.Factory - -
-          Factory for connection logger.
-static interfaceConnectionLogger.StreamListener - -
-          Listens to stream data traffic.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- ConnectionLogger.StreamListenergetIncomingStreamListener() - -
-           
- ConnectionLogger.StreamListenergetOutgoingStreamListener() - -
-           
- voidhandleEos() - -
-          Notifies logger that EOS has been received from remote.
- voidsetConnectionCloser(ConnectionLogger.ConnectionCloser connectionCloser) - -
-          Connection may allow the logger to close it.
- voidstart() - -
-          Notifies logger that actual transmission is starting.
-  -

- - - - - - - - -
-Method Detail
- -

-getIncomingStreamListener

-
-ConnectionLogger.StreamListener getIncomingStreamListener()
-
-
- -
Returns:
listener for incoming socket stream or null
-
-
-
- -

-getOutgoingStreamListener

-
-ConnectionLogger.StreamListener getOutgoingStreamListener()
-
-
- -
Returns:
listener for outgoing socket stream or null
-
-
-
- -

-setConnectionCloser

-
-void setConnectionCloser(ConnectionLogger.ConnectionCloser connectionCloser)
-
-
Connection may allow the logger to close it. It is nice for UI, where - user sees logger and the corresponding stop button. -

-

-
-
-
-
- -

-start

-
-void start()
-
-
Notifies logger that actual transmission is starting. After this handleEos() - is guaranteed to be called. -

-

-
-
-
-
- -

-handleEos

-
-void handleEos()
-
-
Notifies logger that EOS has been received from remote. Technically some - traffic still may go through writer (i.e. be sent to remote) after this. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.ContinueCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.ContinueCallback.html deleted file mode 100644 index 71b112c7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.ContinueCallback.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - -DebugContext.ContinueCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface DebugContext.ContinueCallback

-
-
Enclosing interface:
DebugContext
-
-
-
-
public static interface DebugContext.ContinueCallback
- - -

-A callback for the "continue" request. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String errorMessage) - -
-           
- voidsuccess() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success()
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.String errorMessage)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.State.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.State.html deleted file mode 100644 index 661305a5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.State.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - -DebugContext.State - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum DebugContext.State

-
-java.lang.Object
-  extended by java.lang.Enum<DebugContext.State>
-      extended by org.chromium.sdk.DebugContext.State
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DebugContext.State>
-
-
-
Enclosing interface:
DebugContext
-
-
-
-
public static enum DebugContext.State
extends java.lang.Enum<DebugContext.State>
- - -

-The suspension state. -

- -

-


- -

- - - - - - - - - - - - - -
-Enum Constant Summary
EXCEPTION - -
-          A suspension due to an exception.
NORMAL - -
-          A normal suspension (a step end or a breakpoint).
-  - - - - - - - - - - - - - - - -
-Method Summary
-static DebugContext.StatevalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static DebugContext.State[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-NORMAL

-
-public static final DebugContext.State NORMAL
-
-
A normal suspension (a step end or a breakpoint). -

-

-
-
-
- -

-EXCEPTION

-
-public static final DebugContext.State EXCEPTION
-
-
A suspension due to an exception. -

-

-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static DebugContext.State[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (DebugContext.State c : DebugContext.State.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static DebugContext.State valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.StepAction.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.StepAction.html deleted file mode 100644 index e3597c14..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.StepAction.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - -DebugContext.StepAction - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum DebugContext.StepAction

-
-java.lang.Object
-  extended by java.lang.Enum<DebugContext.StepAction>
-      extended by org.chromium.sdk.DebugContext.StepAction
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DebugContext.StepAction>
-
-
-
Enclosing interface:
DebugContext
-
-
-
-
public static enum DebugContext.StepAction
extends java.lang.Enum<DebugContext.StepAction>
- - -

-JavaScript debugger step actions. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Enum Constant Summary
CONTINUE - -
-          Resume the JavaScript execution.
IN - -
-          Step into the current statement.
OUT - -
-          Step out of the current function.
OVER - -
-          Step over the current statement.
-  - - - - - - - - - - - - - - - -
-Method Summary
-static DebugContext.StepActionvalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static DebugContext.StepAction[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-CONTINUE

-
-public static final DebugContext.StepAction CONTINUE
-
-
Resume the JavaScript execution. -

-

-
-
-
- -

-IN

-
-public static final DebugContext.StepAction IN
-
-
Step into the current statement. -

-

-
-
-
- -

-OVER

-
-public static final DebugContext.StepAction OVER
-
-
Step over the current statement. -

-

-
-
-
- -

-OUT

-
-public static final DebugContext.StepAction OUT
-
-
Step out of the current function. -

-

-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static DebugContext.StepAction[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (DebugContext.StepAction c : DebugContext.StepAction.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static DebugContext.StepAction valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.html deleted file mode 100644 index fdfc355f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugContext.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - -DebugContext - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface DebugContext

-
-
-
public interface DebugContext
- - -

-An object that matches the execution state of the browser JavaScript VM while - suspended. It reconstructs and provides access to the current state of the - JavaScript VM. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceDebugContext.ContinueCallback - -
-          A callback for the "continue" request.
-static classDebugContext.State - -
-          The suspension state.
-static classDebugContext.StepAction - -
-          JavaScript debugger step actions.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidcontinueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback) - -
-          Deprecated. see continueVm(StepAction, int, ContinueCallback, SyncCallback)
- RelayOkcontinueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback, - SyncCallback syncCallback) - -
-          Resumes the JavaScript VM execution using a "continue" request.
- java.util.Collection<? extends Breakpoint>getBreakpointsHit() - -
-           
- java.util.List<? extends CallFrame>getCallFrames() - -
-           
- RemoteValueMappinggetDefaultRemoteValueMapping() - -
-           
- ExceptionDatagetExceptionData() - -
-           
- JsEvaluateContextgetGlobalEvaluateContext() - -
-           
- JavascriptVmgetJavascriptVm() - -
-           
- DebugContext.StategetState() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getState

-
-DebugContext.State getState()
-
-
- -
Returns:
the JavaScript VM suspension state
-
-
-
- -

-getExceptionData

-
-ExceptionData getExceptionData()
-
-
- -
Returns:
the current exception state, or null if current state is - not EXCEPTION
See Also:
getState()
-
-
-
- -

-getCallFrames

-
-java.util.List<? extends CallFrame> getCallFrames()
-
-
- -
Returns:
a list of call frames for the current JavaScript suspended state (from the - innermost (top) frame to the main (bottom) frame) -
Throws: -
MethodIsBlockingException - if called from a callback because it may - need to load necessary scripts
-
-
-
- -

-getBreakpointsHit

-
-java.util.Collection<? extends Breakpoint> getBreakpointsHit()
-
-
- -
Returns:
a set of the breakpoints hit on VM suspension with which this - context is associated. An empty collection if the suspension was - not related to hitting breakpoints (e.g. a step end)
-
-
-
- -

-continueVm

-
-RelayOk continueVm(DebugContext.StepAction stepAction,
-                   int stepCount,
-                   DebugContext.ContinueCallback callback,
-                   SyncCallback syncCallback)
-
-
Resumes the JavaScript VM execution using a "continue" request. This - context becomes invalid until another context is supplied through the - DebugEventListener.suspended(DebugContext) event. -

-

-
Parameters:
stepAction - to perform
stepCount - steps to perform (not used if - stepAction == CONTINUE)
callback - to invoke when the request result is ready
-
-
-
- -

-continueVm

-
-void continueVm(DebugContext.StepAction stepAction,
-                int stepCount,
-                DebugContext.ContinueCallback callback)
-
-
Deprecated. see continueVm(StepAction, int, ContinueCallback, SyncCallback) -

-

-
-
-
-
- -

-getGlobalEvaluateContext

-
-JsEvaluateContext getGlobalEvaluateContext()
-
-
- -
Returns:
evaluate context for evaluating expressions in global scope
-
-
-
- -

-getJavascriptVm

-
-JavascriptVm getJavascriptVm()
-
-
- -
Returns:
JavascriptVm instance this context was created for
-
-
-
- -

-getDefaultRemoteValueMapping

-
-RemoteValueMapping getDefaultRemoteValueMapping()
-
-
- -
Returns:
value mapping that all values have by default; typically unique for a particular - DebugContext
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.VmStatusListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.VmStatusListener.html deleted file mode 100644 index 2daea030..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.VmStatusListener.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - -DebugEventListener.VmStatusListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface DebugEventListener.VmStatusListener

-
-
Enclosing interface:
DebugEventListener
-
-
-
-
public static interface DebugEventListener.VmStatusListener
- - -

-A specialized listener for status of remote VM command queue. After we have sent a request and - before VM answers, it is considered busy processing this request. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voidbusyStatusChanged(java.lang.String currentRequest, - int numberOfEnqueued) - -
-          Reports a new status of remote VM.
-  -

- - - - - - - - -
-Method Detail
- -

-busyStatusChanged

-
-void busyStatusChanged(java.lang.String currentRequest,
-                       int numberOfEnqueued)
-
-
Reports a new status of remote VM. -

-

-
Parameters:
currentRequest - name of the oldest request that hasn't been answered yet or null
numberOfEnqueued - number of requests that are expected to be waiting in VM queue; does - not make sense if currentRequest is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.html deleted file mode 100644 index 30eee53f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/DebugEventListener.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - -DebugEventListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface DebugEventListener

-
-
-
public interface DebugEventListener
- - -

-This interface is used by the SDK to report debug events for a certain JavascriptVm to - the clients. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceDebugEventListener.VmStatusListener - -
-          A specialized listener for status of remote VM command queue.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voiddisconnected() - -
-          Reports the debug connection has terminated and JavascriptVm has stopped operating.
- DebugEventListener.VmStatusListenergetVmStatusListener() - -
-          Gets DebugEventListener.VmStatusListener that is considered a part of DebugEventListener.
- voidresumed() - -
-          Reports the browser JavaScript virtual machine has resumed.
- voidscriptCollected(Script script) - -
-          Reports that the script has been collected and is no longer used in VM.
- voidscriptContentChanged(Script newScript) - -
-          Reports that script source has been altered in remote VM.
- voidscriptLoaded(Script newScript) - -
-          Reports that a new script has been loaded into a tab.
- voidsuspended(DebugContext context) - -
-          Reports the browser JavaScript virtual machine has suspended (on hitting - breakpoints or a step end).
-  -

- - - - - - - - -
-Method Detail
- -

-suspended

-
-void suspended(DebugContext context)
-
-
Reports the browser JavaScript virtual machine has suspended (on hitting - breakpoints or a step end). The context can be used to access the - current backtrace. -

-

-
Parameters:
context - associated with the current suspended state
-
-
-
- -

-resumed

-
-void resumed()
-
-
Reports the browser JavaScript virtual machine has resumed. This can happen - asynchronously, due to a user action in the browser (without explicitly - resuming the VM through - DebugContext.continueVm(org.chromium.sdk.DebugContext.StepAction, int, org.chromium.sdk.DebugContext.ContinueCallback)). -

-

-
-
-
-
- -

-disconnected

-
-void disconnected()
-
-
Reports the debug connection has terminated and JavascriptVm has stopped operating. - This event is reported always, regardless of which reason causes termination. - TODO: consider adding disconnect reason here. -

-

-
-
-
-
- -

-scriptLoaded

-
-void scriptLoaded(Script newScript)
-
-
Reports that a new script has been loaded into a tab. -

-

-
Parameters:
newScript - loaded into the tab
-
-
-
- -

-scriptCollected

-
-void scriptCollected(Script script)
-
-
Reports that the script has been collected and is no longer used in VM. -

-

-
-
-
-
- -

-getVmStatusListener

-
-DebugEventListener.VmStatusListener getVmStatusListener()
-
-
Gets DebugEventListener.VmStatusListener that is considered a part of DebugEventListener. - The value this method returns may be cached by caller. -

-

- -
Returns:
DebugEventListener.VmStatusListener or null
-
-
-
- -

-scriptContentChanged

-
-void scriptContentChanged(Script newScript)
-
-
Reports that script source has been altered in remote VM. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ExceptionData.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ExceptionData.html deleted file mode 100644 index de6dcead..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/ExceptionData.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - -ExceptionData - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface ExceptionData

-
-
-
public interface ExceptionData
- - -

-A JavaScript exception data holder for exceptions reported by a JavaScript - virtual machine. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- java.lang.StringgetExceptionMessage() - -
-           
- JsValuegetExceptionValue() - -
-           
- java.lang.StringgetSourceText() - -
-           
- booleanisUncaught() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getExceptionValue

-
-JsValue getExceptionValue()
-
-
- -
Returns:
the thrown exception value
-
-
-
- -

-isUncaught

-
-boolean isUncaught()
-
-
- -
Returns:
whether this exception is uncaught
-
-
-
- -

-getSourceText

-
-java.lang.String getSourceText()
-
-
- -
Returns:
the text of the source line where the exception was thrown or null
-
-
-
- -

-getExceptionMessage

-
-java.lang.String getExceptionMessage()
-
-
- -
Returns:
the exception description (plain text)
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/FunctionScopeExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/FunctionScopeExtension.html deleted file mode 100644 index f75f06c4..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/FunctionScopeExtension.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - -FunctionScopeExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface FunctionScopeExtension

-
-
-
public interface FunctionScopeExtension
- - -

-An extension to JsFunction API that returns function (closure) hidden scope. -

- -

-

-
See Also:
JavascriptVm.getFunctionScopeExtension()
-
- -

- - - - - - - - - - - - -
-Method Summary
- java.util.List<? extends JsScope>getScopes(JsFunction function) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getScopes

-
-java.util.List<? extends JsScope> getScopes(JsFunction function)
-                                            throws MethodIsBlockingException
-
-
- -
Returns:
list of hidden function scopes (possibly empty) -
Throws: -
MethodIsBlockingException - because function may need to load scope data - on demand
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/IgnoreCountBreakpointExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/IgnoreCountBreakpointExtension.html deleted file mode 100644 index 3f750faa..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/IgnoreCountBreakpointExtension.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - -IgnoreCountBreakpointExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface IgnoreCountBreakpointExtension

-
-
-
public interface IgnoreCountBreakpointExtension
- - -

-An extension to breakpoint API that supports 'ignore count' property. Some backends - or VM versions may not support it. -

- -

-

-
See Also:
JavascriptVm.getIgnoreCountBreakpointExtension(), -Breakpoint.getIgnoreCountBreakpointExtension()
-
- -

- - - - - - - - - - - -
-Field Summary
-static intEMPTY_VALUE - -
-          This value is used when the corresponding parameter is absent.
-  - - - - - - - - - - - - - - - -
-Method Summary
- RelayOksetBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOksetIgnoreCount(Breakpoint breakpoint, - int ignoreCount, - GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Sets the ignore count for this breakpoint (EMPTY_VALUE to clear).
-  -

- - - - - - - - -
-Field Detail
- -

-EMPTY_VALUE

-
-static final int EMPTY_VALUE
-
-
This value is used when the corresponding parameter is absent. -

-

-
See Also:
setIgnoreCount(org.chromium.sdk.Breakpoint, int, org.chromium.sdk.util.GenericCallback, org.chromium.sdk.SyncCallback), -Constant Field Values
-
- - - - - - - - -
-Method Detail
- -

-setBreakpoint

-
-RelayOk setBreakpoint(JavascriptVm javascriptVm,
-                      Breakpoint.Target target,
-                      int line,
-                      int column,
-                      boolean enabled,
-                      java.lang.String condition,
-                      int ignoreCount,
-                      JavascriptVm.BreakpointCallback callback,
-                      SyncCallback syncCallback)
-
-
Sets a breakpoint with the specified parameters. -

-

-
Parameters:
target - of the breakpoint
line - in the script or function (1-based). If none, use - Breakpoint.EMPTY_VALUE
column - of the target start within the line (1-based). If none, use - Breakpoint.EMPTY_VALUE
enabled - whether the breakpoint is enabled initially
ignoreCount - number specifying the amount of breakpoint hits to - ignore. If none, use EMPTY_VALUE
condition - nullable string with breakpoint condition
callback - to invoke when the evaluation result is ready, - may be null
-
-
-
- -

-setIgnoreCount

-
-RelayOk setIgnoreCount(Breakpoint breakpoint,
-                       int ignoreCount,
-                       GenericCallback<java.lang.Void> callback,
-                       SyncCallback syncCallback)
-
-
Sets the ignore count for this breakpoint (EMPTY_VALUE to clear). - Does not require subsequent flush call. -

-

-
Parameters:
ignoreCount - the new ignored hits count to set
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/InvalidContextException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/InvalidContextException.html deleted file mode 100644 index c6f27e96..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/InvalidContextException.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -InvalidContextException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class InvalidContextException

-
-java.lang.Object
-  extended by java.lang.Throwable
-      extended by java.lang.Exception
-          extended by java.lang.RuntimeException
-              extended by org.chromium.sdk.InvalidContextException
-
-
-
All Implemented Interfaces:
java.io.Serializable
-
-
-
-
public class InvalidContextException
extends java.lang.RuntimeException
- - -

-Signals that operation is not available because related DebugContext - is no more valid. However, there is no guarantee this exception will be thrown - in each case. Note also that DebugContext.continueVm(org.chromium.sdk.DebugContext.StepAction, int, org.chromium.sdk.DebugContext.ContinueCallback, org.chromium.sdk.SyncCallback) throws - simple IllegalStateException. -

- -

-

-
See Also:
Serialized Form
-
- -

- - - - - - - - - - - -
-Constructor Summary
InvalidContextException(java.lang.Throwable cause) - -
-           
-  - - - - - - - -
-Method Summary
- - - - - - - -
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-InvalidContextException

-
-public InvalidContextException(java.lang.Throwable cause)
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.BreakpointCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.BreakpointCallback.html deleted file mode 100644 index be3183c9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.BreakpointCallback.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - -JavascriptVm.BreakpointCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JavascriptVm.BreakpointCallback

-
-
Enclosing interface:
JavascriptVm
-
-
-
-
public static interface JavascriptVm.BreakpointCallback
- - -

-A callback for breakpoint-related requests. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String errorMessage) - -
-           
- voidsuccess(Breakpoint breakpoint) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(Breakpoint breakpoint)
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.String errorMessage)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ExceptionCatchMode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ExceptionCatchMode.html deleted file mode 100644 index 38ff30e9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ExceptionCatchMode.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -JavascriptVm.ExceptionCatchMode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum JavascriptVm.ExceptionCatchMode

-
-java.lang.Object
-  extended by java.lang.Enum<JavascriptVm.ExceptionCatchMode>
-      extended by org.chromium.sdk.JavascriptVm.ExceptionCatchMode
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JavascriptVm.ExceptionCatchMode>
-
-
-
Enclosing interface:
JavascriptVm
-
-
-
-
public static enum JavascriptVm.ExceptionCatchMode
extends java.lang.Enum<JavascriptVm.ExceptionCatchMode>
- - -

-Defines when VM will break on exception throw (before stack unwind happened). -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Enum Constant Summary
ALL - -
-          VM always breaks when exception is being thrown.
NONE - -
-          VM doesn't break when exception is being thrown.
UNCAUGHT - -
-          VM breaks when exception is being thrown without try-catch that is going to catch it.
-  - - - - - - - - - - - - - - - -
-Method Summary
-static JavascriptVm.ExceptionCatchModevalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JavascriptVm.ExceptionCatchMode[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-ALL

-
-public static final JavascriptVm.ExceptionCatchMode ALL
-
-
VM always breaks when exception is being thrown. -

-

-
-
-
- -

-UNCAUGHT

-
-public static final JavascriptVm.ExceptionCatchMode UNCAUGHT
-
-
VM breaks when exception is being thrown without try-catch that is going to catch it. -

-

-
-
-
- -

-NONE

-
-public static final JavascriptVm.ExceptionCatchMode NONE
-
-
VM doesn't break when exception is being thrown. -

-

-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static JavascriptVm.ExceptionCatchMode[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (JavascriptVm.ExceptionCatchMode c : JavascriptVm.ExceptionCatchMode.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static JavascriptVm.ExceptionCatchMode valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ListBreakpointsCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ListBreakpointsCallback.html deleted file mode 100644 index 16eeabca..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ListBreakpointsCallback.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - -JavascriptVm.ListBreakpointsCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JavascriptVm.ListBreakpointsCallback

-
-
Enclosing interface:
JavascriptVm
-
-
-
-
public static interface JavascriptVm.ListBreakpointsCallback
- - -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.Exception exception) - -
-           
- voidsuccess(java.util.Collection<? extends Breakpoint> breakpoints) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(java.util.Collection<? extends Breakpoint> breakpoints)
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.Exception exception)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ScriptsCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ScriptsCallback.html deleted file mode 100644 index 7638c912..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.ScriptsCallback.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - -JavascriptVm.ScriptsCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JavascriptVm.ScriptsCallback

-
-
Enclosing interface:
JavascriptVm
-
-
-
-
public static interface JavascriptVm.ScriptsCallback
- - -

-A callback for retrieving scripts. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String errorMessage) - -
-           
- voidsuccess(java.util.Collection<Script> scripts) - -
-          This method provides a synchronous access to script collection.
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(java.util.Collection<Script> scripts)
-
-
This method provides a synchronous access to script collection. All script events - are postponed for the time of this call. -

-

-
-
-
-
- -

-failure

-
-void failure(java.lang.String errorMessage)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.SuspendCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.SuspendCallback.html deleted file mode 100644 index 79d56c4d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.SuspendCallback.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -JavascriptVm.SuspendCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JavascriptVm.SuspendCallback

-
-
Enclosing interface:
JavascriptVm
-
-
-
-
public static interface JavascriptVm.SuspendCallback
- - -

-A callback for suspend request. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.Exception reason) - -
-           
- voidsuccess() - -
-          Signals that command successfully finished.
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success()
-
-
Signals that command successfully finished. After this DebugContext should be built - and unless there are some problems, - DebugEventListener.suspended(DebugContext) will be called soon. -

-

-
-
-
-
- -

-failure

-
-void failure(java.lang.Exception reason)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.html deleted file mode 100644 index 81748d42..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JavascriptVm.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - -JavascriptVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JavascriptVm

-
-
All Known Subinterfaces:
BrowserTab, StandaloneVm, WipJavascriptVm
-
-
-
-
public interface JavascriptVm
- - -

-Abstraction of a remote JavaScript virtual machine. Clients can use it to - conduct debugging process. -

- -

-

-
See Also:
Browser.TabConnector.attach(org.chromium.sdk.TabDebugEventListener), -BrowserFactory.createStandalone(java.net.SocketAddress, org.chromium.sdk.ConnectionLogger), -WipBrowser.WipTabConnector.attach(TabDebugEventListener)
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceJavascriptVm.BreakpointCallback - -
-          A callback for breakpoint-related requests.
-static classJavascriptVm.ExceptionCatchMode - -
-          Defines when VM will break on exception throw (before stack unwind happened).
-static interfaceJavascriptVm.ListBreakpointsCallback - -
-           
-static interfaceJavascriptVm.ScriptsCallback - -
-          A callback for retrieving scripts.
-static interfaceJavascriptVm.SuspendCallback - -
-          A callback for suspend request.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- booleandetach() - -
-          Detaches from the related tab debugger.
- RelayOkenableBreakpoints(java.lang.Boolean enabled, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Asynchronously enables or disables all breakpoints on remote.
- BreakpointTypeExtensiongetBreakpointTypeExtension() - -
-           
- FunctionScopeExtensiongetFunctionScopeExtension() - -
-           
- IgnoreCountBreakpointExtensiongetIgnoreCountBreakpointExtension() - -
-           
- RestartFrameExtensiongetRestartFrameExtension() - -
-           
- voidgetScripts(JavascriptVm.ScriptsCallback callback) - -
-          Returns user scripts loaded into the tab.
- VersiongetVersion() - -
-           
- booleanisAttached() - -
-           
- RelayOklistBreakpoints(JavascriptVm.ListBreakpointsCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reads breakpoints from remote VM.
- RelayOksetBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
- RelayOksetBreakpoint(Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- voidsuspend(JavascriptVm.SuspendCallback callback) - -
-          Tries to suspend VM.
-  -

- - - - - - - - -
-Method Detail
- -

-detach

-
-boolean detach()
-
-
Detaches from the related tab debugger. -

-

- -
Returns:
whether the operation succeeded
-
-
-
- -

-isAttached

-
-boolean isAttached()
-
-
- -
Returns:
whether the tab is currently attached
-
-
-
- -

-getScripts

-
-void getScripts(JavascriptVm.ScriptsCallback callback)
-                throws MethodIsBlockingException
-
-
Returns user scripts loaded into the tab. May block until scripts are actually loaded. -

Some scripts could be already collected when the method is called. They can be missed - in the result list. -

-

-
Parameters:
callback - that synchronously receives result, may be null -
Throws: -
MethodIsBlockingException - because it may need to actually load scripts
-
-
-
- -

-setBreakpoint

-
-RelayOk setBreakpoint(Breakpoint.Target target,
-                      int line,
-                      int column,
-                      boolean enabled,
-                      java.lang.String condition,
-                      JavascriptVm.BreakpointCallback callback,
-                      SyncCallback syncCallback)
-
-
Sets a breakpoint with the specified parameters. -

-

-
Parameters:
target - of the breakpoint
line - in the script or function (1-based). If none, use - Breakpoint.EMPTY_VALUE
column - of the target start within the line (1-based). If none, use - Breakpoint.EMPTY_VALUE
enabled - whether the breakpoint is enabled initially
condition - nullable string with breakpoint condition
callback - to invoke when the evaluation result is ready, - may be null
-
-
-
- -

-suspend

-
-void suspend(JavascriptVm.SuspendCallback callback)
-
-
Tries to suspend VM. If successful, DebugEventListener.suspended(DebugContext) - will be called. -

-

-
Parameters:
callback - to invoke once the operation result is available, - may be null
-
-
-
- -

-listBreakpoints

-
-RelayOk listBreakpoints(JavascriptVm.ListBreakpointsCallback callback,
-                        SyncCallback syncCallback)
-
-
Asynchronously reads breakpoints from remote VM. The now-effective collection of breakpoints - is returned to callback. Already existing Breakpoint instances are preserved. -

-

-
-
-
-
- -

-enableBreakpoints

-
-RelayOk enableBreakpoints(java.lang.Boolean enabled,
-                          GenericCallback<java.lang.Boolean> callback,
-                          SyncCallback syncCallback)
-
-
Asynchronously enables or disables all breakpoints on remote. 'Enabled' means that - breakpoints behave as normal, 'disabled' means that VM doesn't stop on breakpoints. - It doesn't update individual properties of Breakpoints. Method call - with a null value and not null callback simply returns current value. -

-

-
Parameters:
enabled - new value to set or null
callback - receives current value if succeed or error message
-
-
-
- -

-setBreakOnException

-
-RelayOk setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode,
-                            GenericCallback<JavascriptVm.ExceptionCatchMode> callback,
-                            SyncCallback syncCallback)
-
-
Controls whether VM stops on exceptions. 3 catch modes are supported. -

-

-
Parameters:
catchMode - new mode or null to keep the current mode
callback - gets invoked when operation is finished and receives current mode - as a value (may receive null if actual mode doesn't fit into JavascriptVm.ExceptionCatchMode - type)
-
-
-
- -

-getVersion

-
-Version getVersion()
-
-
- -
Returns:
version of JavaScript VM or null if not available
-
-
-
- -

-getBreakpointTypeExtension

-
-BreakpointTypeExtension getBreakpointTypeExtension()
-
-
- -
Returns:
extension to standard breakpoint target types
-
-
-
- -

-getIgnoreCountBreakpointExtension

-
-IgnoreCountBreakpointExtension getIgnoreCountBreakpointExtension()
-
-
- -
Returns:
extension that supports ignore count property of breakpoint - or null if unsupported by VM
-
-
-
- -

-getFunctionScopeExtension

-
-FunctionScopeExtension getFunctionScopeExtension()
-
-
- -
Returns:
extension that returns function hidden scopes or null if unsupported by VM
-
-
-
- -

-getRestartFrameExtension

-
-RestartFrameExtension getRestartFrameExtension()
-
-
- -
Returns:
extension that restarts frame or null if unsupported by VM
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsArray.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsArray.html deleted file mode 100644 index 4ca2f3b5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsArray.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - -JsArray - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsArray

-
-
All Superinterfaces:
JsObject, JsValue
-
-
-
-
public interface JsArray
extends JsObject
- - -

-Extends JsObject interface by adding methods for handling array elements. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JsValue
JsValue.ReloadBiggerCallback, JsValue.Type
-  - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsVariableget(int index) - -
-           
- intlength() - -
-           
- java.util.SortedMap<java.lang.Integer,? extends JsVariable>toSparseArray() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsObject
asArray, asFunction, getClassName, getInternalProperties, getProperties, getProperty, getRefId, getRemoteValueMapping
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsValue
asObject, getType, getValueString, isTruncated, reloadHeavyValue
-  -

- - - - - - - - -
-Method Detail
- -

-length

-
-int length()
-           throws MethodIsBlockingException
-
-
-
-
-
- -
Returns:
the array length (index of the last element plus one), - 0 iff the array is empty -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-get

-
-JsVariable get(int index)
-               throws MethodIsBlockingException
-
-
-
-
-
-
Parameters:
index - in the array -
Returns:
a JsVariable at the index, or null if there - is no value at the specified index in the array -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-toSparseArray

-
-java.util.SortedMap<java.lang.Integer,? extends JsVariable> toSparseArray()
-                                                                          throws MethodIsBlockingException
-
-
-
-
-
- -
Returns:
a map whose keys are array indices and values are JsVariable instances found at the corresponding indices. The - resulting map is guaranteed to be sorted in the ascending key - order. -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.EvaluateCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.EvaluateCallback.html deleted file mode 100644 index a74cfa8f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.EvaluateCallback.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - -JsEvaluateContext.EvaluateCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsEvaluateContext.EvaluateCallback

-
-
Enclosing interface:
JsEvaluateContext
-
-
-
-
public static interface JsEvaluateContext.EvaluateCallback
- - -

-A callback for the "evaluate" request. - TODO: support thrown JavaScript exception here. Currently they are passed as pseudoobject. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String errorMessage) - -
-           
- voidsuccess(JsVariable variable) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(JsVariable variable)
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.String errorMessage)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.html deleted file mode 100644 index 82976793..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsEvaluateContext.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - -JsEvaluateContext - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsEvaluateContext

-
-
-
public interface JsEvaluateContext
- - -

-A context in which watch expressions may be evaluated. Typically corresponds to stack frame - of suspended process, but may also be detached from any stack frame. -

- -

-

-
See Also:
EvaluateToMappingExtension
-
- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceJsEvaluateContext.EvaluateCallback - -
-          A callback for the "evaluate" request.
-  - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkevaluateAsync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- voidevaluateSync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

- - - - - - - - -
-Method Detail
- -

-evaluateSync

-
-void evaluateSync(java.lang.String expression,
-                  java.util.Map<java.lang.String,java.lang.String> additionalContext,
-                  JsEvaluateContext.EvaluateCallback evaluateCallback)
-                  throws MethodIsBlockingException
-
-
Synchronously evaluates an arbitrary JavaScript expression in - the particular context. - Previously loaded JsObjects can be addressed from the expression if listed in - additionalContext parameter. - The evaluation result is reported to the specified evaluateCallback. - The method will block until the evaluation result is available. -

-

-
Parameters:
expression - to evaluate
additionalContext - a name-to-object-ref-id map that adds new values to an expression - scope; may be null
evaluateCallback - to report the evaluation result to -
Throws: -
MethodIsBlockingException - if called from a callback because it blocks - until remote VM returns result
-
-
-
- -

-evaluateAsync

-
-RelayOk evaluateAsync(java.lang.String expression,
-                      java.util.Map<java.lang.String,java.lang.String> additionalContext,
-                      JsEvaluateContext.EvaluateCallback evaluateCallback,
-                      SyncCallback syncCallback)
-
-
Asynchronously evaluates an arbitrary JavaScript expression in - the particular context. - Previously loaded JsObjects can be addressed from the expression if listed in - additionalContext parameter. - The evaluation result is reported to the specified evaluateCallback. - The method doesn't block. -

-

-
Parameters:
expression - to evaluate
additionalContext - a name-to-object-ref-id map that adds new values to an expression - scope; may be null
evaluateCallback - to report the evaluation result to
syncCallback - to report the end of any processing
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsFunction.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsFunction.html deleted file mode 100644 index c4a17414..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsFunction.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - -JsFunction - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsFunction

-
-
All Superinterfaces:
JsObject, JsValue
-
-
-
-
public interface JsFunction
extends JsObject
- - -

-Extends JsObject interface with the methods for function-specific properties. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JsValue
JsValue.ReloadBiggerCallback, JsValue.Type
-  - - - - - - - - - - - - - - - - -
-Method Summary
- TextStreamPositiongetOpenParenPosition() - -
-          Returns position of opening parenthesis of function arguments.
- ScriptgetScript() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsObject
asArray, asFunction, getClassName, getInternalProperties, getProperties, getProperty, getRefId, getRemoteValueMapping
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsValue
asObject, getType, getValueString, isTruncated, reloadHeavyValue
-  -

- - - - - - - - -
-Method Detail
- -

-getScript

-
-Script getScript()
-                 throws MethodIsBlockingException
-
-
-
-
-
- -
Returns:
script the function resides in or null if script is not available -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-getOpenParenPosition

-
-TextStreamPosition getOpenParenPosition()
-                                        throws MethodIsBlockingException
-
-
Returns position of opening parenthesis of function arguments. Position is absolute - within resource (not relative to script start position). -

-

-
-
-
- -
Returns:
position or null if position is not available -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObject.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObject.html deleted file mode 100644 index 1f4a2bec..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObject.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -JsObject - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsObject

-
-
All Superinterfaces:
JsValue
-
-
-
All Known Subinterfaces:
JsArray, JsFunction
-
-
-
-
public interface JsObject
extends JsValue
- - -

-A compound JsValue that has zero or more properties. Note that JavaScript null - value while officially being 'object' in the SDK is represented as a plain JsValue. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JsValue
JsValue.ReloadBiggerCallback, JsValue.Type
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsArrayasArray() - -
-           
- JsFunctionasFunction() - -
-           
- java.lang.StringgetClassName() - -
-           
- java.util.Collection<? extends JsVariable>getInternalProperties() - -
-           
- java.util.Collection<? extends JsVariable>getProperties() - -
-           
- JsVariablegetProperty(java.lang.String name) - -
-           
- java.lang.StringgetRefId() - -
-          Optionally returns unique id for this object.
- RemoteValueMappinggetRemoteValueMapping() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsValue
asObject, getType, getValueString, isTruncated, reloadHeavyValue
-  -

- - - - - - - - -
-Method Detail
- -

-getClassName

-
-java.lang.String getClassName()
-
-
-
-
-
- -
Returns:
the class name of this object
-
-
-
- -

-getProperties

-
-java.util.Collection<? extends JsVariable> getProperties()
-                                                         throws MethodIsBlockingException
-
-
-
-
-
- -
Returns:
the own properties of this compound value (does not include - properties from proto object) -
Throws: -
MethodIsBlockingException - because it may need to load value from remote - TODO: make it return list of JsObjectProperty once hacks for supporting exceptions are - removed.
-
-
-
- -

-getInternalProperties

-
-java.util.Collection<? extends JsVariable> getInternalProperties()
-                                                                 throws MethodIsBlockingException
-
-
-
-
-
- -
Returns:
the internal properties of this compound value (e.g. those properties which - are not detectable with the "in" operator: __proto__ etc) -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-getProperty

-
-JsVariable getProperty(java.lang.String name)
-                       throws MethodIsBlockingException
-
-
-
-
-
-
Parameters:
name - of the property to get -
Returns:
the own property object or null if name does not - designate an existing object property (does not return - properties from proto object) -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
-
- -

-asArray

-
-JsArray asArray()
-
-
-
-
-
- -
Returns:
this object cast to JsArray or null if this object - is not an array
-
-
-
- -

-asFunction

-
-JsFunction asFunction()
-
-
-
-
-
- -
Returns:
this object cast to JsFunction or null if this object - is not a function
-
-
-
- -

-getRefId

-
-java.lang.String getRefId()
-
-
Optionally returns unique id for this object. No two distinct objects can have the same id. - Lifetime of id is limited to lifetime of its RemoteValueMapping (typically corresponds - to the lifetime of DebugContext.) -

-

-
-
-
- -
Returns:
object id or null
See Also:
getRemoteValueMapping()
-
-
-
- -

-getRemoteValueMapping

-
-RemoteValueMapping getRemoteValueMapping()
-
-
-
-
-
- -
Returns:
value mapping this object is associated with or null for special-case - immutable objects
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObjectProperty.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObjectProperty.html deleted file mode 100644 index a2b9e00e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsObjectProperty.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -JsObjectProperty - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsObjectProperty

-
-
All Superinterfaces:
JsVariable
-
-
-
-
public interface JsObjectProperty
extends JsVariable
- - -

-Exposes additional data if variable is a property of object and its property descriptor - is available. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JsVariable
JsVariable.SetValueCallback
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkevaluateGet(JsEvaluateContext.EvaluateCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates property getter and returns property value.
- JsValuegetGetter() - -
-           
- JsFunctiongetGetterAsFunction() - -
-           
- JsValuegetSetter() - -
-           
- booleanisConfigurable() - -
-           
- booleanisEnumerable() - -
-           
- booleanisWritable() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsVariable
asObjectProperty, getFullyQualifiedName, getName, getValue, isMutable, isReadable, setValue
-  -

- - - - - - - - -
-Method Detail
- -

-isWritable

-
-boolean isWritable()
-
-
-
-
-
- -
Returns:
whether property described as 'writable'
-
-
-
- -

-getGetter

-
-JsValue getGetter()
-
-
-
-
-
- -
Returns:
property getter value (function or undefined) or null if not an accessor property
-
-
-
- -

-getGetterAsFunction

-
-JsFunction getGetterAsFunction()
-
-
-
-
-
- -
Returns:
getGetter() result as function or null if cannot cast
-
-
-
- -

-getSetter

-
-JsValue getSetter()
-
-
-
-
-
- -
Returns:
property setter value (function or undefined) or null if not an accessor property
-
-
-
- -

-isConfigurable

-
-boolean isConfigurable()
-
-
-
-
-
- -
Returns:
whether property described as 'configurable'
-
-
-
- -

-isEnumerable

-
-boolean isEnumerable()
-
-
-
-
-
- -
Returns:
whether property described as 'enumerable'
-
-
-
- -

-evaluateGet

-
-RelayOk evaluateGet(JsEvaluateContext.EvaluateCallback callback,
-                    SyncCallback syncCallback)
-
-
Asynchronously evaluates property getter and returns property value. Must only be used - if getGetterAsFunction() returns not null; otherwise behavior is undefined and - implementation-specific. -

-

-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.Type.html deleted file mode 100644 index 6b333ba6..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.Type.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -JsScope.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum JsScope.Type

-
-java.lang.Object
-  extended by java.lang.Enum<JsScope.Type>
-      extended by org.chromium.sdk.JsScope.Type
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JsScope.Type>
-
-
-
Enclosing interface:
JsScope
-
-
-
-
public static enum JsScope.Type
extends java.lang.Enum<JsScope.Type>
- - -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - - -
-Enum Constant Summary
CATCH - -
-           
CLOSURE - -
-           
GLOBAL - -
-           
LOCAL - -
-           
UNKNOWN - -
-           
WITH - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
-static JsScope.TypevalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JsScope.Type[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-GLOBAL

-
-public static final JsScope.Type GLOBAL
-
-
-
-
-
- -

-LOCAL

-
-public static final JsScope.Type LOCAL
-
-
-
-
-
- -

-WITH

-
-public static final JsScope.Type WITH
-
-
-
-
-
- -

-CLOSURE

-
-public static final JsScope.Type CLOSURE
-
-
-
-
-
- -

-CATCH

-
-public static final JsScope.Type CATCH
-
-
-
-
-
- -

-UNKNOWN

-
-public static final JsScope.Type UNKNOWN
-
-
-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static JsScope.Type[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (JsScope.Type c : JsScope.Type.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static JsScope.Type valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.WithScope.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.WithScope.html deleted file mode 100644 index 62cba33b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.WithScope.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - -JsScope.WithScope - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsScope.WithScope

-
-
All Superinterfaces:
JsScope
-
-
-
Enclosing interface:
JsScope
-
-
-
-
public static interface JsScope.WithScope
extends JsScope
- - -

-Subtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject). -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JsScope
JsScope.Type, JsScope.WithScope
-  - - - - - - - - - - - - -
-Method Summary
- JsValuegetWithArgument() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JsScope
asWithScope, getType, getVariables
-  -

- - - - - - - - -
-Method Detail
- -

-getWithArgument

-
-JsValue getWithArgument()
-                        throws MethodIsBlockingException
-
-
-
-
-
- -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.html deleted file mode 100644 index dbc92f8f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsScope.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -JsScope - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsScope

-
-
All Known Subinterfaces:
JsScope.WithScope
-
-
-
-
public interface JsScope
- - -

-An object that represents a scope in JavaScript. - TODO: consider adding object getter for both with and global scopes. -

- -

-


- -

- - - - - - - - - - - - - - - -
-Nested Class Summary
-static classJsScope.Type - -
-           
-static interfaceJsScope.WithScope - -
-          Subtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject).
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsScope.WithScopeasWithScope() - -
-           
- JsScope.TypegetType() - -
-           
- java.util.List<? extends JsVariable>getVariables() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getType

-
-JsScope.Type getType()
-
-
- -
Returns:
type of the scope
-
-
-
- -

-asWithScope

-
-JsScope.WithScope asWithScope()
-
-
- -
Returns:
optional subtype when type is JsScope.Type.WITH and null otherwise
-
-
-
- -

-getVariables

-
-java.util.List<? extends JsVariable> getVariables()
-                                                  throws MethodIsBlockingException
-
-
- -
Returns:
the variables known in this scope, in lexicographical order -
Throws: -
MethodIsBlockingException - because it may need to load value from remote
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.ReloadBiggerCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.ReloadBiggerCallback.html deleted file mode 100644 index ce82b0f0..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.ReloadBiggerCallback.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -JsValue.ReloadBiggerCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsValue.ReloadBiggerCallback

-
-
Enclosing interface:
JsValue
-
-
-
-
public static interface JsValue.ReloadBiggerCallback
- - -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voiddone() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-done

-
-void done()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.Type.html deleted file mode 100644 index ad2cce2f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.Type.html +++ /dev/null @@ -1,524 +0,0 @@ - - - - - - -JsValue.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum JsValue.Type

-
-java.lang.Object
-  extended by java.lang.Enum<JsValue.Type>
-      extended by org.chromium.sdk.JsValue.Type
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JsValue.Type>
-
-
-
Enclosing interface:
JsValue
-
-
-
-
public static enum JsValue.Type
extends java.lang.Enum<JsValue.Type>
- - -

-Type of a JavaScript value. Two bogus type values (DATE and ARRAY) are - included even though they are not reported by V8. Instead, they are inferred - from the object classname. null value has a bogus type NULL. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Enum Constant Summary
TYPE_ARRAY - -
-          An object which is actually an array.
TYPE_BOOLEAN - -
-          Boolean type.
TYPE_DATE - -
-          An object which is actually a Date.
TYPE_ERROR - -
-          Error type (this one describes a JavaScript exception).
TYPE_FUNCTION - -
-          Function type.
TYPE_NULL - -
-          null type.
TYPE_NUMBER - -
-          Number type.
TYPE_OBJECT - -
-          Object type.
TYPE_REGEXP - -
-          A regular expression.
TYPE_STRING - -
-          String type.
TYPE_UNDEFINED - -
-          undefined type.
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
-static booleanisObjectType(JsValue.Type type) - -
-          Returns whether type corresponds to a JsObject.
-static JsValue.TypevalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JsValue.Type[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-TYPE_OBJECT

-
-public static final JsValue.Type TYPE_OBJECT
-
-
Object type. -

-

-
-
-
- -

-TYPE_NUMBER

-
-public static final JsValue.Type TYPE_NUMBER
-
-
Number type. -

-

-
-
-
- -

-TYPE_STRING

-
-public static final JsValue.Type TYPE_STRING
-
-
String type. -

-

-
-
-
- -

-TYPE_FUNCTION

-
-public static final JsValue.Type TYPE_FUNCTION
-
-
Function type. -

-

-
-
-
- -

-TYPE_BOOLEAN

-
-public static final JsValue.Type TYPE_BOOLEAN
-
-
Boolean type. -

-

-
-
-
- -

-TYPE_ERROR

-
-public static final JsValue.Type TYPE_ERROR
-
-
Error type (this one describes a JavaScript exception). -

-

-
-
-
- -

-TYPE_REGEXP

-
-public static final JsValue.Type TYPE_REGEXP
-
-
A regular expression. -

-

-
-
-
- -

-TYPE_DATE

-
-public static final JsValue.Type TYPE_DATE
-
-
An object which is actually a Date. This type is not present in the - protocol but is rather induced from the "object" type and "Date" class of - an object. -

-

-
-
-
- -

-TYPE_ARRAY

-
-public static final JsValue.Type TYPE_ARRAY
-
-
An object which is actually an array. This type is not present in the - protocol but is rather induced from the "object" type and "Array" class of - an object. -

-

-
-
-
- -

-TYPE_UNDEFINED

-
-public static final JsValue.Type TYPE_UNDEFINED
-
-
undefined type. -

-

-
-
-
- -

-TYPE_NULL

-
-public static final JsValue.Type TYPE_NULL
-
-
null type. This is a bogus type that doesn't exist in JavaScript. -

-

-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static JsValue.Type[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (JsValue.Type c : JsValue.Type.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static JsValue.Type valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
-
- -

-isObjectType

-
-public static boolean isObjectType(JsValue.Type type)
-
-
Returns whether type corresponds to a JsObject. Note that while 'null' is an object - in JavaScript world, here for API consistency it has bogus type TYPE_NULL and is - not a JsObject. -

-

-
Parameters:
type - to check
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.html deleted file mode 100644 index d1ee2f42..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsValue.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - -JsValue - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsValue

-
-
All Known Subinterfaces:
JsArray, JsFunction, JsObject
-
-
-
-
public interface JsValue
- - -

-An object that represents a browser JavaScript VM variable value (compound or - atomic.) -

In some backends values (currently only strings) are loaded with a size limit. - The value part that exceeds the limit is truncated. The full value - can be loaded by reloadHeavyValue(org.chromium.sdk.JsValue.ReloadBiggerCallback, org.chromium.sdk.SyncCallback) method. -

- -

-


- -

- - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceJsValue.ReloadBiggerCallback - -
-           
-static classJsValue.Type - -
-          Type of a JavaScript value.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsObjectasObject() - -
-          Return this value cast to JsObject or null if this value - is not an object.
- JsValue.TypegetType() - -
-           
- java.lang.StringgetValueString() - -
-           
- booleanisTruncated() - -
-           
- RelayOkreloadHeavyValue(JsValue.ReloadBiggerCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reloads object value with extended size limit.
-  -

- - - - - - - - -
-Method Detail
- -

-getType

-
-JsValue.Type getType()
-
-
- -
Returns:
this value type
-
-
-
- -

-getValueString

-
-java.lang.String getValueString()
-
-
- -
Returns:
a string representation of this value
-
-
-
- -

-asObject

-
-JsObject asObject()
-
-
Return this value cast to JsObject or null if this value - is not an object. - See JsValue.Type.isObjectType(org.chromium.sdk.JsValue.Type) method for details. -

-

- -
Returns:
this or null
-
-
-
- -

-isTruncated

-
-boolean isTruncated()
-
-
- -
Returns:
whether the value of the object has been truncated while loaded
-
-
-
- -

-reloadHeavyValue

-
-RelayOk reloadHeavyValue(JsValue.ReloadBiggerCallback callback,
-                         SyncCallback syncCallback)
-
-
Asynchronously reloads object value with extended size limit. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.SetValueCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.SetValueCallback.html deleted file mode 100644 index ac1b691f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.SetValueCallback.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - -JsVariable.SetValueCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsVariable.SetValueCallback

-
-
Enclosing interface:
JsVariable
-
-
-
-
public static interface JsVariable.SetValueCallback
- - -

-A callback to use while setting a variable value. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String errorMessage) - -
-           
- voidsuccess() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success()
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.String errorMessage)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.html deleted file mode 100644 index cce119d5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/JsVariable.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - -JsVariable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface JsVariable

-
-
All Known Subinterfaces:
JsObjectProperty
-
-
-
-
public interface JsVariable
- - -

-An object that represents a variable in a browser JavaScript VM call frame. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceJsVariable.SetValueCallback - -
-          A callback to use while setting a variable value.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- JsObjectPropertyasObjectProperty() - -
-          Returns object property data if variable is an object property and its descriptor - is available.
- java.lang.StringgetFullyQualifiedName() - -
-           
- java.lang.StringgetName() - -
-           
- JsValuegetValue() - -
-          Returns the value of this variable.
- booleanisMutable() - -
-           
- booleanisReadable() - -
-           
- voidsetValue(java.lang.String newValue, - JsVariable.SetValueCallback callback) - -
-          Sets a new value for this variable.
-  -

- - - - - - - - -
-Method Detail
- -

-isReadable

-
-boolean isReadable()
-
-
- -
Returns:
whether it is possible to read this variable
-
-
-
- -

-getValue

-
-JsValue getValue()
-                 throws java.lang.UnsupportedOperationException
-
-
Returns the value of this variable. -

-

- -
Returns:
a [probably compound] JsValue corresponding to this variable. - null if there was an error reading the value data - or the property has accessor descriptor -
Throws: -
java.lang.UnsupportedOperationException - if this variable is not readable
See Also:
isReadable()
-
-
-
- -

-getName

-
-java.lang.String getName()
-
-
- -
Returns:
the name of this variable
-
-
-
- -

-isMutable

-
-boolean isMutable()
-
-
- -
Returns:
whether it is possible to modify this variable
-
-
-
- -

-setValue

-
-void setValue(java.lang.String newValue,
-              JsVariable.SetValueCallback callback)
-              throws java.lang.UnsupportedOperationException
-
-
Sets a new value for this variable. -

-

-
Parameters:
newValue - to set
callback - to report the operation result to -
Throws: -
java.lang.UnsupportedOperationException - if this variable is not mutable
See Also:
isMutable()
-
-
-
- -

-getFullyQualifiedName

-
-java.lang.String getFullyQualifiedName()
-
-
- -
Returns:
the fully qualified name of this variable relative to the context - of its call frame
-
-
-
- -

-asObjectProperty

-
-JsObjectProperty asObjectProperty()
-
-
Returns object property data if variable is an object property and its descriptor - is available. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RelayOk.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RelayOk.html deleted file mode 100644 index 8278052b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RelayOk.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -RelayOk - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface RelayOk

-
-
-
public interface RelayOk
- - -

-A symbolic interface that means "callback has been accepted and will be called sooner or later". - This interface comes together with SyncCallback interface. An asynchronous method - typically accepts SyncCallback parameter or throws an exception. By contract either - an exception is thrown or the caller rely on SyncCallback being called sooner or later. - This interface as a return type helps correctly write such code: -

- All this checks are done by compiler. The actual value of this type is not used. -

- This helps to prove that nobody will wait forever for a call-back that is never actually going - to be called. -

- -

-


- -

- -

- -


- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RemoteValueMapping.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RemoteValueMapping.html deleted file mode 100644 index 296f4a3a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RemoteValueMapping.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - -RemoteValueMapping - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface RemoteValueMapping

-
-
All Known Subinterfaces:
PermanentRemoteValueMapping
-
-
-
-
public interface RemoteValueMapping
- - -

-Represents a technical scope that manages remote value representation in debugger. - It controls life-cycle of JsObjects and their caching strategies. -

- -

-

-
See Also:
JsObject.getRemoteValueMapping(), -DebugContext.getDefaultRemoteValueMapping()
-
- -

- - - - - - - - - - - - -
-Method Summary
- voidclearCaches() - -
-          Clears local caches that store object properties.
-  -

- - - - - - - - -
-Method Detail
- -

-clearCaches

-
-void clearCaches()
-
-
Clears local caches that store object properties. This method should be called if - property value has been changed in VM (for example as an expression side-effect). -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RestartFrameExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RestartFrameExtension.html deleted file mode 100644 index 5349efa7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/RestartFrameExtension.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - -RestartFrameExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface RestartFrameExtension

-
-
-
public interface RestartFrameExtension
- - -

-An extension to CallFrame API that supports restart frame operation. Some backends - or VM versions may not support it. -

- -

-

-
See Also:
JavascriptVm.getRestartFrameExtension()
-
- -

- - - - - - - - - - - - - - - - -
-Method Summary
- booleancanRestartFrame(CallFrame callFrame) - -
-           
- RelayOkrestartFrame(CallFrame callFrame, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Restarts a frame (all frames above are dropped from the stack, this frame is started over).
-  -

- - - - - - - - -
-Method Detail
- -

-restartFrame

-
-RelayOk restartFrame(CallFrame callFrame,
-                     GenericCallback<java.lang.Boolean> callback,
-                     SyncCallback syncCallback)
-
-
Restarts a frame (all frames above are dropped from the stack, this frame is started over). -

-

-
Parameters:
callback - is notified about operation outcome; for success the boolean parameter - is true if VM has been resumed and is expected to get suspended again in a moment (with - a standard 'resumed' notification), and is false if callframes list is already updated - without VM state change (this case presently is never actually happening)
-
-
-
- -

-canRestartFrame

-
-boolean canRestartFrame(CallFrame callFrame)
-
-
- -
Returns:
whether reset operation is supported for the particular callFrame
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.Type.html deleted file mode 100644 index a877e040..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.Type.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -Script.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum Script.Type

-
-java.lang.Object
-  extended by java.lang.Enum<Script.Type>
-      extended by org.chromium.sdk.Script.Type
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Script.Type>
-
-
-
Enclosing interface:
Script
-
-
-
-
public static enum Script.Type
extends java.lang.Enum<Script.Type>
- - -

-Denotes a script type. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Enum Constant Summary
EXTENSION - -
-          A script supplied by an extension
NATIVE - -
-          A native, internal JavaScript VM script
NORMAL - -
-          A normal user script
-  - - - - - - - - - - - - - - - -
-Method Summary
-static Script.TypevalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static Script.Type[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-NATIVE

-
-public static final Script.Type NATIVE
-
-
A native, internal JavaScript VM script -

-

-
-
-
- -

-EXTENSION

-
-public static final Script.Type EXTENSION
-
-
A script supplied by an extension -

-

-
-
-
- -

-NORMAL

-
-public static final Script.Type NORMAL
-
-
A normal user script -

-

-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static Script.Type[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (Script.Type c : Script.Type.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static Script.Type valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.html deleted file mode 100644 index 2d837b5a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Script.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - -Script - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface Script

-
-
All Superinterfaces:
UpdatableScript
-
-
-
-
public interface Script
extends UpdatableScript
- - -

-An objects that holds data for a "script" which is a part of a resource - loaded into the browser, identified by its original document URL, line offset - in the original document, and the line count this script spans. - Its UpdatableScript aspect is refactored out as a separate interface not to - overload Script. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static classScript.Type - -
-          Denotes a script type.
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.UpdatableScript
UpdatableScript.ChangeDescription, UpdatableScript.ChangeStatus, UpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>>, UpdatableScript.FunctionPositions, UpdatableScript.NewFunctionNode, UpdatableScript.OldFunctionNode, UpdatableScript.TextualDiff, UpdatableScript.UpdateCallback
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intgetEndLine() - -
-           
- java.lang.ObjectgetId() - -
-          Returns the script ID as reported by the JavaScript VM debugger.
- java.lang.StringgetName() - -
-           
- java.lang.StringgetSource() - -
-           
- intgetStartColumn() - -
-           
- intgetStartLine() - -
-           
- Script.TypegetType() - -
-           
- booleanhasSource() - -
-           
- booleanisCollected() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.UpdatableScript
previewSetSource, setSourceOnRemote
-  -

- - - - - - - - -
-Method Detail
- -

-getType

-
-Script.Type getType()
-
-
-
-
-
- -
Returns:
the script type
-
-
-
- -

-getName

-
-java.lang.String getName()
-
-
-
-
-
- -
Returns:
the original document URL for this script known by Chromium. - A null name for eval'd scripts
-
-
-
- -

-getId

-
-java.lang.Object getId()
-
-
Returns the script ID as reported by the JavaScript VM debugger. The actual ID type - is backend-specific, however it must provide equals/hashCode/toString methods and - be serializable. -

-

-
-
-
-
-
-
-
- -

-getStartLine

-
-int getStartLine()
-
-
-
-
-
- -
Returns:
the start line of this script in the original document - (zero-based)
-
-
-
- -

-getStartColumn

-
-int getStartColumn()
-
-
-
-
-
- -
Returns:
the start column of this script in the original document - (zero-based)
-
-
-
- -

-getEndLine

-
-int getEndLine()
-
-
-
-
-
- -
Returns:
the end line of this script in the original document (zero-based), - inclusive
-
-
-
- -

-getSource

-
-java.lang.String getSource()
-
-
-
-
-
- -
Returns:
the currently set source text of this script
-
-
-
- -

-hasSource

-
-boolean hasSource()
-
-
-
-
-
- -
Returns:
whether the source for this script is known
-
-
-
- -

-isCollected

-
-boolean isCollected()
-
-
-
-
-
- -
Returns:
whether the script has been collected on remote
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/StandaloneVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/StandaloneVm.html deleted file mode 100644 index 8b8329a5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/StandaloneVm.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - -StandaloneVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface StandaloneVm

-
-
All Superinterfaces:
JavascriptVm
-
-
-
-
public interface StandaloneVm
extends JavascriptVm
- - -

-Abstraction of a remote JavaScript virtual machine which is embedded into - some application and accessed via TCP/IP connection to a port opened by - DebuggerAgent. Clients can use it to conduct debugging process. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JavascriptVm
JavascriptVm.BreakpointCallback, JavascriptVm.ExceptionCatchMode, JavascriptVm.ListBreakpointsCallback, JavascriptVm.ScriptsCallback, JavascriptVm.SuspendCallback
-  - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidattach(DebugEventListener listener) - -
-          Connects to the target VM.
- java.lang.StringgetDisconnectReason() - -
-           
- java.lang.StringgetEmbedderName() - -
-           
- java.lang.StringgetVmVersion() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JavascriptVm
detach, enableBreakpoints, getBreakpointTypeExtension, getFunctionScopeExtension, getIgnoreCountBreakpointExtension, getRestartFrameExtension, getScripts, getVersion, isAttached, listBreakpoints, setBreakOnException, setBreakpoint, suspend
-  -

- - - - - - - - -
-Method Detail
- -

-attach

-
-void attach(DebugEventListener listener)
-            throws java.io.IOException,
-                   UnsupportedVersionException,
-                   MethodIsBlockingException
-
-
Connects to the target VM. -

-

-
-
-
-
Parameters:
listener - to report the debug events to -
Throws: -
java.io.IOException - if there was a transport layer error -
UnsupportedVersionException - if the SDK protocol version is not - compatible with that supported by the browser -
MethodIsBlockingException - because initialization implies couple of remote calls - (to request version etc)
-
-
-
- -

-getEmbedderName

-
-java.lang.String getEmbedderName()
-
-
-
-
-
- -
Returns:
name of embedding application as it wished to name itself; might be null
-
-
-
- -

-getVmVersion

-
-java.lang.String getVmVersion()
-
-
-
-
-
- -
Returns:
version of V8 implementation, format is unspecified; must not be null if - StandaloneVm has been attached
-
-
-
- -

-getDisconnectReason

-
-java.lang.String getDisconnectReason()
-
-
-
-
-
- -
Returns:
message explaining why VM is detached; may be null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/SyncCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/SyncCallback.html deleted file mode 100644 index 168460ba..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/SyncCallback.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -SyncCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface SyncCallback

-
-
All Known Implementing Classes:
CallbackSemaphore
-
-
-
-
public interface SyncCallback
- - -

-Secondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception. - It helps to separate callback logic (which may fail) from multi-thread - synchronization (which shouldn't fail). Typically client may release - his semaphore in this callback. -

- It could also be called 'finally callback', implying that is resembles - try-finally control flow. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voidcallbackDone(java.lang.RuntimeException e) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-callbackDone

-
-void callbackDone(java.lang.RuntimeException e)
-
-
-
Parameters:
e - an exception main callback raised or null if none is reported
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TabDebugEventListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TabDebugEventListener.html deleted file mode 100644 index 9311011a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TabDebugEventListener.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - -TabDebugEventListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface TabDebugEventListener

-
-
-
public interface TabDebugEventListener
- - -

-This interface is used by the SDK to report browser-related debug - events for a certain tab to the clients. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidclosed() - -
-          Reports a closing event on the target tab.
- DebugEventListenergetDebugEventListener() - -
-          Every TabDebugEventListener should aggregate - DebugEventListener.
- voidnavigated(java.lang.String newUrl) - -
-          Reports a navigation event on the target tab.
-  -

- - - - - - - - -
-Method Detail
- -

-getDebugEventListener

-
-DebugEventListener getDebugEventListener()
-
-
Every TabDebugEventListener should aggregate - DebugEventListener. -

-

-
-
-
-
- -

-navigated

-
-void navigated(java.lang.String newUrl)
-
-
Reports a navigation event on the target tab. -

-

-
Parameters:
newUrl - the new URL of the debugged tab
-
-
-
- -

-closed

-
-void closed()
-
-
Reports a closing event on the target tab. All following communications - with the associated tab are illegal. This call will be followed by - call to DebugEventListener.disconnected(). - TODO: consider adding close reason here. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TextStreamPosition.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TextStreamPosition.html deleted file mode 100644 index e5355d65..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/TextStreamPosition.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -TextStreamPosition - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface TextStreamPosition

-
-
-
public interface TextStreamPosition
- - -

-A structure that defines position within text stream (file). - There are 2 possible notations: offset from the beginning of the stream (in characters) - and line/column pair. This structure contains numbers in both notations. -

- -

-


- -

- - - - - - - - - - - -
-Field Summary
-static intNO_POSITION - -
-           
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intgetColumn() - -
-          Returns 0-based column number within the line.
- intgetLine() - -
-          Returns 0-based line number within the stream/file.
- intgetOffset() - -
-          Returns 0-based offset from the beginning of the stream/file measured in Unicode characters.
-  -

- - - - - - - - -
-Field Detail
- -

-NO_POSITION

-
-static final int NO_POSITION
-
-
-
See Also:
Constant Field Values
-
- - - - - - - - -
-Method Detail
- -

-getOffset

-
-int getOffset()
-
-
Returns 0-based offset from the beginning of the stream/file measured in Unicode characters. -

-

- -
Returns:
offset from the beginning of the stream/file or NO_POSITION if value - is not available
-
-
-
- -

-getLine

-
-int getLine()
-
-
Returns 0-based line number within the stream/file. -

-

- -
Returns:
0-based line number or NO_POSITION if value is not available
-
-
-
- -

-getColumn

-
-int getColumn()
-
-
Returns 0-based column number within the line. -

-

- -
Returns:
0-based column number or NO_POSITION if value is not available
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UnsupportedVersionException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UnsupportedVersionException.html deleted file mode 100644 index 028bcff7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UnsupportedVersionException.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - -UnsupportedVersionException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class UnsupportedVersionException

-
-java.lang.Object
-  extended by java.lang.Throwable
-      extended by java.lang.Exception
-          extended by org.chromium.sdk.UnsupportedVersionException
-
-
-
All Implemented Interfaces:
java.io.Serializable
-
-
-
-
public class UnsupportedVersionException
extends java.lang.Exception
- - -

-This exception is thrown if the SDK protocol version is not compatible with - that supported by the browser. -

- -

-

-
See Also:
Serialized Form
-
- -

- - - - - - - - - - - - - - -
-Constructor Summary
UnsupportedVersionException(Version localVersion, - Version remoteVersion) - -
-           
UnsupportedVersionException(Version localVersion, - Version remoteVersion, - java.lang.String message) - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
- VersiongetLocalVersion() - -
-           
- VersiongetRemoteVersion() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-UnsupportedVersionException

-
-public UnsupportedVersionException(Version localVersion,
-                                   Version remoteVersion)
-
-
-
- -

-UnsupportedVersionException

-
-public UnsupportedVersionException(Version localVersion,
-                                   Version remoteVersion,
-                                   java.lang.String message)
-
-
- - - - - - - - -
-Method Detail
- -

-getLocalVersion

-
-public Version getLocalVersion()
-
-
- -
Returns:
the protocol version supported by the SDK
-
-
-
- -

-getRemoteVersion

-
-public Version getRemoteVersion()
-
-
- -
Returns:
the incompatible protocol version supported by the browser
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeDescription.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeDescription.html deleted file mode 100644 index 54bcc9fd..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeDescription.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - -UpdatableScript.ChangeDescription - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.ChangeDescription

-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.ChangeDescription
- - -

-An interface that explains what has happened/going to happen within script update action. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- UpdatableScript.OldFunctionNodegetChangeTree() - -
-           
- java.lang.StringgetCreatedScriptName() - -
-           
- UpdatableScript.TextualDiffgetTextualDiff() - -
-           
- booleanisStackModified() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getChangeTree

-
-UpdatableScript.OldFunctionNode getChangeTree()
-
-
- -
Returns:
the root of the function change tree
-
-
-
- -

-getTextualDiff

-
-UpdatableScript.TextualDiff getTextualDiff()
-
-
- -
Returns:
the description of the textual diff
-
-
-
- -

-getCreatedScriptName

-
-java.lang.String getCreatedScriptName()
-
-
- -
Returns:
the name of 'old script' that has been created or null if there was no need in - creating a script
-
-
-
- -

-isStackModified

-
-boolean isStackModified()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeStatus.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeStatus.html deleted file mode 100644 index 14d6cd84..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.ChangeStatus.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - -UpdatableScript.ChangeStatus - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Enum UpdatableScript.ChangeStatus

-
-java.lang.Object
-  extended by java.lang.Enum<UpdatableScript.ChangeStatus>
-      extended by org.chromium.sdk.UpdatableScript.ChangeStatus
-
-
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UpdatableScript.ChangeStatus>
-
-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static enum UpdatableScript.ChangeStatus
extends java.lang.Enum<UpdatableScript.ChangeStatus>
- - -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Enum Constant Summary
CODE_PATCHED - -
-           
DAMAGED - -
-           
NESTED_CHANGED - -
-           
UNCHANGED - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
-static UpdatableScript.ChangeStatusvalueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static UpdatableScript.ChangeStatus[]values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
- - - - - - - -
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
- - - - - - - -
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Enum Constant Detail
- -

-UNCHANGED

-
-public static final UpdatableScript.ChangeStatus UNCHANGED
-
-
-
-
-
- -

-NESTED_CHANGED

-
-public static final UpdatableScript.ChangeStatus NESTED_CHANGED
-
-
-
-
-
- -

-CODE_PATCHED

-
-public static final UpdatableScript.ChangeStatus CODE_PATCHED
-
-
-
-
-
- -

-DAMAGED

-
-public static final UpdatableScript.ChangeStatus DAMAGED
-
-
-
-
- - - - - - - - -
-Method Detail
- -

-values

-
-public static UpdatableScript.ChangeStatus[] values()
-
-
Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
-for (UpdatableScript.ChangeStatus c : UpdatableScript.ChangeStatus.values())
-    System.out.println(c);
-
-

-

- -
Returns:
an array containing the constants of this enum type, in -the order they are declared
-
-
-
- -

-valueOf

-
-public static UpdatableScript.ChangeStatus valueOf(java.lang.String name)
-
-
Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.) -

-

-
Parameters:
name - the name of the enum constant to be returned. -
Returns:
the enum constant with the specified name -
Throws: -
java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name -
java.lang.NullPointerException - if the argument is null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionNode.html deleted file mode 100644 index 2f7120aa..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionNode.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - -UpdatableScript.FunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>>

-
-
All Known Subinterfaces:
UpdatableScript.NewFunctionNode, UpdatableScript.OldFunctionNode
-
-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>>
- - -

-A basic element of function change tree. - Subtyped as UpdatableScript.OldFunctionNode and UpdatableScript.NewFunctionNode. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- UpdatableScript.OldFunctionNodeasOldFunction() - -
-           
- java.util.List<? extends T>children() - -
-           
- java.lang.StringgetName() - -
-           
- UpdatableScript.FunctionPositionsgetPositions() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getName

-
-java.lang.String getName()
-
-
-
-
-
-
- -

-getPositions

-
-UpdatableScript.FunctionPositions getPositions()
-
-
-
-
-
-
- -

-children

-
-java.util.List<? extends T> children()
-
-
-
-
-
-
- -

-asOldFunction

-
-UpdatableScript.OldFunctionNode asOldFunction()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionPositions.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionPositions.html deleted file mode 100644 index 5888e995..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.FunctionPositions.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - -UpdatableScript.FunctionPositions - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.FunctionPositions

-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.FunctionPositions
- - -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- longgetEnd() - -
-           
- longgetStart() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getStart

-
-long getStart()
-
-
-
-
-
-
- -

-getEnd

-
-long getEnd()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.NewFunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.NewFunctionNode.html deleted file mode 100644 index e549f9f2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.NewFunctionNode.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -UpdatableScript.NewFunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.NewFunctionNode

-
-
All Superinterfaces:
UpdatableScript.FunctionNode<UpdatableScript.NewFunctionNode>
-
-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.NewFunctionNode
extends UpdatableScript.FunctionNode<UpdatableScript.NewFunctionNode>
- - -

-Represents a brand new function in the changed script, that has no corresponding old function. -

- -

-


- -

- - - - - - - - -
-Method Summary
- - - - - - - -
Methods inherited from interface org.chromium.sdk.UpdatableScript.FunctionNode
asOldFunction, children, getName, getPositions
-  -

- -


- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.OldFunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.OldFunctionNode.html deleted file mode 100644 index 9d887e51..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.OldFunctionNode.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -UpdatableScript.OldFunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.OldFunctionNode

-
-
All Superinterfaces:
UpdatableScript.FunctionNode<UpdatableScript.OldFunctionNode>
-
-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.OldFunctionNode
extends UpdatableScript.FunctionNode<UpdatableScript.OldFunctionNode>
- - -

-Represents an old function in the changed script. If it has new positions, it is also - represented in a new version of the script. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- UpdatableScript.FunctionPositionsgetNewPositions() - -
-           
- UpdatableScript.ChangeStatusgetStatus() - -
-           
- java.lang.StringgetStatusExplanation() - -
-           
- java.util.List<? extends UpdatableScript.NewFunctionNode>newChildren() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.UpdatableScript.FunctionNode
asOldFunction, children, getName, getPositions
-  -

- - - - - - - - -
-Method Detail
- -

-getStatus

-
-UpdatableScript.ChangeStatus getStatus()
-
-
-
-
-
-
-
-
-
- -

-getStatusExplanation

-
-java.lang.String getStatusExplanation()
-
-
-
-
-
-
-
-
-
- -

-getNewPositions

-
-UpdatableScript.FunctionPositions getNewPositions()
-
-
-
-
-
- -
Returns:
nullable
-
-
-
- -

-newChildren

-
-java.util.List<? extends UpdatableScript.NewFunctionNode> newChildren()
-
-
-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.TextualDiff.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.TextualDiff.html deleted file mode 100644 index 8444f137..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.TextualDiff.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - -UpdatableScript.TextualDiff - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.TextualDiff

-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.TextualDiff
- - -

-


- -

- - - - - - - - - - - - -
-Method Summary
- java.util.List<java.lang.Long>getChunks() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getChunks

-
-java.util.List<java.lang.Long> getChunks()
-
-
- -
Returns:
textual diff of the script in form of list of 3-element diff chunk parameters - that are (old_start_pos, old_end_pos, new_end_pos)
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.UpdateCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.UpdateCallback.html deleted file mode 100644 index 578af295..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.UpdateCallback.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - -UpdatableScript.UpdateCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript.UpdateCallback

-
-
Enclosing interface:
UpdatableScript
-
-
-
-
public static interface UpdatableScript.UpdateCallback
- - -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.String message) - -
-           
- voidsuccess(java.lang.Object report, - UpdatableScript.ChangeDescription changeDescription) - -
-          Script text change has succeeded or was successfully pre-calculated (in preview mode).
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(java.lang.Object report,
-             UpdatableScript.ChangeDescription changeDescription)
-
-
Script text change has succeeded or was successfully pre-calculated (in preview mode). - DebugEventListener.scriptContentChanged(org.chromium.sdk.Script) will - be called additionally. Besides, a current context may be dismissed and recreated after this - event. The order of all listed event notifications is not currently specified. -

-

-
Parameters:
report - unspecified implementation-dependent report for debugging purposes; - may be null
changeDescription - describes live editing change that has been applied or is planned - to be applied; may be null if backend or VM does not support
-
-
-
- -

-failure

-
-void failure(java.lang.String message)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.html deleted file mode 100644 index 76599356..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/UpdatableScript.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - -UpdatableScript - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Interface UpdatableScript

-
-
All Known Subinterfaces:
Script
-
-
-
-
public interface UpdatableScript
- - -

-This interface is a part of Script interface. It covers live editing support. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceUpdatableScript.ChangeDescription - -
-          An interface that explains what has happened/going to happen within script update action.
-static classUpdatableScript.ChangeStatus - -
-           
-static interfaceUpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>> - -
-          A basic element of function change tree.
-static interfaceUpdatableScript.FunctionPositions - -
-           
-static interfaceUpdatableScript.NewFunctionNode - -
-          Represents a brand new function in the changed script, that has no corresponding old function.
-static interfaceUpdatableScript.OldFunctionNode - -
-          Represents an old function in the changed script.
-static interfaceUpdatableScript.TextualDiff - -
-           
-static interfaceUpdatableScript.UpdateCallback - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkpreviewSetSource(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Same as setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes.
- RelayOksetSourceOnRemote(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Demands that script text should be replaced with a new one if possible.
-  -

- - - - - - - - -
-Method Detail
- -

-setSourceOnRemote

-
-RelayOk setSourceOnRemote(java.lang.String newSource,
-                          UpdatableScript.UpdateCallback callback,
-                          SyncCallback syncCallback)
-
-
Demands that script text should be replaced with a new one if possible. VM may get resumed - after this command (this is defined by UpdatableScript.ChangeDescription.isStackModified()). In this - case a standard 'suspended' notification is expected in a moment. -

-

-
Parameters:
newSource - new text of script - TODO: add an explicit output parameter about whether VM was resumed or not.
-
-
-
- -

-previewSetSource

-
-RelayOk previewSetSource(java.lang.String newSource,
-                         UpdatableScript.UpdateCallback callback,
-                         SyncCallback syncCallback)
-
-
Same as setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes. -

-

-
Parameters:
callback - receives change plan description
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Version.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Version.html deleted file mode 100644 index fcfc0691..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/Version.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - -Version - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk -
-Class Version

-
-java.lang.Object
-  extended by org.chromium.sdk.Version
-
-
-
All Implemented Interfaces:
java.lang.Comparable<Version>
-
-
-
-
public class Version
extends java.lang.Object
implements java.lang.Comparable<Version>
- - -

-An object that describes a number-based version. A version consists of dot-separated - integers and an optional string addendum. -

- -

-


- -

- - - - - - - - - - - - - - -
-Constructor Summary
Version(java.lang.Integer... components) - -
-          Constructs an immutable Version instance given the numeric components of version.
Version(java.util.List<java.lang.Integer> components, - java.lang.String textComponent) - -
-          Constructs an immutable Version instance given the numeric components of version and optional - text component.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intcompareTo(Version other) - -
-           
- booleanequals(java.lang.Object obj) - -
-           
- java.util.List<java.lang.Integer>getComponents() - -
-           
- inthashCode() - -
-           
-static VersionparseString(java.lang.String text) - -
-          Parses string as version as far as it is dot-delimited integer numbers.
- java.lang.StringtoString() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-Version

-
-public Version(java.lang.Integer... components)
-
-
Constructs an immutable Version instance given the numeric components of version. -

-

-
- -

-Version

-
-public Version(java.util.List<java.lang.Integer> components,
-               java.lang.String textComponent)
-
-
Constructs an immutable Version instance given the numeric components of version and optional - text component. -

-

- - - - - - - - -
-Method Detail
- -

-getComponents

-
-public java.util.List<java.lang.Integer> getComponents()
-
-
-
-
-
- -
Returns:
numeric components of version in form of list of integers
-
-
-
- -

-equals

-
-public boolean equals(java.lang.Object obj)
-
-
-
Overrides:
equals in class java.lang.Object
-
-
-
-
-
-
- -

-hashCode

-
-public int hashCode()
-
-
-
Overrides:
hashCode in class java.lang.Object
-
-
-
-
-
-
- -

-compareTo

-
-public int compareTo(Version other)
-
-
-
Specified by:
compareTo in interface java.lang.Comparable<Version>
-
-
-
-
-
-
- -

-toString

-
-public java.lang.String toString()
-
-
-
Overrides:
toString in class java.lang.Object
-
-
-
-
-
-
- -

-parseString

-
-public static Version parseString(java.lang.String text)
-
-
Parses string as version as far as it is dot-delimited integer numbers. -

-

-
-
-
-
Parameters:
text - string representation of version; not null -
Returns:
new instance of version or null if text is not version.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptId.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptId.html deleted file mode 100644 index 8f17cb8d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptId.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.Breakpoint.Target.ScriptId - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.Breakpoint.Target.ScriptId

-
-No usage of org.chromium.sdk.Breakpoint.Target.ScriptId -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptName.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptName.html deleted file mode 100644 index 2acf7c86..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.ScriptName.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.Breakpoint.Target.ScriptName - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.Breakpoint.Target.ScriptName

-
-No usage of org.chromium.sdk.Breakpoint.Target.ScriptName -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.Visitor.html deleted file mode 100644 index a7c95e0e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.Visitor.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Breakpoint.Target.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Breakpoint.Target.Visitor

-
- - - - - - - - - -
-Packages that use Breakpoint.Target.Visitor
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Breakpoint.Target.Visitor in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Subinterfaces of Breakpoint.Target.Visitor in org.chromium.sdk
-static interfaceBreakpointTypeExtension.FunctionSupport.Visitor<R> - -
-          Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
-static interfaceBreakpointTypeExtension.ScriptRegExpSupport.Visitor<R> - -
-          Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type Breakpoint.Target.Visitor
-abstract - - - - -
-<R> R
-
Breakpoint.Target.accept(Breakpoint.Target.Visitor<R> visitor) - -
-          Dispatches call on the actual Target type.
- - - - - -
-<R> R
-
Breakpoint.Target.ScriptId.accept(Breakpoint.Target.Visitor<R> visitor) - -
-           
- - - - - -
-<R> R
-
Breakpoint.Target.ScriptName.accept(Breakpoint.Target.Visitor<R> visitor) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.html deleted file mode 100644 index e4bb4e15..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.Target.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.Breakpoint.Target - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.Breakpoint.Target

-
- - - - - - - - - -
-Packages that use Breakpoint.Target
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Breakpoint.Target in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Subclasses of Breakpoint.Target in org.chromium.sdk
-static classBreakpoint.Target.ScriptId - -
-          A target that refers to a script by its id.
-static classBreakpoint.Target.ScriptName - -
-          A target that refers to a script by its name.
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return Breakpoint.Target
- Breakpoint.TargetBreakpointTypeExtension.FunctionSupport.createTarget(java.lang.String expression) - -
-           
- Breakpoint.TargetBreakpointTypeExtension.ScriptRegExpSupport.createTarget(java.lang.String regExp) - -
-           
- Breakpoint.TargetBreakpoint.getTarget() - -
-           
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type Breakpoint.Target
- RelayOkJavascriptVm.setBreakpoint(Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RBreakpoint.Target.Visitor.visitUnknown(Breakpoint.Target target) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.html deleted file mode 100644 index abc98b0c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Breakpoint.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Breakpoint - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Breakpoint

-
- - - - - - - - - -
-Packages that use Breakpoint
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Breakpoint in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type Breakpoint
- java.util.Collection<? extends Breakpoint>DebugContext.getBreakpointsHit() - -
-           
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type Breakpoint
- RelayOkIgnoreCountBreakpointExtension.setIgnoreCount(Breakpoint breakpoint, - int ignoreCount, - GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Sets the ignore count for this breakpoint (EMPTY_VALUE to clear).
- voidJavascriptVm.BreakpointCallback.success(Breakpoint breakpoint) - -
-           
-  -

- - - - - - - - - -
Method parameters in org.chromium.sdk with type arguments of type Breakpoint
- voidJavascriptVm.ListBreakpointsCallback.success(java.util.Collection<? extends Breakpoint> breakpoints) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.Visitor.html deleted file mode 100644 index 9f40f189..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.Visitor.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BreakpointTypeExtension.FunctionSupport.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BreakpointTypeExtension.FunctionSupport.Visitor

-
-No usage of org.chromium.sdk.BreakpointTypeExtension.FunctionSupport.Visitor -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.html deleted file mode 100644 index dc6be0d1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.FunctionSupport.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BreakpointTypeExtension.FunctionSupport - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BreakpointTypeExtension.FunctionSupport

-
- - - - - - - - - -
-Packages that use BreakpointTypeExtension.FunctionSupport
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of BreakpointTypeExtension.FunctionSupport in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return BreakpointTypeExtension.FunctionSupport
- BreakpointTypeExtension.FunctionSupportBreakpointTypeExtension.getFunctionSupport() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html deleted file mode 100644 index f09d2838..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.Visitor.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport.Visitor - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport.Visitor

-
-No usage of org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport.Visitor -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.html deleted file mode 100644 index cfa5507e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.ScriptRegExpSupport.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BreakpointTypeExtension.ScriptRegExpSupport

-
- - - - - - - - - -
-Packages that use BreakpointTypeExtension.ScriptRegExpSupport
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of BreakpointTypeExtension.ScriptRegExpSupport in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return BreakpointTypeExtension.ScriptRegExpSupport
- BreakpointTypeExtension.ScriptRegExpSupportBreakpointTypeExtension.getScriptRegExpSupport() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.html deleted file mode 100644 index 45664567..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BreakpointTypeExtension.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BreakpointTypeExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BreakpointTypeExtension

-
- - - - - - - - - -
-Packages that use BreakpointTypeExtension
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of BreakpointTypeExtension in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return BreakpointTypeExtension
- BreakpointTypeExtensionJavascriptVm.getBreakpointTypeExtension() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabConnector.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabConnector.html deleted file mode 100644 index 31b8af14..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabConnector.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Browser.TabConnector - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Browser.TabConnector

-
- - - - - - - - - -
-Packages that use Browser.TabConnector
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Browser.TabConnector in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type Browser.TabConnector
- java.util.List<? extends Browser.TabConnector>Browser.TabFetcher.getTabs() - -
-          Retrieves all browser tabs currently opened.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabFetcher.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabFetcher.html deleted file mode 100644 index 8ce14fa8..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.TabFetcher.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Browser.TabFetcher - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Browser.TabFetcher

-
- - - - - - - - - -
-Packages that use Browser.TabFetcher
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Browser.TabFetcher in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return Browser.TabFetcher
- Browser.TabFetcherBrowser.createTabFetcher() - -
-          Establishes the browser connection and checks for the protocol version - supported by the remote, then creates object that downloads list of tabs.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.html deleted file mode 100644 index 6d4d187f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Browser.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Browser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Browser

-
- - - - - - - - - -
-Packages that use Browser
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Browser in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return Browser
-abstract  BrowserBrowserFactory.create(java.net.SocketAddress socketAddress, - ConnectionLogger.Factory connectionLoggerFactory) - -
-          Returns a Browser implementor instance that talks to a browser listening at - socketAddress.
- BrowserBrowserTab.getBrowser() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserFactory.html deleted file mode 100644 index 6f7df98e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserFactory.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.BrowserFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.BrowserFactory

-
- - - - - - - - - -
-Packages that use BrowserFactory
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of BrowserFactory in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return BrowserFactory
-static BrowserFactoryBrowserFactory.getInstance() - -
-          Gets a BrowserFactory instance.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserTab.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserTab.html deleted file mode 100644 index 1a9ac230..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/BrowserTab.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.BrowserTab - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.BrowserTab

-
- - - - - - - - - -
-Packages that use BrowserTab
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of BrowserTab in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return BrowserTab
- BrowserTabBrowser.TabConnector.attach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallFrame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallFrame.html deleted file mode 100644 index 3df1cd62..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallFrame.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.CallFrame - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.CallFrame

-
- - - - - - - - - -
-Packages that use CallFrame
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of CallFrame in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type CallFrame
- java.util.List<? extends CallFrame>DebugContext.getCallFrames() - -
-           
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type CallFrame
- booleanRestartFrameExtension.canRestartFrame(CallFrame callFrame) - -
-           
- RelayOkRestartFrameExtension.restartFrame(CallFrame callFrame, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Restarts a frame (all frames above are dropped from the stack, this frame is started over).
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallbackSemaphore.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallbackSemaphore.html deleted file mode 100644 index 4d197160..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/CallbackSemaphore.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.CallbackSemaphore - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.CallbackSemaphore

-
-No usage of org.chromium.sdk.CallbackSemaphore -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.ConnectionCloser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.ConnectionCloser.html deleted file mode 100644 index 8b428114..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.ConnectionCloser.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.ConnectionLogger.ConnectionCloser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.ConnectionLogger.ConnectionCloser

-
- - - - - - - - - -
-Packages that use ConnectionLogger.ConnectionCloser
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of ConnectionLogger.ConnectionCloser in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type ConnectionLogger.ConnectionCloser
- voidConnectionLogger.setConnectionCloser(ConnectionLogger.ConnectionCloser connectionCloser) - -
-          Connection may allow the logger to close it.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.Factory.html deleted file mode 100644 index da6f81f2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.Factory.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.ConnectionLogger.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.ConnectionLogger.Factory

-
- - - - - - - - - -
-Packages that use ConnectionLogger.Factory
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of ConnectionLogger.Factory in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type ConnectionLogger.Factory
-abstract  BrowserBrowserFactory.create(java.net.SocketAddress socketAddress, - ConnectionLogger.Factory connectionLoggerFactory) - -
-          Returns a Browser implementor instance that talks to a browser listening at - socketAddress.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.StreamListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.StreamListener.html deleted file mode 100644 index 439404b5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.StreamListener.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.ConnectionLogger.StreamListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.ConnectionLogger.StreamListener

-
- - - - - - - - - -
-Packages that use ConnectionLogger.StreamListener
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of ConnectionLogger.StreamListener in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return ConnectionLogger.StreamListener
- ConnectionLogger.StreamListenerConnectionLogger.getIncomingStreamListener() - -
-           
- ConnectionLogger.StreamListenerConnectionLogger.getOutgoingStreamListener() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.html deleted file mode 100644 index 1c2fbf81..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ConnectionLogger.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.ConnectionLogger - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.ConnectionLogger

-
- - - - - - - - - - - - - -
-Packages that use ConnectionLogger
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of ConnectionLogger in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return ConnectionLogger
- ConnectionLoggerConnectionLogger.Factory.newConnectionLogger() - -
-          Creates new instance of ConnectionLogger.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type ConnectionLogger
-abstract  StandaloneVmBrowserFactory.createStandalone(java.net.SocketAddress socketAddress, - ConnectionLogger connectionLogger) - -
-          Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - DebuggerAgent opened at socketAddress.
-  -

- - - - - -
-Uses of ConnectionLogger in org.chromium.sdk.wip
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip that return ConnectionLogger
- ConnectionLoggerWipBrowserFactory.LoggerFactory.newBrowserConnectionLogger() - -
-           
- ConnectionLoggerWipBrowserFactory.LoggerFactory.newTabConnectionLogger() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.ContinueCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.ContinueCallback.html deleted file mode 100644 index adce5972..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.ContinueCallback.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.DebugContext.ContinueCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.DebugContext.ContinueCallback

-
- - - - - - - - - -
-Packages that use DebugContext.ContinueCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugContext.ContinueCallback in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type DebugContext.ContinueCallback
- voidDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback) - -
-          Deprecated. see DebugContext.continueVm(StepAction, int, ContinueCallback, SyncCallback)
- RelayOkDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback, - SyncCallback syncCallback) - -
-          Resumes the JavaScript VM execution using a "continue" request.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.State.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.State.html deleted file mode 100644 index 5d979016..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.State.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.DebugContext.State - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.DebugContext.State

-
- - - - - - - - - -
-Packages that use DebugContext.State
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugContext.State in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return DebugContext.State
- DebugContext.StateDebugContext.getState() - -
-           
-static DebugContext.StateDebugContext.State.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static DebugContext.State[]DebugContext.State.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.StepAction.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.StepAction.html deleted file mode 100644 index 41137b57..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.StepAction.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.DebugContext.StepAction - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.DebugContext.StepAction

-
- - - - - - - - - -
-Packages that use DebugContext.StepAction
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugContext.StepAction in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return DebugContext.StepAction
-static DebugContext.StepActionDebugContext.StepAction.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static DebugContext.StepAction[]DebugContext.StepAction.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type DebugContext.StepAction
- voidDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback) - -
-          Deprecated. see DebugContext.continueVm(StepAction, int, ContinueCallback, SyncCallback)
- RelayOkDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback, - SyncCallback syncCallback) - -
-          Resumes the JavaScript VM execution using a "continue" request.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.html deleted file mode 100644 index 80a57294..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugContext.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.DebugContext - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.DebugContext

-
- - - - - - - - - -
-Packages that use DebugContext
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugContext in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type DebugContext
- voidDebugEventListener.suspended(DebugContext context) - -
-          Reports the browser JavaScript virtual machine has suspended (on hitting - breakpoints or a step end).
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.VmStatusListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.VmStatusListener.html deleted file mode 100644 index 33ce0008..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.VmStatusListener.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.DebugEventListener.VmStatusListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.DebugEventListener.VmStatusListener

-
- - - - - - - - - -
-Packages that use DebugEventListener.VmStatusListener
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugEventListener.VmStatusListener in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return DebugEventListener.VmStatusListener
- DebugEventListener.VmStatusListenerDebugEventListener.getVmStatusListener() - -
-          Gets DebugEventListener.VmStatusListener that is considered a part of DebugEventListener.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.html deleted file mode 100644 index 4f0bf470..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/DebugEventListener.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.DebugEventListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.DebugEventListener

-
- - - - - - - - - -
-Packages that use DebugEventListener
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of DebugEventListener in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return DebugEventListener
- DebugEventListenerTabDebugEventListener.getDebugEventListener() - -
-          Every TabDebugEventListener should aggregate - DebugEventListener.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type DebugEventListener
- voidStandaloneVm.attach(DebugEventListener listener) - -
-          Connects to the target VM.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ExceptionData.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ExceptionData.html deleted file mode 100644 index 429d95fd..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/ExceptionData.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.ExceptionData - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.ExceptionData

-
- - - - - - - - - -
-Packages that use ExceptionData
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of ExceptionData in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return ExceptionData
- ExceptionDataDebugContext.getExceptionData() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/FunctionScopeExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/FunctionScopeExtension.html deleted file mode 100644 index 3dd91997..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/FunctionScopeExtension.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.FunctionScopeExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.FunctionScopeExtension

-
- - - - - - - - - -
-Packages that use FunctionScopeExtension
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of FunctionScopeExtension in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return FunctionScopeExtension
- FunctionScopeExtensionJavascriptVm.getFunctionScopeExtension() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/IgnoreCountBreakpointExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/IgnoreCountBreakpointExtension.html deleted file mode 100644 index 18c7e249..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/IgnoreCountBreakpointExtension.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.IgnoreCountBreakpointExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.IgnoreCountBreakpointExtension

-
- - - - - - - - - -
-Packages that use IgnoreCountBreakpointExtension
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of IgnoreCountBreakpointExtension in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return IgnoreCountBreakpointExtension
- IgnoreCountBreakpointExtensionBreakpoint.getIgnoreCountBreakpointExtension() - -
-           
- IgnoreCountBreakpointExtensionJavascriptVm.getIgnoreCountBreakpointExtension() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/InvalidContextException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/InvalidContextException.html deleted file mode 100644 index a85e760d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/InvalidContextException.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.InvalidContextException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.InvalidContextException

-
-No usage of org.chromium.sdk.InvalidContextException -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.BreakpointCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.BreakpointCallback.html deleted file mode 100644 index 17736719..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.BreakpointCallback.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JavascriptVm.BreakpointCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JavascriptVm.BreakpointCallback

-
- - - - - - - - - -
-Packages that use JavascriptVm.BreakpointCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JavascriptVm.BreakpointCallback in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm.BreakpointCallback
- RelayOkBreakpoint.clear(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished.
- RelayOkBreakpoint.flush(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished.
- RelayOkJavascriptVm.setBreakpoint(Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ExceptionCatchMode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ExceptionCatchMode.html deleted file mode 100644 index 29eda1a2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ExceptionCatchMode.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.JavascriptVm.ExceptionCatchMode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.JavascriptVm.ExceptionCatchMode

-
- - - - - - - - - -
-Packages that use JavascriptVm.ExceptionCatchMode
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JavascriptVm.ExceptionCatchMode in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JavascriptVm.ExceptionCatchMode
-static JavascriptVm.ExceptionCatchModeJavascriptVm.ExceptionCatchMode.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JavascriptVm.ExceptionCatchMode[]JavascriptVm.ExceptionCatchMode.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm.ExceptionCatchMode
- RelayOkJavascriptVm.setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
-  -

- - - - - - - - - -
Method parameters in org.chromium.sdk with type arguments of type JavascriptVm.ExceptionCatchMode
- RelayOkJavascriptVm.setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ListBreakpointsCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ListBreakpointsCallback.html deleted file mode 100644 index 5962f393..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ListBreakpointsCallback.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JavascriptVm.ListBreakpointsCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JavascriptVm.ListBreakpointsCallback

-
- - - - - - - - - -
-Packages that use JavascriptVm.ListBreakpointsCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JavascriptVm.ListBreakpointsCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm.ListBreakpointsCallback
- RelayOkJavascriptVm.listBreakpoints(JavascriptVm.ListBreakpointsCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reads breakpoints from remote VM.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ScriptsCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ScriptsCallback.html deleted file mode 100644 index 84393631..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.ScriptsCallback.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JavascriptVm.ScriptsCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JavascriptVm.ScriptsCallback

-
- - - - - - - - - -
-Packages that use JavascriptVm.ScriptsCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JavascriptVm.ScriptsCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm.ScriptsCallback
- voidJavascriptVm.getScripts(JavascriptVm.ScriptsCallback callback) - -
-          Returns user scripts loaded into the tab.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.SuspendCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.SuspendCallback.html deleted file mode 100644 index 7b2c4c7a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.SuspendCallback.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JavascriptVm.SuspendCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JavascriptVm.SuspendCallback

-
- - - - - - - - - -
-Packages that use JavascriptVm.SuspendCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JavascriptVm.SuspendCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm.SuspendCallback
- voidJavascriptVm.suspend(JavascriptVm.SuspendCallback callback) - -
-          Tries to suspend VM.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.html deleted file mode 100644 index 07533c15..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JavascriptVm.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JavascriptVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JavascriptVm

-
- - - - - - - - - - - - - -
-Packages that use JavascriptVm
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of JavascriptVm in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Subinterfaces of JavascriptVm in org.chromium.sdk
- interfaceBrowserTab - -
-          A lightweight abstraction of a remote Browser tab.
- interfaceStandaloneVm - -
-          Abstraction of a remote JavaScript virtual machine which is embedded into - some application and accessed via TCP/IP connection to a port opened by - DebuggerAgent.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return JavascriptVm
- JavascriptVmDebugContext.getJavascriptVm() - -
-           
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JavascriptVm
- RelayOkIgnoreCountBreakpointExtension.setBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
-  -

- - - - - -
-Uses of JavascriptVm in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Subinterfaces of JavascriptVm in org.chromium.sdk.wip
- interfaceWipJavascriptVm - -
-          WIP-specific extension to JavascriptVm.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsArray.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsArray.html deleted file mode 100644 index e672c5b7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsArray.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsArray - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsArray

-
- - - - - - - - - -
-Packages that use JsArray
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsArray in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return JsArray
- JsArrayJsObject.asArray() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.EvaluateCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.EvaluateCallback.html deleted file mode 100644 index 5d6186ed..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.EvaluateCallback.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsEvaluateContext.EvaluateCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsEvaluateContext.EvaluateCallback

-
- - - - - - - - - - - - - -
-Packages that use JsEvaluateContext.EvaluateCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of JsEvaluateContext.EvaluateCallback in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsEvaluateContext.EvaluateCallback
- RelayOkJsEvaluateContext.evaluateAsync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- RelayOkJsObjectProperty.evaluateGet(JsEvaluateContext.EvaluateCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates property getter and returns property value.
- voidJsEvaluateContext.evaluateSync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

- - - - - -
-Uses of JsEvaluateContext.EvaluateCallback in org.chromium.sdk.wip
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type JsEvaluateContext.EvaluateCallback
- RelayOkEvaluateToMappingExtension.evaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- voidEvaluateToMappingExtension.evaluateSync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.html deleted file mode 100644 index 561a0151..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsEvaluateContext.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsEvaluateContext - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsEvaluateContext

-
- - - - - - - - - - - - - -
-Packages that use JsEvaluateContext
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of JsEvaluateContext in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsEvaluateContext
- JsEvaluateContextCallFrame.getEvaluateContext() - -
-           
- JsEvaluateContextDebugContext.getGlobalEvaluateContext() - -
-           
-  -

- - - - - -
-Uses of JsEvaluateContext in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return JsEvaluateContext
- JsEvaluateContextPermanentRemoteValueMapping.getEvaluateContext() - -
-          Returns JsEvaluateContext that is tied with this RemoteValueMapping.
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type JsEvaluateContext
- RelayOkEvaluateToMappingExtension.evaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- voidEvaluateToMappingExtension.evaluateSync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsFunction.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsFunction.html deleted file mode 100644 index adbb61f6..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsFunction.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsFunction - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsFunction

-
- - - - - - - - - -
-Packages that use JsFunction
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsFunction in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsFunction
- JsFunctionJsObject.asFunction() - -
-           
- JsFunctionJsObjectProperty.getGetterAsFunction() - -
-           
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsFunction
- java.util.List<? extends JsScope>FunctionScopeExtension.getScopes(JsFunction function) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObject.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObject.html deleted file mode 100644 index e7239aa0..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObject.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsObject - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsObject

-
- - - - - - - - - -
-Packages that use JsObject
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsObject in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Subinterfaces of JsObject in org.chromium.sdk
- interfaceJsArray - -
-          Extends JsObject interface by adding methods for handling array elements.
- interfaceJsFunction - -
-          Extends JsObject interface with the methods for function-specific properties.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return JsObject
- JsObjectJsValue.asObject() - -
-          Return this value cast to JsObject or null if this value - is not an object.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObjectProperty.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObjectProperty.html deleted file mode 100644 index b9c37566..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsObjectProperty.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsObjectProperty - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsObjectProperty

-
- - - - - - - - - -
-Packages that use JsObjectProperty
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsObjectProperty in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return JsObjectProperty
- JsObjectPropertyJsVariable.asObjectProperty() - -
-          Returns object property data if variable is an object property and its descriptor - is available.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.Type.html deleted file mode 100644 index ca75b513..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.Type.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.JsScope.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.JsScope.Type

-
- - - - - - - - - -
-Packages that use JsScope.Type
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsScope.Type in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsScope.Type
- JsScope.TypeJsScope.getType() - -
-           
-static JsScope.TypeJsScope.Type.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JsScope.Type[]JsScope.Type.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.WithScope.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.WithScope.html deleted file mode 100644 index da00e830..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.WithScope.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsScope.WithScope - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsScope.WithScope

-
- - - - - - - - - -
-Packages that use JsScope.WithScope
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsScope.WithScope in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return JsScope.WithScope
- JsScope.WithScopeJsScope.asWithScope() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.html deleted file mode 100644 index 9472cb62..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsScope.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsScope - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsScope

-
- - - - - - - - - -
-Packages that use JsScope
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsScope in org.chromium.sdk
-  -

- - - - - - - - - -
Subinterfaces of JsScope in org.chromium.sdk
-static interfaceJsScope.WithScope - -
-          Subtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject).
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type JsScope
- java.util.List<? extends JsScope>FunctionScopeExtension.getScopes(JsFunction function) - -
-           
- java.util.List<? extends JsScope>CallFrame.getVariableScopes() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.ReloadBiggerCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.ReloadBiggerCallback.html deleted file mode 100644 index 5756f3cc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.ReloadBiggerCallback.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsValue.ReloadBiggerCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsValue.ReloadBiggerCallback

-
- - - - - - - - - -
-Packages that use JsValue.ReloadBiggerCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsValue.ReloadBiggerCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsValue.ReloadBiggerCallback
- RelayOkJsValue.reloadHeavyValue(JsValue.ReloadBiggerCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reloads object value with extended size limit.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.Type.html deleted file mode 100644 index 7a9542cb..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.Type.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.JsValue.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.JsValue.Type

-
- - - - - - - - - -
-Packages that use JsValue.Type
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsValue.Type in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsValue.Type
- JsValue.TypeJsValue.getType() - -
-           
-static JsValue.TypeJsValue.Type.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static JsValue.Type[]JsValue.Type.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsValue.Type
-static booleanJsValue.Type.isObjectType(JsValue.Type type) - -
-          Returns whether type corresponds to a JsObject.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.html deleted file mode 100644 index f80ddd26..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsValue.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsValue - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsValue

-
- - - - - - - - - -
-Packages that use JsValue
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsValue in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Subinterfaces of JsValue in org.chromium.sdk
- interfaceJsArray - -
-          Extends JsObject interface by adding methods for handling array elements.
- interfaceJsFunction - -
-          Extends JsObject interface with the methods for function-specific properties.
- interfaceJsObject - -
-          A compound JsValue that has zero or more properties.
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsValue
- JsValueExceptionData.getExceptionValue() - -
-           
- JsValueJsObjectProperty.getGetter() - -
-           
- JsValueJsObjectProperty.getSetter() - -
-           
- JsValueJsVariable.getValue() - -
-          Returns the value of this variable.
- JsValueJsScope.WithScope.getWithArgument() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.SetValueCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.SetValueCallback.html deleted file mode 100644 index 866a1f8c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.SetValueCallback.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsVariable.SetValueCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsVariable.SetValueCallback

-
- - - - - - - - - -
-Packages that use JsVariable.SetValueCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsVariable.SetValueCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsVariable.SetValueCallback
- voidJsVariable.setValue(java.lang.String newValue, - JsVariable.SetValueCallback callback) - -
-          Sets a new value for this variable.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.html deleted file mode 100644 index 6e1255dc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/JsVariable.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.JsVariable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.JsVariable

-
- - - - - - - - - -
-Packages that use JsVariable
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of JsVariable in org.chromium.sdk
-  -

- - - - - - - - - -
Subinterfaces of JsVariable in org.chromium.sdk
- interfaceJsObjectProperty - -
-          Exposes additional data if variable is a property of object and its property descriptor - is available.
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return JsVariable
- JsVariableJsArray.get(int index) - -
-           
- JsVariableJsObject.getProperty(java.lang.String name) - -
-           
- JsVariableCallFrame.getReceiverVariable() - -
-           
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type JsVariable
- java.util.Collection<? extends JsVariable>JsObject.getInternalProperties() - -
-           
- java.util.Collection<? extends JsVariable>JsObject.getProperties() - -
-           
- java.util.List<? extends JsVariable>JsScope.getVariables() - -
-           
- java.util.SortedMap<java.lang.Integer,? extends JsVariable>JsArray.toSparseArray() - -
-           
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type JsVariable
- voidJsEvaluateContext.EvaluateCallback.success(JsVariable variable) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RelayOk.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RelayOk.html deleted file mode 100644 index 75fc741c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RelayOk.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.RelayOk - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.RelayOk

-
- - - - - - - - - - - - - - - - - -
-Packages that use RelayOk
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.util  
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of RelayOk in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return RelayOk
- RelayOkBreakpoint.clear(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished.
- RelayOkDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback, - SyncCallback syncCallback) - -
-          Resumes the JavaScript VM execution using a "continue" request.
- RelayOkJavascriptVm.enableBreakpoints(java.lang.Boolean enabled, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Asynchronously enables or disables all breakpoints on remote.
- RelayOkJsEvaluateContext.evaluateAsync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- RelayOkJsObjectProperty.evaluateGet(JsEvaluateContext.EvaluateCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates property getter and returns property value.
- RelayOkBreakpoint.flush(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished.
- RelayOkJavascriptVm.listBreakpoints(JavascriptVm.ListBreakpointsCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reads breakpoints from remote VM.
- RelayOkUpdatableScript.previewSetSource(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Same as UpdatableScript.setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes.
- RelayOkJsValue.reloadHeavyValue(JsValue.ReloadBiggerCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reloads object value with extended size limit.
- RelayOkRestartFrameExtension.restartFrame(CallFrame callFrame, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Restarts a frame (all frames above are dropped from the stack, this frame is started over).
- RelayOkJavascriptVm.setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
- RelayOkJavascriptVm.setBreakpoint(Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setIgnoreCount(Breakpoint breakpoint, - int ignoreCount, - GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Sets the ignore count for this breakpoint (EMPTY_VALUE to clear).
- RelayOkUpdatableScript.setSourceOnRemote(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Demands that script text should be replaced with a new one if possible.
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type RelayOk
- voidCallbackSemaphore.acquireDefault(RelayOk relayOk) - -
-           
- booleanCallbackSemaphore.tryAcquireDefault(RelayOk relayOk) - -
-          Tries to acquire semaphore with some reasonable default timeout.
-  -

- - - - - -
-Uses of RelayOk in org.chromium.sdk.util
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk.util that return RelayOk
- RelayOkRelaySyncCallback.finish() - -
-          Finish relay by calling SyncCallback.
-static RelayOkRelaySyncCallback.finish(SyncCallback syncCallback) - -
-           
-abstract  RelayOkAsyncFuture.getAsync(AsyncFuture.Callback<? super T> callback, - SyncCallback syncCallback) - -
-          Obtains the operation result.
- RelayOkAsyncFutureRef.getAsync(AsyncFuture.Callback<T> callback, - SyncCallback syncCallback) - -
-           
- RelayOkAsyncFuture.Operation.start(AsyncFuture.Callback<RES> callback, - SyncCallback syncCallback) - -
-          Starts the operation.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type RelayOk
- voidRelaySyncCallback.Guard.discharge(RelayOk relayed) - -
-          This method should be called when operations was successfully relayed.
-  -

- - - - - -
-Uses of RelayOk in org.chromium.sdk.wip
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip that return RelayOk
- RelayOkPermanentRemoteValueMapping.delete(GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Asynchronously deletes mapping on remote VM.
- RelayOkEvaluateToMappingExtension.evaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RemoteValueMapping.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RemoteValueMapping.html deleted file mode 100644 index 99c4283d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RemoteValueMapping.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.RemoteValueMapping - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.RemoteValueMapping

-
- - - - - - - - - - - - - -
-Packages that use RemoteValueMapping
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of RemoteValueMapping in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return RemoteValueMapping
- RemoteValueMappingDebugContext.getDefaultRemoteValueMapping() - -
-           
- RemoteValueMappingJsObject.getRemoteValueMapping() - -
-           
-  -

- - - - - -
-Uses of RemoteValueMapping in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Subinterfaces of RemoteValueMapping in org.chromium.sdk.wip
- interfacePermanentRemoteValueMapping - -
-          A RemoteValueMapping that outlives suspend/resume cycle of debugger.
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type RemoteValueMapping
- RelayOkEvaluateToMappingExtension.evaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- voidEvaluateToMappingExtension.evaluateSync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RestartFrameExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RestartFrameExtension.html deleted file mode 100644 index 694c801d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/RestartFrameExtension.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.RestartFrameExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.RestartFrameExtension

-
- - - - - - - - - -
-Packages that use RestartFrameExtension
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of RestartFrameExtension in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return RestartFrameExtension
- RestartFrameExtensionJavascriptVm.getRestartFrameExtension() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.Type.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.Type.html deleted file mode 100644 index ce0762c7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.Type.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.Script.Type - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.Script.Type

-
- - - - - - - - - -
-Packages that use Script.Type
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Script.Type in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return Script.Type
- Script.TypeScript.getType() - -
-           
-static Script.TypeScript.Type.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static Script.Type[]Script.Type.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.html deleted file mode 100644 index dfdf996e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Script.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.Script - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.Script

-
- - - - - - - - - -
-Packages that use Script
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Script in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return Script
- ScriptCallFrame.getScript() - -
-           
- ScriptJsFunction.getScript() - -
-           
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type Script
- voidDebugEventListener.scriptCollected(Script script) - -
-          Reports that the script has been collected and is no longer used in VM.
- voidDebugEventListener.scriptContentChanged(Script newScript) - -
-          Reports that script source has been altered in remote VM.
- voidDebugEventListener.scriptLoaded(Script newScript) - -
-          Reports that a new script has been loaded into a tab.
-  -

- - - - - - - - - -
Method parameters in org.chromium.sdk with type arguments of type Script
- voidJavascriptVm.ScriptsCallback.success(java.util.Collection<Script> scripts) - -
-          This method provides a synchronous access to script collection.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/StandaloneVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/StandaloneVm.html deleted file mode 100644 index da9e5508..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/StandaloneVm.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.StandaloneVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.StandaloneVm

-
- - - - - - - - - -
-Packages that use StandaloneVm
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of StandaloneVm in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return StandaloneVm
-abstract  StandaloneVmBrowserFactory.createStandalone(java.net.SocketAddress socketAddress, - ConnectionLogger connectionLogger) - -
-          Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - DebuggerAgent opened at socketAddress.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/SyncCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/SyncCallback.html deleted file mode 100644 index 0855e05e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/SyncCallback.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.SyncCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.SyncCallback

-
- - - - - - - - - - - - - - - - - -
-Packages that use SyncCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.util  
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of SyncCallback in org.chromium.sdk
-  -

- - - - - - - - - -
Classes in org.chromium.sdk that implement SyncCallback
- classCallbackSemaphore - -
-          Convenient implementation of SyncCallback.
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type SyncCallback
- RelayOkBreakpoint.clear(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Removes the breakpoint from the JS debugger and invokes the - callback once the operation has finished.
- RelayOkDebugContext.continueVm(DebugContext.StepAction stepAction, - int stepCount, - DebugContext.ContinueCallback callback, - SyncCallback syncCallback) - -
-          Resumes the JavaScript VM execution using a "continue" request.
- RelayOkJavascriptVm.enableBreakpoints(java.lang.Boolean enabled, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Asynchronously enables or disables all breakpoints on remote.
- RelayOkJsEvaluateContext.evaluateAsync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- RelayOkJsObjectProperty.evaluateGet(JsEvaluateContext.EvaluateCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates property getter and returns property value.
- RelayOkBreakpoint.flush(JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Flushes the breakpoint parameter changes (set* methods) into the browser - and invokes the callback once the operation has finished.
- RelayOkJavascriptVm.listBreakpoints(JavascriptVm.ListBreakpointsCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reads breakpoints from remote VM.
- RelayOkUpdatableScript.previewSetSource(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Same as UpdatableScript.setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes.
- RelayOkJsValue.reloadHeavyValue(JsValue.ReloadBiggerCallback callback, - SyncCallback syncCallback) - -
-          Asynchronously reloads object value with extended size limit.
- RelayOkRestartFrameExtension.restartFrame(CallFrame callFrame, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Restarts a frame (all frames above are dropped from the stack, this frame is started over).
- RelayOkJavascriptVm.setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
- RelayOkJavascriptVm.setBreakpoint(Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setBreakpoint(JavascriptVm javascriptVm, - Breakpoint.Target target, - int line, - int column, - boolean enabled, - java.lang.String condition, - int ignoreCount, - JavascriptVm.BreakpointCallback callback, - SyncCallback syncCallback) - -
-          Sets a breakpoint with the specified parameters.
- RelayOkIgnoreCountBreakpointExtension.setIgnoreCount(Breakpoint breakpoint, - int ignoreCount, - GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Sets the ignore count for this breakpoint (EMPTY_VALUE to clear).
- RelayOkUpdatableScript.setSourceOnRemote(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Demands that script text should be replaced with a new one if possible.
-  -

- - - - - -
-Uses of SyncCallback in org.chromium.sdk.util
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.util that return SyncCallback
- SyncCallbackRelaySyncCallback.Guard.asSyncCallback() - -
-           
- SyncCallbackRelaySyncCallback.getUserSyncCallback() - -
-           
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type SyncCallback
-static RelayOkRelaySyncCallback.finish(SyncCallback syncCallback) - -
-           
-abstract  RelayOkAsyncFuture.getAsync(AsyncFuture.Callback<? super T> callback, - SyncCallback syncCallback) - -
-          Obtains the operation result.
- RelayOkAsyncFutureRef.getAsync(AsyncFuture.Callback<T> callback, - SyncCallback syncCallback) - -
-           
- RelayOkAsyncFuture.Operation.start(AsyncFuture.Callback<RES> callback, - SyncCallback syncCallback) - -
-          Starts the operation.
-  -

- - - - - - - - -
Constructors in org.chromium.sdk.util with parameters of type SyncCallback
RelaySyncCallback(SyncCallback syncCallback) - -
-           
-  -

- - - - - -
-Uses of SyncCallback in org.chromium.sdk.wip
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type SyncCallback
- RelayOkPermanentRemoteValueMapping.delete(GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Asynchronously deletes mapping on remote VM.
- RelayOkEvaluateToMappingExtension.evaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TabDebugEventListener.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TabDebugEventListener.html deleted file mode 100644 index c6ce5537..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TabDebugEventListener.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.TabDebugEventListener - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.TabDebugEventListener

-
- - - - - - - - - - - - - -
-Packages that use TabDebugEventListener
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of TabDebugEventListener in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type TabDebugEventListener
- BrowserTabBrowser.TabConnector.attach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
-  -

- - - - - -
-Uses of TabDebugEventListener in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type TabDebugEventListener
- WipBrowserTabWipBrowser.WipTabConnector.attach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TextStreamPosition.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TextStreamPosition.html deleted file mode 100644 index 50c907e9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/TextStreamPosition.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.TextStreamPosition - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.TextStreamPosition

-
- - - - - - - - - -
-Packages that use TextStreamPosition
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of TextStreamPosition in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return TextStreamPosition
- TextStreamPositionJsFunction.getOpenParenPosition() - -
-          Returns position of opening parenthesis of function arguments.
- TextStreamPositionCallFrame.getStatementStartPosition() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UnsupportedVersionException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UnsupportedVersionException.html deleted file mode 100644 index c89a5a62..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UnsupportedVersionException.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.UnsupportedVersionException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.UnsupportedVersionException

-
- - - - - - - - - -
-Packages that use UnsupportedVersionException
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UnsupportedVersionException in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that throw UnsupportedVersionException
- voidStandaloneVm.attach(DebugEventListener listener) - -
-          Connects to the target VM.
- Browser.TabFetcherBrowser.createTabFetcher() - -
-          Establishes the browser connection and checks for the protocol version - supported by the remote, then creates object that downloads list of tabs.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeDescription.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeDescription.html deleted file mode 100644 index ae3725b6..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeDescription.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.ChangeDescription - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.ChangeDescription

-
- - - - - - - - - -
-Packages that use UpdatableScript.ChangeDescription
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.ChangeDescription in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type UpdatableScript.ChangeDescription
- voidUpdatableScript.UpdateCallback.success(java.lang.Object report, - UpdatableScript.ChangeDescription changeDescription) - -
-          Script text change has succeeded or was successfully pre-calculated (in preview mode).
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeStatus.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeStatus.html deleted file mode 100644 index bb8572a1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.ChangeStatus.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.UpdatableScript.ChangeStatus - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.UpdatableScript.ChangeStatus

-
- - - - - - - - - -
-Packages that use UpdatableScript.ChangeStatus
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.ChangeStatus in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return UpdatableScript.ChangeStatus
- UpdatableScript.ChangeStatusUpdatableScript.OldFunctionNode.getStatus() - -
-           
-static UpdatableScript.ChangeStatusUpdatableScript.ChangeStatus.valueOf(java.lang.String name) - -
-          Returns the enum constant of this type with the specified name.
-static UpdatableScript.ChangeStatus[]UpdatableScript.ChangeStatus.values() - -
-          Returns an array containing the constants of this enum type, in -the order they are declared.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionNode.html deleted file mode 100644 index 7fc17e99..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionNode.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.FunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.FunctionNode

-
- - - - - - - - - -
-Packages that use UpdatableScript.FunctionNode
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.FunctionNode in org.chromium.sdk
-  -

- - - - - - - - - -
Classes in org.chromium.sdk with type parameters of type UpdatableScript.FunctionNode
-static interfaceUpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>> - -
-          A basic element of function change tree.
-  -

- - - - - - - - - - - - - -
Subinterfaces of UpdatableScript.FunctionNode in org.chromium.sdk
-static interfaceUpdatableScript.NewFunctionNode - -
-          Represents a brand new function in the changed script, that has no corresponding old function.
-static interfaceUpdatableScript.OldFunctionNode - -
-          Represents an old function in the changed script.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionPositions.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionPositions.html deleted file mode 100644 index a3babc39..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.FunctionPositions.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.FunctionPositions - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.FunctionPositions

-
- - - - - - - - - -
-Packages that use UpdatableScript.FunctionPositions
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.FunctionPositions in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return UpdatableScript.FunctionPositions
- UpdatableScript.FunctionPositionsUpdatableScript.OldFunctionNode.getNewPositions() - -
-           
- UpdatableScript.FunctionPositionsUpdatableScript.FunctionNode.getPositions() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.NewFunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.NewFunctionNode.html deleted file mode 100644 index a24c185e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.NewFunctionNode.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.NewFunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.NewFunctionNode

-
- - - - - - - - - -
-Packages that use UpdatableScript.NewFunctionNode
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.NewFunctionNode in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return types with arguments of type UpdatableScript.NewFunctionNode
- java.util.List<? extends UpdatableScript.NewFunctionNode>UpdatableScript.OldFunctionNode.newChildren() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.OldFunctionNode.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.OldFunctionNode.html deleted file mode 100644 index d909bd34..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.OldFunctionNode.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.OldFunctionNode - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.OldFunctionNode

-
- - - - - - - - - -
-Packages that use UpdatableScript.OldFunctionNode
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.OldFunctionNode in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk that return UpdatableScript.OldFunctionNode
- UpdatableScript.OldFunctionNodeUpdatableScript.FunctionNode.asOldFunction() - -
-           
- UpdatableScript.OldFunctionNodeUpdatableScript.ChangeDescription.getChangeTree() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.TextualDiff.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.TextualDiff.html deleted file mode 100644 index 8e47b422..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.TextualDiff.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.TextualDiff - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.TextualDiff

-
- - - - - - - - - -
-Packages that use UpdatableScript.TextualDiff
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.TextualDiff in org.chromium.sdk
-  -

- - - - - - - - - -
Methods in org.chromium.sdk that return UpdatableScript.TextualDiff
- UpdatableScript.TextualDiffUpdatableScript.ChangeDescription.getTextualDiff() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.UpdateCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.UpdateCallback.html deleted file mode 100644 index 1f73baa1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.UpdateCallback.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript.UpdateCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript.UpdateCallback

-
- - - - - - - - - -
-Packages that use UpdatableScript.UpdateCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript.UpdateCallback in org.chromium.sdk
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type UpdatableScript.UpdateCallback
- RelayOkUpdatableScript.previewSetSource(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Same as UpdatableScript.setSourceOnRemote(java.lang.String, org.chromium.sdk.UpdatableScript.UpdateCallback, org.chromium.sdk.SyncCallback), but does not actually update a script, only provides - a description of the planned changes.
- RelayOkUpdatableScript.setSourceOnRemote(java.lang.String newSource, - UpdatableScript.UpdateCallback callback, - SyncCallback syncCallback) - -
-          Demands that script text should be replaced with a new one if possible.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.html deleted file mode 100644 index 826c82cb..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/UpdatableScript.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.UpdatableScript - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.UpdatableScript

-
- - - - - - - - - -
-Packages that use UpdatableScript
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of UpdatableScript in org.chromium.sdk
-  -

- - - - - - - - - -
Subinterfaces of UpdatableScript in org.chromium.sdk
- interfaceScript - -
-          An objects that holds data for a "script" which is a part of a resource - loaded into the browser, identified by its original document URL, line offset - in the original document, and the line count this script spans.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Version.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Version.html deleted file mode 100644 index 3f41dbcf..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/class-use/Version.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.Version - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.Version

-
- - - - - - - - - -
-Packages that use Version
org.chromium.sdkMain package of ChromDevTools SDK API. 
-  -

- - - - - -
-Uses of Version in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that return Version
- VersionUnsupportedVersionException.getLocalVersion() - -
-           
- VersionUnsupportedVersionException.getRemoteVersion() - -
-           
- VersionJavascriptVm.getVersion() - -
-           
-static VersionVersion.parseString(java.lang.String text) - -
-          Parses string as version as far as it is dot-delimited integer numbers.
-  -

- - - - - - - - - -
Methods in org.chromium.sdk with parameters of type Version
- intVersion.compareTo(Version other) - -
-           
-  -

- - - - - - - - - - - -
Constructors in org.chromium.sdk with parameters of type Version
UnsupportedVersionException(Version localVersion, - Version remoteVersion) - -
-           
UnsupportedVersionException(Version localVersion, - Version remoteVersion, - java.lang.String message) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-frame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-frame.html deleted file mode 100644 index 5e076db5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-frame.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -org.chromium.sdk - - - - - - - - - - - -org.chromium.sdk - - - - -
-Interfaces  - -
-Breakpoint -
-Breakpoint.Target.Visitor -
-BreakpointTypeExtension -
-BreakpointTypeExtension.FunctionSupport -
-BreakpointTypeExtension.FunctionSupport.Visitor -
-BreakpointTypeExtension.ScriptRegExpSupport -
-BreakpointTypeExtension.ScriptRegExpSupport.Visitor -
-Browser -
-Browser.TabConnector -
-Browser.TabFetcher -
-BrowserTab -
-CallFrame -
-ConnectionLogger -
-ConnectionLogger.ConnectionCloser -
-ConnectionLogger.Factory -
-ConnectionLogger.StreamListener -
-DebugContext -
-DebugContext.ContinueCallback -
-DebugEventListener -
-DebugEventListener.VmStatusListener -
-ExceptionData -
-FunctionScopeExtension -
-IgnoreCountBreakpointExtension -
-JavascriptVm -
-JavascriptVm.BreakpointCallback -
-JavascriptVm.ListBreakpointsCallback -
-JavascriptVm.ScriptsCallback -
-JavascriptVm.SuspendCallback -
-JsArray -
-JsEvaluateContext -
-JsEvaluateContext.EvaluateCallback -
-JsFunction -
-JsObject -
-JsObjectProperty -
-JsScope -
-JsScope.WithScope -
-JsValue -
-JsValue.ReloadBiggerCallback -
-JsVariable -
-JsVariable.SetValueCallback -
-RelayOk -
-RemoteValueMapping -
-RestartFrameExtension -
-Script -
-StandaloneVm -
-SyncCallback -
-TabDebugEventListener -
-TextStreamPosition -
-UpdatableScript -
-UpdatableScript.ChangeDescription -
-UpdatableScript.FunctionNode -
-UpdatableScript.FunctionPositions -
-UpdatableScript.NewFunctionNode -
-UpdatableScript.OldFunctionNode -
-UpdatableScript.TextualDiff -
-UpdatableScript.UpdateCallback
- - - - - - -
-Classes  - -
-Breakpoint.Target -
-Breakpoint.Target.ScriptId -
-Breakpoint.Target.ScriptName -
-BrowserFactory -
-CallbackSemaphore -
-Version
- - - - - - -
-Enums  - -
-DebugContext.State -
-DebugContext.StepAction -
-JavascriptVm.ExceptionCatchMode -
-JsScope.Type -
-JsValue.Type -
-Script.Type -
-UpdatableScript.ChangeStatus
- - - - - - -
-Exceptions  - -
-InvalidContextException -
-UnsupportedVersionException
- - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-summary.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-summary.html deleted file mode 100644 index aa2010dc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-summary.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - -org.chromium.sdk - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-

-Package org.chromium.sdk -

-Main package of ChromDevTools SDK API. -

-See: -
-          Description -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Interface Summary
BreakpointA breakpoint in the browser JavaScript virtual machine.
Breakpoint.Target.Visitor<R> 
BreakpointTypeExtensionAn extension to supported breakpoint target types.
BreakpointTypeExtension.FunctionSupportSupports targets that refer to function text in form of function-returning - JavaScript expression.
BreakpointTypeExtension.FunctionSupport.Visitor<R>Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
BreakpointTypeExtension.ScriptRegExpSupportSupports targets that refer to a script by a 'regexp' of its name.
BreakpointTypeExtension.ScriptRegExpSupport.Visitor<R>Additional interface that user visitor may implement for Breakpoint.Target.accept(org.chromium.sdk.Breakpoint.Target.Visitor) - method.
BrowserAn "entry point" of the SDK.
Browser.TabConnectorTab list item that is fetched from browser.
Browser.TabFetcherHelps to fetch currently opened browser tabs.
BrowserTabA lightweight abstraction of a remote Browser tab.
CallFrameAn object that represents a browser JavaScript VM call frame.
ConnectionLoggerLogger facility for the Chromium debugger connection.
ConnectionLogger.ConnectionCloserInterface that gives you control over underlying connection.
ConnectionLogger.FactoryFactory for connection logger.
ConnectionLogger.StreamListenerListens to stream data traffic.
DebugContextAn object that matches the execution state of the browser JavaScript VM while - suspended.
DebugContext.ContinueCallbackA callback for the "continue" request.
DebugEventListenerThis interface is used by the SDK to report debug events for a certain JavascriptVm to - the clients.
DebugEventListener.VmStatusListenerA specialized listener for status of remote VM command queue.
ExceptionDataA JavaScript exception data holder for exceptions reported by a JavaScript - virtual machine.
FunctionScopeExtensionAn extension to JsFunction API that returns function (closure) hidden scope.
IgnoreCountBreakpointExtensionAn extension to breakpoint API that supports 'ignore count' property.
JavascriptVmAbstraction of a remote JavaScript virtual machine.
JavascriptVm.BreakpointCallbackA callback for breakpoint-related requests.
JavascriptVm.ListBreakpointsCallback 
JavascriptVm.ScriptsCallbackA callback for retrieving scripts.
JavascriptVm.SuspendCallbackA callback for suspend request.
JsArrayExtends JsObject interface by adding methods for handling array elements.
JsEvaluateContextA context in which watch expressions may be evaluated.
JsEvaluateContext.EvaluateCallbackA callback for the "evaluate" request.
JsFunctionExtends JsObject interface with the methods for function-specific properties.
JsObjectA compound JsValue that has zero or more properties.
JsObjectPropertyExposes additional data if variable is a property of object and its property descriptor - is available.
JsScopeAn object that represents a scope in JavaScript.
JsScope.WithScopeSubtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject).
JsValueAn object that represents a browser JavaScript VM variable value (compound or - atomic.)
JsValue.ReloadBiggerCallback 
JsVariableAn object that represents a variable in a browser JavaScript VM call frame.
JsVariable.SetValueCallbackA callback to use while setting a variable value.
RelayOkA symbolic interface that means "callback has been accepted and will be called sooner or later".
RemoteValueMappingRepresents a technical scope that manages remote value representation in debugger.
RestartFrameExtensionAn extension to CallFrame API that supports restart frame operation.
ScriptAn objects that holds data for a "script" which is a part of a resource - loaded into the browser, identified by its original document URL, line offset - in the original document, and the line count this script spans.
StandaloneVmAbstraction of a remote JavaScript virtual machine which is embedded into - some application and accessed via TCP/IP connection to a port opened by - DebuggerAgent.
SyncCallbackSecondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception.
TabDebugEventListenerThis interface is used by the SDK to report browser-related debug - events for a certain tab to the clients.
TextStreamPositionA structure that defines position within text stream (file).
UpdatableScriptThis interface is a part of Script interface.
UpdatableScript.ChangeDescriptionAn interface that explains what has happened/going to happen within script update action.
UpdatableScript.FunctionNode<T extends UpdatableScript.FunctionNode<T>>A basic element of function change tree.
UpdatableScript.FunctionPositions 
UpdatableScript.NewFunctionNodeRepresents a brand new function in the changed script, that has no corresponding old function.
UpdatableScript.OldFunctionNodeRepresents an old function in the changed script.
UpdatableScript.TextualDiff 
UpdatableScript.UpdateCallback 
-  - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Class Summary
Breakpoint.TargetA reference to some JavaScript text that you can set breakpoints on.
Breakpoint.Target.ScriptIdA target that refers to a script by its id.
Breakpoint.Target.ScriptNameA target that refers to a script by its name.
BrowserFactoryA factory for Browser instances.
CallbackSemaphoreConvenient implementation of SyncCallback.
VersionAn object that describes a number-based version.
-  - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Enum Summary
DebugContext.StateThe suspension state.
DebugContext.StepActionJavaScript debugger step actions.
JavascriptVm.ExceptionCatchModeDefines when VM will break on exception throw (before stack unwind happened).
JsScope.Type 
JsValue.TypeType of a JavaScript value.
Script.TypeDenotes a script type.
UpdatableScript.ChangeStatus 
-  - -

- - - - - - - - - - - - - -
-Exception Summary
InvalidContextExceptionSignals that operation is not available because related DebugContext - is no more valid.
UnsupportedVersionExceptionThis exception is thrown if the SDK protocol version is not compatible with - that supported by the browser.
-  - -

-

-Package org.chromium.sdk Description -

- -

-Main package of ChromDevTools SDK API. - See Tutorial at http://code.google.com/p/chromedevtools/wiki/SdkTutorial -

- -

-

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-tree.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-tree.html deleted file mode 100644 index bd98ca59..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-tree.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - -org.chromium.sdk Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package org.chromium.sdk -

-
-
-
Package Hierarchies:
All Packages
-
-

-Class Hierarchy -

- -

-Interface Hierarchy -

- -

-Enum Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-use.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-use.html deleted file mode 100644 index 3e388113..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/package-use.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - - - -Uses of Package org.chromium.sdk - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Package
org.chromium.sdk

-
- - - - - - - - - - - - - - - - - -
-Packages that use org.chromium.sdk
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.util  
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Classes in org.chromium.sdk used by org.chromium.sdk
Breakpoint - -
-          A breakpoint in the browser JavaScript virtual machine.
Breakpoint.Target - -
-          A reference to some JavaScript text that you can set breakpoints on.
Breakpoint.Target.Visitor - -
-           
BreakpointTypeExtension - -
-          An extension to supported breakpoint target types.
BreakpointTypeExtension.FunctionSupport - -
-          Supports targets that refer to function text in form of function-returning - JavaScript expression.
BreakpointTypeExtension.ScriptRegExpSupport - -
-          Supports targets that refer to a script by a 'regexp' of its name.
Browser - -
-          An "entry point" of the SDK.
Browser.TabConnector - -
-          Tab list item that is fetched from browser.
Browser.TabFetcher - -
-          Helps to fetch currently opened browser tabs.
BrowserFactory - -
-          A factory for Browser instances.
BrowserTab - -
-          A lightweight abstraction of a remote Browser tab.
CallFrame - -
-          An object that represents a browser JavaScript VM call frame.
ConnectionLogger - -
-          Logger facility for the Chromium debugger connection.
ConnectionLogger.ConnectionCloser - -
-          Interface that gives you control over underlying connection.
ConnectionLogger.Factory - -
-          Factory for connection logger.
ConnectionLogger.StreamListener - -
-          Listens to stream data traffic.
DebugContext - -
-          An object that matches the execution state of the browser JavaScript VM while - suspended.
DebugContext.ContinueCallback - -
-          A callback for the "continue" request.
DebugContext.State - -
-          The suspension state.
DebugContext.StepAction - -
-          JavaScript debugger step actions.
DebugEventListener - -
-          This interface is used by the SDK to report debug events for a certain JavascriptVm to - the clients.
DebugEventListener.VmStatusListener - -
-          A specialized listener for status of remote VM command queue.
ExceptionData - -
-          A JavaScript exception data holder for exceptions reported by a JavaScript - virtual machine.
FunctionScopeExtension - -
-          An extension to JsFunction API that returns function (closure) hidden scope.
IgnoreCountBreakpointExtension - -
-          An extension to breakpoint API that supports 'ignore count' property.
JavascriptVm - -
-          Abstraction of a remote JavaScript virtual machine.
JavascriptVm.BreakpointCallback - -
-          A callback for breakpoint-related requests.
JavascriptVm.ExceptionCatchMode - -
-          Defines when VM will break on exception throw (before stack unwind happened).
JavascriptVm.ListBreakpointsCallback - -
-           
JavascriptVm.ScriptsCallback - -
-          A callback for retrieving scripts.
JavascriptVm.SuspendCallback - -
-          A callback for suspend request.
JsArray - -
-          Extends JsObject interface by adding methods for handling array elements.
JsEvaluateContext - -
-          A context in which watch expressions may be evaluated.
JsEvaluateContext.EvaluateCallback - -
-          A callback for the "evaluate" request.
JsFunction - -
-          Extends JsObject interface with the methods for function-specific properties.
JsObject - -
-          A compound JsValue that has zero or more properties.
JsObjectProperty - -
-          Exposes additional data if variable is a property of object and its property descriptor - is available.
JsScope - -
-          An object that represents a scope in JavaScript.
JsScope.Type - -
-           
JsScope.WithScope - -
-          Subtype that exposes the value of the 'with' statement expression (the value might be - already converted by ToObject).
JsValue - -
-          An object that represents a browser JavaScript VM variable value (compound or - atomic.)
JsValue.ReloadBiggerCallback - -
-           
JsValue.Type - -
-          Type of a JavaScript value.
JsVariable - -
-          An object that represents a variable in a browser JavaScript VM call frame.
JsVariable.SetValueCallback - -
-          A callback to use while setting a variable value.
RelayOk - -
-          A symbolic interface that means "callback has been accepted and will be called sooner or later".
RemoteValueMapping - -
-          Represents a technical scope that manages remote value representation in debugger.
RestartFrameExtension - -
-          An extension to CallFrame API that supports restart frame operation.
Script - -
-          An objects that holds data for a "script" which is a part of a resource - loaded into the browser, identified by its original document URL, line offset - in the original document, and the line count this script spans.
Script.Type - -
-          Denotes a script type.
StandaloneVm - -
-          Abstraction of a remote JavaScript virtual machine which is embedded into - some application and accessed via TCP/IP connection to a port opened by - DebuggerAgent.
SyncCallback - -
-          Secondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception.
TabDebugEventListener - -
-          This interface is used by the SDK to report browser-related debug - events for a certain tab to the clients.
TextStreamPosition - -
-          A structure that defines position within text stream (file).
UnsupportedVersionException - -
-          This exception is thrown if the SDK protocol version is not compatible with - that supported by the browser.
UpdatableScript - -
-          This interface is a part of Script interface.
UpdatableScript.ChangeDescription - -
-          An interface that explains what has happened/going to happen within script update action.
UpdatableScript.ChangeStatus - -
-           
UpdatableScript.FunctionNode - -
-          A basic element of function change tree.
UpdatableScript.FunctionPositions - -
-           
UpdatableScript.NewFunctionNode - -
-          Represents a brand new function in the changed script, that has no corresponding old function.
UpdatableScript.OldFunctionNode - -
-          Represents an old function in the changed script.
UpdatableScript.TextualDiff - -
-           
UpdatableScript.UpdateCallback - -
-           
Version - -
-          An object that describes a number-based version.
-  -

- - - - - - - - - - - -
-Classes in org.chromium.sdk used by org.chromium.sdk.util
RelayOk - -
-          A symbolic interface that means "callback has been accepted and will be called sooner or later".
SyncCallback - -
-          Secondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception.
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Classes in org.chromium.sdk used by org.chromium.sdk.wip
ConnectionLogger - -
-          Logger facility for the Chromium debugger connection.
JavascriptVm - -
-          Abstraction of a remote JavaScript virtual machine.
JsEvaluateContext - -
-          A context in which watch expressions may be evaluated.
JsEvaluateContext.EvaluateCallback - -
-          A callback for the "evaluate" request.
RelayOk - -
-          A symbolic interface that means "callback has been accepted and will be called sooner or later".
RemoteValueMapping - -
-          Represents a technical scope that manages remote value representation in debugger.
SyncCallback - -
-          Secondary callback that should be called after main callback has been - called; it gets called regardless of whether main callback finished - normally or thrown an exception.
TabDebugEventListener - -
-          This interface is used by the SDK to report browser-related debug - events for a certain tab to the clients.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Callback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Callback.html deleted file mode 100644 index 8caee31e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Callback.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -AsyncFuture.Callback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface AsyncFuture.Callback<RES>

-
-
Enclosing class:
AsyncFuture<T>
-
-
-
-
public static interface AsyncFuture.Callback<RES>
- - -

-A callback used in operation and in AsyncFuture.getAsync(org.chromium.sdk.util.AsyncFuture.Callback, org.chromium.sdk.SyncCallback) method. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voiddone(RES res) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-done

-
-void done(RES res)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Operation.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Operation.html deleted file mode 100644 index 66ee5a2b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.Operation.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - -AsyncFuture.Operation - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface AsyncFuture.Operation<RES>

-
-
Enclosing class:
AsyncFuture<T>
-
-
-
-
public static interface AsyncFuture.Operation<RES>
- - -

-An operation that asynchronously results in a value of type RES. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- RelayOkstart(AsyncFuture.Callback<RES> callback, - SyncCallback syncCallback) - -
-          Starts the operation.
-  -

- - - - - - - - -
-Method Detail
- -

-start

-
-RelayOk start(AsyncFuture.Callback<RES> callback,
-              SyncCallback syncCallback)
-
-
Starts the operation. The method can be blocking and perform the entire operation - or its part. In this case the corresponding call to AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference>, org.chromium.sdk.util.AsyncFuture.Operation) - or AsyncFuture.reinitializeReference(java.util.concurrent.atomic.AtomicReference>, org.chromium.sdk.util.AsyncFuture.Operation) will be blocking as well. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.SyncOperation.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.SyncOperation.html deleted file mode 100644 index 3de8fc58..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.SyncOperation.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -AsyncFuture.SyncOperation - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class AsyncFuture.SyncOperation<RES>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.AsyncFuture.SyncOperation<RES>
-
-
-
Enclosing class:
AsyncFuture<T>
-
-
-
-
public abstract static class AsyncFuture.SyncOperation<RES>
extends java.lang.Object
- - -

-Helper class that presents operation meant to be executed synchronously in the current thread - as an asynchronous AsyncFuture.Operation suitable for AsyncFuture. User implements - runSync() method and passes the object returned form asAsyncOperation() - to AsyncFuture. Immediately after this he must call execute() method - (because some threads may have already got blocked on AsyncFuture.getSync() method). - However the user runSync() method may not be actually called if AsyncFuture - didn't started the operation for some reason. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
AsyncFuture.SyncOperation() - -
-           
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- AsyncFuture.Operation<RES>asAsyncOperation() - -
-           
- voidexecute() - -
-          User must call this method immediately after he passed the object to AsyncFuture.
-protected abstract  RESrunSync() - -
-          Does whatever tasks the operation requires.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-AsyncFuture.SyncOperation

-
-public AsyncFuture.SyncOperation()
-
-
- - - - - - - - -
-Method Detail
- -

-execute

-
-public void execute()
-             throws MethodIsBlockingException
-
-
User must call this method immediately after he passed the object to AsyncFuture. - Failure to do this may cause that some threads remain blocked waiting for result. -

-

- -
Throws: -
MethodIsBlockingException - as the runSync() is blocking
-
-
-
- -

-asAsyncOperation

-
-public AsyncFuture.Operation<RES> asAsyncOperation()
-
-
- -
Returns:
Operation type suitable for AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference>, org.chromium.sdk.util.AsyncFuture.Operation) and - AsyncFuture.reinitializeReference(java.util.concurrent.atomic.AtomicReference>, org.chromium.sdk.util.AsyncFuture.Operation) methods.
-
-
-
- -

-runSync

-
-protected abstract RES runSync()
-                        throws MethodIsBlockingException
-
-
Does whatever tasks the operation requires. It may also fail with no special precautions. -

-

- -
Throws: -
MethodIsBlockingException - method may deal with blocking operations
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.html deleted file mode 100644 index c3e548af..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFuture.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - -AsyncFuture - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class AsyncFuture<T>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.AsyncFuture<T>
-
-
-
Type Parameters:
T - type of the future result
-
-
-
public abstract class AsyncFuture<T>
extends java.lang.Object
- - -

-Represents a result of asynchronous operation. Unlike Future, the result may be obtained - both synchronously (blocking getter method) and asynchronously. -

The class provides a low-level service and should be used with AtomicReference class. - AsyncFutureRef offers a slightly more convenient interface for the price of extra object - (you may find it significant when there are tons of operations). -

The owner of the future operation must have a permanent field of type - AtomicReference<AsyncFuture>. It will consequently have the following values: -

    -
  1. null -- operation is idle (hasn't been started yet); user will start it some time later; -
  2. AsyncFuture instance that is performing the operation; -
  3. AsyncFuture stub instance that simply keeps a result value and returns it very - quickly; -
- The user only creates an empty AtomicReference object. Not before the result value is - actually needed the other objects are created and the operation is started. This is typically - happens in some getter. The method should: - -

- -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static interfaceAsyncFuture.Callback<RES> - -
-          A callback used in operation and in getAsync(org.chromium.sdk.util.AsyncFuture.Callback, org.chromium.sdk.SyncCallback) method.
-static interfaceAsyncFuture.Operation<RES> - -
-          An operation that asynchronously results in a value of type RES.
-static classAsyncFuture.SyncOperation<RES> - -
-          Helper class that presents operation meant to be executed synchronously in the current thread - as an asynchronous AsyncFuture.Operation suitable for AsyncFuture.
-  - - - - - - - - - - -
-Constructor Summary
AsyncFuture() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-abstract  RelayOkgetAsync(AsyncFuture.Callback<? super T> callback, - SyncCallback syncCallback) - -
-          Obtains the operation result.
-abstract  TgetSync() - -
-          Returns the operation result.
-static - - - - -
-<T> void
-
initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture if the reference - still holds null.
-static - - - - -
-<T> void
-
initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation, - boolean forceRefresh) - -
-          Operation may work synchronously.
-static - - - - -
-<T> void
-
initializeTrivial(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - T result) - -
-          Initializes the reference with the a new instance of AsyncFuture that already - holds a result.
-abstract  booleanisDone() - -
-          Returns whether the operation is done.
-static - - - - -
-<T> void
-
reinitializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-AsyncFuture

-
-public AsyncFuture()
-
-
- - - - - - - - -
-Method Detail
- -

-initializeReference

-
-public static <T> void initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref,
-                                           AsyncFuture.Operation<T> operation)
-
-
Initializes the reference with the a new instance of AsyncFuture if the reference - still holds null. This has a semantics of starting the operation. If the reference already - holds non-null value, the method does nothing. -

This method is thread-safe. -

-

-
-
-
-
- -

-reinitializeReference

-
-public static <T> void reinitializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref,
-                                             AsyncFuture.Operation<T> operation)
-
-
Initializes the reference with the a new instance of AsyncFuture. This - always works even if the reference has already been initialized. This has a semantics of - re-starting the operation and obtaining the new result after this call. -

This method is thread-safe. -

-

-
-
-
-
- -

-initializeTrivial

-
-public static <T> void initializeTrivial(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref,
-                                         T result)
-
-
Initializes the reference with the a new instance of AsyncFuture that already - holds a result. This method skips the calculation phase and may be needed to support - some trivial cases. -

This method is thread-safe. -

-

-
-
-
-
- -

-initializeReference

-
-public static <T> void initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref,
-                                           AsyncFuture.Operation<T> operation,
-                                           boolean forceRefresh)
-
-
Operation may work synchronously. This method will block in this case. -

-

-
-
-
-
- -

-getSync

-
-public abstract T getSync()
-                   throws MethodIsBlockingException
-
-
Returns the operation result. If the result is not ready yet, the method will block until - the operation finished. -

-

- -
Returns:
the operation result -
Throws: -
MethodIsBlockingException
See Also:
isDone()
-
-
-
- -

-getAsync

-
-public abstract RelayOk getAsync(AsyncFuture.Callback<? super T> callback,
-                                 SyncCallback syncCallback)
-
-
Obtains the operation result. The result is passed to callback immediately (synchronously) or - asynchronosuly later. -

-

-
Parameters:
callback - may be null
syncCallback - may be null
-
-
-
- -

-isDone

-
-public abstract boolean isDone()
-
-
Returns whether the operation is done. If the method returns true, the following calls - to getSync() will return immediately. The following calls to getSync() - of other instance of AsyncFuture that is held in the reference will also be - non-blocking, until reinitializeReference(java.util.concurrent.atomic.AtomicReference>, org.chromium.sdk.util.AsyncFuture.Operation) is called with this reference. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureMerger.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureMerger.html deleted file mode 100644 index 79ead363..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureMerger.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - -AsyncFutureMerger - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class AsyncFutureMerger<T>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.AsyncFutureMerger<T>
-
-
-
Type Parameters:
T - type of sub-operation result
-
-
-
public class AsyncFutureMerger<T>
extends java.lang.Object
- - -

-A class that provides an AsyncFuture for a group operation: one that consists of any - number of sub-operations and completes once all of them have completed. - The class does not care about nature of sub-operations, it only keeps their number. User - registers new sub-operations (addSubOperation()) and reports on their completion - (subOperationDone(T) and (subOperationDoneSync(java.lang.RuntimeException)). One sub-operation is registered - by default. Once all sub-operations completed, - the main operation is considered done and the future returns the group result. Groups result is - a list of sub-operation results. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
AsyncFutureMerger() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidaddSubOperation() - -
-          Registers a new sub-operation.
- AsyncFuture<java.util.List<T>>getFuture() - -
-          Returns AsyncFuture that provides the group result.
- voidsubOperationDone(T result) - -
-          Registers a sub-operation completion and saves its result.
- voidsubOperationDoneSync(java.lang.RuntimeException exception) - -
-          Additionally registers a sub-operation completion.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-AsyncFutureMerger

-
-public AsyncFutureMerger()
-
-
- - - - - - - - -
-Method Detail
- -

-addSubOperation

-
-public void addSubOperation()
-
-
Registers a new sub-operation. - This method is not thread-safe. User must synchronize access himself. -

-

-
-
-
-
- -

-subOperationDone

-
-public void subOperationDone(T result)
-
-
Registers a sub-operation completion and saves its result. - This call is not mandatory and user may fail to make it; this won't cause waiting thread - to block forever. - This method is not thread-safe. User must synchronize access himself. -

-

-
-
-
-
- -

-subOperationDoneSync

-
-public void subOperationDoneSync(java.lang.RuntimeException exception)
-
-
Additionally registers a sub-operation completion. This method should be called only after - subOperationDone(T) and this call is mandatory and must be made even in case of - sub-operation failure; this method is typically called form finally section of - the top-level procedure. - Other threads may block infinitely unless this method is being called a proper number of times. - This method is not thread-safe. User must synchronize access himself. -

-

-
Parameters:
exception - optional value of a failure that prevented corresponding call - to subOperationDone(T)
-
-
-
- -

-getFuture

-
-public AsyncFuture<java.util.List<T>> getFuture()
-
-
Returns AsyncFuture that provides the group result. - This method is thread-safe. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureRef.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureRef.html deleted file mode 100644 index 1a23de19..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/AsyncFutureRef.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - -AsyncFutureRef - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class AsyncFutureRef<T>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.AsyncFutureRef<T>
-
-
-
-
public class AsyncFutureRef<T>
extends java.lang.Object
- - -

-A wrapper around AtomicReference and AsyncFuture that makes the source code - cleaner and shorter. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
AsyncFutureRef() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkgetAsync(AsyncFuture.Callback<T> callback, - SyncCallback syncCallback) - -
-           
- TgetSync() - -
-           
- voidinitializeRunning(AsyncFuture.Operation<T> requester) - -
-           
- voidinitializeTrivial(T value) - -
-           
- booleanisDone() - -
-           
- booleanisInitialized() - -
-           
- voidreinitializeRunning(AsyncFuture.Operation<T> requester) - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-AsyncFutureRef

-
-public AsyncFutureRef()
-
-
- - - - - - - - -
-Method Detail
- -

-initializeRunning

-
-public void initializeRunning(AsyncFuture.Operation<T> requester)
-
-
-
-
-
-
- -

-reinitializeRunning

-
-public void reinitializeRunning(AsyncFuture.Operation<T> requester)
-
-
-
-
-
-
- -

-initializeTrivial

-
-public void initializeTrivial(T value)
-
-
-
-
-
-
- -

-isInitialized

-
-public boolean isInitialized()
-
-
-
-
-
-
- -

-getSync

-
-public T getSync()
-          throws MethodIsBlockingException
-
-
- -
Throws: -
MethodIsBlockingException
-
-
-
- -

-getAsync

-
-public RelayOk getAsync(AsyncFuture.Callback<T> callback,
-                        SyncCallback syncCallback)
-
-
-
-
-
-
- -

-isDone

-
-public boolean isDone()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/BasicUtil.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/BasicUtil.html deleted file mode 100644 index 6900413d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/BasicUtil.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - -BasicUtil - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class BasicUtil

-
-java.lang.Object
-  extended by org.chromium.sdk.util.BasicUtil
-
-
-
-
public class BasicUtil
extends java.lang.Object
- - -

-Utilities for safe using collections and several small methods missing in standard Java library. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
BasicUtil() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-static - - - - -
-<K,V> boolean
-
containsKeySafe(java.util.Map<K,V> map, - K key) - -
-          Type-safe wrapper for Map.containsKey(Object) method.
-static - - - - -
-<V> boolean
-
containsSafe(java.util.Collection<V> collection, - V value) - -
-          Type-safe wrapper for Collection.contains(Object) method.
-static - - - - -
-<T> boolean
-
eq(T left, - T right) - -
-          Convenience wrapper around Object.equals(Object) method that allows - both left and right to be null.
-static - - - - -
-<K,V> V
-
getSafe(java.util.Map<K,V> map, - K key) - -
-          Type-safe wrapper for Map.get(Object) method.
-static java.lang.StringgetStacktraceString(java.lang.Exception exception) - -
-          Takes stacktrace string out of exception.
-static inthashCode(java.lang.Object obj) - -
-          Convenience wrapper around Object.hashCode() method that allows - object to be null.
-static java.lang.Stringjoin(java.lang.Iterable<? extends java.lang.String> components, - java.lang.String separator) - -
-          Implementation of traditional join operation.
-static - - - - -
-<V> boolean
-
removeSafe(java.util.Collection<V> collection, - V value) - -
-          Type-safe wrapper for Collection.remove(Object) method.
-static - - - - -
-<K,V> V
-
removeSafe(java.util.Map<K,V> map, - K key) - -
-          Type-safe wrapper for Map.remove(Object) method.
-static - - - - -
-<T> T[]
-
toArray(java.util.Collection<? extends T> collection, - java.lang.Class<T> clazz) - -
-          Convenient method wrapping Collection.toArray().
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-BasicUtil

-
-public BasicUtil()
-
-
- - - - - - - - -
-Method Detail
- -

-toArray

-
-public static <T> T[] toArray(java.util.Collection<? extends T> collection,
-                              java.lang.Class<T> clazz)
-
-
Convenient method wrapping Collection.toArray(). It creates array of proper - length of proper type. -

-

-
-
-
-
- -

-removeSafe

-
-public static <K,V> V removeSafe(java.util.Map<K,V> map,
-                                 K key)
-
-
Type-safe wrapper for Map.remove(Object) method. It restricts - type of key and makes sure that you do not try to remove key of wrong - type. -

-

-
-
-
-
- -

-getSafe

-
-public static <K,V> V getSafe(java.util.Map<K,V> map,
-                              K key)
-
-
Type-safe wrapper for Map.get(Object) method. It restricts - type of key and makes sure that you do not try to get by key of wrong - type. -

-

-
-
-
-
- -

-containsKeySafe

-
-public static <K,V> boolean containsKeySafe(java.util.Map<K,V> map,
-                                            K key)
-
-
Type-safe wrapper for Map.containsKey(Object) method. It restricts - type of a value and makes sure that you do not call method for the value - wrong type. -

-

-
-
-
-
- -

-containsSafe

-
-public static <V> boolean containsSafe(java.util.Collection<V> collection,
-                                       V value)
-
-
Type-safe wrapper for Collection.contains(Object) method. It restricts - type of a value and makes sure that you do not call method for the value - wrong type. -

-

-
-
-
-
- -

-removeSafe

-
-public static <V> boolean removeSafe(java.util.Collection<V> collection,
-                                     V value)
-
-
Type-safe wrapper for Collection.remove(Object) method. It restricts - type of a value and makes sure that you do not call method for the value - wrong type. -

-

-
-
-
-
- -

-eq

-
-public static <T> boolean eq(T left,
-                             T right)
-
-
Convenience wrapper around Object.equals(Object) method that allows - both left and right to be null. -

-

-
-
-
-
- -

-hashCode

-
-public static int hashCode(java.lang.Object obj)
-
-
Convenience wrapper around Object.hashCode() method that allows - object to be null. -

-

-
-
-
-
- -

-join

-
-public static java.lang.String join(java.lang.Iterable<? extends java.lang.String> components,
-                                    java.lang.String separator)
-
-
Implementation of traditional join operation. -

-

-
-
-
-
- -

-getStacktraceString

-
-public static java.lang.String getStacktraceString(java.lang.Exception exception)
-
-
Takes stacktrace string out of exception. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/ByteToCharConverter.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/ByteToCharConverter.html deleted file mode 100644 index 753ce8ac..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/ByteToCharConverter.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - -ByteToCharConverter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class ByteToCharConverter

-
-java.lang.Object
-  extended by org.chromium.sdk.util.ByteToCharConverter
-
-
-
-
public class ByteToCharConverter
extends java.lang.Object
- - -

-A stateful converter from bytes to characters according to a specified Charset. - The byte input may end with an incomplete character code (e.g. in UTF-8 one character - is coded up to 4 bytes). In this case the partial character code is saved in an internal - buffer, thus the statefulness. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
ByteToCharConverter(java.nio.charset.Charset charset) - -
-           
-  - - - - - - - - - - - -
-Method Summary
- java.nio.CharBufferconvert(java.nio.ByteBuffer input) - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-ByteToCharConverter

-
-public ByteToCharConverter(java.nio.charset.Charset charset)
-
-
- - - - - - - - -
-Method Detail
- -

-convert

-
-public java.nio.CharBuffer convert(java.nio.ByteBuffer input)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/Destructable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/Destructable.html deleted file mode 100644 index 93b72ec5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/Destructable.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -Destructable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface Destructable

-
-
-
public interface Destructable
- - -

-An interface to destruct some object. Used from DestructingGuard. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voiddestruct() - -
-          Destructs object wrapped in the interface.
-  -

- - - - - - - - -
-Method Detail
- -

-destruct

-
-void destruct()
-
-
Destructs object wrapped in the interface. As usual exceptions are not - welcome from destruct method. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/DestructingGuard.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/DestructingGuard.html deleted file mode 100644 index 08a5707d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/DestructingGuard.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - -DestructingGuard - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class DestructingGuard

-
-java.lang.Object
-  extended by org.chromium.sdk.util.DestructingGuard
-
-
-
-
public class DestructingGuard
extends java.lang.Object
- - -

-Helper class that destructs unfinished objects. It is needed when Java GC is not enough. - It requires to be explicitly discharged if all went OK and destruction should be cancelled. - Using this class may be more convenient that try/finally in Java. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
DestructingGuard() - -
-           
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidaddValue(Destructable destructable) - -
-          Adds another value that should be destructed.
- voiddischarge() - -
-          Confirms that constructing has finished OKAY and no destruction is needed from now.
- voiddoFinally() - -
-          This method is supposed to be called from finally clause.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-DestructingGuard

-
-public DestructingGuard()
-
-
- - - - - - - - -
-Method Detail
- -

-discharge

-
-public void discharge()
-
-
Confirms that constructing has finished OKAY and no destruction is needed from now. -

-

-
-
-
-
- -

-doFinally

-
-public void doFinally()
-
-
This method is supposed to be called from finally clause. It performs destructing - unless discharge() has been called. -

-

-
-
-
-
- -

-addValue

-
-public void addValue(Destructable destructable)
-
-
Adds another value that should be destructed. Added values are destructed in reversed order. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/GenericCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/GenericCallback.html deleted file mode 100644 index 744709c0..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/GenericCallback.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -GenericCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface GenericCallback<T>

-
-
-
public interface GenericCallback<T>
- - -

-A generic callback used in asynchronous operations that either fail with exception - or return a result. -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- voidfailure(java.lang.Exception exception) - -
-           
- voidsuccess(T value) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-success

-
-void success(T value)
-
-
-
-
-
-
- -

-failure

-
-void failure(java.lang.Exception exception)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.Factory.html deleted file mode 100644 index 6ccc1da9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.Factory.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -LazyConstructable.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface LazyConstructable.Factory<T>

-
-
Enclosing class:
LazyConstructable<T>
-
-
-
-
public static interface LazyConstructable.Factory<T>
- - -

-


- -

- - - - - - - - - - - - -
-Method Summary
- Tconstruct() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-construct

-
-T construct()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.html deleted file mode 100644 index 5c3564a5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/LazyConstructable.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - -LazyConstructable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class LazyConstructable<T>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.LazyConstructable<T>
-
-
-
-
public class LazyConstructable<T>
extends java.lang.Object
- - -

-Holds a value yet-to-be-constructed. It gets constructed when method get() is - called the first time. User must provide LazyConstructable.Factory that - actually constructs the value. Once the value is constructed, the factory is released - and may be collected by Java GC. -

Threads: the class is thread-safe; how it's implementation is lock-free, so a - factory may be called several times from several concurrent threads. However - method get() is guaranteed to always return the same value from to whatever - thread. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceLazyConstructable.Factory<T> - -
-           
-  - - - - - - - - - - -
-Constructor Summary
LazyConstructable(LazyConstructable.Factory<T> factory) - -
-           
-  - - - - - - - - - - - - - - - -
-Method Summary
-static - - - - -
-<T> LazyConstructable<T>
-
create(LazyConstructable.Factory<T> factory) - -
-           
- Tget() - -
-          Constructs a value when called first time and returns it to all subsequent calls.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-LazyConstructable

-
-public LazyConstructable(LazyConstructable.Factory<T> factory)
-
-
- - - - - - - - -
-Method Detail
- -

-create

-
-public static <T> LazyConstructable<T> create(LazyConstructable.Factory<T> factory)
-
-
-
-
-
-
- -

-get

-
-public T get()
-
-
Constructs a value when called first time and returns it to all subsequent calls. -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/MethodIsBlockingException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/MethodIsBlockingException.html deleted file mode 100644 index b436c78c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/MethodIsBlockingException.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -MethodIsBlockingException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class MethodIsBlockingException

-
-java.lang.Object
-  extended by java.lang.Throwable
-      extended by java.lang.Exception
-          extended by java.lang.RuntimeException
-              extended by org.chromium.sdk.util.MethodIsBlockingException
-
-
-
All Implemented Interfaces:
java.io.Serializable
-
-
-
-
public class MethodIsBlockingException
extends java.lang.RuntimeException
- - -

-Signals that a deadlock was about to happen. -

- Method may wait for some callback to receive a result from some worker - thread. If this method happened to be called from another callback - being run by the same thread this will block the thread forever because - method is never going to get result. Such situation may raise this - exception. -

- Currently this exception is never actually thrown so it gets more of - symbolic sense. Nevertheless it's still important to keep its declaration - because it helps to track which ones are blocking and which are not. - To do this, one should temporarily modify this class and make exception checked - (make it extend java.lang.Exception). This will enforce the proper - declaration of all blocking methods. -

Here are the simple rules: you never normally catch this exception, but - add throws declaration wherever needed; if your callback method needs to - throw it you are doing something wrong (i.e. calling blocking method from - a callback) and risk running into a deadlock; wherever you are - sure you are on a safe ground (not called from callback) and there is no - need in further tracking this exception, make a symbolic try/catch and - explain why you think it's safe, in a catch block: -

-   try {
-     makeSureAllScriptsAreLoaded();
-   } catch (MethodIsBlockingException e) {
-     // I'm being called from my own thread, so it's ok if method blocks,
-     // I can wait
-     throw new RuntimeException(e); // never executed
-   }
- 
-

By default, MethodIsBlockingException is unchecked exception, - so you may completely ignore it. -

- -

-

-
See Also:
Serialized Form
-
- -

- - - - - - - - -
-Method Summary
- - - - - - - -
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- -


- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.Guard.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.Guard.html deleted file mode 100644 index f958010b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.Guard.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - -RelaySyncCallback.Guard - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class RelaySyncCallback.Guard

-
-java.lang.Object
-  extended by org.chromium.sdk.util.RelaySyncCallback.Guard
-
-
-
Enclosing class:
RelaySyncCallback
-
-
-
-
public class RelaySyncCallback.Guard
extends java.lang.Object
- - -

-Responsible for calling SyncCallback unless - operation has been successfully relayed to the next step. -

- -

-


- -

- - - - - - - - - - - -
-Constructor Summary
RelaySyncCallback.Guard() - -
-           
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- SyncCallbackasSyncCallback() - -
-           
- voiddischarge(RelayOk relayed) - -
-          This method should be called when operations was successfully relayed.
- RelaySyncCallbackgetRelay() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-RelaySyncCallback.Guard

-
-public RelaySyncCallback.Guard()
-
-
- - - - - - - - -
-Method Detail
- -

-discharge

-
-public void discharge(RelayOk relayed)
-
-
This method should be called when operations was successfully relayed. This is typically - a last statement in operation step, right before relay call. - Failing to call discharge(org.chromium.sdk.RelayOk) (because of abnormal finishing) would cause guard to - call SyncCallback meaning the termination of the operation. -

-

-
Parameters:
relayed -
-
-
-
- -

-asSyncCallback

-
-public SyncCallback asSyncCallback()
-
-
- -
Returns:
guard wrapped as SyncCallback that that would let the guard to fulfill its - main contract
-
-
-
- -

-getRelay

-
-public RelaySyncCallback getRelay()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.html deleted file mode 100644 index 6d6b4c34..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/RelaySyncCallback.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - -RelaySyncCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class RelaySyncCallback

-
-java.lang.Object
-  extended by org.chromium.sdk.util.RelaySyncCallback
-
-
-
-
public class RelaySyncCallback
extends java.lang.Object
- - -

-A utility class for handling SyncCallback in chained asynchronous operations. - Whatever happens to each step of operation, SyncCallback must be called once - in the end. RelaySyncCallback wraps the SyncCallback for the whole - multistep operation. It works in pair with RelaySyncCallback.Guard class. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
- classRelaySyncCallback.Guard - -
-          Responsible for calling SyncCallback unless - operation has been successfully relayed to the next step.
-  - - - - - - - - - - -
-Constructor Summary
RelaySyncCallback(SyncCallback syncCallback) - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkfinish() - -
-          Finish relay by calling SyncCallback.
-static RelayOkfinish(SyncCallback syncCallback) - -
-           
- SyncCallbackgetUserSyncCallback() - -
-           
- RelaySyncCallback.GuardnewGuard() - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-RelaySyncCallback

-
-public RelaySyncCallback(SyncCallback syncCallback)
-
-
- - - - - - - - -
-Method Detail
- -

-newGuard

-
-public RelaySyncCallback.Guard newGuard()
-
-
-
-
-
-
- -

-getUserSyncCallback

-
-public SyncCallback getUserSyncCallback()
-
-
-
-
-
-
- -

-finish

-
-public RelayOk finish()
-
-
Finish relay by calling SyncCallback. -

-

-
-
-
-
- -

-finish

-
-public static RelayOk finish(SyncCallback syncCallback)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.AlreadySignalledException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.AlreadySignalledException.html deleted file mode 100644 index a34b1ed3..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.AlreadySignalledException.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - -SignalRelay.AlreadySignalledException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class SignalRelay.AlreadySignalledException

-
-java.lang.Object
-  extended by java.lang.Throwable
-      extended by java.lang.Exception
-          extended by org.chromium.sdk.util.SignalRelay.AlreadySignalledException
-
-
-
All Implemented Interfaces:
java.io.Serializable
-
-
-
Enclosing class:
SignalRelay<SIGNAL>
-
-
-
-
public static class SignalRelay.AlreadySignalledException
extends java.lang.Exception
- - -

-

-
See Also:
Serialized Form
-
- -

- - - - - - - - -
-Method Summary
- - - - - - - -
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- -


- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.Callback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.Callback.html deleted file mode 100644 index 80cbe72c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.Callback.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - -SignalRelay.Callback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface SignalRelay.Callback<S>

-
-
Enclosing class:
SignalRelay<SIGNAL>
-
-
-
-
public static interface SignalRelay.Callback<S>
- - -

-An interface to notify a user about a received signal. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- voidonSignal(S signal, - java.lang.Exception cause) - -
-          Called from the thread that initiated a broadcast (i.e.
-  -

- - - - - - - - -
-Method Detail
- -

-onSignal

-
-void onSignal(S signal,
-              java.lang.Exception cause)
-              throws java.lang.RuntimeException,
-                     java.lang.Error
-
-
Called from the thread that initiated a broadcast (i.e. called - onSignal(Object, Exception)). -

-

- -
Throws: -
java.lang.RuntimeException - thrown exception gets caught and logged -
java.lang.Error - not caught
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.SignalConverter.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.SignalConverter.html deleted file mode 100644 index c3aac0a1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.SignalConverter.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - -SignalRelay.SignalConverter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Interface SignalRelay.SignalConverter<FROM,TO>

-
-
Enclosing class:
SignalRelay<SIGNAL>
-
-
-
-
public static interface SignalRelay.SignalConverter<FROM,TO>
- - -

-A converter that translates signals from one type to another so that unrelated resources - could co-work. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- TOconvert(FROM source) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-convert

-
-TO convert(FROM source)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.html deleted file mode 100644 index b97c994a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/SignalRelay.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - -SignalRelay - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.util -
-Class SignalRelay<SIGNAL>

-
-java.lang.Object
-  extended by org.chromium.sdk.util.SignalRelay<SIGNAL>
-
-
-
Type Parameters:
SIGNAL - type of signal that this node works with
-
-
-
public class SignalRelay<SIGNAL>
extends java.lang.Object
- - -

-A node in a network that broadcasts some signal among all its peers one time. The signal may get - converted when goes from node to node. The first time a node receives a signal, it calls - a user callback. It ignores all further signals. A signal is accompanied by exception - called 'cause' that can be null. -

The class is thread-safe. -

This class is useful for a shutdown strategy, when several resources should be taken down - together, but there are no single authority to manage it. E.g. in a client-medium-server - threesome each part can initiate shutdown. -

Nodes of different signal system can be bound using SignalRelay.SignalConverter. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - -
-Nested Class Summary
-static classSignalRelay.AlreadySignalledException - -
-           
-static interfaceSignalRelay.Callback<S> - -
-          An interface to notify a user about a received signal.
-static interfaceSignalRelay.SignalConverter<FROM,TO> - -
-          A converter that translates signals from one type to another so that unrelated resources - could co-work.
-  - - - - - - - - - - -
-Constructor Summary
SignalRelay(SignalRelay.Callback<SIGNAL> callback) - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- - - - - -
-<OPPOSITE> void
-
bind(SignalRelay<OPPOSITE> peer, - SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter, - SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter) - -
-          Binds this node to a peer node.
-static - - - - -
-<T> SignalRelay<T>
-
create(SignalRelay.Callback<T> callback) - -
-           
- SIGNALgetReceivedSignal() - -
-           
- booleanisSignalled() - -
-           
- voidsendSignal(SIGNAL signal, - java.lang.Exception cause) - -
-           
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-SignalRelay

-
-public SignalRelay(SignalRelay.Callback<SIGNAL> callback)
-
-
- - - - - - - - -
-Method Detail
- -

-create

-
-public static <T> SignalRelay<T> create(SignalRelay.Callback<T> callback)
-
-
-
-
-
-
- -

-sendSignal

-
-public void sendSignal(SIGNAL signal,
-                       java.lang.Exception cause)
-
-
-
-
-
-
- -

-isSignalled

-
-public boolean isSignalled()
-
-
-
-
-
-
- -

-getReceivedSignal

-
-public SIGNAL getReceivedSignal()
-
-
- -
Returns:
a signal received or null if called before a signal came in.
-
-
-
- -

-bind

-
-public <OPPOSITE> void bind(SignalRelay<OPPOSITE> peer,
-                            SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter,
-                            SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter)
-          throws SignalRelay.AlreadySignalledException
-
-
Binds this node to a peer node. If the peer already received a signal, accepts it and - throws an exception. -

-

-
Type Parameters:
OPPOSITE - type of signal the peer node works with
Parameters:
toPeerConverter - a signal converter that is used when sending signal or null
fromPeerConverter - a signal converter that is used when receiving signal or null -
Throws: -
SignalRelay.AlreadySignalledException - when binding to node that already has a signal
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Callback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Callback.html deleted file mode 100644 index 1383626f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Callback.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.AsyncFuture.Callback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.AsyncFuture.Callback

-
- - - - - - - - - -
-Packages that use AsyncFuture.Callback
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of AsyncFuture.Callback in org.chromium.sdk.util
-  -

- - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type AsyncFuture.Callback
-abstract  RelayOkAsyncFuture.getAsync(AsyncFuture.Callback<? super T> callback, - SyncCallback syncCallback) - -
-          Obtains the operation result.
- RelayOkAsyncFutureRef.getAsync(AsyncFuture.Callback<T> callback, - SyncCallback syncCallback) - -
-           
- RelayOkAsyncFuture.Operation.start(AsyncFuture.Callback<RES> callback, - SyncCallback syncCallback) - -
-          Starts the operation.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Operation.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Operation.html deleted file mode 100644 index bfca27fd..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.Operation.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.AsyncFuture.Operation - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.AsyncFuture.Operation

-
- - - - - - - - - -
-Packages that use AsyncFuture.Operation
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of AsyncFuture.Operation in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return AsyncFuture.Operation
- AsyncFuture.Operation<RES>AsyncFuture.SyncOperation.asAsyncOperation() - -
-           
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type AsyncFuture.Operation
-static - - - - -
-<T> void
-
AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture if the reference - still holds null.
-static - - - - -
-<T> void
-
AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation, - boolean forceRefresh) - -
-          Operation may work synchronously.
- voidAsyncFutureRef.initializeRunning(AsyncFuture.Operation<T> requester) - -
-           
-static - - - - -
-<T> void
-
AsyncFuture.reinitializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture.
- voidAsyncFutureRef.reinitializeRunning(AsyncFuture.Operation<T> requester) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.SyncOperation.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.SyncOperation.html deleted file mode 100644 index 549fefd7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.SyncOperation.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.AsyncFuture.SyncOperation - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.AsyncFuture.SyncOperation

-
-No usage of org.chromium.sdk.util.AsyncFuture.SyncOperation -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.html deleted file mode 100644 index 5bfb4cee..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFuture.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.AsyncFuture - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.AsyncFuture

-
- - - - - - - - - -
-Packages that use AsyncFuture
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of AsyncFuture in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return AsyncFuture
- AsyncFuture<java.util.List<T>>AsyncFutureMerger.getFuture() - -
-          Returns AsyncFuture that provides the group result.
-  -

- - - - - - - - - - - - - - - - - - - - - -
Method parameters in org.chromium.sdk.util with type arguments of type AsyncFuture
-static - - - - -
-<T> void
-
AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture if the reference - still holds null.
-static - - - - -
-<T> void
-
AsyncFuture.initializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation, - boolean forceRefresh) - -
-          Operation may work synchronously.
-static - - - - -
-<T> void
-
AsyncFuture.initializeTrivial(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - T result) - -
-          Initializes the reference with the a new instance of AsyncFuture that already - holds a result.
-static - - - - -
-<T> void
-
AsyncFuture.reinitializeReference(java.util.concurrent.atomic.AtomicReference<AsyncFuture<T>> ref, - AsyncFuture.Operation<T> operation) - -
-          Initializes the reference with the a new instance of AsyncFuture.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureMerger.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureMerger.html deleted file mode 100644 index 3f3913ed..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureMerger.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.AsyncFutureMerger - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.AsyncFutureMerger

-
-No usage of org.chromium.sdk.util.AsyncFutureMerger -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureRef.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureRef.html deleted file mode 100644 index 0c550b27..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/AsyncFutureRef.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.AsyncFutureRef - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.AsyncFutureRef

-
-No usage of org.chromium.sdk.util.AsyncFutureRef -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/BasicUtil.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/BasicUtil.html deleted file mode 100644 index f33c332b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/BasicUtil.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.BasicUtil - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.BasicUtil

-
-No usage of org.chromium.sdk.util.BasicUtil -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/ByteToCharConverter.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/ByteToCharConverter.html deleted file mode 100644 index 1d21cd19..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/ByteToCharConverter.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.ByteToCharConverter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.ByteToCharConverter

-
-No usage of org.chromium.sdk.util.ByteToCharConverter -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/Destructable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/Destructable.html deleted file mode 100644 index e0df1599..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/Destructable.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.Destructable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.Destructable

-
- - - - - - - - - -
-Packages that use Destructable
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of Destructable in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type Destructable
- voidDestructingGuard.addValue(Destructable destructable) - -
-          Adds another value that should be destructed.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/DestructingGuard.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/DestructingGuard.html deleted file mode 100644 index 99042b1c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/DestructingGuard.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.DestructingGuard - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.DestructingGuard

-
-No usage of org.chromium.sdk.util.DestructingGuard -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/GenericCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/GenericCallback.html deleted file mode 100644 index b80eab4c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/GenericCallback.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.GenericCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.GenericCallback

-
- - - - - - - - - - - - - -
-Packages that use GenericCallback
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of GenericCallback in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk with parameters of type GenericCallback
- RelayOkJavascriptVm.enableBreakpoints(java.lang.Boolean enabled, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Asynchronously enables or disables all breakpoints on remote.
- RelayOkRestartFrameExtension.restartFrame(CallFrame callFrame, - GenericCallback<java.lang.Boolean> callback, - SyncCallback syncCallback) - -
-          Restarts a frame (all frames above are dropped from the stack, this frame is started over).
- RelayOkJavascriptVm.setBreakOnException(JavascriptVm.ExceptionCatchMode catchMode, - GenericCallback<JavascriptVm.ExceptionCatchMode> callback, - SyncCallback syncCallback) - -
-          Controls whether VM stops on exceptions.
- RelayOkIgnoreCountBreakpointExtension.setIgnoreCount(Breakpoint breakpoint, - int ignoreCount, - GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Sets the ignore count for this breakpoint (EMPTY_VALUE to clear).
-  -

- - - - - -
-Uses of GenericCallback in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type GenericCallback
- RelayOkPermanentRemoteValueMapping.delete(GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Asynchronously deletes mapping on remote VM.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.Factory.html deleted file mode 100644 index aa81aa75..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.Factory.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.LazyConstructable.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.LazyConstructable.Factory

-
- - - - - - - - - -
-Packages that use LazyConstructable.Factory
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of LazyConstructable.Factory in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type LazyConstructable.Factory
-static - - - - -
-<T> LazyConstructable<T>
-
LazyConstructable.create(LazyConstructable.Factory<T> factory) - -
-           
-  -

- - - - - - - - -
Constructors in org.chromium.sdk.util with parameters of type LazyConstructable.Factory
LazyConstructable(LazyConstructable.Factory<T> factory) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.html deleted file mode 100644 index cf6cef33..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/LazyConstructable.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.LazyConstructable - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.LazyConstructable

-
- - - - - - - - - -
-Packages that use LazyConstructable
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of LazyConstructable in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return LazyConstructable
-static - - - - -
-<T> LazyConstructable<T>
-
LazyConstructable.create(LazyConstructable.Factory<T> factory) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/MethodIsBlockingException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/MethodIsBlockingException.html deleted file mode 100644 index 3f35db47..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/MethodIsBlockingException.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.MethodIsBlockingException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.MethodIsBlockingException

-
- - - - - - - - - - - - - - - - - -
-Packages that use MethodIsBlockingException
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.util  
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of MethodIsBlockingException in org.chromium.sdk
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk that throw MethodIsBlockingException
- voidCallbackSemaphore.acquireDefault(RelayOk relayOk) - -
-           
- voidStandaloneVm.attach(DebugEventListener listener) - -
-          Connects to the target VM.
- BrowserTabBrowser.TabConnector.attach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
- voidJsEvaluateContext.evaluateSync(java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
- JsVariableJsArray.get(int index) - -
-           
- java.util.Collection<? extends JsVariable>JsObject.getInternalProperties() - -
-           
- TextStreamPositionJsFunction.getOpenParenPosition() - -
-          Returns position of opening parenthesis of function arguments.
- java.util.Collection<? extends JsVariable>JsObject.getProperties() - -
-           
- JsVariableJsObject.getProperty(java.lang.String name) - -
-           
- JsVariableCallFrame.getReceiverVariable() - -
-           
- java.util.List<? extends JsScope>FunctionScopeExtension.getScopes(JsFunction function) - -
-           
- ScriptJsFunction.getScript() - -
-           
- voidJavascriptVm.getScripts(JavascriptVm.ScriptsCallback callback) - -
-          Returns user scripts loaded into the tab.
- java.util.List<? extends JsVariable>JsScope.getVariables() - -
-           
- JsValueJsScope.WithScope.getWithArgument() - -
-           
- intJsArray.length() - -
-           
- java.util.SortedMap<java.lang.Integer,? extends JsVariable>JsArray.toSparseArray() - -
-           
- booleanCallbackSemaphore.tryAcquire(long timeout, - java.util.concurrent.TimeUnit unit) - -
-          Tries to acquire the semaphore.
- booleanCallbackSemaphore.tryAcquireDefault(RelayOk relayOk) - -
-          Tries to acquire semaphore with some reasonable default timeout.
-  -

- - - - - -
-Uses of MethodIsBlockingException in org.chromium.sdk.util
-  -

- - - - - - - - - - - - - - - - - - - - - -
Methods in org.chromium.sdk.util that throw MethodIsBlockingException
- voidAsyncFuture.SyncOperation.execute() - -
-          User must call this method immediately after he passed the object to AsyncFuture.
-abstract  TAsyncFuture.getSync() - -
-          Returns the operation result.
- TAsyncFutureRef.getSync() - -
-           
-protected abstract  RESAsyncFuture.SyncOperation.runSync() - -
-          Does whatever tasks the operation requires.
-  -

- - - - - -
-Uses of MethodIsBlockingException in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that throw MethodIsBlockingException
- voidEvaluateToMappingExtension.evaluateSync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.Guard.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.Guard.html deleted file mode 100644 index 69471c78..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.Guard.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.RelaySyncCallback.Guard - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.RelaySyncCallback.Guard

-
- - - - - - - - - -
-Packages that use RelaySyncCallback.Guard
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of RelaySyncCallback.Guard in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return RelaySyncCallback.Guard
- RelaySyncCallback.GuardRelaySyncCallback.newGuard() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.html deleted file mode 100644 index b1f8248e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/RelaySyncCallback.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.RelaySyncCallback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.RelaySyncCallback

-
- - - - - - - - - -
-Packages that use RelaySyncCallback
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of RelaySyncCallback in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return RelaySyncCallback
- RelaySyncCallbackRelaySyncCallback.Guard.getRelay() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.AlreadySignalledException.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.AlreadySignalledException.html deleted file mode 100644 index 64cdc15c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.AlreadySignalledException.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.SignalRelay.AlreadySignalledException - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.SignalRelay.AlreadySignalledException

-
- - - - - - - - - -
-Packages that use SignalRelay.AlreadySignalledException
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of SignalRelay.AlreadySignalledException in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that throw SignalRelay.AlreadySignalledException
- - - - - -
-<OPPOSITE> void
-
SignalRelay.bind(SignalRelay<OPPOSITE> peer, - SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter, - SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter) - -
-          Binds this node to a peer node.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.Callback.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.Callback.html deleted file mode 100644 index 7d5b60d9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.Callback.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.SignalRelay.Callback - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.SignalRelay.Callback

-
- - - - - - - - - -
-Packages that use SignalRelay.Callback
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of SignalRelay.Callback in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type SignalRelay.Callback
-static - - - - -
-<T> SignalRelay<T>
-
SignalRelay.create(SignalRelay.Callback<T> callback) - -
-           
-  -

- - - - - - - - -
Constructors in org.chromium.sdk.util with parameters of type SignalRelay.Callback
SignalRelay(SignalRelay.Callback<SIGNAL> callback) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.SignalConverter.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.SignalConverter.html deleted file mode 100644 index 67be6524..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.SignalConverter.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.util.SignalRelay.SignalConverter - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.util.SignalRelay.SignalConverter

-
- - - - - - - - - -
-Packages that use SignalRelay.SignalConverter
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of SignalRelay.SignalConverter in org.chromium.sdk.util
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type SignalRelay.SignalConverter
- - - - - -
-<OPPOSITE> void
-
SignalRelay.bind(SignalRelay<OPPOSITE> peer, - SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter, - SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter) - -
-          Binds this node to a peer node.
- - - - - -
-<OPPOSITE> void
-
SignalRelay.bind(SignalRelay<OPPOSITE> peer, - SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter, - SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter) - -
-          Binds this node to a peer node.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.html deleted file mode 100644 index 2d3eb7bd..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/class-use/SignalRelay.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - -Uses of Class org.chromium.sdk.util.SignalRelay - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Class
org.chromium.sdk.util.SignalRelay

-
- - - - - - - - - -
-Packages that use SignalRelay
org.chromium.sdk.util  
-  -

- - - - - -
-Uses of SignalRelay in org.chromium.sdk.util
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util that return SignalRelay
-static - - - - -
-<T> SignalRelay<T>
-
SignalRelay.create(SignalRelay.Callback<T> callback) - -
-           
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.util with parameters of type SignalRelay
- - - - - -
-<OPPOSITE> void
-
SignalRelay.bind(SignalRelay<OPPOSITE> peer, - SignalRelay.SignalConverter<SIGNAL,OPPOSITE> toPeerConverter, - SignalRelay.SignalConverter<OPPOSITE,SIGNAL> fromPeerConverter) - -
-          Binds this node to a peer node.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-frame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-frame.html deleted file mode 100644 index a6f5b77c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-frame.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - -org.chromium.sdk.util - - - - - - - - - - - -org.chromium.sdk.util - - - - -
-Interfaces  - -
-AsyncFuture.Callback -
-AsyncFuture.Operation -
-Destructable -
-GenericCallback -
-LazyConstructable.Factory -
-SignalRelay.Callback -
-SignalRelay.SignalConverter
- - - - - - -
-Classes  - -
-AsyncFuture -
-AsyncFuture.SyncOperation -
-AsyncFutureMerger -
-AsyncFutureRef -
-BasicUtil -
-ByteToCharConverter -
-DestructingGuard -
-LazyConstructable -
-RelaySyncCallback -
-SignalRelay
- - - - - - -
-Exceptions  - -
-MethodIsBlockingException -
-SignalRelay.AlreadySignalledException
- - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-summary.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-summary.html deleted file mode 100644 index 3121a15b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-summary.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - -org.chromium.sdk.util - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-

-Package org.chromium.sdk.util -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Interface Summary
AsyncFuture.Callback<RES>A callback used in operation and in AsyncFuture.getAsync(org.chromium.sdk.util.AsyncFuture.Callback, org.chromium.sdk.SyncCallback) method.
AsyncFuture.Operation<RES>An operation that asynchronously results in a value of type RES.
DestructableAn interface to destruct some object.
GenericCallback<T>A generic callback used in asynchronous operations that either fail with exception - or return a result.
LazyConstructable.Factory<T> 
SignalRelay.Callback<S>An interface to notify a user about a received signal.
SignalRelay.SignalConverter<FROM,TO>A converter that translates signals from one type to another so that unrelated resources - could co-work.
-  - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Class Summary
AsyncFuture<T>Represents a result of asynchronous operation.
AsyncFuture.SyncOperation<RES>Helper class that presents operation meant to be executed synchronously in the current thread - as an asynchronous AsyncFuture.Operation suitable for AsyncFuture.
AsyncFutureMerger<T>A class that provides an AsyncFuture for a group operation: one that consists of any - number of sub-operations and completes once all of them have completed.
AsyncFutureRef<T>A wrapper around AtomicReference and AsyncFuture that makes the source code - cleaner and shorter.
BasicUtilUtilities for safe using collections and several small methods missing in standard Java library.
ByteToCharConverterA stateful converter from bytes to characters according to a specified Charset.
DestructingGuardHelper class that destructs unfinished objects.
LazyConstructable<T>Holds a value yet-to-be-constructed.
RelaySyncCallbackA utility class for handling SyncCallback in chained asynchronous operations.
SignalRelay<SIGNAL>A node in a network that broadcasts some signal among all its peers one time.
-  - -

- - - - - - - - - - - - - -
-Exception Summary
MethodIsBlockingExceptionSignals that a deadlock was about to happen.
SignalRelay.AlreadySignalledException 
-  - -

-

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-tree.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-tree.html deleted file mode 100644 index fc4b03f1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-tree.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -org.chromium.sdk.util Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package org.chromium.sdk.util -

-
-
-
Package Hierarchies:
All Packages
-
-

-Class Hierarchy -

- -

-Interface Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-use.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-use.html deleted file mode 100644 index 12389591..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/util/package-use.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -Uses of Package org.chromium.sdk.util - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Package
org.chromium.sdk.util

-
- - - - - - - - - - - - - - - - - -
-Packages that use org.chromium.sdk.util
org.chromium.sdkMain package of ChromDevTools SDK API. 
org.chromium.sdk.util  
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - - - - - - - -
-Classes in org.chromium.sdk.util used by org.chromium.sdk
GenericCallback - -
-          A generic callback used in asynchronous operations that either fail with exception - or return a result.
MethodIsBlockingException - -
-          Signals that a deadlock was about to happen.
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Classes in org.chromium.sdk.util used by org.chromium.sdk.util
AsyncFuture - -
-          Represents a result of asynchronous operation.
AsyncFuture.Callback - -
-          A callback used in operation and in AsyncFuture.getAsync(org.chromium.sdk.util.AsyncFuture.Callback, org.chromium.sdk.SyncCallback) method.
AsyncFuture.Operation - -
-          An operation that asynchronously results in a value of type RES.
Destructable - -
-          An interface to destruct some object.
LazyConstructable - -
-          Holds a value yet-to-be-constructed.
LazyConstructable.Factory - -
-           
MethodIsBlockingException - -
-          Signals that a deadlock was about to happen.
RelaySyncCallback - -
-          A utility class for handling SyncCallback in chained asynchronous operations.
RelaySyncCallback.Guard - -
-          Responsible for calling SyncCallback unless - operation has been successfully relayed to the next step.
SignalRelay - -
-          A node in a network that broadcasts some signal among all its peers one time.
SignalRelay.AlreadySignalledException - -
-           
SignalRelay.Callback - -
-          An interface to notify a user about a received signal.
SignalRelay.SignalConverter - -
-          A converter that translates signals from one type to another so that unrelated resources - could co-work.
-  -

- - - - - - - - - - - -
-Classes in org.chromium.sdk.util used by org.chromium.sdk.wip
GenericCallback - -
-          A generic callback used in asynchronous operations that either fail with exception - or return a result.
MethodIsBlockingException - -
-          Signals that a deadlock was about to happen.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/EvaluateToMappingExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/EvaluateToMappingExtension.html deleted file mode 100644 index 9ba154e0..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/EvaluateToMappingExtension.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - -EvaluateToMappingExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface EvaluateToMappingExtension

-
-
-
public interface EvaluateToMappingExtension
- - -

-An extension to evaluate methods, that allows to specify RemoteValueMapping - as an additional argument 'targetMapping'. - The extension is available from - WipJavascriptVm.getEvaluateWithDestinationMappingExtension(). -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkevaluateAsync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback, - SyncCallback syncCallback) - -
-          Asynchronously evaluates an arbitrary JavaScript expression in - the particular context.
- voidevaluateSync(JsEvaluateContext evaluateContext, - java.lang.String expression, - java.util.Map<java.lang.String,java.lang.String> additionalContext, - RemoteValueMapping targetMapping, - JsEvaluateContext.EvaluateCallback evaluateCallback) - -
-          Synchronously evaluates an arbitrary JavaScript expression in - the particular context.
-  -

- - - - - - - - -
-Method Detail
- -

-evaluateSync

-
-void evaluateSync(JsEvaluateContext evaluateContext,
-                  java.lang.String expression,
-                  java.util.Map<java.lang.String,java.lang.String> additionalContext,
-                  RemoteValueMapping targetMapping,
-                  JsEvaluateContext.EvaluateCallback evaluateCallback)
-                  throws MethodIsBlockingException
-
-
Synchronously evaluates an arbitrary JavaScript expression in - the particular context. - Previously loaded JsObjects can be addressed from the expression if listed in - additionalContext parameter. - The evaluation result is reported to the specified evaluateCallback. - The method will block until the evaluation result is available. -

-

-
Parameters:
expression - to evaluate
additionalContext - a name-to-object-ref-id map that adds new values to an expression - scope; may be null
targetMapping - mapping the result must belong to
evaluateCallback - to report the evaluation result to -
Throws: -
MethodIsBlockingException - if called from a callback because it blocks - until remote VM returns result
-
-
-
- -

-evaluateAsync

-
-RelayOk evaluateAsync(JsEvaluateContext evaluateContext,
-                      java.lang.String expression,
-                      java.util.Map<java.lang.String,java.lang.String> additionalContext,
-                      RemoteValueMapping targetMapping,
-                      JsEvaluateContext.EvaluateCallback evaluateCallback,
-                      SyncCallback syncCallback)
-
-
Asynchronously evaluates an arbitrary JavaScript expression in - the particular context. - Previously loaded JsObjects can be addressed from the expression if listed in - additionalContext parameter. - The evaluation result is reported to the specified evaluateCallback. - The method doesn't block. -

-

-
Parameters:
expression - to evaluate
additionalContext - a name-to-object-ref-id map that adds new values to an expression - scope; may be null
targetMapping - mapping the result must belong to
evaluateCallback - to report the evaluation result to
syncCallback - to report the end of any processing
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/PermanentRemoteValueMapping.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/PermanentRemoteValueMapping.html deleted file mode 100644 index a20dce6e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/PermanentRemoteValueMapping.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - -PermanentRemoteValueMapping - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface PermanentRemoteValueMapping

-
-
All Superinterfaces:
RemoteValueMapping
-
-
-
-
public interface PermanentRemoteValueMapping
extends RemoteValueMapping
- - -

-A RemoteValueMapping that outlives suspend/resume cycle of debugger. - It represents both remote pointer table and local property caches. - The remote table should be explicitly deleted when the mapping is no longer used. - The table has a unique id. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- RelayOkdelete(GenericCallback<java.lang.Void> callback, - SyncCallback syncCallback) - -
-          Asynchronously deletes mapping on remote VM.
- JsEvaluateContextgetEvaluateContext() - -
-          Returns JsEvaluateContext that is tied with this RemoteValueMapping.
- java.lang.StringgetId() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.RemoteValueMapping
clearCaches
-  -

- - - - - - - - -
-Method Detail
- -

-getId

-
-java.lang.String getId()
-
-
-
-
-
-
-
-
-
- -

-delete

-
-RelayOk delete(GenericCallback<java.lang.Void> callback,
-               SyncCallback syncCallback)
-
-
Asynchronously deletes mapping on remote VM. No values from this RemoteValueMapping - must be used after this call. -

-

-
-
-
-
-
-
-
- -

-getEvaluateContext

-
-JsEvaluateContext getEvaluateContext()
-
-
Returns JsEvaluateContext that is tied with this RemoteValueMapping. - By default all evaluate result values will use this RemoteValueMapping. - (This can be overriden by EvaluateToMappingExtension). -

-

-
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.Factory.html deleted file mode 100644 index f000c0fe..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.Factory.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - -WipBackend.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBackend.Factory

-
-
Enclosing interface:
WipBackend
-
-
-
-
public static interface WipBackend.Factory
- - -

-Used to dynamically instantiate WipBackend. Instance of WipBackend.Factory should be - available via ClassLoader. -

- -

-


- -

- - - - - - - - - - - - -
-Method Summary
- WipBackendcreate() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-create

-
-WipBackend create()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.html deleted file mode 100644 index 8a7af28e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBackend.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - -WipBackend - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBackend

-
-
-
public interface WipBackend
- - -

-Abstract interface to WIP implementation, that is delivered in a separate library. - It allows to have several versions of implementation in the system at the same time, - which may be needed because WIP is not stable yet and is evolving quite rapidly. -

- A particular set-up should choose it's own way to get backed instances. For example - Eclipse may use its extension point mechanism. Other frameworks can dynamically instantiate - WipBackend.Factory. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceWipBackend.Factory - -
-          Used to dynamically instantiate WipBackend.
-  - - - - - - - - - - - - - - - -
-Method Summary
- java.lang.StringgetDescription() - -
-           
- java.lang.StringgetId() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getId

-
-java.lang.String getId()
-
-
- -
Returns:
a unique name of backend implementation
-
-
-
- -

-getDescription

-
-java.lang.String getDescription()
-
-
- -
Returns:
a human-readable implementation description that should help to tell what protocol - version it supports
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.WipTabConnector.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.WipTabConnector.html deleted file mode 100644 index bf0729b8..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.WipTabConnector.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - -WipBrowser.WipTabConnector - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBrowser.WipTabConnector

-
-
Enclosing interface:
WipBrowser
-
-
-
-
public static interface WipBrowser.WipTabConnector
- - -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- WipBrowserTabattach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
- java.lang.StringgetTitle() - -
-           
- java.lang.StringgetUrl() - -
-           
- booleanisAlreadyAttached() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getTitle

-
-java.lang.String getTitle()
-
-
-
-
-
-
- -

-getUrl

-
-java.lang.String getUrl()
-
-
- -
Returns:
tab url that should be shown to user to let him select one tab from list
-
-
-
- -

-isAlreadyAttached

-
-boolean isAlreadyAttached()
-
-
- -
Returns:
true if the tab is already attached at this moment
-
-
-
- -

-attach

-
-WipBrowserTab attach(TabDebugEventListener listener)
-                     throws java.io.IOException
-
-
Attaches to the related tab debugger. -

-

-
Parameters:
listener - to report the debug events to -
Returns:
null if operation failed -
Throws: -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.html deleted file mode 100644 index 2eb0045d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowser.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -WipBrowser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBrowser

-
-
-
public interface WipBrowser
- - -

-WIP interface to browser similar to Browser. -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceWipBrowser.WipTabConnector - -
-           
-  - - - - - - - - - - - -
-Method Summary
- java.util.List<? extends WipBrowser.WipTabConnector>getTabs(WipBackend backend) - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getTabs

-
-java.util.List<? extends WipBrowser.WipTabConnector> getTabs(WipBackend backend)
-                                                             throws java.io.IOException
-
-
-
Parameters:
backend - wip implementation -
Throws: -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.LoggerFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.LoggerFactory.html deleted file mode 100644 index bf5ac8de..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.LoggerFactory.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - -WipBrowserFactory.LoggerFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBrowserFactory.LoggerFactory

-
-
Enclosing interface:
WipBrowserFactory
-
-
-
-
public static interface WipBrowserFactory.LoggerFactory
- - -

-


- -

- - - - - - - - - - - - - - - - -
-Method Summary
- ConnectionLoggernewBrowserConnectionLogger() - -
-           
- ConnectionLoggernewTabConnectionLogger() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-newBrowserConnectionLogger

-
-ConnectionLogger newBrowserConnectionLogger()
-
-
-
-
-
-
- -

-newTabConnectionLogger

-
-ConnectionLogger newTabConnectionLogger()
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.html deleted file mode 100644 index f9e3d063..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserFactory.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - -WipBrowserFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBrowserFactory

-
-
-
public interface WipBrowserFactory
- - -

-A factory for connections via WebInspector protocol (WIP). -

- -

-


- -

- - - - - - - - - - - -
-Nested Class Summary
-static interfaceWipBrowserFactory.LoggerFactory - -
-           
- - - - - - - - - - -
-Field Summary
-static WipBrowserFactoryINSTANCE - -
-           
-  - - - - - - - - - - - -
-Method Summary
- WipBrowsercreateBrowser(java.net.InetSocketAddress socketAddress, - WipBrowserFactory.LoggerFactory connectionLoggerFactory) - -
-           
-  -

- - - - - - - - -
-Field Detail
- -

-INSTANCE

-
-static final WipBrowserFactory INSTANCE
-
-
-
-
- - - - - - - - -
-Method Detail
- -

-createBrowser

-
-WipBrowser createBrowser(java.net.InetSocketAddress socketAddress,
-                         WipBrowserFactory.LoggerFactory connectionLoggerFactory)
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserTab.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserTab.html deleted file mode 100644 index ffadb2ee..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipBrowserTab.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -WipBrowserTab - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipBrowserTab

-
-
-
public interface WipBrowserTab
- - -

-An abstraction of a remote Browser tab. Each browser tab contains - a Javascript Virtual Machine. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- WipBrowsergetBrowser() - -
-           
- WipJavascriptVmgetJavascriptVm() - -
-           
- java.lang.StringgetUrl() - -
-           
-  -

- - - - - - - - -
-Method Detail
- -

-getBrowser

-
-WipBrowser getBrowser()
-
-
- -
Returns:
the "parent" Browser instance
-
-
-
- -

-getJavascriptVm

-
-WipJavascriptVm getJavascriptVm()
-
-
- -
Returns:
JavaScript VM representation of this tab
-
-
-
- -

-getUrl

-
-java.lang.String getUrl()
-
-
- -
Returns:
a URL of the corresponding browser tab
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipJavascriptVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipJavascriptVm.html deleted file mode 100644 index edf980b4..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/WipJavascriptVm.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - -WipJavascriptVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.chromium.sdk.wip -
-Interface WipJavascriptVm

-
-
All Superinterfaces:
JavascriptVm
-
-
-
-
public interface WipJavascriptVm
extends JavascriptVm
- - -

-WIP-specific extension to JavascriptVm. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from interface org.chromium.sdk.JavascriptVm
JavascriptVm.BreakpointCallback, JavascriptVm.ExceptionCatchMode, JavascriptVm.ListBreakpointsCallback, JavascriptVm.ScriptsCallback, JavascriptVm.SuspendCallback
-  - - - - - - - - - - - - - - - - -
-Method Summary
- PermanentRemoteValueMappingcreatePermanentValueMapping(java.lang.String id) - -
-          Creates new PermanentRemoteValueMapping.
- EvaluateToMappingExtensiongetEvaluateWithDestinationMappingExtension() - -
-           
- - - - - - - -
Methods inherited from interface org.chromium.sdk.JavascriptVm
detach, enableBreakpoints, getBreakpointTypeExtension, getFunctionScopeExtension, getIgnoreCountBreakpointExtension, getRestartFrameExtension, getScripts, getVersion, isAttached, listBreakpoints, setBreakOnException, setBreakpoint, suspend
-  -

- - - - - - - - -
-Method Detail
- -

-createPermanentValueMapping

-
-PermanentRemoteValueMapping createPermanentValueMapping(java.lang.String id)
-
-
Creates new PermanentRemoteValueMapping. If the groups with the - same id already exists, another copy of local caches will be created which - might be undesired result. It is user's responsibility to choose unique group id. -

-

-
-
-
-
-
-
-
- -

-getEvaluateWithDestinationMappingExtension

-
-EvaluateToMappingExtension getEvaluateWithDestinationMappingExtension()
-
-
-
-
-
- -
Returns:
extension to evaluate operations that supports RemoteValueMapping; not null
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/EvaluateToMappingExtension.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/EvaluateToMappingExtension.html deleted file mode 100644 index cca54494..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/EvaluateToMappingExtension.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.EvaluateToMappingExtension - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.EvaluateToMappingExtension

-
- - - - - - - - - -
-Packages that use EvaluateToMappingExtension
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of EvaluateToMappingExtension in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return EvaluateToMappingExtension
- EvaluateToMappingExtensionWipJavascriptVm.getEvaluateWithDestinationMappingExtension() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/PermanentRemoteValueMapping.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/PermanentRemoteValueMapping.html deleted file mode 100644 index a1d4e75e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/PermanentRemoteValueMapping.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.PermanentRemoteValueMapping - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.PermanentRemoteValueMapping

-
- - - - - - - - - -
-Packages that use PermanentRemoteValueMapping
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of PermanentRemoteValueMapping in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return PermanentRemoteValueMapping
- PermanentRemoteValueMappingWipJavascriptVm.createPermanentValueMapping(java.lang.String id) - -
-          Creates new PermanentRemoteValueMapping.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.Factory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.Factory.html deleted file mode 100644 index 305b9bad..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.Factory.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBackend.Factory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBackend.Factory

-
-No usage of org.chromium.sdk.wip.WipBackend.Factory -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.html deleted file mode 100644 index 9c2498f9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBackend.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBackend - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBackend

-
- - - - - - - - - -
-Packages that use WipBackend
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBackend in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return WipBackend
- WipBackendWipBackend.Factory.create() - -
-           
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type WipBackend
- java.util.List<? extends WipBrowser.WipTabConnector>WipBrowser.getTabs(WipBackend backend) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.WipTabConnector.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.WipTabConnector.html deleted file mode 100644 index a1402575..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.WipTabConnector.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBrowser.WipTabConnector - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBrowser.WipTabConnector

-
- - - - - - - - - -
-Packages that use WipBrowser.WipTabConnector
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBrowser.WipTabConnector in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return types with arguments of type WipBrowser.WipTabConnector
- java.util.List<? extends WipBrowser.WipTabConnector>WipBrowser.getTabs(WipBackend backend) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.html deleted file mode 100644 index cc782f92..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowser.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBrowser - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBrowser

-
- - - - - - - - - -
-Packages that use WipBrowser
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBrowser in org.chromium.sdk.wip
-  -

- - - - - - - - - - - - - -
Methods in org.chromium.sdk.wip that return WipBrowser
- WipBrowserWipBrowserFactory.createBrowser(java.net.InetSocketAddress socketAddress, - WipBrowserFactory.LoggerFactory connectionLoggerFactory) - -
-           
- WipBrowserWipBrowserTab.getBrowser() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.LoggerFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.LoggerFactory.html deleted file mode 100644 index 611b7a05..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.LoggerFactory.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBrowserFactory.LoggerFactory

-
- - - - - - - - - -
-Packages that use WipBrowserFactory.LoggerFactory
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBrowserFactory.LoggerFactory in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip with parameters of type WipBrowserFactory.LoggerFactory
- WipBrowserWipBrowserFactory.createBrowser(java.net.InetSocketAddress socketAddress, - WipBrowserFactory.LoggerFactory connectionLoggerFactory) - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.html deleted file mode 100644 index 192562ff..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserFactory.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBrowserFactory - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBrowserFactory

-
- - - - - - - - - -
-Packages that use WipBrowserFactory
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBrowserFactory in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Fields in org.chromium.sdk.wip declared as WipBrowserFactory
-static WipBrowserFactoryWipBrowserFactory.INSTANCE - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserTab.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserTab.html deleted file mode 100644 index 33197dea..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipBrowserTab.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipBrowserTab - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipBrowserTab

-
- - - - - - - - - -
-Packages that use WipBrowserTab
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipBrowserTab in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return WipBrowserTab
- WipBrowserTabWipBrowser.WipTabConnector.attach(TabDebugEventListener listener) - -
-          Attaches to the related tab debugger.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipJavascriptVm.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipJavascriptVm.html deleted file mode 100644 index 412759cb..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/class-use/WipJavascriptVm.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -Uses of Interface org.chromium.sdk.wip.WipJavascriptVm - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Interface
org.chromium.sdk.wip.WipJavascriptVm

-
- - - - - - - - - -
-Packages that use WipJavascriptVm
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - -
-Uses of WipJavascriptVm in org.chromium.sdk.wip
-  -

- - - - - - - - - -
Methods in org.chromium.sdk.wip that return WipJavascriptVm
- WipJavascriptVmWipBrowserTab.getJavascriptVm() - -
-           
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-frame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-frame.html deleted file mode 100644 index 37d9abf3..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-frame.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - -org.chromium.sdk.wip - - - - - - - - - - - -org.chromium.sdk.wip - - - - -
-Interfaces  - -
-EvaluateToMappingExtension -
-PermanentRemoteValueMapping -
-WipBackend -
-WipBackend.Factory -
-WipBrowser -
-WipBrowser.WipTabConnector -
-WipBrowserFactory -
-WipBrowserFactory.LoggerFactory -
-WipBrowserTab -
-WipJavascriptVm
- - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-summary.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-summary.html deleted file mode 100644 index 0518ae88..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-summary.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - -org.chromium.sdk.wip - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-

-Package org.chromium.sdk.wip -

-Contains all WIP-specific interfaces. -

-See: -
-          Description -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Interface Summary
EvaluateToMappingExtensionAn extension to evaluate methods, that allows to specify RemoteValueMapping - as an additional argument 'targetMapping'.
PermanentRemoteValueMappingA RemoteValueMapping that outlives suspend/resume cycle of debugger.
WipBackendAbstract interface to WIP implementation, that is delivered in a separate library.
WipBackend.FactoryUsed to dynamically instantiate WipBackend.
WipBrowserWIP interface to browser similar to Browser.
WipBrowser.WipTabConnector 
WipBrowserFactoryA factory for connections via WebInspector protocol (WIP).
WipBrowserFactory.LoggerFactory 
WipBrowserTabAn abstraction of a remote Browser tab.
WipJavascriptVmWIP-specific extension to JavascriptVm.
-  - -

-

-Package org.chromium.sdk.wip Description -

- -

-Contains all WIP-specific interfaces. WIP implementation is currently experimental. - These interfaces are subject to change. -

- -

-

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-tree.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-tree.html deleted file mode 100644 index 407e54c9..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-tree.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -org.chromium.sdk.wip Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package org.chromium.sdk.wip -

-
-
-
Package Hierarchies:
All Packages
-
-

-Interface Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-use.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-use.html deleted file mode 100644 index 573c480a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/org/chromium/sdk/wip/package-use.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - -Uses of Package org.chromium.sdk.wip - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Uses of Package
org.chromium.sdk.wip

-
- - - - - - - - - -
-Packages that use org.chromium.sdk.wip
org.chromium.sdk.wipContains all WIP-specific interfaces. 
-  -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Classes in org.chromium.sdk.wip used by org.chromium.sdk.wip
EvaluateToMappingExtension - -
-          An extension to evaluate methods, that allows to specify RemoteValueMapping - as an additional argument 'targetMapping'.
PermanentRemoteValueMapping - -
-          A RemoteValueMapping that outlives suspend/resume cycle of debugger.
WipBackend - -
-          Abstract interface to WIP implementation, that is delivered in a separate library.
WipBrowser - -
-          WIP interface to browser similar to Browser.
WipBrowser.WipTabConnector - -
-           
WipBrowserFactory - -
-          A factory for connections via WebInspector protocol (WIP).
WipBrowserFactory.LoggerFactory - -
-           
WipBrowserTab - -
-          An abstraction of a remote Browser tab.
WipJavascriptVm - -
-          WIP-specific extension to JavascriptVm.
-  -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-frame.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-frame.html deleted file mode 100644 index 4dff8777..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-frame.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -Overview List - - - - - - - - - - - - - - - -
-
- - - - - -
All Classes -

- -Packages -
-org.chromium.sdk -
-org.chromium.sdk.util -
-org.chromium.sdk.wip -
-

- -

-  - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-summary.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-summary.html deleted file mode 100644 index a728eeba..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-summary.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - -Overview - - - - - - - - - - - - -


- - - - - - - - - - - - - - - -
- -
- - - -
- - - - - - - - - - - - - - - - - -
-Packages
org.chromium.sdkMain package of ChromDevTools SDK API.
org.chromium.sdk.util 
org.chromium.sdk.wipContains all WIP-specific interfaces.
- -


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-tree.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-tree.html deleted file mode 100644 index 27d226ea..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/overview-tree.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - -Class Hierarchy - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For All Packages

-
-
-
Package Hierarchies:
org.chromium.sdk, org.chromium.sdk.util, org.chromium.sdk.wip
-
-

-Class Hierarchy -

- -

-Interface Hierarchy -

- -

-Enum Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/package-list b/chromedevtools/plugins/org.chromium.sdk/javadocs/package-list deleted file mode 100644 index d478b6f1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/package-list +++ /dev/null @@ -1,3 +0,0 @@ -org.chromium.sdk -org.chromium.sdk.util -org.chromium.sdk.wip diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/resources/inherit.gif b/chromedevtools/plugins/org.chromium.sdk/javadocs/resources/inherit.gif deleted file mode 100644 index c814867a..00000000 Binary files a/chromedevtools/plugins/org.chromium.sdk/javadocs/resources/inherit.gif and /dev/null differ diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/serialized-form.html b/chromedevtools/plugins/org.chromium.sdk/javadocs/serialized-form.html deleted file mode 100644 index 26e1e70b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/serialized-form.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - -Serialized Form - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Serialized Form

-
-
- - - - - -
-Package org.chromium.sdk
- -

- - - - - -
-Class org.chromium.sdk.InvalidContextException extends java.lang.RuntimeException implements Serializable
- -

- -

- - - - - -
-Class org.chromium.sdk.UnsupportedVersionException extends java.lang.Exception implements Serializable
- -

-serialVersionUID: 1L - -

- - - - - -
-Serialized Fields
- -

-localVersion

-
-Version localVersion
-
-
-
-
-
-

-remoteVersion

-
-Version remoteVersion
-
-
-
-
-
- - - - - -
-Package org.chromium.sdk.util
- -

- - - - - -
-Class org.chromium.sdk.util.MethodIsBlockingException extends java.lang.RuntimeException implements Serializable
- -

- -

- - - - - -
-Class org.chromium.sdk.util.SignalRelay.AlreadySignalledException extends java.lang.Exception implements Serializable
- -

- -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/chromedevtools/plugins/org.chromium.sdk/javadocs/stylesheet.css b/chromedevtools/plugins/org.chromium.sdk/javadocs/stylesheet.css deleted file mode 100644 index 6ea9e516..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/javadocs/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF; color:#000000 } - -/* Headings */ -h1 { font-size: 145% } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ -.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } -.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ -.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} - diff --git a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/AUTHORS.txt b/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/AUTHORS.txt deleted file mode 100755 index f5ff4956..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/AUTHORS.txt +++ /dev/null @@ -1 +0,0 @@ -Fang Yidong \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/LICENSE.txt b/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/LICENSE.txt deleted file mode 100755 index 78f90c9b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/LICENSE.txt +++ /dev/null @@ -1,162 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, -and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the -copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other -entities that control, are controlled by, or are under common control -with that entity. For the purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management -of such entity, whether by contract or otherwise, or (ii) ownership of -fifty percent (50%) or more of the outstanding shares, or (iii) beneficial -ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, -including but not limited to software source code, documentation source, -and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that is -included in or attached to the work (an example is provided in the Appendix -below). - -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial -revisions, annotations, elaborations, or other modifications represent, -as a whole, an original work of authorship. For the purposes of this License, -Derivative Works shall not include works that remain separable from, or merely -link (or bind by name) to the interfaces of, the Work and Derivative Works -thereof. - -"Contribution" shall mean any work of authorship, including the original -version of the Work and any modifications or additions to that Work or -Derivative Works thereof, that is intentionally submitted to Licensor for -inclusion in the Work by the copyright owner or by an individual or Legal -Entity authorized to submit on behalf of the copyright owner. For the purposes -of this definition, "submitted" means any form of electronic, verbal, or -written communication sent to the Licensor or its representatives, including -but not limited to communication on electronic mailing lists, source code -control systems, and issue tracking systems that are managed by, or on behalf -of, the Licensor for the purpose of discussing and improving the Work, but -excluding communication that is conspicuously marked or otherwise designated -in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, -non-exclusive, no-charge, royalty-free, irrevocable copyright license to -reproduce, prepare Derivative Works of, publicly display, publicly perform, -sublicense, and distribute the Work and such Derivative Works in Source or -Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, -non-exclusive, no-charge, royalty-free, irrevocable (except as stated in -this section) patent license to make, have made, use, offer to sell, sell, -import, and otherwise transfer the Work, where such license applies only -to those patent claims licensable by such Contributor that are necessarily -infringed by their Contribution(s) alone or by combination of their -Contribution(s) with the Work to which such Contribution(s) was submitted. -If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Work or a Contribution -incorporated within the Work constitutes direct or contributory patent -infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, -and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy -of this License; and - - 2. You must cause any modified files to carry prominent notices stating that -You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You -distribute, all copyright, patent, trademark, and attribution notices from -the Source form of the Work, excluding those notices that do not pertain to -any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part of -the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the -Derivative Works, if and wherever such third-party notices normally appear. -The contents of the NOTICE file are for informational purposes only and do -not modify the License. You may add Your own attribution notices within -Derivative Works that You distribute, alongside or as an addendum to the -NOTICE text from the Work, provided that such additional attribution notices -cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as a -whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, -any Contribution intentionally submitted for inclusion in the Work by You -to the Licensor shall be under the terms and conditions of this License, -without any additional terms or conditions. Notwithstanding the above, -nothing herein shall supersede or modify the terms of any separate license -agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as -required for reasonable and customary use in describing the origin of the -Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A -PARTICULAR PURPOSE. You are solely responsible for determining the -appropriateness of using or redistributing the Work and assume any risks -associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other -commercial damages or losses), even if such Contributor has been advised of -the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such -obligations, You may act only on Your own behalf and on Your sole -responsibility, not on behalf of any other Contributor, and only if You agree -to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.Chromium b/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.Chromium deleted file mode 100644 index fb86cc9b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.Chromium +++ /dev/null @@ -1 +0,0 @@ -Project home: http://code.google.com/p/json-simple diff --git a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.txt b/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.txt deleted file mode 100755 index 71e84751..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/README.txt +++ /dev/null @@ -1,144 +0,0 @@ -Simple Java toolkit for JSON (JSON.simple) -========================================== - -1.Why the Simple Java toolkit (also named as JSON.simple) for JSON? - - When I use JSON as the data exchange format between the AJAX client and JSP - for the first time, what worry me mostly is how to encode Java strings and - numbers correctly in the server side so the AJAX client will receive a well - formed JSON data. When I looked into the 'JSON in Java' directory in JSON - website,I found that wrappers to JSONObject and JSONArray can be simpler, - due to the simplicity of JSON itself. So I wrote the JSON.simple package. - -2.Is it simple,really? - - I think so. Take an example: - - import org.json.simple.JSONObject; - - JSONObject obj=new JSONObject(); - obj.put("name","foo"); - obj.put("num",new Integer(100)); - obj.put("balance",new Double(1000.21)); - obj.put("is_vip",new Boolean(true)); - obj.put("nickname",null); - System.out.print(obj); - - Result: - {"nickname":null,"num":100,"balance":1000.21,"is_vip":true,"name":"foo"} - - The JSONObject.toString() will escape controls and specials correctly. - -3.How to use JSON.simple in JSP? - - Take an example in JSP: - - <%@page contentType="text/html; charset=UTF-8"%> - <%@page import="org.json.simple.JSONObject"%> - <% - JSONObject obj=new JSONObject(); - obj.put("name","foo"); - obj.put("num",new Integer(100)); - obj.put("balance",new Double(1000.21)); - obj.put("is_vip",new Boolean(true)); - obj.put("nickname",null); - out.print(obj); - out.flush(); - %> - - So the AJAX client will get the responseText. - -4.Some details about JSONObject? - - JSONObject inherits java.util.HashMap,so it don't have to worry about the - mapping things between keys and values. Feel free to use the Map methods - like get(), put(), and remove() and others. JSONObject.toString() will - combine key value pairs to get the JSON data string. Values will be escaped - into JSON quote string format if it's an instance of java.lang.String. Other - type of instance like java.lang.Number,java.lang.Boolean,null,JSONObject and - JSONArray will NOT escape, just take their java.lang.String.valueOf() result. - null value will be the JSON 'null' in the result. - - It's still correct if you put an instance of JSONObject or JSONArray into an - instance of JSONObject or JSONArray. Take the example about: - - JSONObject obj2=new JSONObject(); - obj2.put("phone","123456"); - obj2.put("zip","7890"); - obj.put("contact",obj2); - System.out.print(obj); - - Result: - {"nickname":null,"num":100,"contact":{"phone":"123456","zip":"7890"},"balance":1000.21,"is_vip":true,"name":"foo"} - - The method JSONObject.escape() is used to escape Java string into JSON quote - string. Controls and specials will be escaped correctly into \b,\f,\r,\n,\t, - \",\\,\/,\uhhhh. - -5.Some detail about JSONArray? - - org.json.simple.JSONArray inherits java.util.ArrayList. Feel free to use the - List methods like get(),add(),remove(),iterator() and so on. The rules of - JSONArray.toString() is similar to JSONObject.toString(). Here's the example: - - import org.json.simple.JSONArray; - - JSONArray array=new JSONArray(); - array.add("hello"); - array.add(new Integer(123)); - array.add(new Boolean(false)); - array.add(null); - array.add(new Double(123.45)); - array.add(obj2);//see above - System.out.print(array); - - Result: - ["hello",123,false,null,123.45,{"phone":"123456","zip":"7890"}] - -6.What is JSONValue for? - - org.json.simple.JSONValue is use to parse JSON data into Java Object. - In JSON, the topmost entity is JSON value, not the JSON object. But - it's not necessary to wrap JSON string,boolean,number and null again, - for the Java has already had the according classes: java.lang.String, - java.lang.Boolean,java.lang.Number and null. The mapping is: - - JSON Java - ------------------------------------------------ - string <=> java.lang.String - number <=> java.lang.Number - true|false <=> java.lang.Boolean - null <=> null - array <=> org.json.simple.JSONArray - object <=> org.json.simple.JSONObject - ------------------------------------------------ - - JSONValue has only one kind of method, JSONValue.parse(), which receives - a java.io.Reader or java.lang.String. Return type of JSONValue.parse() - is according to the mapping above. If the input is incorrect in syntax or - there's exceptions during the parsing, I choose to return null, ignoring - the exception: I have no idea if it's a serious implementaion, but I think - it's convenient to the user. - - Here's the example: - - String s="[0,{\"1\":{\"2\":{\"3\":{\"4\":[5,{\"6\":7}]}}}}]"; - Object obj=JSONValue.parse(s); - JSONArray array=(JSONArray)obj; - System.out.println(array.get(1)); - JSONObject obj2=(JSONObject)array.get(1); - System.out.println(obj2.get("1")); - - Result: - {"1":{"2":{"3":{"4":[5,{"6":7}]}}}} - {"2":{"3":{"4":[5,{"6":7}]}}} - -7.About the author. - - I'm a Java EE developer on Linux. - I'm working on web systems and information retrieval systems. - I also develop 3D games and Flash games. - - You can contact me through: - Fang Yidong - Fang Yidong diff --git a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/json_simple-1.1.jar b/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/json_simple-1.1.jar deleted file mode 100755 index f395f414..00000000 Binary files a/chromedevtools/plugins/org.chromium.sdk/lib/json_simple/json_simple-1.1.jar and /dev/null differ diff --git a/chromedevtools/plugins/org.chromium.sdk/pom.xml b/chromedevtools/plugins/org.chromium.sdk/pom.xml deleted file mode 100644 index e4157a8d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.chromium.chromedevtools - org.chromium.parent - 0.3.9-SNAPSHOT - ../../pom.xml - - - org.chromium.sdk - eclipse-plugin - - org.chromium.sdk - org.chromium.sdk - - diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java deleted file mode 100644 index d45156a5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.liveeditprotocol; - -/** - * An accessor to dynamic implementation of LiveEdit protocol parser. Should be replaceable with - * a similar class that provides access to generated parser implementation. - */ -public class LiveEditProtocolParserAccess { - public static LiveEditProtocolParser get() { - return PARSER; - } - - private static final LiveEditProtocolParser PARSER = - LiveEditDynamicParser.create().getParserRoot(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java deleted file mode 100644 index bce6df0c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.shellprotocol.tools.protocol.input; - -/** - * An accessor to dynamic implementation of DevTools protocol parser. Should be replaceable with - * a similar class that provides access to generated parser implementation. - */ -public class ToolsProtocolParserAccess { - public static ToolsProtocolParser get() { - return PARSER; - } - - private static final ToolsProtocolParser PARSER = - DynamicToolsProtocolParser.createDynamic().getParserRoot(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java deleted file mode 100644 index 2755f888..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.v8native.protocol.input; - -/** - * An accessor to dynamic implementation of a v8 protocol parser. Should be replaceable with - * a similar class that provides access to generated parser implementation. - */ -public class V8ProtocolParserAccess { - public static V8NativeProtocolParser get() { - return PARSER; - } - - private static final V8NativeProtocolParser PARSER = V8DynamicParser.create().getParserRoot(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_all_static_parsers.launch b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_all_static_parsers.launch deleted file mode 100644 index 57e1ab0f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_all_static_parsers.launch +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_liveedit.launch b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_liveedit.launch deleted file mode 100644 index f2a05343..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_liveedit.launch +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_v8.launch b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_v8.launch deleted file mode 100644 index 953e0267..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/generate_static_parser_v8.launch +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/AllProtocolParsersGenerator.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/AllProtocolParsersGenerator.java deleted file mode 100644 index 129fedef..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/AllProtocolParsersGenerator.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal; - -import org.chromium.sdk.internal.liveeditprotocol.LiveEditParserGenerator; -import org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsProtocolParserGenerator; -import org.chromium.sdk.internal.v8native.protocol.input.V8ParserGenerator; - -/** - * A main class that generates all protocol static parsers (except tests). - */ -public class AllProtocolParsersGenerator { - public static void main(String[] args) { - LiveEditParserGenerator.main(args); - ToolsProtocolParserGenerator.main(args); - V8ParserGenerator.main(args); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditDynamicParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditDynamicParser.java deleted file mode 100644 index 5f54183f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditDynamicParser.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.liveeditprotocol; - -import java.util.Arrays; -import java.util.Collections; - -import org.chromium.sdk.internal.liveeditprotocol.LiveEditResult; -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl; - -/** - * A dynamic implementation of a v8 protocol parser. - */ -public class LiveEditDynamicParser { - public static DynamicParserImpl create() { - try { - return new DynamicParserImpl(LiveEditProtocolParser.class, - Arrays.asList(new Class[] { - LiveEditResult.class, - LiveEditResult.OldTreeNode.class, - LiveEditResult.NewTreeNode.class, - LiveEditResult.Positions.class, - LiveEditResult.TextualDiff.class, - }), - Collections.>emptyList(), false); - } catch (JsonProtocolModelParseException e) { - throw new RuntimeException(e); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditParserGenerator.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditParserGenerator.java deleted file mode 100644 index 985d9592..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/liveeditprotocol/LiveEditParserGenerator.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.liveeditprotocol; - -import org.chromium.sdk.internal.protocolparser.dynamicimpl.ParserGeneratorBase; - -/** - * A main class that generates V8 protocol static parser implementation. - */ -public class LiveEditParserGenerator extends ParserGeneratorBase { - public static void main(String[] args) { - mainImpl(args, createConfiguration()); - } - - public static GenerateConfiguration createConfiguration() { - return new GenerateConfiguration("org.chromium.sdk.internal.liveeditprotocol", - "GeneratedLiveEditProtocolParser", LiveEditDynamicParser.create()); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/BaseHandlersLibrary.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/BaseHandlersLibrary.java deleted file mode 100644 index ede46d63..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/BaseHandlersLibrary.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.chromium.sdk.internal.protocolparser.AnyObjectBased; -import org.chromium.sdk.internal.protocolparser.JsonObjectBased; -import org.chromium.sdk.internal.protocolparser.JsonSubtype; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.json.simple.JSONObject; - -/** - * Contains dynamic proxy method handlers for several well-known methods. - */ -class BaseHandlersLibrary { - public static BaseHandlersLibrary INSTANCE; - - public Map getAllHandlers() { - return method2Handler; - } - - /** - * Generates Java implementation of standard methods of JSON type class (if needed): - * {@link JsonObjectBased#getUnderlyingObject()}, - * {@link AnyObjectBased#getUnderlyingObject()} and {@link JsonSubtype#getSuper()} - */ - public static void writeBaseMethodsJava(ClassScope scope, TypeHandler typeHandler) { - Class typeClass = typeHandler.getTypeClass(); - - // Generated getUnderlyingObject method if it's in interface. - writeGetUnderlyingObject: { - Method method; - try { - method = typeClass.getMethod("getUnderlyingObject"); - } catch (SecurityException e) { - throw new RuntimeException(e); - } catch (NoSuchMethodException e) { - // Method not found, skip. - break writeGetUnderlyingObject; - } - - MethodHandler.writeMethodDeclarationJava(scope, method, Collections.emptyList()); - scope.startLine("{\n"); - scope.startLine(" return underlying;\n"); - scope.startLine("}\n"); - } - - typeHandler.getSubtypeSupport().writeGetSuperMethodJava(scope); - } - - private final Map method2Handler; - - private BaseHandlersLibrary(Method[] objectMethods) throws NoSuchMethodException { - method2Handler = new HashMap(); - for (Method m : objectMethods) { - method2Handler.put(m, new SelfCallMethodHanlder(m)); - } - fill(method2Handler, new GetJsonObjectMethodHaldler(), new GetAnyObjectMethodHaldler(), - new GetSuperMethodHaldler()); - } - - private static void fill(Map map, MethodHandlerBase ... handlers) { - for (MethodHandlerBase handler : handlers) { - map.put(handler.getMethod(), handler); - } - } - - private static abstract class MethodHandlerBase extends MethodHandler { - private final Method method; - MethodHandlerBase(Method method) { - this.method = method; - } - Method getMethod() { - return method; - } - } - - private static class SelfCallMethodHanlder extends MethodHandlerBase { - SelfCallMethodHanlder(Method method) { - super(method); - } - - @Override - Object handle(ObjectData objectData, Object[] args) - throws IllegalAccessException, InvocationTargetException { - return getMethod().invoke(objectData, args); - } - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - // Ignore. - } - } - - private static class GetJsonObjectMethodHaldler extends MethodHandlerBase { - GetJsonObjectMethodHaldler() throws NoSuchMethodException { - super(JsonObjectBased.class.getMethod("getUnderlyingObject")); - } - - @Override - JSONObject handle(ObjectData objectData, Object[] args) { - return (JSONObject) objectData.getUnderlyingObject(); - } - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - } - } - - private static class GetAnyObjectMethodHaldler extends MethodHandlerBase { - GetAnyObjectMethodHaldler() throws NoSuchMethodException { - super(AnyObjectBased.class.getMethod("getUnderlyingObject")); - } - - @Override - Object handle(ObjectData objectData, Object[] args) { - return objectData.getUnderlyingObject(); - } - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - } - } - - private static class GetSuperMethodHaldler extends MethodHandlerBase { - GetSuperMethodHaldler() throws NoSuchMethodException { - super(JsonSubtype.class.getMethod("getSuper")); - } - - @Override - Object handle(ObjectData objectData, Object[] args) { - return objectData.getSuperObjectData().getProxy(); - } - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - // Ignore. - } - } - - static final Method[] OBJECT_METHODS; - static { - try { - OBJECT_METHODS = new Method[] { - Object.class.getMethod("equals", Object.class), - Object.class.getMethod("hashCode"), - Object.class.getMethod("toString") - }; - } catch (NoSuchMethodException e) { - throw new RuntimeException(e); - } - } - - static { - try { - INSTANCE = new BaseHandlersLibrary(OBJECT_METHODS); - } catch (NoSuchMethodException e) { - throw new RuntimeException(e); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/DynamicParserImpl.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/DynamicParserImpl.java deleted file mode 100644 index bc00cc25..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/DynamicParserImpl.java +++ /dev/null @@ -1,1752 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.annotation.RetentionPolicy; -import java.lang.reflect.Method; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Proxy; -import java.lang.reflect.Type; -import java.lang.reflect.WildcardType; -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReferenceArray; - -import org.chromium.sdk.internal.protocolparser.FieldLoadStrategy; -import org.chromium.sdk.internal.protocolparser.JsonField; -import org.chromium.sdk.internal.protocolparser.JsonNullable; -import org.chromium.sdk.internal.protocolparser.JsonObjectBased; -import org.chromium.sdk.internal.protocolparser.JsonOptionalField; -import org.chromium.sdk.internal.protocolparser.JsonOverrideField; -import org.chromium.sdk.internal.protocolparser.JsonParserRoot; -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.JsonSubtype; -import org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting; -import org.chromium.sdk.internal.protocolparser.JsonType; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.GlobalScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.Util; -import org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; - -/** - * Java dynamic-proxy based implementation of {@link JsonProtocolParser}. It analyses - * interfaces with reflection and provides their implementation by {@link Proxy} factory. - * User-friendly 'root' interface is available by {@link #getParserRoot()} method. - * @param root user-provided type (see {@link JsonParserRoot}) - */ -public class DynamicParserImpl { - private final Map, TypeHandler> type2TypeHandler; - private final ParserRootImpl rootImpl; - - /** - * Constructs parser from a set of type interfaces. - */ - public DynamicParserImpl(Class parserRootClass, List> protocolInterfaces) - throws JsonProtocolModelParseException { - this(parserRootClass, protocolInterfaces, Collections.>emptyList()); - } - - /** - * Constructs parser from a set of type interfaces and a list of base packages. Type interfaces - * may reference to type interfaces from base packages. - * @param basePackages list of base packages in form of list of {@link DynamicParserImpl}'s - */ - public DynamicParserImpl(Class parserRootClass, - List> protocolInterfaces, - List> basePackages) throws JsonProtocolModelParseException { - this(parserRootClass, protocolInterfaces, basePackages, false); - } - - public DynamicParserImpl(Class parserRootClass, - List> protocolInterfaces, - List> basePackages, boolean strictMode) - throws JsonProtocolModelParseException { - type2TypeHandler = readTypes(protocolInterfaces, basePackages, strictMode); - rootImpl = new ParserRootImpl(parserRootClass, type2TypeHandler); - } - - public ROOT getParserRoot() { - return rootImpl.getInstance(); - } - - private static Map, TypeHandler> readTypes( - List> protocolInterfaces, - final List> basePackages, boolean strictMode) - throws JsonProtocolModelParseException { - ReadInterfacesSession session = - new ReadInterfacesSession(protocolInterfaces, basePackages, strictMode); - session.go(); - return session.getResult(); - } - - - private static class ReadInterfacesSession { - private final Map, TypeHandler> type2typeHandler; - private final List> basePackages; - private final boolean strictMode; - - final List> refs = new ArrayList>(); - final List subtypeCasters = - new ArrayList(); - - ReadInterfacesSession(List> protocolInterfaces, - List> basePackages, boolean strictMode) { - // Keep interfaces ordered to keep generated parser less random. - this.type2typeHandler = new LinkedHashMap, TypeHandler>(); - this.basePackages = basePackages; - this.strictMode = strictMode; - - for (Class typeClass : protocolInterfaces) { - if (type2typeHandler.containsKey(typeClass)) { - throw new IllegalArgumentException( - "Protocol interface duplicated " + typeClass.getName()); - } - type2typeHandler.put(typeClass, null); - } - } - - void go() throws JsonProtocolModelParseException { - // Create TypeHandler's. - for (Class typeClass : type2typeHandler.keySet()) { - TypeHandler typeHandler = createTypeHandler(typeClass); - type2typeHandler.put(typeClass, typeHandler); - } - - // Resolve cross-references. - for (RefImpl ref : refs) { - TypeHandler type = type2typeHandler.get(ref.typeClass); - if (type == null) { - throw new RuntimeException(); - } - ref.set(type); - } - - // Set subtype casters. - for (SubtypeCaster subtypeCaster : subtypeCasters) { - TypeHandler subtypeHandler = subtypeCaster.getSubtypeHandler(); - subtypeHandler.getSubtypeSupport().setSubtypeCaster(subtypeCaster); - } - - // Check subtype casters consistency. - for (TypeHandler type : type2typeHandler.values()) { - type.getSubtypeSupport().checkHasSubtypeCaster(); - } - - if (strictMode) { - for (TypeHandler type : type2typeHandler.values()) { - type.buildClosedNameSet(); - } - } - } - - Map, TypeHandler> getResult() { - return type2typeHandler; - } - - private TypeHandler createTypeHandler(Class typeClass) - throws JsonProtocolModelParseException { - if (!typeClass.isInterface()) { - throw new JsonProtocolModelParseException("Json model type should be interface: " + - typeClass.getName()); - } - - FieldProcessor fields = new FieldProcessor(typeClass); - - fields.go(); - - Map methodHandlerMap = fields.getMethodHandlerMap(); - methodHandlerMap.putAll(BaseHandlersLibrary.INSTANCE.getAllHandlers()); - - TypeHandler.EagerFieldParser eagerFieldParser = - new EagerFieldParserImpl(fields.getOnDemandHanlers()); - - RefToType superclassRef = getSuperclassRef(typeClass); - - boolean requiresJsonObject = fields.requiresJsonObject() || - JsonObjectBased.class.isAssignableFrom(typeClass); - - return new TypeHandler(typeClass, superclassRef, - fields.getFieldArraySize(), fields.getVolatileFields(), methodHandlerMap, - fields.getFieldLoaders(), - fields.getFieldConditions(), eagerFieldParser, fields.getAlgCasesData(), - requiresJsonObject, strictMode); - } - - private SlowParser getFieldTypeParser(Type type, boolean declaredNullable, - boolean isSubtyping, FieldLoadStrategy loadStrategy) - throws JsonProtocolModelParseException { - if (type instanceof Class) { - Class typeClass = (Class) type; - if (type == Long.class) { - nullableIsNotSupported(declaredNullable); - return LONG_PARSER.getNullable(); - } else if (type == Long.TYPE) { - nullableIsNotSupported(declaredNullable); - return LONG_PARSER.getNotNullable(); - } else if (type == Boolean.class) { - nullableIsNotSupported(declaredNullable); - return BOOLEAN_PARSER.getNullable(); - } else if (type == Boolean.TYPE) { - nullableIsNotSupported(declaredNullable); - return BOOLEAN_PARSER.getNotNullable(); - } else if (type == Float.class) { - nullableIsNotSupported(declaredNullable); - return FLOAT_PARSER.getNullable(); - } else if (type == Float.TYPE) { - nullableIsNotSupported(declaredNullable); - return FLOAT_PARSER.getNotNullable(); - } else if (type == Number.class) { - return NUMBER_PARSER.get(declaredNullable); - } else if (type == Void.class) { - nullableIsNotSupported(declaredNullable); - return VOID_PARSER; - } else if (type == String.class) { - return STRING_PARSER.get(declaredNullable); - } else if (type == Object.class) { - return OBJECT_PARSER.get(declaredNullable); - } else if (type == JSONObject.class) { - return JSON_PARSER.get(declaredNullable); - } else if (typeClass.isEnum()) { - Class enumTypeClass = (Class) typeClass; - return EnumParser.create(enumTypeClass, declaredNullable); - } else if (type2typeHandler.containsKey(typeClass)) { - } - RefToType ref = getTypeRef(typeClass); - if (ref != null) { - return createJsonParser(ref, declaredNullable, isSubtyping); - } - throw new JsonProtocolModelParseException("Method return type " + type + - " (simple class) not supported"); - } else if (type instanceof ParameterizedType) { - ParameterizedType parameterizedType = (ParameterizedType) type; - if (parameterizedType.getRawType() == List.class) { - Type argumentType = parameterizedType.getActualTypeArguments()[0]; - if (argumentType instanceof WildcardType) { - WildcardType wildcard = (WildcardType) argumentType; - if (wildcard.getLowerBounds().length == 0 && wildcard.getUpperBounds().length == 1) { - argumentType = wildcard.getUpperBounds()[0]; - } - } - SlowParser componentParser = - getFieldTypeParser(argumentType, false, false, loadStrategy); - return createArrayParser(componentParser, declaredNullable, loadStrategy); - } else { - throw new JsonProtocolModelParseException("Method return type " + type + - " (generic) not supported"); - } - } else { - throw new JsonProtocolModelParseException("Method return type " + type + " not supported"); - } - } - - private void nullableIsNotSupported(boolean declaredNullable) - throws JsonProtocolModelParseException { - if (declaredNullable) { - throw new JsonProtocolModelParseException("The type cannot be declared nullable"); - } - } - - private JsonTypeParser createJsonParser(RefToType type, boolean isNullable, - boolean isSubtyping) { - return new JsonTypeParser(type, isNullable, isSubtyping); - } - - private ArrayParser createArrayParser(SlowParser componentParser, - boolean isNullable, FieldLoadStrategy loadStrategy) { - if (loadStrategy == FieldLoadStrategy.LAZY) { - return new ArrayParser(componentParser, isNullable, ArrayParser.LAZY); - } else { - return new ArrayParser(componentParser, isNullable, ArrayParser.EAGER); - } - } - - private RefToType getTypeRef(final Class typeClass) { - if (type2typeHandler.containsKey(typeClass)) { - RefImpl result = new RefImpl(typeClass); - refs.add(result); - return result; - } - for (DynamicParserImpl baseParser : basePackages) { - TypeHandler typeHandler = baseParser.type2TypeHandler.get(typeClass); - if (typeHandler != null) { - final TypeHandler typeHandlerT = (TypeHandler) typeHandler; - return new RefToType() { - @Override - TypeHandler get() { - return typeHandlerT; - } - @Override - Class getTypeClass() { - return typeClass; - } - }; - } - } - return null; - } - - private RefToType getSuperclassRef(Class typeClass) - throws JsonProtocolModelParseException { - RefToType result = null; - for (Type interfc : typeClass.getGenericInterfaces()) { - if (interfc instanceof ParameterizedType == false) { - continue; - } - ParameterizedType parameterizedType = (ParameterizedType) interfc; - if (parameterizedType.getRawType() != JsonSubtype.class) { - continue; - } - Type param = parameterizedType.getActualTypeArguments()[0]; - if (param instanceof Class == false) { - throw new JsonProtocolModelParseException("Unexpected type of superclass " + param); - } - Class paramClass = (Class) param; - if (result != null) { - throw new JsonProtocolModelParseException("Already has superclass " + - result.getTypeClass().getName()); - } - result = getTypeRef(paramClass); - if (result == null) { - throw new JsonProtocolModelParseException("Unknown base class " + paramClass.getName()); - } - } - return result; - } - - class FieldProcessor { - private final Class typeClass; - - private final JsonType jsonTypeAnn; - private final List fieldLoaders = new ArrayList(2); - private final List onDemandHanlers = new ArrayList(); - private final Map methodHandlerMap = - new HashMap(); - private final FieldMap fieldMap = new FieldMap(); - private final List fieldConditions = new ArrayList(2); - private ManualAlgebraicCasesDataImpl manualAlgCasesData = null; - private AutoAlgebraicCasesDataImpl autoAlgCasesData = null; - private int fieldArraySize = 0; - private List volatileFields = new ArrayList(2); - private boolean requiresJsonObject = false; - - FieldProcessor(Class typeClass) throws JsonProtocolModelParseException { - this.typeClass = typeClass; - jsonTypeAnn = typeClass.getAnnotation(JsonType.class); - if (jsonTypeAnn == null) { - throw new JsonProtocolModelParseException("Not a json model type: " + typeClass); - } - } - - void go() throws JsonProtocolModelParseException { - for (Method m : typeClass.getDeclaredMethods()) { - try { - processMethod(m); - } catch (JsonProtocolModelParseException e) { - throw new JsonProtocolModelParseException("Problem with method " + m, e); - } - } - } - - private void processMethod(Method m) throws JsonProtocolModelParseException { - if (m.getParameterTypes().length != 0) { - throw new JsonProtocolModelParseException("No parameters expected in " + m); - } - JsonOverrideField overrideFieldAnn = m.getAnnotation(JsonOverrideField.class); - FieldConditionLogic fieldConditionLogic = FieldConditionLogic.readLogic(m); - String fieldName = checkAndGetJsonFieldName(m); - MethodHandler methodHandler; - - JsonSubtypeCasting jsonSubtypeCaseAnn = m.getAnnotation(JsonSubtypeCasting.class); - if (jsonSubtypeCaseAnn != null) { - if (fieldConditionLogic != null) { - throw new JsonProtocolModelParseException( - "Subtype condition annotation only works with field getter methods"); - } - if (overrideFieldAnn != null) { - throw new JsonProtocolModelParseException( - "Override annotation only works with field getter methods"); - } - - if (jsonTypeAnn.subtypesChosenManually()) { - if (manualAlgCasesData == null) { - manualAlgCasesData = new ManualAlgebraicCasesDataImpl(); - } - methodHandler = processManualSubtypeMethod(m, jsonSubtypeCaseAnn); - } else { - if (autoAlgCasesData == null) { - autoAlgCasesData = new AutoAlgebraicCasesDataImpl(); - } - if (jsonSubtypeCaseAnn.reinterpret()) { - throw new JsonProtocolModelParseException( - "Option 'reinterpret' is only available with 'subtypes chosen manually'"); - } - requiresJsonObject = true; - methodHandler = processAutomaticSubtypeMethod(m); - } - - } else { - requiresJsonObject = true; - methodHandler = processFieldGetterMethod(m, fieldConditionLogic, overrideFieldAnn, - fieldName); - } - methodHandlerMap.put(m, methodHandler); - } - - private MethodHandler processFieldGetterMethod(Method m, - FieldConditionLogic fieldConditionLogic, JsonOverrideField overrideFieldAnn, - String fieldName) throws JsonProtocolModelParseException { - MethodHandler methodHandler; - - FieldLoadStrategy loadStrategy; - if (m.getAnnotation(JsonField.class) == null) { - loadStrategy = FieldLoadStrategy.AUTO; - } else { - loadStrategy = m.getAnnotation(JsonField.class).loadStrategy(); - } - - JsonNullable nullableAnn = m.getAnnotation(JsonNullable.class); - SlowParser fieldTypeParser = getFieldTypeParser(m.getGenericReturnType(), - nullableAnn != null, false, loadStrategy); - if (fieldConditionLogic != null) { - fieldConditions.add(new FieldCondition(fieldName, fieldTypeParser.asQuickParser(), - fieldConditionLogic)); - } - if (overrideFieldAnn == null) { - fieldMap.localNames.add(fieldName); - } else { - fieldMap.overridenNames.add(fieldName); - } - - boolean isOptional = isOptionalField(m); - - if (fieldTypeParser.asQuickParser() != null) { - QuickParser quickParser = fieldTypeParser.asQuickParser(); - if (loadStrategy == FieldLoadStrategy.EAGER) { - methodHandler = createEagerLoadGetterHandler(fieldName, fieldTypeParser, isOptional); - } else { - methodHandler = createLazyQuickGetterHandler(quickParser, isOptional, fieldName); - } - } else { - if (loadStrategy == FieldLoadStrategy.LAZY) { - methodHandler = createLazyCachedGetterHandler(fieldName, fieldTypeParser, isOptional); - } else { - methodHandler = createEagerLoadGetterHandler(fieldName, fieldTypeParser, isOptional); - } - } - return methodHandler; - } - - private MethodHandler createLazyQuickGetterHandler(QuickParser quickParser, - boolean isOptional, String fieldName) { - LazyParseFieldMethodHandler onDemandHandler = new LazyParseFieldMethodHandler(quickParser, - isOptional, fieldName, typeClass); - onDemandHanlers.add(onDemandHandler); - return onDemandHandler; - } - - private MethodHandler createEagerLoadGetterHandler(String fieldName, - SlowParser fieldTypeParser, boolean isOptional) { - int fieldCode = allocateFieldInArray(); - FieldLoader fieldLoader = new FieldLoader(fieldCode, fieldName, fieldTypeParser, - isOptional); - fieldLoaders.add(fieldLoader); - return new PreparsedFieldMethodHandler(fieldCode, - fieldTypeParser.getValueFinisher(), fieldName); - } - - private MethodHandler createLazyCachedGetterHandler(String fieldName, - SlowParser fieldTypeParser, boolean isOptional) { - VolatileFieldBinding fieldBinding = allocateVolatileField(fieldTypeParser, false); - LazyCachedFieldMethodHandler lazyCachedHandler = - new LazyCachedFieldMethodHandler(fieldBinding, fieldTypeParser, isOptional, - fieldName, typeClass); - onDemandHanlers.add(lazyCachedHandler); - return lazyCachedHandler; - } - - private MethodHandler processAutomaticSubtypeMethod(Method m) - throws JsonProtocolModelParseException { - MethodHandler methodHandler; - if (m.getReturnType() == Void.TYPE) { - if (autoAlgCasesData.hasDefaultCase) { - throw new JsonProtocolModelParseException("Duplicate default case method: " + m); - } - autoAlgCasesData.hasDefaultCase = true; - methodHandler = RETURN_NULL_METHOD_HANDLER; - } else { - Class methodType = m.getReturnType(); - RefToType ref = getTypeRef(methodType); - if (ref == null) { - throw new JsonProtocolModelParseException("Unknown return type in " + m); - } - if (autoAlgCasesData.variantCodeFieldPos == -1) { - autoAlgCasesData.variantCodeFieldPos = allocateFieldInArray(); - autoAlgCasesData.variantValueFieldPos = allocateFieldInArray(); - } - final int algCode = autoAlgCasesData.subtypes.size(); - autoAlgCasesData.subtypes.add(ref); - final AutoSubtypeMethodHandler algMethodHandler = new AutoSubtypeMethodHandler( - autoAlgCasesData.variantCodeFieldPos, autoAlgCasesData.variantValueFieldPos, - algCode); - methodHandler = algMethodHandler; - - SubtypeCaster subtypeCaster = new SubtypeCaster(typeClass, ref) { - @Override - ObjectData getSubtypeObjectData(ObjectData objectData) { - return algMethodHandler.getFieldObjectData(objectData); - } - @Override - void writeJava(ClassScope scope, String expectedTypeName, String superTypeValueRef, - String resultRef) { - scope.startLine(expectedTypeName + " " + resultRef + " = " + superTypeValueRef + - "." + AutoAlgebraicCasesDataImpl.getAutoAlgFieldNameJava(algCode) + ";\n"); - } - }; - - subtypeCasters.add(subtypeCaster); - } - return methodHandler; - } - - - private MethodHandler processManualSubtypeMethod(final Method m, - JsonSubtypeCasting jsonSubtypeCaseAnn) throws JsonProtocolModelParseException { - - SlowParser fieldTypeParser = getFieldTypeParser(m.getGenericReturnType(), false, - !jsonSubtypeCaseAnn.reinterpret(), FieldLoadStrategy.AUTO); - - VolatileFieldBinding fieldInfo = allocateVolatileField(fieldTypeParser, true); - - if (!Arrays.asList(m.getExceptionTypes()).contains(JsonProtocolParseException.class)) { - throw new JsonProtocolModelParseException( - "Method should declare JsonProtocolParseException exception: " + m); - } - - final ManualSubtypeMethodHandler handler = new ManualSubtypeMethodHandler(fieldInfo, - fieldTypeParser); - JsonTypeParser parserAsJsonTypeParser = fieldTypeParser.asJsonTypeParser(); - if (parserAsJsonTypeParser != null && parserAsJsonTypeParser.isSubtyping()) { - SubtypeCaster subtypeCaster = new SubtypeCaster(typeClass, - parserAsJsonTypeParser.getType()) { - @Override - ObjectData getSubtypeObjectData(ObjectData baseObjectData) - throws JsonProtocolParseException { - ObjectData objectData = baseObjectData; - return handler.getSubtypeData(objectData); - } - @Override - void writeJava(ClassScope scope, String expectedTypeName, String superTypeValueRef, - String resultRef) { - scope.startLine(expectedTypeName + " " + resultRef + " = " + superTypeValueRef + - "." + m.getName() + "();\n"); - } - }; - manualAlgCasesData.subtypes.add(parserAsJsonTypeParser.getType()); - subtypeCasters.add(subtypeCaster); - } - - return handler; - } - - int getFieldArraySize() { - return fieldArraySize; - } - - List getVolatileFields() { - return volatileFields; - } - - TypeHandler.AlgebraicCasesData getAlgCasesData() { - if (jsonTypeAnn.subtypesChosenManually()) { - return manualAlgCasesData; - } else { - return autoAlgCasesData; - } - } - - List getFieldLoaders() { - return fieldLoaders; - } - - List getOnDemandHanlers() { - return onDemandHanlers; - } - - Map getMethodHandlerMap() { - return methodHandlerMap; - } - - List getFieldConditions() { - return fieldConditions; - } - - boolean requiresJsonObject() { - return requiresJsonObject; - } - - private int allocateFieldInArray() { - return fieldArraySize++; - } - - private VolatileFieldBinding allocateVolatileField(final SlowParser fieldTypeParser, - boolean internalType) { - int position = volatileFields.size(); - FieldTypeInfo fieldTypeInfo; - if (internalType) { - fieldTypeInfo = new FieldTypeInfo() { - @Override public void appendValueTypeNameJava(FileScope scope) { - fieldTypeParser.appendInternalValueTypeNameJava(scope); - } - }; - } else { - fieldTypeInfo = new FieldTypeInfo() { - @Override public void appendValueTypeNameJava(FileScope scope) { - fieldTypeParser.appendFinishedValueTypeNameJava(scope); - } - }; - } - VolatileFieldBinding binding = new VolatileFieldBinding(position, fieldTypeInfo); - volatileFields.add(binding); - return binding; - } - - private boolean isOptionalField(Method m) { - JsonOptionalField jsonOptionalFieldAnn = m.getAnnotation(JsonOptionalField.class); - return jsonOptionalFieldAnn != null; - } - - private String checkAndGetJsonFieldName(Method m) throws JsonProtocolModelParseException { - if (m.getParameterTypes().length != 0) { - throw new JsonProtocolModelParseException("Must have 0 parameters"); - } - JsonField fieldAnn = m.getAnnotation(JsonField.class); - if (fieldAnn != null) { - String jsonLiteralName = fieldAnn.jsonLiteralName(); - if (!jsonLiteralName.isEmpty()) { - return jsonLiteralName; - } - } - return m.getName(); - } - } - } - - private static class EagerFieldParserImpl extends TypeHandler.EagerFieldParser { - private final List onDemandHandlers; - - private EagerFieldParserImpl(List onDemandHandlers) { - this.onDemandHandlers = onDemandHandlers; - } - - @Override - void parseAllFields(ObjectData objectData) throws JsonProtocolParseException { - for (LazyHandler handler : onDemandHandlers) { - handler.parseEager(objectData); - } - } - @Override - void addAllFieldNames(Set output) { - for (LazyHandler handler : onDemandHandlers) { - output.add(handler.getFieldName()); - } - } - } - - private interface LazyHandler { - void parseEager(ObjectData objectData) throws JsonProtocolParseException; - String getFieldName(); - } - - private static class LazyParseFieldMethodHandler extends MethodHandler implements LazyHandler { - private final QuickParser quickParser; - private final boolean isOptional; - private final String fieldName; - private final Class typeClass; - - LazyParseFieldMethodHandler(QuickParser quickParser, boolean isOptional, String fieldName, - Class typeClass) { - this.quickParser = quickParser; - this.isOptional = isOptional; - this.fieldName = fieldName; - this.typeClass = typeClass; - } - - @Override - Object handle(ObjectData objectData, Object[] args) { - try { - return parse(objectData); - } catch (JsonProtocolParseException e) { - throw new ParseRuntimeException( - "On demand parsing failed for " + objectData.getUnderlyingObject(), e); - } - } - - @Override - public void parseEager(ObjectData objectData) throws JsonProtocolParseException { - parse(objectData); - } - - public Object parse(ObjectData objectData) throws JsonProtocolParseException { - Map properties = (JSONObject)objectData.getUnderlyingObject(); - Object value = properties.get(fieldName); - boolean hasValue; - if (value == null) { - hasValue = properties.containsKey(fieldName); - } else { - hasValue = true; - } - return parse(hasValue, value, objectData); - } - - public Object parse(boolean hasValue, Object value, ObjectData objectData) - throws JsonProtocolParseException { - if (hasValue) { - try { - return quickParser.parseValueQuick(value); - } catch (JsonProtocolParseException e) { - throw new JsonProtocolParseException("Failed to parse field '" + fieldName + - "' in type " + typeClass.getName(), e); - } - } else { - if (!isOptional) { - throw new JsonProtocolParseException("Field is not optional: " + fieldName + - " (in type " + typeClass.getName() + ")"); - } - return null; - } - } - - @Override - public String getFieldName() { - return fieldName; - } - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - writeMethodDeclarationJava(classScope, m, Collections.emptyList()); - classScope.startLine("{\n"); - - MethodScope scope = classScope.newMethodScope(); - - scope.indentRight(); - - scope.startLine(""); - quickParser.appendFinishedValueTypeNameJava(scope); - scope.append(" result;\n"); - - boolean wrap = quickParser.javaCodeThrowsException() || !isOptional; - if (wrap) { - scope.startLine("try {\n"); - scope.indentRight(); - } - - String valueRef = scope.newMethodScopedName("value"); - String hasValueRef = scope.newMethodScopedName("hasValue"); - Util.writeReadValueAndHasValue(scope, fieldName, "underlying", valueRef, hasValueRef); - scope.startLine("if (" + hasValueRef + ") {\n"); - scope.indentRight(); - if (quickParser.javaCodeThrowsException()) { - scope.startLine("try {\n"); - scope.indentRight(); - quickParser.writeParseQuickCode(scope, valueRef, "r1"); - scope.startLine("result = r1;\n"); - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Failed to parse field " + fieldName + " in type "); - scope.append(typeClass.getName() + "\", e);\n"); - scope.startLine("}\n"); - } else { - quickParser.writeParseQuickCode(scope, valueRef, "r1"); - scope.startLine("result = r1;\n"); - } - scope.indentLeft(); - scope.startLine("} else {\n"); - scope.indentRight(); - if (isOptional) { - scope.startLine("result = null;\n"); - } else { - scope.startLine("throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Field is not optional: " + fieldName + "\");\n"); - } - scope.indentLeft(); - scope.startLine("}\n"); - - if (wrap) { - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".implutil.CommonImpl.ParseRuntimeException(" + - "\"On demand parsing failed for \" + underlying, e);\n"); - scope.startLine("}\n"); - } - scope.startLine("return result;\n"); - scope.indentLeft(); - scope.startLine("}\n"); - } - } - - /** - * Basic implementation of the method that parses value on demand and store it for - * a future use. - */ - private static abstract class LazyCachedMethodHandlerBase extends MethodHandler { - private final VolatileFieldBinding fieldBinding; - - LazyCachedMethodHandlerBase(VolatileFieldBinding fieldBinding) { - this.fieldBinding = fieldBinding; - } - - @Override - Object handle(ObjectData objectData, Object[] args) { - try { - return handle(objectData); - } catch (JsonProtocolParseException e) { - throw new ParseRuntimeException( - "On demand parsing failed for " + objectData.getUnderlyingObject(), e); - } - } - - Object handle(ObjectData objectData) throws JsonProtocolParseException { - Object raw = handleRaw(objectData); - return finishRawValue(raw); - } - - protected abstract Object finishRawValue(Object raw); - - Object handleRaw(ObjectData objectData) throws JsonProtocolParseException { - AtomicReferenceArray atomicReferenceArray = objectData.getAtomicReferenceArray(); - - Object cachedValue = fieldBinding.get(atomicReferenceArray); - if (cachedValue != null) { - return cachedValue; - } - - Object parsedValue = parse(objectData); - - if (parsedValue != null) { - parsedValue = fieldBinding.setAndGet(atomicReferenceArray, parsedValue); - } - return parsedValue; - } - - protected abstract Object parse(ObjectData objectData) throws JsonProtocolParseException; - - protected VolatileFieldBinding getFieldBinding() { - return fieldBinding; - } - - protected abstract void writeReturnTypeJava(ClassScope scope, Method m); - - @Override - void writeMethodImplementationJava(ClassScope classScope, Method m) { - classScope.startLine("@Override public "); - writeReturnTypeJava(classScope, m); - classScope.append(" "); - appendMethodSignatureJava(classScope, m, Collections.emptyList()); - { - Type[] exceptions = m.getGenericExceptionTypes(); - if (exceptions.length > 0) { - classScope.append(" throws "); - for (int i = 0; i < exceptions.length; i++) { - if (i != 0) { - classScope.append(", "); - } - Util.writeJavaTypeName(exceptions[i], classScope.getStringBuilder()); - } - } - } - - MethodScope scope = classScope.newMethodScope(); - scope.append(" {\n"); - scope.indentRight(); - - classScope.startLine(""); - writeReturnTypeJava(classScope, m); - scope.append(" result = "); - getFieldBinding().writeGetExpressionJava(scope.getStringBuilder()); - scope.append(";\n"); - - scope.startLine("if (result != null) {\n"); - scope.startLine(" return result;\n"); - scope.startLine("}\n"); - - String parseResultRef = scope.newMethodScopedName("parseResult"); - writeParseJava(scope, parseResultRef); - - scope.startLine("if (" + parseResultRef + " != null) {\n"); - scope.indentRight(); - getFieldBinding().writeSetAndGetJava(scope, parseResultRef, "cachedResult"); - scope.startLine(parseResultRef + " = cachedResult;\n"); - scope.indentLeft(); - scope.startLine("}\n"); - - scope.startLine("return " + parseResultRef + ";\n"); - - scope.indentLeft(); - scope.startLine("}\n"); - } - - protected abstract void writeParseJava(MethodScope scope, String parseResultRef); - } - - private static class LazyCachedFieldMethodHandler extends LazyCachedMethodHandlerBase - implements LazyHandler { - private final SlowParser slowParser; - private final boolean isOptional; - private final String fieldName; - private final Class typeClass; - - LazyCachedFieldMethodHandler(VolatileFieldBinding fieldBinding, SlowParser slowParser, - boolean isOptional, String fieldName, Class typeClass) { - super(fieldBinding); - this.slowParser = slowParser; - this.isOptional = isOptional; - this.fieldName = fieldName; - this.typeClass = typeClass; - } - - @Override - public void parseEager(ObjectData objectData) throws JsonProtocolParseException { - parse(objectData); - } - - @Override - protected Object parse(ObjectData objectData) throws JsonProtocolParseException { - Map properties = (JSONObject)objectData.getUnderlyingObject(); - Object value = properties.get(fieldName); - boolean hasValue; - if (value == null) { - hasValue = properties.containsKey(fieldName); - } else { - hasValue = true; - } - Object parsedValue = parse(hasValue, value, objectData); - // Cache already finished value, because we don't use unfinished value anywhere. - FieldLoadedFinisher valueFinisher = slowParser.getValueFinisher(); - if (valueFinisher != null) { - parsedValue = valueFinisher.getValueForUser(parsedValue); - } - return parsedValue; - } - - @Override - protected Object finishRawValue(Object raw) { - return raw; - } - - private Object parse(boolean hasValue, Object value, ObjectData objectData) - throws JsonProtocolParseException { - if (hasValue) { - try { - return slowParser.parseValue(value, objectData); - } catch (JsonProtocolParseException e) { - throw new JsonProtocolParseException("Failed to parse field " + fieldName + " in type " + - typeClass.getName(), e); - } - } else { - if (!isOptional) { - throw new JsonProtocolParseException("Field is not optional: " + fieldName + - " (in type " + typeClass.getName() + ")"); - } - return null; - } - } - - - @Override - protected void writeReturnTypeJava(ClassScope scope, Method m) { - getFieldBinding().getTypeInfo().appendValueTypeNameJava(scope); - } - - @Override - protected void writeParseJava(MethodScope scope, String parseResultRef) { - scope.startLine(""); - getFieldBinding().getTypeInfo().appendValueTypeNameJava(scope); - scope.append(" " + parseResultRef + ";\n"); - - boolean wrap = slowParser.javaCodeThrowsException() || !isOptional; - if (wrap) { - scope.startLine("try {\n"); - scope.indentRight(); - } - - String valueRef = scope.newMethodScopedName("value"); - String hasValueRef = scope.newMethodScopedName("hasValue"); - Util.writeReadValueAndHasValue(scope, fieldName, "underlying", valueRef, hasValueRef); - - scope.startLine("if (" + hasValueRef + ") {\n"); - scope.indentRight(); - if (slowParser.javaCodeThrowsException()) { - scope.startLine("try {\n"); - scope.indentRight(); - slowParser.writeParseCode(scope, valueRef, "null", "r1"); - scope.startLine(parseResultRef + " = r1;\n"); - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Failed to parse field " + fieldName + " in type "); - scope.append(typeClass.getName() + "\", e);\n"); - scope.startLine("}\n"); - } else { - slowParser.writeParseCode(scope, valueRef, "null", "r1"); - scope.startLine(parseResultRef + " = r1;\n"); - } - scope.indentLeft(); - scope.startLine("} else {\n"); - scope.indentRight(); - if (isOptional) { - scope.startLine(parseResultRef + " = null;\n"); - } else { - scope.startLine("throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Field is not optional: " + fieldName + "\");\n"); - } - scope.indentLeft(); - scope.startLine("}\n"); - - if (wrap) { - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".implutil.CommonImpl.ParseRuntimeException(" + - "\"On demand parsing failed for \" + underlying, e);\n"); - scope.startLine("}\n"); - } - } - - @Override - public String getFieldName() { - return fieldName; - } - } - - private static class PreparsedFieldMethodHandler extends MethodHandler { - private final int pos; - private final FieldLoadedFinisher valueFinisher; - private final String fieldName; - - PreparsedFieldMethodHandler(int pos, FieldLoadedFinisher valueFinisher, String fieldName) { - this.pos = pos; - this.valueFinisher = valueFinisher; - this.fieldName = fieldName; - } - - @Override - Object handle(ObjectData objectData, Object[] args) throws Throwable { - Object val = objectData.getFieldArray()[pos]; - if (valueFinisher != null) { - val = valueFinisher.getValueForUser(val); - } - return val; - } - - @Override - void writeMethodImplementationJava(ClassScope scope, Method m) { - writeMethodDeclarationJava(scope, m, Collections.emptyList()); - scope.append(" {\n"); - scope.startLine(" return field_" + fieldName + ";\n"); - scope.startLine("}\n"); - } - } - - static SlowParser VOID_PARSER = new QuickParser() { - @Override - public Void parseValueQuick(Object value) { - return null; - } - - @Override - public void appendFinishedValueTypeNameJava(FileScope scope) { - scope.append("Void"); - } - - @Override - void writeParseQuickCode(MethodScope scope, String valueRef, String resultRef) { - scope.startLine("Void " + resultRef + " = null;\n"); - } - - @Override - boolean javaCodeThrowsException() { - return false; - } - }; - - static class SimpleCastParser extends QuickParser { - private final boolean nullable; - private final Class fieldType; - - SimpleCastParser(Class fieldType, boolean nullable) { - this.fieldType = fieldType; - this.nullable = nullable; - } - - @Override - public T parseValueQuick(Object value) throws JsonProtocolParseException { - if (value == null) { - if (nullable) { - return null; - } else { - throw new JsonProtocolParseException("Field must have type " + fieldType.getName()); - } - } - try { - return fieldType.cast(value); - } catch (ClassCastException e) { - throw new JsonProtocolParseException("Field must have type " + fieldType.getName(), e); - } - } - - @Override - public FieldLoadedFinisher getValueFinisher() { - return null; - } - - @Override - public void appendFinishedValueTypeNameJava(FileScope scope) { - scope.append(fieldType.getCanonicalName()); - } - - @Override - public void writeParseQuickCode(MethodScope scope, String valueRef, - String resultRef) { - scope.startLine(fieldType.getCanonicalName() + " " + resultRef + " = (" + - fieldType.getCanonicalName() + ") " + valueRef + ";\n"); - } - - @Override - boolean javaCodeThrowsException() { - return false; - } - } - - static class SimpleParserPair { - static SimpleParserPair create(Class fieldType) { - return new SimpleParserPair(fieldType); - } - - private final SimpleCastParser nullable; - private final SimpleCastParser notNullable; - - private SimpleParserPair(Class fieldType) { - nullable = new SimpleCastParser(fieldType, true); - notNullable = new SimpleCastParser(fieldType, false); - } - - SimpleCastParser getNullable() { - return nullable; - } - - SimpleCastParser getNotNullable() { - return notNullable; - } - - SlowParser get(boolean declaredNullable) { - return declaredNullable ? nullable : notNullable; - } - } - - private static final SimpleParserPair LONG_PARSER = - SimpleParserPair.create(Long.class); - private static final SimpleParserPair BOOLEAN_PARSER = - SimpleParserPair.create(Boolean.class); - private static final SimpleParserPair FLOAT_PARSER = - SimpleParserPair.create(Float.class); - private static final SimpleParserPair NUMBER_PARSER = - SimpleParserPair.create(Number.class); - private static final SimpleParserPair STRING_PARSER = - SimpleParserPair.create(String.class); - private static final SimpleParserPair OBJECT_PARSER = - SimpleParserPair.create(Object.class); - private static final SimpleParserPair JSON_PARSER = - SimpleParserPair.create(JSONObject.class); - - static class ArrayParser extends SlowParser> { - - static abstract class ListFactory { - abstract List create(JSONArray array, SlowParser componentParser) - throws JsonProtocolParseException; - - abstract void writeCreateListCode(SlowParser componentParser, MethodScope scope, - String inputRef, String resultRef); - } - - static final ListFactory EAGER = new ListFactory() { - @Override - List create(JSONArray array, SlowParser componentParser) - throws JsonProtocolParseException { - int size = array.size(); - List list = new ArrayList(size); - FieldLoadedFinisher valueFinisher = componentParser.getValueFinisher(); - for (int i = 0; i < size; i++) { - // We do not support super object for array component. - Object val = componentParser.parseValue(array.get(i), null); - if (valueFinisher != null) { - val = valueFinisher.getValueForUser(val); - } - list.add(val); - } - return Collections.unmodifiableList(list); - } - - @Override - void writeCreateListCode(SlowParser componentParser, MethodScope scope, String inputRef, - String resultRef) { - String sizeRef = scope.newMethodScopedName("size"); - String listRef = scope.newMethodScopedName("list"); - String indexRef = scope.newMethodScopedName("index"); - String componentRef = scope.newMethodScopedName("arrayComponent"); - scope.startLine("int " + sizeRef + " = " + inputRef + ".size();\n"); - scope.startLine("java.util.List<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append("> " + listRef + " = new java.util.ArrayList<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append(">(" + sizeRef + ");\n"); - scope.startLine("for (int " + indexRef + " = 0; " + indexRef + " < " + sizeRef + "; " + - indexRef + "++) {\n"); - scope.indentRight(); - componentParser.writeParseCode(scope, inputRef + ".get(" + indexRef + ")", "null", - componentRef); - scope.startLine(listRef + ".add(" + componentRef + ");\n"); - scope.indentLeft(); - scope.startLine("}\n"); - scope.startLine("java.util.List<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append("> " + resultRef + " = java.util.Collections.unmodifiableList(" + - listRef + ");\n"); - } - }; - - static final ListFactory LAZY = new ListFactory() { - @Override - List create(final JSONArray array, final SlowParser componentParser) { - final int size = array.size(); - List list = new AbstractList() { - private final AtomicReferenceArray values = new AtomicReferenceArray(size); - - @Override - public synchronized T get(int index) { - T parsedValue = values.get(index); - if (parsedValue == null) { - Object rawObject = array.get(index); - if (rawObject != null) { - Object parsedObject; - try { - parsedObject = componentParser.parseValue(array.get(index), null); - } catch (JsonProtocolParseException e) { - throw new ParseRuntimeException(e); - } - FieldLoadedFinisher valueFinisher = componentParser.getValueFinisher(); - if (valueFinisher != null) { - parsedObject = valueFinisher.getValueForUser(parsedObject); - } - parsedValue = (T) parsedObject; - values.compareAndSet(index, null, parsedValue); - parsedValue = values.get(index); - } - } - return parsedValue; - } - - @Override - public int size() { - return size; - } - }; - return list; - } - - @Override - void writeCreateListCode(SlowParser componentParser, MethodScope scope, String inputRef, - String resultRef) { - String sizeRef = scope.newMethodScopedName("size"); - scope.startLine("final int " + sizeRef + " = " + inputRef + ".size();\n"); - scope.startLine("java.util.List<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append("> " + resultRef + " = new java.util.AbstractList<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append(">() {\n"); - scope.indentRight(); - scope.startLine("private final java.util.concurrent.atomic.AtomicReferenceArray<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append("> cachedValues = new java.util.concurrent.atomic.AtomicReferenceArray<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append(">(" + sizeRef + ");\n"); - scope.append("\n"); - scope.startLine("@Override public int size() { return " + sizeRef + "; }\n"); - scope.append("\n"); - writeGetMethodCode(componentParser, scope, inputRef); - scope.indentLeft(); - scope.startLine("};\n"); - } - - private void writeGetMethodCode(SlowParser componentParser, MethodScope outerMethodScope, - String arrayRef) { - outerMethodScope.startLine("@Override public "); - componentParser.appendFinishedValueTypeNameJava(outerMethodScope); - outerMethodScope.append(" get(int index) {\n"); - { - MethodScope scope = outerMethodScope.newMethodScope(); - scope.indentRight(); - - String resultRef = scope.newMethodScopedName("result"); - - scope.startLine(""); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append(" " + resultRef + " = cachedValues.get(index);\n"); - scope.startLine("if (" + resultRef + " == null) {\n"); - scope.indentRight(); - - boolean wrap = componentParser.javaCodeThrowsException(); - if (wrap) { - scope.startLine("try {\n"); - scope.indentRight(); - } - - scope.startLine("Object unparsed = " + arrayRef + ".get(index);\n"); - componentParser.writeParseCode(scope, "unparsed", "null", "parsed"); - scope.startLine(resultRef + " = parsed;\n"); - - if (wrap) { - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + - ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".implutil.CommonImpl.ParseRuntimeException(e);\n"); - scope.startLine("}\n"); - } - scope.startLine("cachedValues.compareAndSet(index, null, " + resultRef + ");\n"); - scope.startLine(resultRef + " = cachedValues.get(index);\n"); - scope.indentLeft(); - scope.startLine("}\n"); - scope.startLine("return " + resultRef + ";\n"); - scope.indentLeft(); - } - outerMethodScope.startLine("}\n"); - } - }; - - private final SlowParser componentParser; - private final boolean isNullable; - private final ListFactory listFactory; - - ArrayParser(SlowParser componentParser, boolean isNullable, ListFactory listFactory) { - this.componentParser = componentParser; - this.isNullable = isNullable; - this.listFactory = listFactory; - } - - @Override - public List parseValue(Object value, ObjectData thisData) - throws JsonProtocolParseException { - if (isNullable && value == null) { - return null; - } - if (value instanceof JSONArray == false) { - throw new JsonProtocolParseException("Array value expected"); - } - JSONArray arrayValue = (JSONArray) value; - return listFactory.create(arrayValue, componentParser); - } - - @Override - public FieldLoadedFinisher getValueFinisher() { - return null; - } - - @Override - public JsonTypeParser asJsonTypeParser() { - return null; - } - - @Override - public void appendFinishedValueTypeNameJava(FileScope scope) { - scope.append("java.util.List<"); - componentParser.appendFinishedValueTypeNameJava(scope); - scope.append(">"); - } - - @Override - public void appendInternalValueTypeNameJava(FileScope scope) { - appendFinishedValueTypeNameJava(scope); - } - - @Override - void writeParseCode(MethodScope scope, String valueRef, - String superValueRef, String resultRef) { - if (isNullable) { - scope.startLine("if (" + valueRef + " == null) {\n"); - scope.startLine(" return null;\n"); - scope.startLine("}\n"); - } - scope.startLine("if (" + valueRef + " instanceof org.json.simple.JSONArray == false) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".JsonProtocolParseException(\"Array value expected\");\n"); - scope.startLine("}\n"); - - String arrayValueRef = scope.newMethodScopedName("arrayValue"); - - scope.startLine("final org.json.simple.JSONArray " + arrayValueRef + - " = (org.json.simple.JSONArray) " + valueRef + ";\n"); - listFactory.writeCreateListCode(componentParser, scope, arrayValueRef, resultRef); - } - - @Override - boolean javaCodeThrowsException() { - return true; - } - } - - static MethodHandler RETURN_NULL_METHOD_HANDLER = new MethodHandler() { - @Override - Object handle(ObjectData objectData, Object[] args) throws Throwable { - return null; - } - - @Override - void writeMethodImplementationJava(ClassScope scope, Method m) { - writeMethodDeclarationJava(scope, m, Collections.emptyList()); - scope.append(" {\n"); - scope.startLine("}\n"); - } - }; - - static class AutoSubtypeMethodHandler extends MethodHandler { - private final int variantCodeField; - private final int variantValueField; - private final int code; - - AutoSubtypeMethodHandler(int variantCodeField, int variantValueField, int code) { - this.variantCodeField = variantCodeField; - this.variantValueField = variantValueField; - this.code = code; - } - - ObjectData getFieldObjectData(ObjectData objectData) { - Object[] array = objectData.getFieldArray(); - Integer actualCode = (Integer) array[variantCodeField]; - if (this.code == actualCode) { - ObjectData data = (ObjectData) array[variantValueField]; - return data; - } else { - return null; - } - } - - @Override - Object handle(ObjectData objectData, Object[] args) { - ObjectData resData = getFieldObjectData(objectData); - if (resData == null) { - return null; - } else { - return resData.getProxy(); - } - } - - @Override - void writeMethodImplementationJava(ClassScope scope, Method m) { - writeMethodDeclarationJava(scope, m, Collections.emptyList()); - scope.append(" {\n"); - scope.startLine(" return " + AutoAlgebraicCasesDataImpl.getAutoAlgFieldNameJava(code) + - ";\n"); - scope.startLine("}\n"); - } - } - - static class ManualSubtypeMethodHandler extends LazyCachedMethodHandlerBase { - private final SlowParser parser; - - ManualSubtypeMethodHandler(VolatileFieldBinding fieldInf, SlowParser parser) { - super(fieldInf); - this.parser = parser; - } - - @Override - protected Object parse(ObjectData objectData) throws JsonProtocolParseException { - return parser.parseValue(objectData.getUnderlyingObject(), objectData); - } - - @Override - protected Object finishRawValue(Object raw) { - FieldLoadedFinisher valueFinisher = parser.getValueFinisher(); - Object res = raw; - if (valueFinisher != null) { - res = valueFinisher.getValueForUser(res); - } - return res; - } - - ObjectData getSubtypeData(ObjectData objectData) throws JsonProtocolParseException { - return (ObjectData) handleRaw(objectData); - } - - @Override - protected void writeReturnTypeJava(ClassScope scope, Method m) { - JsonTypeParser jsonTypeParser = parser.asJsonTypeParser(); - if (jsonTypeParser == null) { - JavaCodeGenerator.Util.writeJavaTypeName(m.getGenericReturnType(), - scope.getStringBuilder()); - } else { - String valueTypeName = scope.getTypeImplReference(jsonTypeParser.getType().get()); - scope.append(valueTypeName); - } - } - - @Override - protected void writeParseJava(MethodScope scope, String parseResultRef) { - parser.writeParseCode(scope, "underlying", "this", parseResultRef); - } - } - - static class AutoAlgebraicCasesDataImpl extends TypeHandler.AlgebraicCasesData { - private int variantCodeFieldPos = -1; - private int variantValueFieldPos = -1; - private boolean hasDefaultCase = false; - private final List> subtypes = new ArrayList>(); - - - @Override - List> getSubtypes() { - return subtypes; - } - - @Override - void parseObjectSubtype(ObjectData objectData, Map jsonProperties, - Object input) throws JsonProtocolParseException { - if (jsonProperties == null) { - throw new JsonProtocolParseException( - "JSON object input expected for non-manual subtyping"); - } - int code = -1; - for (int i = 0; i < this.getSubtypes().size(); i++) { - TypeHandler nextSubtype = this.getSubtypes().get(i).get(); - boolean ok = nextSubtype.getSubtypeSupport().checkConditions(jsonProperties); - if (ok) { - if (code == -1) { - code = i; - } else { - throw new JsonProtocolParseException("More than one case match"); - } - } - } - if (code == -1) { - if (!this.hasDefaultCase) { - throw new JsonProtocolParseException("Not a singe case matches"); - } - } else { - ObjectData fieldData = - this.getSubtypes().get(code).get().parse(input, objectData); - objectData.getFieldArray()[this.variantValueFieldPos] = fieldData; - } - objectData.getFieldArray()[this.variantCodeFieldPos] = - Integer.valueOf(code); - } - - @Override - void writeConstructorCodeJava(MethodScope methodScope) { - methodScope.startLine("int code = -1;\n"); - for (int i = 0; i < getSubtypes().size(); i++) { - TypeHandler nextSubtype = getSubtypes().get(i).get(); - methodScope.startLine("if (" + methodScope.getTypeImplReference(nextSubtype) + - ".checkSubtypeConditions(underlying)) {\n"); - methodScope.startLine(" if (code == -1) {\n"); - methodScope.startLine(" code = " + i + ";\n"); - methodScope.startLine(" } else {\n"); - methodScope.startLine(" throw new " + Util.BASE_PACKAGE + - ".JsonProtocolParseException(\"More than one case match\");\n"); - methodScope.startLine(" }\n"); - methodScope.startLine("}\n"); - } - if (!hasDefaultCase) { - methodScope.startLine("if (code == -1) {\n"); - methodScope.startLine(" throw new " + Util.BASE_PACKAGE + - ".JsonProtocolParseException(\"Not a singe case matches\");\n"); - methodScope.startLine("}\n"); - } - for (int i = 0; i < getSubtypes().size(); i++) { - TypeHandler nextSubtype = getSubtypes().get(i).get(); - methodScope.startLine(getAutoAlgFieldNameJava(i) + " = (code == " + i + ") ? new " + - methodScope.getTypeImplReference(nextSubtype) + "(underlying, this) : null;\n"); - } - } - - @Override - void writeFiledsJava(ClassScope classScope) { - for (int i = 0; i < getSubtypes().size(); i++) { - TypeHandler nextSubtype = getSubtypes().get(i).get(); - classScope.startLine("private final " + classScope.getTypeImplReference(nextSubtype) + - " " + getAutoAlgFieldNameJava(i) + ";\n"); - } - } - - private static String getAutoAlgFieldNameJava(int code) { - return "auto_alg_field_" + code; - } - } - - - static class ManualAlgebraicCasesDataImpl extends TypeHandler.AlgebraicCasesData { - private final List> subtypes = new ArrayList>(); - - @Override - List> getSubtypes() { - return subtypes; - } - - @Override - void parseObjectSubtype(ObjectData objectData, Map jsonProperties, Object input) { - } - - @Override - void writeConstructorCodeJava(MethodScope methodScope) { - } - - @Override - void writeFiledsJava(ClassScope classScope) { - } - } - - static class VolatileFieldBinding { - private final int position; - private final FieldTypeInfo fieldTypeInfo; - - public VolatileFieldBinding(int position, FieldTypeInfo fieldTypeInfo) { - this.position = position; - this.fieldTypeInfo = fieldTypeInfo; - } - - public Object setAndGet(AtomicReferenceArray atomicReferenceArray, - Object value) { - atomicReferenceArray.compareAndSet(position, null, value); - return atomicReferenceArray.get(position); - } - - public Object get(AtomicReferenceArray atomicReferenceArray) { - return atomicReferenceArray.get(position); - } - - void writeGetExpressionJava(StringBuilder output) { - output.append(getCodeFieldName() + ".get()"); - } - - void writeSetAndGetJava(MethodScope scope, - String valueRef, String resultRef) { - scope.startLine(getCodeFieldName() + ".compareAndSet(null, " + valueRef + ");\n"); - scope.startLine(""); - fieldTypeInfo.appendValueTypeNameJava(scope); - scope.append(" " + resultRef + " = "); - writeGetExpressionJava(scope.getStringBuilder()); - scope.append(";\n"); - } - - - void writeFieldDeclarationJava(ClassScope scope) { - scope.startLine("private final java.util.concurrent.atomic.AtomicReference<"); - fieldTypeInfo.appendValueTypeNameJava(scope); - scope.append(" > " + getCodeFieldName() + - " = new java.util.concurrent.atomic.AtomicReference<"); - fieldTypeInfo.appendValueTypeNameJava(scope); - scope.append(">(null);\n"); - } - - FieldTypeInfo getTypeInfo() { - return fieldTypeInfo; - } - - private String getCodeFieldName() { - return FIELD_NAME_PREFIX + position; - } - - private static final String FIELD_NAME_PREFIX = "lazyCachedField_"; - } - - private static class RefImpl extends RefToType { - private final Class typeClass; - private TypeHandler type = null; - - RefImpl(Class typeClass) { - this.typeClass = typeClass; - } - - @Override - Class getTypeClass() { - return typeClass; - } - - @Override - TypeHandler get() { - return type; - } - - void set(TypeHandler type) { - this.type = (TypeHandler)type; - } - } - - // We should use it for static analysis later. - private static class FieldMap { - final List localNames = new ArrayList(5); - final List overridenNames = new ArrayList(1); - } - - public GeneratedCodeMap generateStaticParser(StringBuilder stringBuilder, - String packageName, String className) { - return generateStaticParser(stringBuilder, packageName, className, - Collections.emptyList()); - } - - public GeneratedCodeMap generateStaticParser(StringBuilder stringBuilder, String packageName, - String className, Collection basePackages) { - JavaCodeGenerator generator = new JavaCodeGenerator.Impl(); - - GlobalScope globalScope = generator.newGlobalScope(type2TypeHandler.values(), basePackages); - - FileScope fileScope = globalScope.newFileScope(stringBuilder); - - fileScope.startLine("// This is a generated source.\n"); - fileScope.startLine("// See " + this.getClass().getName() + " for details\n"); - fileScope.append("\n"); - fileScope.startLine("package " + packageName + ";\n"); - fileScope.append("\n"); - fileScope.startLine("public class " + className + " implements " + - rootImpl.getType().getCanonicalName() + " {\n"); - - ClassScope rootClassScope = fileScope.newClassScope(); - rootClassScope.indentRight(); - - rootImpl.writeStaticMethodJava(rootClassScope); - - for (TypeHandler typeHandler : type2TypeHandler.values()) { - typeHandler.writeStaticClassJava(rootClassScope); - } - - rootClassScope.writeClassMembers(); - - rootClassScope.indentLeft(); - - rootClassScope.startLine("}\n"); - - Map, String> type2ImplClassName = new HashMap, String>(); - for (TypeHandler typeHandler : type2TypeHandler.values()) { - String shortName = fileScope.getTypeImplShortName(typeHandler); - String fullReference = packageName + "." + className + "." + shortName; - type2ImplClassName.put(typeHandler.getTypeClass(), fullReference); - } - - return new GeneratedCodeMap(type2ImplClassName); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/EnumParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/EnumParser.java deleted file mode 100644 index 6f75e10b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/EnumParser.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.chromium.sdk.internal.protocolparser.EnumValueCondition; -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.Util; - -class EnumParser> extends QuickParser { - public static > EnumParser create(Class enumTypeClass, - boolean isNullable) throws JsonProtocolModelParseException { - return new EnumParser(enumTypeClass, isNullable); - } - - private final Method methodValueOf; - private final boolean isNullable; - private final Class enumClass; - - private EnumParser(Class enumClass, boolean isNullable) - throws JsonProtocolModelParseException { - this.enumClass = enumClass; - this.isNullable = isNullable; - - try { - this.methodValueOf = enumClass.getMethod("valueOf", String.class); - } catch (NoSuchMethodException e) { - throw new JsonProtocolModelParseException( - "Failed to find valueOf method for parsing strings", e); - } - } - - @Override - public T parseValueQuick(Object value) throws JsonProtocolParseException { - if (isNullable && value == null) { - return null; - } - if (value instanceof String == false) { - throw new JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value; - stringValue = EnumValueCondition.decorateEnumConstantName(stringValue); - T result; - try { - result = enumClass.cast(methodValueOf.invoke(null, stringValue)); - } catch (IllegalArgumentException e) { - throw new JsonProtocolParseException("Failed to parse enum constant " + stringValue, e); - } catch (IllegalAccessException e) { - throw new JsonProtocolParseException("Failed to call valueOf method", e); - } catch (InvocationTargetException e) { - throw new JsonProtocolParseException("Failed to call valueOf method", e); - } - if (result == null) { - throw new JsonProtocolParseException("Failed to parse value " + value + " as enum"); - } - return result; - } - - @Override - public void appendFinishedValueTypeNameJava(FileScope scope) { - scope.append(enumClass.getCanonicalName()); - } - - @Override - public void appendInternalValueTypeNameJava(FileScope scope) { - appendFinishedValueTypeNameJava(scope); - } - - @Override - void writeParseQuickCode(MethodScope scope, String valueRef, - String resultRef) { - - for (Object constant : enumClass.getEnumConstants()) { - String name = constant.toString(); - if (!name.toUpperCase().equals(name)) { - throw new RuntimeException(); - } - } - - if (isNullable) { - scope.startLine("if (" + valueRef + " == null) {\n"); - scope.startLine(" return null;\n"); - scope.startLine("}\n"); - } - scope.startLine("if (" + valueRef + " instanceof String == false) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".JsonProtocolParseException(\"String value expected\");\n"); - scope.startLine("}\n"); - scope.startLine("String stringValue = (String) " + valueRef + ";\n"); - scope.startLine("stringValue = stringValue.toUpperCase();\n"); - scope.startLine(enumClass.getCanonicalName() + " " + resultRef + " = " + - enumClass.getCanonicalName() + ".valueOf("); - scope.append("stringValue);\n"); - } - - @Override - boolean javaCodeThrowsException() { - return true; - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldCondition.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldCondition.java deleted file mode 100644 index 792f0122..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldCondition.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; - -/** - * An implementation of JsonSubtypeCondition* annotations. Basically it only holds all parameters - * and delegates actual condition evaluating to {@link #conditionLogic}. - */ -class FieldCondition { - private final String propertyName; - private final QuickParser quickParser; - private final FieldConditionLogic conditionLogic; - - FieldCondition(String propertyName, QuickParser quickParser, - FieldConditionLogic conditionLogic) throws JsonProtocolModelParseException { - if (conditionLogic.requiresQuickParser() && quickParser == null) { - throw new JsonProtocolModelParseException( - "The choose condition does not work with the type of " + propertyName); - } - this.propertyName = propertyName; - this.quickParser = quickParser; - this.conditionLogic = conditionLogic; - } - - String getPropertyName() { - return propertyName; - } - - /** - * @param hasValue whether field exists in JSON object (however its value may be null) - * @param unparsedValue value of the field if hasValue is true or undefined otherwise - */ - boolean checkValue(boolean hasValue, Object unparsedValue) throws JsonProtocolParseException { - return conditionLogic.checkValue(hasValue, unparsedValue, quickParser); - } - - public void writeCheckJava(MethodScope methodScope, String valueRef, String hasValueRef, - String resultRef) { - conditionLogic.writeCheckJava(methodScope, valueRef, hasValueRef, resultRef, quickParser); - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldConditionLogic.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldConditionLogic.java deleted file mode 100644 index fdd48727..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldConditionLogic.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.JsonSubtypeCondition; -import org.chromium.sdk.internal.protocolparser.JsonSubtypeConditionBoolValue; -import org.chromium.sdk.internal.protocolparser.JsonSubtypeConditionCustom; -import org.chromium.sdk.internal.protocolparser.JsonValueCondition; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; - -/** - * An interface to field conditions logic. Some conditions are simple and never need parsed - * values, others are more fine-grained and require quick parser before making actual checks. - */ -abstract class FieldConditionLogic { - private final boolean logicRequiresQuickParser; - - FieldConditionLogic(boolean logicRequiresQuickParser) { - this.logicRequiresQuickParser = logicRequiresQuickParser; - } - - boolean requiresQuickParser() { - return logicRequiresQuickParser; - } - - /** - * @param hasValue whether field exists in JSON object (however its value may be null) - * @param quickParser parser that may be used if {@link #requiresQuickParser()} is true - */ - abstract boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser quickParser) - throws JsonProtocolParseException; - - /** - * Constructor function that creates field condition logic from method annotations. - */ - static FieldConditionLogic readLogic(Method m) throws JsonProtocolModelParseException { - List results = new ArrayList(1); - JsonSubtypeConditionBoolValue boolValueAnn = - m.getAnnotation(JsonSubtypeConditionBoolValue.class); - if (boolValueAnn != null) { - final Boolean required = boolValueAnn.value(); - results.add(new FieldConditionLogic(true) { - @Override - boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser parser) - throws JsonProtocolParseException { - return hasValue && required == parser.parseValueQuick(unparsedValue); - } - - @Override - void writeCheckJava(MethodScope scope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser) { - scope.startLine("boolean " + resultRef + ";\n"); - scope.startLine("if (" + hasValueRef + ") {\n"); - scope.indentRight(); - quickParser.writeParseQuickCode(scope, valueRef, "parserResult"); - scope.startLine(resultRef + " = " + required + " == parserResult;\n"); - scope.indentLeft(); - scope.startLine("} else {\n"); - scope.startLine(" " + resultRef + " = false;\n"); - scope.startLine("}\n"); - } - }); - } - JsonSubtypeConditionCustom customAnn = m.getAnnotation(JsonSubtypeConditionCustom.class); - if (customAnn != null) { - Class> condition = customAnn.condition(); - // We do not know exact type of condition. But we also do not care about result type - // in 'constraint'. Compiler cannot catch the wildcard here, so we use an assumed type. - Class> assumedTypeCondition = - (Class>) customAnn.condition(); - final CustomConditionWrapper constraint = - CustomConditionWrapper.create(assumedTypeCondition); - results.add(new FieldConditionLogic(true) { - @Override - boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser parser) - throws JsonProtocolParseException { - return hasValue && constraint.checkValue(parser.parseValueQuick(unparsedValue)); - } - - @Override - void writeCheckJava(MethodScope scope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser) { - scope.startLine("boolean " + resultRef + ";\n"); - scope.startLine("if (" + hasValueRef + ") {\n"); - scope.indentRight(); - quickParser.writeParseQuickCode(scope, valueRef, "parserResult"); - constraint.writeParseJava(scope, "parserResult", "constraintResult"); - scope.startLine(resultRef + " = constraintResult;\n"); - scope.indentLeft(); - scope.startLine("} else {\n"); - scope.startLine(" " + resultRef + " = false;\n"); - scope.startLine("}\n"); - } - }); - } - JsonSubtypeCondition conditionAnn = m.getAnnotation(JsonSubtypeCondition.class); - if (conditionAnn != null) { - int savedResSize = results.size(); - if (conditionAnn.fieldIsAbsent()) { - results.add(new FieldConditionLogic(false) { - @Override - boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser parser) { - return !hasValue; - } - - @Override - void writeCheckJava(MethodScope scope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser) { - scope.startLine("boolean " + resultRef + " = !" + hasValueRef + ";\n"); - } - }); - } - if (conditionAnn.valueIsNull()) { - results.add(new FieldConditionLogic(false) { - @Override - boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser parser) { - return hasValue && unparsedValue != null; - } - - @Override - void writeCheckJava(MethodScope scope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser) { - scope.startLine("boolean " + resultRef + " = " + valueRef + " != null;\n"); - } - }); - } - if (savedResSize == results.size()) { - results.add(new FieldConditionLogic(false) { - @Override - boolean checkValue(boolean hasValue, Object unparsedValue, QuickParser parser) { - return hasValue; - } - - @Override - void writeCheckJava(MethodScope scope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser) { - scope.startLine("boolean " + resultRef + " = " + hasValueRef + ";\n"); - } - }); - } - } - if (results.size() == 0) { - return null; - } - if (results.size() > 1) { - throw new JsonProtocolModelParseException("Too many constraints for field getter " + m); - } - return results.get(0); - } - - private static class CustomConditionWrapper { - static CustomConditionWrapper create( - Class> constraintClass) { - return new CustomConditionWrapper(constraintClass); - } - - private final JsonValueCondition constraint; - - private CustomConditionWrapper(Class> constraintClass) { - try { - constraint = constraintClass.newInstance(); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - boolean checkValue(Object parsedValue) { - return constraint.conforms((T) parsedValue); - } - - public void writeParseJava(ClassScope classScope, String valueRef, String resultRef) { - - abstract class StaticField implements JavaCodeGenerator.ElementData { - abstract String getFieldName(); - } - - StaticField field = classScope.getRootClassScope().addMember(constraint.getClass(), - new JavaCodeGenerator.ElementFactory() { - @Override - public StaticField create(final int code) { - return new StaticField() { - @Override public void generateCode(ClassScope classScope) { - classScope.startLine("private static final " + - constraint.getClass().getCanonicalName() + " " + getFieldName() + " = new " + - constraint.getClass().getCanonicalName() + "();\n"); - } - @Override String getFieldName() { - return "CUSTOM_CONDITION_" + code; - } - }; - } - }); - classScope.startLine("boolean " + resultRef + " = " + field.getFieldName() + ".conforms(" + - valueRef + ");\n"); - } - } - - abstract void writeCheckJava(MethodScope methodScope, String valueRef, String hasValueRef, - String resultRef, QuickParser quickParser); -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoadedFinisher.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoadedFinisher.java deleted file mode 100644 index 17cb8ffe..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoadedFinisher.java +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -/** - * Defines object responsible for converting values saved in {@link ObjectData} to types - * returned to user. It is necessary, because for json type fields we save {@link ObjectData} - * rather than instance of the type itself. - */ -abstract class FieldLoadedFinisher { - abstract Object getValueForUser(Object cachedValue); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoader.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoader.java deleted file mode 100644 index fa79e205..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldLoader.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.Util; - -/** - * This classs is responsible for parsing field values and saving them in {@link ObjectData} - * for future use. - */ -class FieldLoader { - private final String fieldName; - private final int fieldPosInArray; - private final SlowParser slowParser; - private final boolean isOptional; - - FieldLoader(int fieldPosInArray, String fieldName, SlowParser slowParser, - boolean isOptional) { - this.fieldName = fieldName; - this.fieldPosInArray = fieldPosInArray; - this.slowParser = slowParser; - this.isOptional = isOptional; - } - - public String getFieldName() { - return fieldName; - } - - public void parse(boolean hasValue, Object value, ObjectData objectData) - throws JsonProtocolParseException { - if (hasValue) { - try { - objectData.getFieldArray()[fieldPosInArray] = slowParser.parseValue(value, objectData); - } catch (JsonProtocolParseException e) { - throw new JsonProtocolParseException("Failed to parse field " + getFieldName(), e); - } - } else { - if (!isOptional) { - throw new JsonProtocolParseException("Field is not optional: " + getFieldName()); - } - } - } - - public void writeFieldDeclarationJava(ClassScope scope) { - scope.startLine("private final "); - slowParser.appendFinishedValueTypeNameJava(scope); - scope.append(" field_" + fieldName + ";\n"); - } - - public void writeFieldLoadJava(MethodScope scope, String valueRef, String hasValueRef) { - scope.startLine("if (" + hasValueRef + ") {\n"); - scope.indentRight(); - if (slowParser.javaCodeThrowsException()) { - scope.startLine("try {\n"); - scope.indentRight(); - String parsedValueRef = scope.newMethodScopedName("parsedValue"); - slowParser.writeParseCode(scope, valueRef, "this", parsedValueRef); - scope.startLine("this.field_" + fieldName + " = " + parsedValueRef + ";\n"); - scope.indentLeft(); - scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Failed to parse field " + getFieldName() + "\", e);\n"); - scope.startLine("}\n"); - } else { - String parsedValueRef = scope.newMethodScopedName("parsedValue"); - slowParser.writeParseCode(scope, valueRef, "this", parsedValueRef); - scope.startLine("this.field_" + fieldName + " = " + parsedValueRef + ";\n"); - } - scope.indentLeft(); - scope.startLine("} else {\n"); - if (isOptional) { - scope.startLine(" this.field_" + fieldName + " = null;\n"); - } else { - scope.startLine(" throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Field is not optional: " + getFieldName() + "\");\n"); - } - scope.startLine("}\n"); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldTypeInfo.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldTypeInfo.java deleted file mode 100644 index dd08e45b..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/FieldTypeInfo.java +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; - -/** - * Information about a field type that is used in Java code generation. - */ -interface FieldTypeInfo { - void appendValueTypeNameJava(FileScope scope); -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/GeneratedCodeMap.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/GeneratedCodeMap.java deleted file mode 100644 index 9c67b8b5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/GeneratedCodeMap.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.util.Map; - -/** - * Maps json type interfaces to full class name of their generated implementations. - */ -public class GeneratedCodeMap { - private final Map, String> type2ImplClassName; - - public GeneratedCodeMap(Map, String> type2ImplClassName) { - this.type2ImplClassName = type2ImplClassName; - } - - String getTypeImplementationReference(Class type) { - return type2ImplClassName.get(type); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JavaCodeGenerator.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JavaCodeGenerator.java deleted file mode 100644 index f5f46d1d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JavaCodeGenerator.java +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.WildcardType; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * A set of interfaces and classes used to generate Java code of parser implementation. - */ -public interface JavaCodeGenerator { - - GlobalScope newGlobalScope(Collection> typeHandlers, - Collection basePackages); - - interface GlobalScope { - String getTypeImplReference(TypeHandler typeHandler); - String getTypeImplShortName(TypeHandler typeHandler); - - /** - * @return new {@link FileScope} that extends {@link GlobalScope} and shares the state - * with this {@link GlobalScope} - */ - FileScope newFileScope(StringBuilder output); - } - - interface FileScope extends GlobalScope { - StringBuilder getStringBuilder(); - - void startLine(String line); - void append(String line); - - void indentRight(); - void indentLeft(); - - /** - * @return new {@link ClassScope} that extends {@link FileScope} and shares the state - * with this {@link FileScope} - */ - ClassScope newClassScope(); - } - - interface ClassScope extends FileScope { - ClassScope getRootClassScope(); - - /** - * @return new {@link ClassScope} that has different state as {@link ClassScope}, - * but shares the state with this as {@link FileScope} - */ - @Override - ClassScope newClassScope(); - - /** - * Adds a member to the class. The member is identified by the key. Member Java code - * is generated later. If the member with a particular key - * has already been added, method return data instance if returned the previous time. - * - * @return user-defined field element data - */ - T addMember(Object key, ElementFactory factory); - - /** - * @return new {@link MethodScope} that extends {@link ClassScope} and shares the state - * with this {@link ClassScope}. - */ - MethodScope newMethodScope(); - - /** - * Writes Java code of all added members. - */ - void writeClassMembers(); - } - - interface MethodScope extends ClassScope { - /** - * @return a name unique to this scope with the provided prefix - */ - String newMethodScopedName(String prefix); - } - - interface ElementData { - void generateCode(ClassScope classScope); - } - - interface ElementFactory { - T create(int code); - } - - class Util { - /** - * Generate Java type name of the passed type. Type may be parameterized. - */ - public static void writeJavaTypeName(Type arg, StringBuilder output) { - if (arg instanceof Class) { - Class clazz = (Class) arg; - output.append(clazz.getCanonicalName()); - } else if (arg instanceof ParameterizedType) { - ParameterizedType parameterizedType = (ParameterizedType) arg; - writeJavaTypeName(parameterizedType.getRawType(), output); - output.append("<"); - Type[] params = parameterizedType.getActualTypeArguments(); - for (int i = 0; i < params.length; i++) { - if (i != 0) { - output.append(", "); - } - writeJavaTypeName(params[i], output); - } - output.append(">"); - } else if (arg instanceof WildcardType) { - WildcardType wildcardType = (WildcardType) arg; - Type[] upperBounds = wildcardType.getUpperBounds(); - if (upperBounds == null) { - throw new RuntimeException(); - } - if (upperBounds.length != 1) { - throw new RuntimeException(); - } - output.append("? extends "); - writeJavaTypeName(upperBounds[0], output); - } else { - output.append(arg); - } - } - - /** - * Generates a commonly-used code that gets property from JSON in form of - * 'value' and 'hasValue' pair of variables. - */ - public static void writeReadValueAndHasValue(MethodScope scope, String fieldName, - String jsonObjectRef, String valueRef, String hasValueRef) { - scope.startLine("Object " + valueRef + " = " + jsonObjectRef + ".get(\"" + - fieldName + "\");\n"); - scope.startLine("boolean " + hasValueRef + ";\n"); - scope.startLine("if (" + valueRef + " == null) {\n"); - scope.startLine(" " + hasValueRef + " = " + jsonObjectRef + ".containsKey(\"" + - fieldName + "\");\n"); - scope.startLine("} else {\n"); - scope.startLine(" " + hasValueRef + " = true;\n"); - scope.startLine("}\n"); - } - - public static final String BASE_PACKAGE = "org.chromium.sdk.internal.protocolparser"; - public static final String THROWS_CLAUSE = - " throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException"; - } - - - class Impl implements JavaCodeGenerator { - - @Override - public GlobalScope newGlobalScope(Collection> typeHandlers, - Collection basePackages) { - return new GlobalScopeImpl(typeHandlers, basePackages); - } - - private static class GlobalScopeImpl implements GlobalScope { - private final State state; - - GlobalScopeImpl(Collection> typeHandlers, - Collection basePackages) { - state = new State(typeHandlers, basePackages); - } - - GlobalScopeImpl(GlobalScopeImpl globalScopeImpl) { - state = globalScopeImpl.state; - } - - @Override - public String getTypeImplReference(TypeHandler typeHandler) { - return state.getTypeImplReference(typeHandler); - } - - @Override - public String getTypeImplShortName(TypeHandler typeHandler) { - return state.getTypeImplShortName(typeHandler); - } - - @Override - public FileScope newFileScope(StringBuilder output) { - return new FileScopeImpl(this, output); - } - - private static class State { - private final Map, String> type2Name; - private final Collection basePackages; - - State(Collection> typeHandlers, Collection basePackages) { - this.basePackages = basePackages; - type2Name = buildLocalTypeNameMap(typeHandlers); - } - - String getTypeImplReference(TypeHandler typeHandler) { - String localName = type2Name.get(typeHandler); - if (localName == null) { - for (GeneratedCodeMap base : basePackages) { - String result = base.getTypeImplementationReference(typeHandler.getTypeClass()); - if (result != null) { - return result; - } - } - } else { - return localName; - } - throw new RuntimeException(); - } - - String getTypeImplShortName(TypeHandler typeHandler) { - String result = type2Name.get(typeHandler); - if (result == null) { - throw new RuntimeException(); - } - return result; - } - - private static Map, String> buildLocalTypeNameMap( - Collection> typeHandlers) { - List> list = new ArrayList>(typeHandlers); - - // Sort to produce consistent GeneratedCodeMap later. - Collections.sort(list, new Comparator>() { - @Override - public int compare(TypeHandler o1, TypeHandler o2) { - return getName(o1).compareTo(getName(o2)); - } - - private String getName(TypeHandler handler) { - return handler.getTypeClass().getName(); - } - }); - - int uniqueCode = 0; - Map, String> result = new HashMap, String>(); - - for (TypeHandler handler : list) { - String name = "Value_" + uniqueCode++; - Object conflict = result.put(handler, name); - if (conflict != null) { - throw new RuntimeException(); - } - } - return result; - } - } - } - - private static class FileScopeImpl extends GlobalScopeImpl implements FileScope { - private final State state; - - FileScopeImpl(GlobalScopeImpl globalScopeImpl, StringBuilder stringBuilder) { - super(globalScopeImpl); - this.state = new State(stringBuilder); - } - - FileScopeImpl(FileScopeImpl fileScopeImpl) { - super(fileScopeImpl); - this.state = fileScopeImpl.state; - } - - @Override - public StringBuilder getStringBuilder() { - return state.getStringBuilder(); - } - - @Override - public void startLine(String line) { - state.startLine(line); - } - - @Override - public void append(String line) { - state.append(line); - } - - @Override - public void indentRight() { - state.indentRight(); - } - - @Override - public void indentLeft() { - state.indentLeft(); - } - - @Override - public ClassScope newClassScope() { - return new ClassScopeImpl(this, asClassScopeImpl()); - } - - protected ClassScopeImpl asClassScopeImpl() { - return null; - } - - private static class State { - private final StringBuilder stringBuilder; - private int indent = 0; - - State(StringBuilder stringBuilder) { - this.stringBuilder = stringBuilder; - } - - StringBuilder getStringBuilder() { - return stringBuilder; - } - - void startLine(String line) { - for (int i = 0; i < indent; i++) { - stringBuilder.append(' '); - } - stringBuilder.append(line); - } - - void append(String line) { - stringBuilder.append(line); - } - - void indentRight() { - indent += 2; - } - - void indentLeft() { - indent -= 2; - } - } - } - - private static class ClassScopeImpl extends FileScopeImpl implements ClassScope { - private final State state; - private final ClassScope parentClass; - - ClassScopeImpl(FileScopeImpl fileScopeImpl, ClassScope parentClass) { - super(fileScopeImpl); - this.state = new State(); - this.parentClass = parentClass; - } - - ClassScopeImpl(ClassScopeImpl classScopeImpl) { - super(classScopeImpl); - this.state = classScopeImpl.state; - this.parentClass = classScopeImpl.parentClass; - } - - @Override - public ClassScope getRootClassScope() { - if (parentClass == null) { - return this; - } else { - return parentClass.getRootClassScope(); - } - } - - @Override - public T addMember(Object key, - ElementFactory factory) { - return state.addMember(key, factory); - } - - @Override - public void writeClassMembers() { - state.writeClassElements(this); - } - - @Override - public MethodScope newMethodScope() { - return new MethodScopeImpl(this); - } - - @Override - protected ClassScopeImpl asClassScopeImpl() { - return this; - } - - private static class State { - private final Map key2ElementData = - new HashMap(2); - private int nextCode = 0; - - T addMember(Object key, ElementFactory factory) { - List extendedKey = Arrays.asList(key, factory); - ElementData rawData = key2ElementData.get(extendedKey); - T data = (T) rawData; - if (data == null) { - data = factory.create(nextCode++); - key2ElementData.put(extendedKey, data); - } - return data; - } - - void writeClassElements(ClassScope classScope) { - for (ElementData data : key2ElementData.values()) { - data.generateCode(classScope); - } - key2ElementData.clear(); - } - } - } - - private static class MethodScopeImpl extends ClassScopeImpl implements MethodScope { - private final State state; - - public MethodScopeImpl(ClassScopeImpl classScopeImpl) { - super(classScopeImpl); - state = new State(); - } - - @Override - public String newMethodScopedName(String prefix) { - return state.newMethodScopedName(prefix); - } - - private static class State { - private int nextId = 0; - - String newMethodScopedName(String prefix) { - return prefix + nextId++; - } - } - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonInvocationHandler.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonInvocationHandler.java deleted file mode 100644 index 459c4ee3..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonInvocationHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.util.Map; - -/** - * The implementation of {@link InvocationHandler} for JSON types. It dispatches calls to method - * handlers from the map. - */ -class JsonInvocationHandler implements InvocationHandler { - private final ObjectData objectData; - private final Map methodHandlerMap; - - JsonInvocationHandler(ObjectData objectData, Map methodHandlerMap) { - this.objectData = objectData; - this.methodHandlerMap = methodHandlerMap; - } - - ObjectData getObjectData() { - return objectData; - } - - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - MethodHandler methodHandler = methodHandlerMap.get(method); - if (methodHandler == null) { - throw new RuntimeException("No method handler for " + method); - } - return methodHandler.handle(objectData, args); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonTypeParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonTypeParser.java deleted file mode 100644 index afd91901..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/JsonTypeParser.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.Util; -import org.json.simple.JSONObject; - -/** - * A parser that generates dynamic proxy implementation of JsonType interface - * for a {@link JSONObject}. - * It creates dynamic proxy instance in 2 steps. First {@link #parseValue(Object, ObjectData)} - * outputs {@link ObjectData}, which gets stored in field storage array. Later, when we are - * about to return the value to a user, it is converted to a dynamic proxy instance by - * {@link #VALUE_FINISHER} converter. We have to store an intermediate value for easier data - * manipulation (dynamic proxy does not have any interfaces that we could make use of). - */ -class JsonTypeParser extends SlowParser { - private final RefToType refToType; - private final boolean isNullable; - private final boolean isSubtyping; - - JsonTypeParser(RefToType refToType, boolean isNullable, boolean isSubtyping) { - this.refToType = refToType; - this.isNullable = isNullable; - this.isSubtyping = isSubtyping; - } - - RefToType getType() { - return refToType; - } - - @Override - public ObjectData parseValue(Object value, ObjectData thisData) - throws JsonProtocolParseException { - if (isNullable && value == null) { - return null; - } - if (value == null) { - throw new JsonProtocolParseException("null input"); - } - TypeHandler typeHandler = refToType.get(); - if (isSubtyping) { - return typeHandler.parse(value, thisData); - } else { - return typeHandler.parseRootImpl(value); - } - } - - @Override - public FieldLoadedFinisher getValueFinisher() { - return VALUE_FINISHER; - } - - @Override - public JsonTypeParser asJsonTypeParser() { - return this; - } - - public boolean isSubtyping() { - return isSubtyping; - } - - private static final FieldLoadedFinisher VALUE_FINISHER = new FieldLoadedFinisher() { - @Override - Object getValueForUser(Object cachedValue) { - if (cachedValue == null) { - return null; - } - ObjectData data = (ObjectData) cachedValue; - return data.getProxy(); - } - }; - - @Override - public void appendFinishedValueTypeNameJava(FileScope scope) { - scope.append(refToType.getTypeClass().getCanonicalName()); - } - - @Override - public void appendInternalValueTypeNameJava(FileScope classScope) { - classScope.append(classScope.getTypeImplReference(refToType.get())); - } - - @Override - void writeParseCode(MethodScope scope, String valueRef, - String superValueRef, String resultRef) { - String typeName = scope.getTypeImplReference(refToType.get()); - scope.startLine(typeName + " " + resultRef + ";\n"); - - scope.startLine("if (" + valueRef+ " == null) {\n"); - if (isNullable) { - scope.startLine(" " + resultRef+ " = null;\n"); - } else { - scope.startLine(" throw new " + Util.BASE_PACKAGE + - ".JsonProtocolParseException(\"null input\");\n"); - } - scope.startLine("} else {\n"); - if (isSubtyping) { - scope.startLine(" " + resultRef + " = new " + typeName + "(" + valueRef + ", " + - superValueRef + ");\n"); - } else { - scope.startLine(" " + resultRef + " = " + typeName + ".parse(" + valueRef + ");\n"); - } - scope.startLine("}\n"); - } - - @Override - boolean javaCodeThrowsException() { - return true; - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/MethodHandler.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/MethodHandler.java deleted file mode 100644 index 30feb36c..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/MethodHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.Method; -import java.lang.reflect.Type; -import java.util.Iterator; - -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; - -/** - * An abstract method handler for {@link JsonInvocationHandler}. - */ -abstract class MethodHandler { - abstract Object handle(ObjectData objectData, Object[] args) throws Throwable; - - abstract void writeMethodImplementationJava(ClassScope classScope, Method m); - - protected static void appendMethodSignatureJava(ClassScope scope, Method m, - Iterable paramNames) { - scope.append(m.getName()); - scope.append("("); - boolean firstArg = true; - Iterator namesIt = paramNames.iterator(); - for (Type arg : m.getGenericParameterTypes()) { - if (!firstArg) { - scope.append(", "); - } - JavaCodeGenerator.Util.writeJavaTypeName(arg, scope.getStringBuilder()); - scope.append(" " + namesIt.next()); - } - scope.append(")"); - } - - protected static void writeMethodDeclarationJava(ClassScope scope, Method m, - Iterable paramNames) { - scope.startLine("@Override public "); - JavaCodeGenerator.Util.writeJavaTypeName(m.getGenericReturnType(), scope.getStringBuilder()); - scope.append(" "); - appendMethodSignatureJava(scope, m, paramNames); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ObjectData.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ObjectData.java deleted file mode 100644 index f460db2d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ObjectData.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.util.concurrent.atomic.AtomicReferenceArray; - -import org.chromium.sdk.internal.protocolparser.JsonType; - -/** - * Stores all data for instance of json type. - * Each implementation of json type interface is a java dynamic proxy, that holds reference - * to {@link JsonInvocationHandler} which holds reference to this structure. ObjectData points - * back to dynamic proxy instance in {@link #proxy}. - */ -class ObjectData { - - /** - * Stores type-specific set of pre-parsed fields. - */ - private final Object[] fieldArray; - private final AtomicReferenceArray atomicReferenceArray; - - /** - * May be JSONObject (in most cases) or any - * object (for {@link JsonType#subtypesChosenManually()}=true). - */ - private final Object underlyingObject; - private final TypeHandler typeHandler; - - /** - * Holds reference to base type object data (or null). - */ - private final ObjectData superObjectData; - private Object proxy = null; - - ObjectData(TypeHandler typeHandler, Object inputObject, int fieldArraySize, - int volatileArraySize, ObjectData superObjectData) { - this.superObjectData = superObjectData; - this.typeHandler = typeHandler; - this.underlyingObject = inputObject; - - if (fieldArraySize == 0) { - fieldArray = null; - } else { - fieldArray = new Object[fieldArraySize]; - } - if (volatileArraySize == 0) { - atomicReferenceArray = null; - } else { - atomicReferenceArray = new AtomicReferenceArray(volatileArraySize); - } - } - - void initProxy(Object proxy) { - this.proxy = proxy; - } - - Object[] getFieldArray() { - return fieldArray; - } - - AtomicReferenceArray getAtomicReferenceArray() { - return atomicReferenceArray; - } - - Object getUnderlyingObject() { - return underlyingObject; - } - - TypeHandler getTypeHandler() { - return typeHandler; - } - - ObjectData getSuperObjectData() { - return superObjectData; - } - - Object getProxy() { - return proxy; - } - - @Override - public String toString() { - return typeHandler.getShortName() + "/" + underlyingObject; - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserGeneratorBase.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserGeneratorBase.java deleted file mode 100644 index 851091e8..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserGeneratorBase.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * Base class for all generator main classes. - */ -public class ParserGeneratorBase { - - protected static void mainImpl(String[] args, GenerateConfiguration configuration) { - Params params = parseArgs(args); - - StringBuilder stringBuilder = new StringBuilder(); - generateImpl(configuration, stringBuilder); - - String path = configuration.getPackageName().replace('.', '/'); - - File directory = new File(params.outputDirectory() + "/" + path); - directory.mkdirs(); - - File output = new File(directory, configuration.getClassName() + ".java"); - try { - Writer writer = new OutputStreamWriter(new FileOutputStream(output)); - - writer.append(stringBuilder); - writer.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - protected static class GenerateConfiguration { - private final String packageName; - private final String className; - private final DynamicParserImpl parserImpl; - private final Collection basePackagesMap; - - public GenerateConfiguration(String packageName, String className, - DynamicParserImpl parserImpl) { - this(packageName, className, parserImpl, Collections.emptyList()); - } - - public GenerateConfiguration(String packageName, String className, - DynamicParserImpl parserImpl, Collection basePackagesMap) { - this.packageName = packageName; - this.className = className; - this.parserImpl = parserImpl; - this.basePackagesMap = basePackagesMap; - } - - public String getPackageName() { - return packageName; - } - - public String getClassName() { - return className; - } - - public DynamicParserImpl getParserImpl() { - return parserImpl; - } - - public Collection getBasePackagesMap() { - return basePackagesMap; - } - } - - private interface Params { - String outputDirectory(); - } - - private static Params parseArgs(String[] args) { - final StringParam outputDirParam = new StringParam(); - - Map paramMap = new HashMap(3); - paramMap.put("output-dir", outputDirParam); - - for (String arg : args) { - if (!arg.startsWith("--")) { - throw new IllegalArgumentException("Unrecognized param: " + arg); - } - int equalsPos = arg.indexOf('=', 2); - String key; - String value; - if (equalsPos == -1) { - key = arg.substring(2).trim(); - value = null; - } else { - key = arg.substring(2, equalsPos).trim(); - value = arg.substring(equalsPos + 1).trim(); - } - ParamListener paramListener = paramMap.get(key); - if (paramListener == null) { - throw new IllegalArgumentException("Unrecognized param name: " + key); - } - try { - paramListener.setValue(value); - } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("Failed to set value of " + key, e); - } - } - for (Map.Entry en : paramMap.entrySet()) { - if (en.getValue().getValue() == null) { - throw new IllegalArgumentException("Parameter " + en.getKey() + " should be set"); - } - } - - return new Params() { - @Override - public String outputDirectory() { - return outputDirParam.getValue(); - } - }; - } - - private interface ParamListener { - void setValue(String value); - } - - private static class StringParam implements ParamListener { - private String value = null; - - @Override - public void setValue(String value) { - if (value == null) { - throw new IllegalArgumentException("Argument with value expected"); - } - if (this.value != null) { - throw new IllegalArgumentException("Argument value already set"); - } - this.value = value; - } - - public String getValue() { - return value; - } - } - - protected static GeneratedCodeMap buildParserMap(GenerateConfiguration configuration) { - return generateImpl(configuration, new StringBuilder()); - } - - private static GeneratedCodeMap generateImpl(GenerateConfiguration configuration, - StringBuilder stringBuilder) { - return configuration.getParserImpl().generateStaticParser(stringBuilder, - configuration.getPackageName(), configuration.getClassName(), - configuration.getBasePackagesMap()); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserRootImpl.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserRootImpl.java deleted file mode 100644 index 9e8c1846..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/ParserRootImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.lang.reflect.Type; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.chromium.sdk.internal.protocolparser.JsonParseMethod; -import org.chromium.sdk.internal.protocolparser.JsonParserRoot; -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; - -import static org.chromium.sdk.util.BasicUtil.*; -import org.json.simple.JSONObject; - -/** - * Dynamic implementation of user 'root' interface to parser. - * @param 'root' interface type - * @see JsonParserRoot - */ -class ParserRootImpl { - private final Class rootClass; - private final InvocationHandlerImpl invocationHandler; - private final R instance; - - ParserRootImpl(Class rootClass, Map, TypeHandler> type2TypeHandler) - throws JsonProtocolModelParseException { - this.rootClass = rootClass; - ParseInterfaceSession session = new ParseInterfaceSession(type2TypeHandler); - session.run(rootClass); - this.invocationHandler = session.createInvocationHandler(); - Object result = Proxy.newProxyInstance(rootClass.getClassLoader(), - new Class[] { rootClass }, invocationHandler); - this.instance = (R) result; - } - - R getInstance() { - return instance; - } - - private static class ParseInterfaceSession { - private final Map, TypeHandler> type2TypeHandler; - private final Set> visitedInterfaces = new HashSet>(1); - private final Map methodMap = new HashMap(); - - ParseInterfaceSession(Map, TypeHandler> type2TypeHandler) { - this.type2TypeHandler = type2TypeHandler; - } - - void run(Class clazz) throws JsonProtocolModelParseException { - parseInterfaceRecursive(clazz); - for (Method method : BaseHandlersLibrary.OBJECT_METHODS) { - methodMap.put(method, new SelfCallDelegate(method)); - } - } - - private void parseInterfaceRecursive(Class clazz) throws JsonProtocolModelParseException { - if (containsSafe(visitedInterfaces, clazz)) { - return; - } - visitedInterfaces.add(clazz); - if (!clazz.isInterface()) { - throw new JsonProtocolModelParseException( - "Parser root type must be an interface: " + clazz); - } - JsonParserRoot jsonParserRoot = clazz.getAnnotation(JsonParserRoot.class); - if (jsonParserRoot == null) { - throw new JsonProtocolModelParseException( - JsonParserRoot.class.getCanonicalName() + " annotation is expected in " + clazz); - } - for (Method m : clazz.getMethods()) { - JsonParseMethod jsonParseMethod = m.getAnnotation(JsonParseMethod.class); - if (jsonParseMethod == null) { - throw new JsonProtocolModelParseException( - JsonParseMethod.class.getCanonicalName() + " annotation is expected in " + clazz); - } - - Class[] exceptionTypes = m.getExceptionTypes(); - if (exceptionTypes.length > 1) { - throw new JsonProtocolModelParseException("Too many exception declared in " + m); - } - if (exceptionTypes.length < 1 || exceptionTypes[0] != JsonProtocolParseException.class) { - throw new JsonProtocolModelParseException( - JsonProtocolParseException.class.getCanonicalName() + - " exception must be declared in " + m); - } - - Type returnType = m.getGenericReturnType(); - TypeHandler typeHandler = type2TypeHandler.get(returnType); - if (typeHandler == null) { - throw new JsonProtocolModelParseException("Unknown return type in " + m); - } - - Type[] arguments = m.getGenericParameterTypes(); - if (arguments.length != 1) { - throw new JsonProtocolModelParseException("Exactly one argument is expected in " + m); - } - Type argument = arguments[0]; - MethodDelegate delegate; - if (argument == JSONObject.class) { - delegate = new ParseDelegate(typeHandler); - } else if (argument == Object.class) { - delegate = new ParseDelegate(typeHandler); - } else { - throw new JsonProtocolModelParseException("Unrecognized argument type in " + m); - } - methodMap.put(m, delegate); - } - - for (Type baseType : clazz.getGenericInterfaces()) { - if (baseType instanceof Class == false) { - throw new JsonProtocolModelParseException("Base interface must be class in " + clazz); - } - Class baseClass = (Class) baseType; - parseInterfaceRecursive(baseClass); - } - } - - InvocationHandlerImpl createInvocationHandler() { - return new InvocationHandlerImpl(methodMap); - } - } - - private static class InvocationHandlerImpl implements InvocationHandler { - private final Map map; - - InvocationHandlerImpl(Map map) { - this.map = map; - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - return getSafe(map, method).invoke(proxy, this, args); - } - - public void writeStaticMethodJava(ClassScope scope) { - for (Map.Entry en : map.entrySet()) { - en.getValue().writeStaticMethodJava(scope, en.getKey()); - } - } - } - - private static abstract class MethodDelegate { - abstract Object invoke(Object proxy, InvocationHandlerImpl invocationHandlerImpl, - Object[] args) throws Throwable; - - abstract void writeStaticMethodJava(ClassScope scope, Method key); - } - - private static class ParseDelegate extends MethodDelegate { - private final TypeHandler typeHandler; - - ParseDelegate(TypeHandler typeHandler) { - this.typeHandler = typeHandler; - } - - @Override - Object invoke(Object proxy, InvocationHandlerImpl invocationHandlerImpl, Object[] args) - throws JsonProtocolParseException { - Object obj = args[0]; - return typeHandler.parseRoot(obj); - } - - @Override - void writeStaticMethodJava(ClassScope scope, Method method) { - MethodHandler.writeMethodDeclarationJava(scope, method, STATIC_METHOD_PARAM_NAME_LIST); - scope.append(JavaCodeGenerator.Util.THROWS_CLAUSE + " {\n"); - scope.indentRight(); - - scope.startLine("return " + scope.getTypeImplReference(typeHandler) + ".parse(" + - STATIC_METHOD_PARAM_NAME + ");\n"); - scope.indentLeft(); - scope.startLine("}\n"); - scope.append("\n"); - } - - private static final String STATIC_METHOD_PARAM_NAME = "obj"; - - private static final List STATIC_METHOD_PARAM_NAME_LIST = - Collections.singletonList(STATIC_METHOD_PARAM_NAME); - } - - private static class SelfCallDelegate extends MethodDelegate { - private final Method method; - - SelfCallDelegate(Method method) { - this.method = method; - } - - @Override - Object invoke(Object proxy, InvocationHandlerImpl invocationHandlerImpl, Object[] args) - throws Throwable { - try { - return method.invoke(invocationHandlerImpl, args); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - } - - @Override - void writeStaticMethodJava(ClassScope scope, Method method) { - } - } - - public Class getType() { - return rootClass; - } - - public void writeStaticMethodJava(ClassScope rootClassScope) { - invocationHandler.writeStaticMethodJava(rootClassScope); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/QuickParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/QuickParser.java deleted file mode 100644 index 5294d224..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/QuickParser.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.JsonSubtypeCondition; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; - -/** - * A parser that accepts value of JSON field and outputs value in another form (e.g. string - * is converted to enum constant) to serve field getters in JsonType interfaces. - * The parser is called "quick" because it is supposed to employ only fast conversions. - * The quick parser should be suitable for subtype conditions - * (see {@link JsonSubtypeCondition} etc), because they should not take long to evaluate. - */ -abstract class QuickParser extends SlowParser { - @Override - public T parseValue(Object value, ObjectData thisData) throws JsonProtocolParseException { - return parseValueQuick(value); - } - - /** - * Parses input value and returns output that doesn't need any post-processing - * by {@link FieldLoadedFinisher} (see {@link SlowParser}). - */ - public abstract T parseValueQuick(Object value) throws JsonProtocolParseException; - - @Override - public QuickParser asQuickParser() { - return this; - } - - @Override - public FieldLoadedFinisher getValueFinisher() { - return null; - } - - @Override - public JsonTypeParser asJsonTypeParser() { - return null; - } - - @Override - public void appendInternalValueTypeNameJava(FileScope scope) { - appendFinishedValueTypeNameJava(scope); - } - - @Override - void writeParseCode(MethodScope scope, String valueRef, - String superValueRef, String resultRef) { - writeParseQuickCode(scope, valueRef, resultRef); - } - - @Override - abstract boolean javaCodeThrowsException(); - - abstract void writeParseQuickCode(MethodScope scope, String valueRef, String resultRef); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/RefToType.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/RefToType.java deleted file mode 100644 index 6b0567b7..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/RefToType.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -/** - * Late-resolvable reference to {@link TypeHandler}, for building {@link JsonTypeParser}. - */ -abstract class RefToType { - /** - * Returns json type. - */ - abstract Class getTypeClass(); - - /** - * Returns {@link TypeHandler} corresponding to {@link #getTypeClass()}. The method becomes - * available only after cross-reference resolving has been finished in depths of - * {@link DynamicParserImpl} constructor. - */ - abstract TypeHandler get(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SlowParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SlowParser.java deleted file mode 100644 index 42017586..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SlowParser.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; - -/** - * A parser that accepts value of JSON field and outputs value in another form (e.g. string - * is converted to enum constant) to serve field getters in JsonType interfaces. - *

- * First the input value should be processed by {@link #parseValue(Object, ObjectData)} method - * that returns intermediate value (that may be stored in {@link ObjectData#getFieldArray()} array). - * Then the output value may be obtained via value post-processor, available - * from {@link #getValueFinisher()} (which is null in most cases, but not always). - *

The parser's name "slow" reads "may be slow". It means that parser may do heavy operations. - * Alternatively parser may be (optionally) castable to {@link QuickParser} - * via {@link #asQuickParser()} method. - */ -abstract class SlowParser { - abstract T parseValue(Object value, ObjectData thisData) throws JsonProtocolParseException; - - abstract FieldLoadedFinisher getValueFinisher(); - abstract JsonTypeParser asJsonTypeParser(); - - QuickParser asQuickParser() { - return null; - } - - abstract void appendFinishedValueTypeNameJava(FileScope scope); - - abstract void appendInternalValueTypeNameJava(FileScope scope); - - abstract void writeParseCode(MethodScope methodScope, String valueRef, String superValueRef, - String resultRef); - - abstract boolean javaCodeThrowsException(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SubtypeCaster.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SubtypeCaster.java deleted file mode 100644 index f5afc586..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/SubtypeCaster.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; - -/** - * An internal facility for navigating from object of base type to object of subtype. Used only - * when user wants to parse JSON object as subtype. - * It works in terms of {@link ObjectData}. - */ -abstract class SubtypeCaster { - private final Class baseType; - private final RefToType subtypeRef; - - SubtypeCaster(Class baseType, RefToType subtypeRef) { - this.baseType = baseType; - this.subtypeRef = subtypeRef; - } - - abstract ObjectData getSubtypeObjectData(ObjectData baseObjectData) - throws JsonProtocolParseException; - - Class getSubtype() { - return subtypeRef.getTypeClass(); - } - - TypeHandler getSubtypeHandler() { - return subtypeRef.get(); - } - - Class getBaseType() { - return baseType; - } - - abstract void writeJava(ClassScope scope, String expectedTypeName, String superTypeValueRef, - String resultRef); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/TypeHandler.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/TypeHandler.java deleted file mode 100644 index ddc02e44..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/protocolparser/dynamicimpl/TypeHandler.java +++ /dev/null @@ -1,571 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.protocolparser.dynamicimpl; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; -import org.chromium.sdk.internal.protocolparser.JsonType; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl.VolatileFieldBinding; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.FileScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.Util; -import org.json.simple.JSONObject; - -/** - * The instance of this class corresponds to a particular json type. Primarily it serves - * as a factory for dynamic proxy/{@link ObjectData}, but also plays a role of type - * descriptor object. - */ -class TypeHandler { - private final Class typeClass; - private Constructor proxyClassConstructor = null; - - /** Size of array that holds type-specific instance data. */ - private final int fieldArraySize; - - private final List volatileFields; - - /** Method implementation for dynamic proxy. */ - private final Map methodHandlerMap; - - /** Loaders that should read values and save them in field array on parse time. */ - private final List fieldLoaders; - - /** Set of parsers that non-lazyly check that all fields read OK. */ - private final EagerFieldParser eagerFieldParser; - - /** Holds the data about recognizing subtypes. */ - private final AlgebraicCasesData algCasesData; - - /** Full set of allowed field names. Should be used to check that JSON object is well-formed. */ - private Set closedNameSet = null; - - /** Subtype aspects of the type or null */ - private final SubtypeAspect subtypeAspect; - - private final boolean requiresJsonObject; - - private final boolean checkLazyParsedFields; - - TypeHandler(Class typeClass, RefToType jsonSuperClass, int fieldArraySize, - List volatileFields, - Map methodHandlerMap, - List fieldLoaders, - List fieldConditions, EagerFieldParser eagerFieldParser, - AlgebraicCasesData algCasesData, boolean requiresJsonObject, - boolean checkLazyParsedFields) { - this.typeClass = typeClass; - this.fieldArraySize = fieldArraySize; - this.volatileFields = volatileFields; - this.methodHandlerMap = methodHandlerMap; - this.fieldLoaders = fieldLoaders; - this.eagerFieldParser = eagerFieldParser; - this.algCasesData = algCasesData; - this.requiresJsonObject = requiresJsonObject; - this.checkLazyParsedFields = checkLazyParsedFields; - if (jsonSuperClass == null) { - if (!fieldConditions.isEmpty()) { - throw new IllegalArgumentException(); - } - this.subtypeAspect = new AbsentSubtypeAspect(); - } else { - this.subtypeAspect = new ExistingSubtypeAspect(jsonSuperClass, fieldConditions); - } - } - - public Class getTypeClass() { - return typeClass; - } - - public ObjectData parse(Object input, ObjectData superObjectData) - throws JsonProtocolParseException { - try { - subtypeAspect.checkSuperObject(superObjectData); - - Map jsonProperties = null; - if (input instanceof JSONObject) { - jsonProperties = (JSONObject) input; - } - - ObjectData objectData = new ObjectData(this, input, fieldArraySize, volatileFields.size(), - superObjectData); - if (requiresJsonObject && jsonProperties == null) { - throw new JsonProtocolParseException("JSON object input expected"); - } - - for (FieldLoader fieldLoader : fieldLoaders) { - String fieldName = fieldLoader.getFieldName(); - Object value = jsonProperties.get(fieldName); - boolean hasValue; - if (value == null) { - hasValue = jsonProperties.containsKey(fieldName); - } else { - hasValue = true; - } - fieldLoader.parse(hasValue, value, objectData); - } - - if (closedNameSet != null) { - for (Object fieldNameObject : jsonProperties.keySet()) { - if (!closedNameSet.contains(fieldNameObject)) { - throw new JsonProtocolParseException("Unexpected field " + fieldNameObject); - } - } - } - - parseObjectSubtype(objectData, jsonProperties, input); - - if (checkLazyParsedFields) { - eagerFieldParser.parseAllFields(objectData); - } - wrapInProxy(objectData, methodHandlerMap); - return objectData; - } catch (JsonProtocolParseException e) { - throw new JsonProtocolParseException("Failed to parse type " + getTypeClass().getName(), e); - } - } - - public T parseRoot(Object input) throws JsonProtocolParseException { - ObjectData baseData = parseRootImpl(input); - return typeClass.cast(baseData.getProxy()); - } - - public ObjectData parseRootImpl(Object input) throws JsonProtocolParseException { - return subtypeAspect.parseFromSuper(input); - } - - SubtypeSupport getSubtypeSupport() { - return subtypeAspect; - } - - @SuppressWarnings("unchecked") - TypeHandler cast(Class typeClass) { - if (this.typeClass != typeClass) { - throw new RuntimeException(); - } - return (TypeHandler)this; - } - - void buildClosedNameSet() { - if (!this.subtypeAspect.isRoot()) { - return; - } - List> namesChain = new ArrayList>(3); - buildClosedNameSetRecursive(namesChain); - } - - private void buildClosedNameSetRecursive(List> namesChain) { - Set thisSet = new HashSet(); - eagerFieldParser.addAllFieldNames(thisSet); - for (FieldLoader loader : fieldLoaders) { - thisSet.add(loader.getFieldName()); - } - - if (algCasesData == null) { - JsonType jsonAnnotation = typeClass.getAnnotation(JsonType.class); - if (jsonAnnotation.allowsOtherProperties()) { - return; - } - for (Set set : namesChain) { - thisSet.addAll(set); - } - closedNameSet = thisSet; - } else { - namesChain.add(thisSet); - for (RefToType subtype : algCasesData.getSubtypes()) { - subtype.get().buildClosedNameSetRecursive(namesChain); - } - namesChain.remove(namesChain.size() - 1); - } - } - - String getShortName() { - String name = typeClass.getName(); - int dotPos = name.lastIndexOf('.'); - if (dotPos != -1) { - name = name.substring(dotPos + 1); - } - return "[" + name + "]"; - } - - static abstract class SubtypeSupport { - abstract void setSubtypeCaster(SubtypeCaster subtypeCaster) - throws JsonProtocolModelParseException; - abstract void checkHasSubtypeCaster() throws JsonProtocolModelParseException; - abstract void writeGetSuperMethodJava(ClassScope scope); - - abstract boolean checkConditions(Map jsonProperties) throws JsonProtocolParseException; - } - - private void parseObjectSubtype(ObjectData objectData, Map jsonProperties, Object input) - throws JsonProtocolParseException { - if (algCasesData == null) { - return; - } - algCasesData.parseObjectSubtype(objectData, jsonProperties, input); - } - - /** - * Encapsulate subtype aspects of the type. - */ - private static abstract class SubtypeAspect extends SubtypeSupport { - abstract void checkSuperObject(ObjectData superObjectData) throws JsonProtocolParseException; - abstract ObjectData parseFromSuper(Object input) throws JsonProtocolParseException; - abstract boolean isRoot(); - abstract void writeSuperFieldJava(ClassScope scope); - abstract void writeSuperConstructorParamJava(ClassScope scope); - abstract void writeSuperConstructorInitializationJava(MethodScope scope); - abstract void writeHelperMethodsJava(ClassScope classScope); - abstract void writeParseMethodJava(ClassScope classScope, String valueTypeName, - String inputRef); - } - - private class AbsentSubtypeAspect extends SubtypeAspect { - @Override - void checkSuperObject(ObjectData superObjectData) throws JsonProtocolParseException { - if (superObjectData != null) { - throw new JsonProtocolParseException("super object is not expected"); - } - } - @Override - boolean checkConditions(Map jsonProperties) throws JsonProtocolParseException { - throw new JsonProtocolParseException("Not a subtype: " + typeClass.getName()); - } - @Override - ObjectData parseFromSuper(Object input) throws JsonProtocolParseException { - return TypeHandler.this.parse(input, null); - } - @Override - void checkHasSubtypeCaster() { - } - @Override - void setSubtypeCaster(SubtypeCaster subtypeCaster) throws JsonProtocolModelParseException { - throw new JsonProtocolModelParseException("Not a subtype: " + typeClass.getName()); - } - @Override - boolean isRoot() { - return true; - } - @Override void writeGetSuperMethodJava(ClassScope scope) { - } - @Override void writeSuperFieldJava(ClassScope scope) { - } - @Override void writeSuperConstructorParamJava(ClassScope scope) { - } - @Override void writeSuperConstructorInitializationJava(MethodScope scope) { - } - @Override void writeHelperMethodsJava(ClassScope classScope) { - } - @Override void writeParseMethodJava(ClassScope scope, String valueTypeName, String inputRef) { - scope.startLine("return new " + valueTypeName + "(" + inputRef + ");\n"); - } - } - - private class ExistingSubtypeAspect extends SubtypeAspect { - private final RefToType jsonSuperClass; - - /** Set of conditions that check whether this type conforms as subtype. */ - private final List fieldConditions; - - /** The helper that casts base type instance to instance of our type */ - private SubtypeCaster subtypeCaster = null; - - private ExistingSubtypeAspect(RefToType jsonSuperClass, - List fieldConditions) { - this.jsonSuperClass = jsonSuperClass; - this.fieldConditions = fieldConditions; - } - - @Override - boolean checkConditions(Map map) throws JsonProtocolParseException { - for (FieldCondition condition : fieldConditions) { - String name = condition.getPropertyName(); - Object value = map.get(name); - boolean hasValue; - if (value == null) { - hasValue = map.containsKey(name); - } else { - hasValue = true; - } - boolean conditionRes = condition.checkValue(hasValue, value); - if (!conditionRes) { - return false; - } - } - return true; - } - - @Override - void checkSuperObject(ObjectData superObjectData) throws JsonProtocolParseException { - if (jsonSuperClass == null) { - return; - } - if (!jsonSuperClass.getTypeClass().isAssignableFrom( - superObjectData.getTypeHandler().getTypeClass())) { - throw new JsonProtocolParseException("Unexpected type of super object"); - } - } - - @Override - ObjectData parseFromSuper(Object input) throws JsonProtocolParseException { - ObjectData base = jsonSuperClass.get().parseRootImpl(input); - ObjectData subtypeObject = subtypeCaster.getSubtypeObjectData(base); - if (subtypeObject == null) { - throw new JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return subtypeObject; - } - @Override - void checkHasSubtypeCaster() throws JsonProtocolModelParseException { - if (this.subtypeCaster == null) { - throw new JsonProtocolModelParseException("Subtype caster should have been set in " + - typeClass.getName()); - } - } - - @Override - void setSubtypeCaster(SubtypeCaster subtypeCaster) throws JsonProtocolModelParseException { - if (jsonSuperClass == null) { - throw new JsonProtocolModelParseException(typeClass.getName() + - " does not have supertype declared" + - " (accessed from " + subtypeCaster.getBaseType().getName() + ")"); - } - if (subtypeCaster.getBaseType() != jsonSuperClass.getTypeClass()) { - throw new JsonProtocolModelParseException("Wrong base type in " + typeClass.getName() + - ", expected " + subtypeCaster.getBaseType().getName()); - } - if (subtypeCaster.getSubtype() != typeClass) { - throw new JsonProtocolModelParseException("Wrong subtype"); - } - if (this.subtypeCaster != null) { - throw new JsonProtocolModelParseException("Subtype caster is already set"); - } - this.subtypeCaster = subtypeCaster; - } - @Override - boolean isRoot() { - return false; - } - - @Override - void writeGetSuperMethodJava(ClassScope scope) { - scope.startLine("@Override public " + - jsonSuperClass.get().getTypeClass().getCanonicalName() + " getSuper() {\n"); - scope.startLine(" return superTypeValue;\n"); - scope.startLine("}\n"); - } - - @Override - void writeSuperFieldJava(ClassScope scope) { - scope.startLine("private final " + jsonSuperClass.get().getTypeClass().getCanonicalName() + - " superTypeValue;\n"); - } - - @Override - void writeSuperConstructorParamJava(ClassScope scope) { - scope.append(", " + jsonSuperClass.get().getTypeClass().getCanonicalName() + - " superValueParam"); - } - - @Override - void writeSuperConstructorInitializationJava(MethodScope scope) { - scope.startLine("this.superTypeValue = superValueParam;\n"); - } - - @Override - void writeHelperMethodsJava(ClassScope classScope) { - classScope.startLine("public static boolean checkSubtypeConditions(" + - "org.json.simple.JSONObject input)" + Util.THROWS_CLAUSE + " {\n"); - MethodScope methodScope = classScope.newMethodScope(); - methodScope.indentRight(); - for (FieldCondition condition : fieldConditions) { - String name = condition.getPropertyName(); - methodScope.startLine("{\n"); - methodScope.startLine(" Object value = input.get(\"" + name + "\");\n"); - methodScope.startLine(" boolean hasValue;\n"); - methodScope.startLine(" if (value == null) {\n"); - methodScope.startLine(" hasValue = input.containsKey(\"" + name + "\");\n"); - methodScope.startLine(" } else {\n"); - methodScope.startLine(" hasValue = true;\n"); - methodScope.startLine(" }\n"); - condition.writeCheckJava(methodScope, "value", "hasValue", "conditionRes"); - methodScope.startLine(" if (!conditionRes) {\n"); - methodScope.startLine(" return false;\n"); - methodScope.startLine(" }\n"); - methodScope.startLine("}\n"); - } - methodScope.startLine("return true;\n"); - methodScope.indentLeft(); - methodScope.startLine("}\n"); - } - - @Override - void writeParseMethodJava(ClassScope scope, String valueTypeName, String inputRef) { - String superTypeName = scope.getTypeImplReference(jsonSuperClass.get()); - scope.startLine(superTypeName + " superTypeValue = " + superTypeName + ".parse(" + - inputRef + ");\n"); - this.subtypeCaster.writeJava(scope, valueTypeName, "superTypeValue", "result"); - scope.startLine("if (result == null) {\n"); - scope.startLine(" throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" + - "\"Failed to get subtype object while parsing\");\n"); - scope.startLine("}\n"); - scope.startLine("return result;\n"); - } - } - - private void wrapInProxy(ObjectData data, Map methodHandlerMap) { - InvocationHandler handler = new JsonInvocationHandler(data, methodHandlerMap); - T proxy = createProxy(handler); - data.initProxy(proxy); - } - - @SuppressWarnings("unchecked") - private T createProxy(InvocationHandler invocationHandler) { - if (proxyClassConstructor == null) { - Class[] interfaces = new Class[] { typeClass }; - Class proxyClass = Proxy.getProxyClass(typeClass.getClassLoader(), interfaces); - Constructor c; - try { - c = proxyClass.getConstructor(InvocationHandler.class); - } catch (NoSuchMethodException e) { - throw new RuntimeException(e); - } - proxyClassConstructor = (Constructor) c; - } - try { - return proxyClassConstructor.newInstance(invocationHandler); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - } - - static abstract class EagerFieldParser { - abstract void parseAllFields(ObjectData objectData) throws JsonProtocolParseException; - abstract void addAllFieldNames(Set output); - } - - static abstract class AlgebraicCasesData { - abstract void parseObjectSubtype(ObjectData objectData, Map jsonProperties, Object input) - throws JsonProtocolParseException; - abstract List> getSubtypes(); - abstract void writeConstructorCodeJava(MethodScope methodScope); - abstract void writeFiledsJava(ClassScope classScope); - } - - public void writeStaticClassJava(FileScope fileScope) { - fileScope.startLine("// Type " + this.getTypeClass().getName() + "\n"); - String valueImplClassName = fileScope.getTypeImplShortName(this); - String typeClassName = this.getTypeClass().getCanonicalName(); - - fileScope.startLine("public static class " + valueImplClassName + " extends " + - Util.BASE_PACKAGE + ".implutil.GeneratedCodeLibrary."); - if (requiresJsonObject) { - fileScope.append("JsonValueBase"); - } else { - fileScope.append("ObjectValueBase"); - } - fileScope.append(" implements " + typeClassName + " {\n"); - - ClassScope classScope = fileScope.newClassScope(); - classScope.indentRight(); - - classScope.startLine("public static " + valueImplClassName + " parse(Object input)" + - Util.THROWS_CLAUSE + " {\n"); - classScope.indentRight(); - subtypeAspect.writeParseMethodJava(classScope, valueImplClassName, "input"); - classScope.indentLeft(); - classScope.startLine("}"); - classScope.append("\n"); - classScope.startLine(valueImplClassName + "(Object input"); - subtypeAspect.writeSuperConstructorParamJava(classScope); - classScope.append(")" + Util.THROWS_CLAUSE + " {\n"); - - { - MethodScope methodScope = classScope.newMethodScope(); - methodScope.indentRight(); - methodScope.startLine("super(input);\n"); - - subtypeAspect.writeSuperConstructorInitializationJava(methodScope); - - for (FieldLoader fieldLoader : fieldLoaders) { - String valueRef = methodScope.newMethodScopedName("value"); - String hasValueRef = methodScope.newMethodScopedName("hasValue"); - String fieldName = fieldLoader.getFieldName(); - methodScope.append("\n"); - Util.writeReadValueAndHasValue(methodScope, fieldName, "underlying", valueRef, - hasValueRef); - fieldLoader.writeFieldLoadJava(methodScope, valueRef, hasValueRef); - } - - if (algCasesData != null) { - algCasesData.writeConstructorCodeJava(methodScope); - } - - methodScope.indentLeft(); - - } - - classScope.startLine("}\n"); - - for (VolatileFieldBinding field : volatileFields) { - field.writeFieldDeclarationJava(classScope); - } - - for (FieldLoader loader : this.fieldLoaders) { - loader.writeFieldDeclarationJava(classScope); - } - - if (algCasesData != null) { - algCasesData.writeFiledsJava(classScope); - } - - subtypeAspect.writeSuperFieldJava(classScope); - - for (Map.Entry en : this.methodHandlerMap.entrySet()) { - Method m = en.getKey(); - MethodHandler methodHandler = en.getValue(); - methodHandler.writeMethodImplementationJava(classScope, m); - } - - BaseHandlersLibrary.writeBaseMethodsJava(classScope, this); - - subtypeAspect.writeHelperMethodsJava(classScope); - - classScope.indentLeft(); - classScope.startLine("}\n"); - fileScope.append("\n"); - } - - public void writeMapFillJava(ClassScope scope, String mapReference) { - scope.startLine("// Type " + this.getTypeClass().getName() + "\n"); - scope.startLine(mapReference + ".put(" + this.getTypeClass().getCanonicalName() + - ".class, new " + Util.BASE_PACKAGE + ".implutil.GeneratedCodeLibrary.AbstractType() {\n"); - scope.startLine(" @Override public Object parseJson(org.json.simple.JSONObject json)" + - Util.THROWS_CLAUSE + " {\n"); - scope.startLine(" return " + scope.getTypeImplShortName(this) + ".parse(json);\n"); - scope.startLine(" }\n"); - scope.startLine(" @Override public Object parseAnything(Object object)" + - Util.THROWS_CLAUSE + " {\n"); - scope.startLine(" return " + scope.getTypeImplShortName(this) + ".parse(object);\n"); - scope.startLine(" }\n"); - scope.startLine("});\n"); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/DynamicToolsProtocolParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/DynamicToolsProtocolParser.java deleted file mode 100644 index 82bc0bbc..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/DynamicToolsProtocolParser.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.shellprotocol.tools.protocol.input; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl; - -/** - * Dynamic implementation of tools protocol parser. - */ -public class DynamicToolsProtocolParser { - public static DynamicParserImpl createDynamic() { - List> classes = new ArrayList>(); - classes.add(ToolsMessage.class); - classes.add(ToolsMessage.Data.class); - - try { - return new DynamicParserImpl(ToolsProtocolParser.class, classes, - Collections.>emptyList(), false); - } catch (JsonProtocolModelParseException e) { - throw new RuntimeException(e); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserGenerator.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserGenerator.java deleted file mode 100644 index fde428c3..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserGenerator.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.shellprotocol.tools.protocol.input; - -import org.chromium.sdk.internal.protocolparser.dynamicimpl.ParserGeneratorBase; - -/** - * A main class that generates DevTools protocol static parser implementation. - */ -public class ToolsProtocolParserGenerator extends ParserGeneratorBase { - public static void main(String[] args) { - mainImpl(args, createConfiguration()); - } - - public static GenerateConfiguration createConfiguration() { - return new GenerateConfiguration("org.chromium.sdk.internal.shellprotocol.tools.protocol.input", - "GeneratedToolsProtocolParser", DynamicToolsProtocolParser.createDynamic()); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8DynamicParser.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8DynamicParser.java deleted file mode 100644 index 61abaa66..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8DynamicParser.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.v8native.protocol.input; - -import java.util.Arrays; -import java.util.List; - -import org.chromium.sdk.internal.liveeditprotocol.LiveEditDynamicParser; -import org.chromium.sdk.internal.protocolparser.JsonProtocolModelParseException; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl; -import org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo; -import org.chromium.sdk.internal.v8native.protocol.input.data.ContextData; -import org.chromium.sdk.internal.v8native.protocol.input.data.ContextHandle; -import org.chromium.sdk.internal.v8native.protocol.input.data.FunctionValueHandle; -import org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle; -import org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject; -import org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithRef; -import org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithValue; -import org.chromium.sdk.internal.v8native.protocol.input.data.RefWithDisplayData; -import org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle; -import org.chromium.sdk.internal.v8native.protocol.input.data.ScriptWithId; -import org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle; -import org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef; -import org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized; -import org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle; - -/** - * A dynamic implementation of a v8 protocol parser. - */ -public class V8DynamicParser { - public static DynamicParserImpl create() { - try { - List> interfaces = Arrays.asList( - IncomingMessage.class, - EventNotification.class, - SuccessCommandResponse.class, - FailedCommandResponse.class, - CommandResponse.class, - BreakEventBody.class, - EventNotificationBody.class, - CommandResponseBody.class, - BacktraceCommandBody.class, - FrameObject.class, - BreakpointBody.class, - ScopeBody.class, - ScopeRef.class, - VersionBody.class, - AfterCompileBody.class, - ChangeLiveBody.class, - RestartFrameBody.class, - RestartFrameBody.ResultDescription.class, - ListBreakpointsBody.class, - ScriptCollectedBody.class, - FlagsBody.class, - FlagsBody.FlagInfo.class, - - SomeHandle.class, - ScriptHandle.class, - ValueHandle.class, - RefWithDisplayData.class, - PropertyObject.class, - PropertyWithRef.class, - PropertyWithValue.class, - ObjectValueHandle.class, - FunctionValueHandle.class, - SomeRef.class, - SomeSerialized.class, - ContextHandle.class, - ContextData.class, - BreakpointInfo.class, - ScriptWithId.class - ); - - List> basePackages = - Arrays.>asList(LiveEditDynamicParser.create()); - - return new DynamicParserImpl(V8NativeProtocolParser.class, - interfaces, basePackages, false); - } catch (JsonProtocolModelParseException e) { - throw new RuntimeException(e); - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8ParserGenerator.java b/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8ParserGenerator.java deleted file mode 100644 index 706cfe4f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-dynamic-impl/parser/org/chromium/sdk/internal/v8native/protocol/input/V8ParserGenerator.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.v8native.protocol.input; - -import java.util.Collections; - -import org.chromium.sdk.internal.liveeditprotocol.LiveEditParserGenerator; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.GeneratedCodeMap; -import org.chromium.sdk.internal.protocolparser.dynamicimpl.ParserGeneratorBase; - -/** - * A main class that generates V8 protocol static parser implementation. - */ -public class V8ParserGenerator extends ParserGeneratorBase { - public static void main(String[] args) { - mainImpl(args, createConfiguration()); - } - - public static GenerateConfiguration createConfiguration() { - GeneratedCodeMap liveEditParserMap = - buildParserMap(LiveEditParserGenerator.createConfiguration()); - return new GenerateConfiguration("org.chromium.sdk.internal.v8native.protocol.input", - "GeneratedV8ProtocolParser", V8DynamicParser.create(), - Collections.singletonList(liveEditParserMap)); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java deleted file mode 100644 index 297d5328..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/liveeditprotocol/LiveEditProtocolParserAccess.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.liveeditprotocol; - -/** - * An accessor to generated implementation of a liveedit protocol parser. - */ -public class LiveEditProtocolParserAccess { - private static final GeneratedLiveEditProtocolParser PARSER = - new GeneratedLiveEditProtocolParser(); - - public static LiveEditProtocolParser get() { - return PARSER; - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java deleted file mode 100644 index ea879c68..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/ToolsProtocolParserAccess.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.shellprotocol.tools.protocol.input; - -/** - * An accessor to generated implementation of DevTools protocol parser. - */ -public class ToolsProtocolParserAccess { - public static ToolsProtocolParser get() { - return INSTANCE; - } - - private static final GeneratedToolsProtocolParser INSTANCE = new GeneratedToolsProtocolParser(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java deleted file mode 100644 index 680771e1..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/bridge/org/chromium/sdk/internal/v8native/protocol/input/V8ProtocolParserAccess.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.v8native.protocol.input; - -/** - * An accessor to generated implementation of a v8 protocol parser. - */ -public class V8ProtocolParserAccess { - - private static final GeneratedV8ProtocolParser PARSER = new GeneratedV8ProtocolParser(); - - public static V8NativeProtocolParser get() { - return PARSER; - } - -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/.placeholder b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/liveeditprotocol/GeneratedLiveEditProtocolParser.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/liveeditprotocol/GeneratedLiveEditProtocolParser.java deleted file mode 100644 index 6ad66995..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/liveeditprotocol/GeneratedLiveEditProtocolParser.java +++ /dev/null @@ -1,516 +0,0 @@ -// This is a generated source. -// See org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl for details - -package org.chromium.sdk.internal.liveeditprotocol; - -public class GeneratedLiveEditProtocolParser implements org.chromium.sdk.internal.liveeditprotocol.LiveEditProtocolParser { - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult parseLiveEditResult(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_0.parse(obj); - } - - // Type org.chromium.sdk.internal.liveeditprotocol.LiveEditResult - public static class Value_0 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.liveeditprotocol.LiveEditResult { - public static Value_0 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_0(input); - } - Value_0(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("textual_diff"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("textual_diff"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_4 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_4.parse(value0); - } - this.field_textual_diff = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field textual_diff", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: textual_diff"); - } - - Object value3 = underlying.get("change_tree"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("change_tree"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - Value_2 parsedValue5; - if (value3 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue5 = Value_2.parse(value3); - } - this.field_change_tree = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field change_tree", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: change_tree"); - } - } - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.TextualDiff field_textual_diff; - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.OldTreeNode field_change_tree; - @Override public boolean updated() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("updated"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("updated"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: updated"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.OldTreeNode change_tree() { - return field_change_tree; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.TextualDiff textual_diff() { - return field_textual_diff; - } - @Override public java.lang.String created_script_name() { - java.lang.String result; - Object value0 = underlying.get("created_script_name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("created_script_name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public boolean stack_modified() { - java.lang.Boolean result; - Object value0 = underlying.get("stack_modified"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("stack_modified"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - result = null; - } - return result; - } - } - - // Type org.chromium.sdk.internal.liveeditprotocol.LiveEditResult$OldTreeNode - public static class Value_2 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.OldTreeNode { - public static Value_2 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_2(input); - } - Value_2(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("positions"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("positions"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_3 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_3.parse(value0); - } - this.field_positions = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field positions", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: positions"); - } - - Object value3 = underlying.get("children"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("children"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - if (value3 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue6 = (org.json.simple.JSONArray) value3; - int size7 = arrayValue6.size(); - java.util.List list8 = new java.util.ArrayList(size7); - for (int index9 = 0; index9 < size7; index9++) { - Value_2 arrayComponent10; - if (arrayValue6.get(index9) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent10 = Value_2.parse(arrayValue6.get(index9)); - } - list8.add(arrayComponent10); - } - java.util.List parsedValue5 = java.util.Collections.unmodifiableList(list8); - this.field_children = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field children", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: children"); - } - - Object value11 = underlying.get("new_positions"); - boolean hasValue12; - if (value11 == null) { - hasValue12 = underlying.containsKey("new_positions"); - } else { - hasValue12 = true; - } - if (hasValue12) { - try { - Value_3 parsedValue13; - if (value11 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue13 = Value_3.parse(value11); - } - this.field_new_positions = parsedValue13; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field new_positions", e); - } - } else { - this.field_new_positions = null; - } - - Object value14 = underlying.get("new_children"); - boolean hasValue15; - if (value14 == null) { - hasValue15 = underlying.containsKey("new_children"); - } else { - hasValue15 = true; - } - if (hasValue15) { - try { - if (value14 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue17 = (org.json.simple.JSONArray) value14; - int size18 = arrayValue17.size(); - java.util.List list19 = new java.util.ArrayList(size18); - for (int index20 = 0; index20 < size18; index20++) { - Value_1 arrayComponent21; - if (arrayValue17.get(index20) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent21 = Value_1.parse(arrayValue17.get(index20)); - } - list19.add(arrayComponent21); - } - java.util.List parsedValue16 = java.util.Collections.unmodifiableList(list19); - this.field_new_children = parsedValue16; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field new_children", e); - } - } else { - this.field_new_children = null; - } - } - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions field_positions; - private final java.util.List field_children; - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions field_new_positions; - private final java.util.List field_new_children; - @Override public java.lang.String name() { - java.lang.String result; - try { - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: name"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions new_positions() { - return field_new_positions; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions positions() { - return field_positions; - } - @Override public java.lang.String status_explanation() { - java.lang.String result; - Object value0 = underlying.get("status_explanation"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("status_explanation"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String status() { - java.lang.String result; - try { - Object value0 = underlying.get("status"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("status"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: status"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.util.List new_children() { - return field_new_children; - } - @Override public java.util.List children() { - return field_children; - } - } - - // Type org.chromium.sdk.internal.liveeditprotocol.LiveEditResult$NewTreeNode - public static class Value_1 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.NewTreeNode { - public static Value_1 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_1(input); - } - Value_1(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("positions"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("positions"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_3 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_3.parse(value0); - } - this.field_positions = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field positions", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: positions"); - } - - Object value3 = underlying.get("children"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("children"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - if (value3 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue6 = (org.json.simple.JSONArray) value3; - int size7 = arrayValue6.size(); - java.util.List list8 = new java.util.ArrayList(size7); - for (int index9 = 0; index9 < size7; index9++) { - Value_1 arrayComponent10; - if (arrayValue6.get(index9) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent10 = Value_1.parse(arrayValue6.get(index9)); - } - list8.add(arrayComponent10); - } - java.util.List parsedValue5 = java.util.Collections.unmodifiableList(list8); - this.field_children = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field children", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: children"); - } - } - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions field_positions; - private final java.util.List field_children; - @Override public java.util.List children() { - return field_children; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions positions() { - return field_positions; - } - @Override public java.lang.String name() { - java.lang.String result; - try { - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: name"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.liveeditprotocol.LiveEditResult$Positions - public static class Value_3 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.Positions { - public static Value_3 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_3(input); - } - Value_3(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public long start_position() { - java.lang.Long result; - try { - Object value0 = underlying.get("start_position"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("start_position"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: start_position"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long end_position() { - java.lang.Long result; - try { - Object value0 = underlying.get("end_position"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("end_position"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: end_position"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.liveeditprotocol.LiveEditResult$TextualDiff - public static class Value_4 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.liveeditprotocol.LiveEditResult.TextualDiff { - public static Value_4 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_4(input); - } - Value_4(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("chunks"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("chunks"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value0; - int size4 = arrayValue3.size(); - java.util.List list5 = new java.util.ArrayList(size4); - for (int index6 = 0; index6 < size4; index6++) { - java.lang.Long arrayComponent7 = (java.lang.Long) arrayValue3.get(index6); - list5.add(arrayComponent7); - } - java.util.List parsedValue2 = java.util.Collections.unmodifiableList(list5); - this.field_chunks = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field chunks", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: chunks"); - } - } - private final java.util.List field_chunks; - @Override public java.util.List chunks() { - return field_chunks; - } - } - -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/GeneratedToolsProtocolParser.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/GeneratedToolsProtocolParser.java deleted file mode 100644 index 609a3feb..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/shellprotocol/tools/protocol/input/GeneratedToolsProtocolParser.java +++ /dev/null @@ -1,176 +0,0 @@ -// This is a generated source. -// See org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl for details - -package org.chromium.sdk.internal.shellprotocol.tools.protocol.input; - -public class GeneratedToolsProtocolParser implements org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsProtocolParser { - @Override public org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage parseToolsMessage(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_0.parse(obj); - } - - // Type org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage - public static class Value_0 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage { - public static Value_0 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_0(input); - } - Value_0(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("data"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("data"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_1 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_1.parse(value0); - } - this.field_data = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field data", e); - } - } else { - this.field_data = null; - } - } - private final org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage.Data field_data; - @Override public long result() { - java.lang.Long result; - try { - Object value0 = underlying.get("result"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("result"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: result"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage.Data data() { - return field_data; - } - @Override public java.lang.String command() { - java.lang.String result; - try { - Object value0 = underlying.get("command"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("command"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: command"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage$Data - public static class Value_1 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.ObjectValueBase implements org.chromium.sdk.internal.shellprotocol.tools.protocol.input.ToolsMessage.Data { - public static Value_1 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_1(input); - } - Value_1(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - private final java.util.concurrent.atomic.AtomicReference> > lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference>>(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_1 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_2 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_3 = new java.util.concurrent.atomic.AtomicReference(null); - @Override public java.lang.String asVersionData() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - java.lang.String result = lazyCachedField_3.get(); - if (result != null) { - return result; - } - java.lang.String parseResult0 = (java.lang.String) underlying; - if (parseResult0 != null) { - lazyCachedField_3.compareAndSet(null, parseResult0); - java.lang.String cachedResult = lazyCachedField_3.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public org.json.simple.JSONObject asDebuggerData() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - org.json.simple.JSONObject result = lazyCachedField_1.get(); - if (result != null) { - return result; - } - org.json.simple.JSONObject parseResult0 = (org.json.simple.JSONObject) underlying; - if (parseResult0 != null) { - lazyCachedField_1.compareAndSet(null, parseResult0); - org.json.simple.JSONObject cachedResult = lazyCachedField_1.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.util.List> asListTabsData() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - java.util.List> result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - if (underlying instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue1 = (org.json.simple.JSONArray) underlying; - int size2 = arrayValue1.size(); - java.util.List> list3 = new java.util.ArrayList>(size2); - for (int index4 = 0; index4 < size2; index4++) { - if (arrayValue1.get(index4) instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue6 = (org.json.simple.JSONArray) arrayValue1.get(index4); - int size7 = arrayValue6.size(); - java.util.List list8 = new java.util.ArrayList(size7); - for (int index9 = 0; index9 < size7; index9++) { - java.lang.Object arrayComponent10 = (java.lang.Object) arrayValue6.get(index9); - list8.add(arrayComponent10); - } - java.util.List arrayComponent5 = java.util.Collections.unmodifiableList(list8); - list3.add(arrayComponent5); - } - java.util.List> parseResult0 = java.util.Collections.unmodifiableList(list3); - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - java.util.List> cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.lang.String asNavigatedData() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - java.lang.String result = lazyCachedField_2.get(); - if (result != null) { - return result; - } - java.lang.String parseResult0 = (java.lang.String) underlying; - if (parseResult0 != null) { - lazyCachedField_2.compareAndSet(null, parseResult0); - java.lang.String cachedResult = lazyCachedField_2.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - } - -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/v8native/protocol/input/GeneratedV8ProtocolParser.java b/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/v8native/protocol/input/GeneratedV8ProtocolParser.java deleted file mode 100644 index 5a1c6b81..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-static-impl/generated/org/chromium/sdk/internal/v8native/protocol/input/GeneratedV8ProtocolParser.java +++ /dev/null @@ -1,4564 +0,0 @@ -// This is a generated source. -// See org.chromium.sdk.internal.protocolparser.dynamicimpl.DynamicParserImpl for details - -package org.chromium.sdk.internal.v8native.protocol.input; - -public class GeneratedV8ProtocolParser implements org.chromium.sdk.internal.v8native.protocol.input.V8NativeProtocolParser { - @Override public org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage parseIncomingMessage(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_13.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle parseScriptHandle(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_31.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.FrameObject parseFrameObject(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_12.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle parseValueHandle(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_36.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef parseSomeRef(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_34.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ContextData parseContextData(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_23.parse(obj); - } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.SuccessCommandResponse parseSuccessCommandResponse(org.json.simple.JSONObject obj) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return Value_20.parse(obj); - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage - public static class Value_13 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage { - public static Value_13 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_13(input); - } - Value_13(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - int code = -1; - if (Value_7.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (Value_5.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (code == -1) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Not a singe case matches"); - } - auto_alg_field_0 = (code == 0) ? new Value_7(underlying, this) : null; - auto_alg_field_1 = (code == 1) ? new Value_5(underlying, this) : null; - } - private final Value_7 auto_alg_field_0; - private final Value_5 auto_alg_field_1; - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponse asCommandResponse() { - return auto_alg_field_1; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.EventNotification asEventNotification() { - return auto_alg_field_0; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.MessageType type() { - org.chromium.sdk.internal.v8native.protocol.input.MessageType result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value0; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.MessageType r1 = org.chromium.sdk.internal.v8native.protocol.input.MessageType.valueOf(stringValue); - result = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field type in type org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long seq() { - java.lang.Long result; - try { - Object value0 = underlying.get("seq"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("seq"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: seq"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.EventNotification - public static class Value_7 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.EventNotification { - public static Value_7 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_13 superTypeValue = Value_13.parse(input); - Value_7 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_7(Object input, org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("body"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("body"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_8 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_8.parse(value0); - } - this.field_body = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field body", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: body"); - } - - Object value3 = underlying.get("refs"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("refs"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - if (value3 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue6 = (org.json.simple.JSONArray) value3; - int size7 = arrayValue6.size(); - java.util.List list8 = new java.util.ArrayList(size7); - for (int index9 = 0; index9 < size7; index9++) { - Value_33 arrayComponent10; - if (arrayValue6.get(index9) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent10 = Value_33.parse(arrayValue6.get(index9)); - } - list8.add(arrayComponent10); - } - java.util.List parsedValue5 = java.util.Collections.unmodifiableList(list8); - this.field_refs = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field refs", e); - } - } else { - this.field_refs = null; - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody field_body; - private final java.util.List field_refs; - private final org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.MessageType type() { - org.chromium.sdk.internal.v8native.protocol.input.MessageType result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value0; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.MessageType r1 = org.chromium.sdk.internal.v8native.protocol.input.MessageType.valueOf(stringValue); - result = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field type in type org.chromium.sdk.internal.v8native.protocol.input.EventNotification", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody body() { - return field_body; - } - @Override public java.util.List refs() { - return field_refs; - } - @Override public org.json.simple.JSONObject exception() { - org.json.simple.JSONObject result; - Object value0 = underlying.get("exception"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("exception"); - } else { - hasValue1 = true; - } - if (hasValue1) { - org.json.simple.JSONObject r1 = (org.json.simple.JSONObject) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String event() { - java.lang.String result; - try { - Object value0 = underlying.get("event"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("event"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: event"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.json.simple.JSONObject getUnderlyingObject() { - return underlying; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("type"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("type"); - } else { - hasValue = true; - } - boolean conditionRes; - if (hasValue) { - if (value instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.MessageType parserResult = org.chromium.sdk.internal.v8native.protocol.input.MessageType.valueOf(stringValue); - boolean constraintResult = CUSTOM_CONDITION_0.conforms(parserResult); - conditionRes = constraintResult; - } else { - conditionRes = false; - } - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.SuccessCommandResponse - public static class Value_20 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.SuccessCommandResponse { - public static Value_20 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_5 superTypeValue = Value_5.parse(input); - Value_20 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_20(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponse superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("body"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("body"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_6 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_6.parse(value0); - } - this.field_body = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field body", e); - } - } else { - this.field_body = null; - } - - Object value3 = underlying.get("refs"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("refs"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - if (value3 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue6 = (org.json.simple.JSONArray) value3; - int size7 = arrayValue6.size(); - java.util.List list8 = new java.util.ArrayList(size7); - for (int index9 = 0; index9 < size7; index9++) { - Value_33 arrayComponent10; - if (arrayValue6.get(index9) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent10 = Value_33.parse(arrayValue6.get(index9)); - } - list8.add(arrayComponent10); - } - java.util.List parsedValue5 = java.util.Collections.unmodifiableList(list8); - this.field_refs = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field refs", e); - } - } else { - this.field_refs = null; - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody field_body; - private final java.util.List field_refs; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponse superTypeValue; - @Override public boolean running() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("running"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("running"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: running"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public boolean success() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("success"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("success"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: success"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody body() { - return field_body; - } - @Override public java.util.List refs() { - return field_refs; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponse getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("success"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("success"); - } else { - hasValue = true; - } - boolean conditionRes; - if (hasValue) { - java.lang.Boolean parserResult = (java.lang.Boolean) value; - conditionRes = true == parserResult; - } else { - conditionRes = false; - } - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.FailedCommandResponse - public static class Value_9 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.FailedCommandResponse { - public static Value_9 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_5 superTypeValue = Value_5.parse(input); - Value_9 result = superTypeValue.auto_alg_field_1; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_9(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponse superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponse superTypeValue; - @Override public java.lang.String message() { - java.lang.String result; - try { - Object value0 = underlying.get("message"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("message"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: message"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long requestSeq() { - java.lang.Long result; - try { - Object value0 = underlying.get("request_seq"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("request_seq"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: request_seq"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String command() { - java.lang.String result; - Object value0 = underlying.get("command"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("command"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public boolean success() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("success"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("success"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: success"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponse getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("success"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("success"); - } else { - hasValue = true; - } - boolean conditionRes; - if (hasValue) { - java.lang.Boolean parserResult = (java.lang.Boolean) value; - conditionRes = false == parserResult; - } else { - conditionRes = false; - } - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.CommandResponse - public static class Value_5 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.CommandResponse { - public static Value_5 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_13 superTypeValue = Value_13.parse(input); - Value_5 result = superTypeValue.auto_alg_field_1; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_5(Object input, org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - int code = -1; - if (Value_20.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (Value_9.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (code == -1) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Not a singe case matches"); - } - auto_alg_field_0 = (code == 0) ? new Value_20(underlying, this) : null; - auto_alg_field_1 = (code == 1) ? new Value_9(underlying, this) : null; - } - private final Value_20 auto_alg_field_0; - private final Value_9 auto_alg_field_1; - private final org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.FailedCommandResponse asFailure() { - return auto_alg_field_1; - } - @Override public long requestSeq() { - java.lang.Long result; - try { - Object value0 = underlying.get("request_seq"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("request_seq"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: request_seq"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public boolean success() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("success"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("success"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: success"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.MessageType type() { - org.chromium.sdk.internal.v8native.protocol.input.MessageType result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value0; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.MessageType r1 = org.chromium.sdk.internal.v8native.protocol.input.MessageType.valueOf(stringValue); - result = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field type in type org.chromium.sdk.internal.v8native.protocol.input.CommandResponse", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.SuccessCommandResponse asSuccess() { - return auto_alg_field_0; - } - @Override public java.lang.String command() { - java.lang.String result; - Object value0 = underlying.get("command"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("command"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.IncomingMessage getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("type"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("type"); - } else { - hasValue = true; - } - boolean conditionRes; - if (hasValue) { - if (value instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.MessageType parserResult = org.chromium.sdk.internal.v8native.protocol.input.MessageType.valueOf(stringValue); - boolean constraintResult = CUSTOM_CONDITION_1.conforms(parserResult); - conditionRes = constraintResult; - } else { - conditionRes = false; - } - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.BreakEventBody - public static class Value_2 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.BreakEventBody { - public static Value_2 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_8 superTypeValue = Value_8.parse(input); - Value_2 result = superTypeValue.asBreakEventBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_2(Object input, org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("breakpoints"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("breakpoints"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value0; - int size4 = arrayValue3.size(); - java.util.List list5 = new java.util.ArrayList(size4); - for (int index6 = 0; index6 < size4; index6++) { - java.lang.Long arrayComponent7 = (java.lang.Long) arrayValue3.get(index6); - list5.add(arrayComponent7); - } - java.util.List parsedValue2 = java.util.Collections.unmodifiableList(list5); - this.field_breakpoints = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field breakpoints", e); - } - } else { - this.field_breakpoints = null; - } - - Object value8 = underlying.get("exception"); - boolean hasValue9; - if (value8 == null) { - hasValue9 = underlying.containsKey("exception"); - } else { - hasValue9 = true; - } - if (hasValue9) { - try { - Value_36 parsedValue10; - if (value8 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue10 = Value_36.parse(value8); - } - this.field_exception = parsedValue10; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field exception", e); - } - } else { - this.field_exception = null; - } - } - private final java.util.List field_breakpoints; - private final org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle field_exception; - private final org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superTypeValue; - @Override public java.lang.String invocationText() { - java.lang.String result; - Object value0 = underlying.get("invocationText"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("invocationText"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String sourceLineText() { - java.lang.String result; - Object value0 = underlying.get("sourceLineText"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceLineText"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.util.List breakpoints() { - return field_breakpoints; - } - @Override public java.lang.Long sourceColumn() { - java.lang.Long result; - Object value0 = underlying.get("sourceColumn"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceColumn"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle exception() { - return field_exception; - } - @Override public java.lang.Long sourceLine() { - java.lang.Long result; - Object value0 = underlying.get("sourceLine"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceLine"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.json.simple.JSONObject script() { - org.json.simple.JSONObject result; - Object value0 = underlying.get("script"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script"); - } else { - hasValue1 = true; - } - if (hasValue1) { - org.json.simple.JSONObject r1 = (org.json.simple.JSONObject) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Boolean uncaught() { - java.lang.Boolean result; - Object value0 = underlying.get("uncaught"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("uncaught"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody - public static class Value_8 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.ObjectValueBase implements org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody { - public static Value_8 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_8(input); - } - Value_8(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_1 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_2 = new java.util.concurrent.atomic.AtomicReference(null); - @Override public Value_19 asScriptCollectedBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_19 result = lazyCachedField_2.get(); - if (result != null) { - return result; - } - Value_19 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_19(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_2.compareAndSet(null, parseResult0); - Value_19 cachedResult = lazyCachedField_2.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_0 asAfterCompileBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_0 result = lazyCachedField_1.get(); - if (result != null) { - return result; - } - Value_0 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_0(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_1.compareAndSet(null, parseResult0); - Value_0 cachedResult = lazyCachedField_1.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_2 asBreakEventBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_2 result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - Value_2 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_2(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - Value_2 cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody - public static class Value_6 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.ObjectValueBase implements org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody { - public static Value_6 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_6(input); - } - Value_6(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_1 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_2 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_3 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_4 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_5 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference > lazyCachedField_6 = new java.util.concurrent.atomic.AtomicReference>(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_7 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_8 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_9 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_10 = new java.util.concurrent.atomic.AtomicReference(null); - @Override public Value_1 asBacktraceCommandBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_1 result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - Value_1 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_1(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - Value_1 cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public org.json.simple.JSONObject asLookupMap() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - org.json.simple.JSONObject result = lazyCachedField_7.get(); - if (result != null) { - return result; - } - org.json.simple.JSONObject parseResult0 = (org.json.simple.JSONObject) underlying; - if (parseResult0 != null) { - lazyCachedField_7.compareAndSet(null, parseResult0); - org.json.simple.JSONObject cachedResult = lazyCachedField_7.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_15 asRestartFrameBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_15 result = lazyCachedField_8.get(); - if (result != null) { - return result; - } - Value_15 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_15(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_8.compareAndSet(null, parseResult0); - Value_15 cachedResult = lazyCachedField_8.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_10 asFlagsBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_10 result = lazyCachedField_10.get(); - if (result != null) { - return result; - } - Value_10 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_10(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_10.compareAndSet(null, parseResult0); - Value_10 cachedResult = lazyCachedField_10.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_21 asVersionBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_21 result = lazyCachedField_4.get(); - if (result != null) { - return result; - } - Value_21 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_21(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_4.compareAndSet(null, parseResult0); - Value_21 cachedResult = lazyCachedField_4.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.util.List asScripts() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - java.util.List result = lazyCachedField_6.get(); - if (result != null) { - return result; - } - if (underlying instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue1 = (org.json.simple.JSONArray) underlying; - int size2 = arrayValue1.size(); - java.util.List list3 = new java.util.ArrayList(size2); - for (int index4 = 0; index4 < size2; index4++) { - Value_31 arrayComponent5; - if (arrayValue1.get(index4) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent5 = Value_31.parse(arrayValue1.get(index4)); - } - list3.add(arrayComponent5); - } - java.util.List parseResult0 = java.util.Collections.unmodifiableList(list3); - if (parseResult0 != null) { - lazyCachedField_6.compareAndSet(null, parseResult0); - java.util.List cachedResult = lazyCachedField_6.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_36 asEvaluateBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_36 result = lazyCachedField_2.get(); - if (result != null) { - return result; - } - Value_36 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = Value_36.parse(underlying); - } - if (parseResult0 != null) { - lazyCachedField_2.compareAndSet(null, parseResult0); - Value_36 cachedResult = lazyCachedField_2.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_4 asChangeLiveBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_4 result = lazyCachedField_5.get(); - if (result != null) { - return result; - } - Value_4 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_4(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_5.compareAndSet(null, parseResult0); - Value_4 cachedResult = lazyCachedField_5.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_17 asScopeBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_17 result = lazyCachedField_3.get(); - if (result != null) { - return result; - } - Value_17 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_17(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_3.compareAndSet(null, parseResult0); - Value_17 cachedResult = lazyCachedField_3.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_3 asBreakpointBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_3 result = lazyCachedField_1.get(); - if (result != null) { - return result; - } - Value_3 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_3(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_1.compareAndSet(null, parseResult0); - Value_3 cachedResult = lazyCachedField_1.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_14 asListBreakpointsBody() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_14 result = lazyCachedField_9.get(); - if (result != null) { - return result; - } - Value_14 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_14(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_9.compareAndSet(null, parseResult0); - Value_14 cachedResult = lazyCachedField_9.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.BacktraceCommandBody - public static class Value_1 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.BacktraceCommandBody { - public static Value_1 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_1 result = superTypeValue.asBacktraceCommandBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_1(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("frames"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("frames"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value0; - int size4 = arrayValue3.size(); - java.util.List list5 = new java.util.ArrayList(size4); - for (int index6 = 0; index6 < size4; index6++) { - Value_12 arrayComponent7; - if (arrayValue3.get(index6) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent7 = Value_12.parse(arrayValue3.get(index6)); - } - list5.add(arrayComponent7); - } - java.util.List parsedValue2 = java.util.Collections.unmodifiableList(list5); - this.field_frames = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field frames", e); - } - } else { - this.field_frames = null; - } - } - private final java.util.List field_frames; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.lang.Long fromFrame() { - java.lang.Long result; - Object value0 = underlying.get("fromFrame"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("fromFrame"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long toFrame() { - java.lang.Long result; - Object value0 = underlying.get("toFrame"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("toFrame"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.util.List frames() { - return field_frames; - } - @Override public java.lang.Long totalFrames() { - java.lang.Long result; - try { - Object value0 = underlying.get("totalFrames"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("totalFrames"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: totalFrames"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.FrameObject - public static class Value_12 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.FrameObject { - public static Value_12 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_12(input); - } - Value_12(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - - Object value0 = underlying.get("script"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_34 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_34.parse(value0); - } - this.field_script = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field script", e); - } - } else { - this.field_script = null; - } - } - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference > lazyCachedField_1 = new java.util.concurrent.atomic.AtomicReference>(null); - private final java.util.concurrent.atomic.AtomicReference > lazyCachedField_2 = new java.util.concurrent.atomic.AtomicReference>(null); - private final java.util.concurrent.atomic.AtomicReference > lazyCachedField_3 = new java.util.concurrent.atomic.AtomicReference>(null); - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_script; - @Override public java.lang.Boolean debuggerFrame() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("debuggerFrame"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("debuggerFrame"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: debuggerFrame"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long column() { - java.lang.Long result; - try { - Object value0 = underlying.get("column"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("column"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: column"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.json.simple.JSONObject func() { - org.json.simple.JSONObject result; - try { - Object value0 = underlying.get("func"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("func"); - } else { - hasValue1 = true; - } - if (hasValue1) { - org.json.simple.JSONObject r1 = (org.json.simple.JSONObject) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: func"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String sourceLineText() { - java.lang.String result; - try { - Object value0 = underlying.get("sourceLineText"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceLineText"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: sourceLineText"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.util.List locals() { - java.util.List result = lazyCachedField_1.get(); - if (result != null) { - return result; - } - java.util.List parseResult0; - try { - Object value1 = underlying.get("locals"); - boolean hasValue2; - if (value1 == null) { - hasValue2 = underlying.containsKey("locals"); - } else { - hasValue2 = true; - } - if (hasValue2) { - try { - if (value1 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value1; - final int size4 = arrayValue3.size(); - java.util.List r1 = new java.util.AbstractList() { - private final java.util.concurrent.atomic.AtomicReferenceArray cachedValues = new java.util.concurrent.atomic.AtomicReferenceArray(size4); - - @Override public int size() { return size4; } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject get(int index) { - org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject result0 = cachedValues.get(index); - if (result0 == null) { - try { - Object unparsed = arrayValue3.get(index); - Value_27 parsed; - if (unparsed == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsed = Value_27.parse(unparsed); - } - result0 = parsed; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException(e); - } - cachedValues.compareAndSet(index, null, result0); - result0 = cachedValues.get(index); - } - return result0; - } - }; - parseResult0 = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field locals in type org.chromium.sdk.internal.v8native.protocol.input.FrameObject", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: locals"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - if (parseResult0 != null) { - lazyCachedField_1.compareAndSet(null, parseResult0); - java.util.List cachedResult = lazyCachedField_1.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.util.List scopes() { - java.util.List result = lazyCachedField_2.get(); - if (result != null) { - return result; - } - java.util.List parseResult0; - try { - Object value1 = underlying.get("scopes"); - boolean hasValue2; - if (value1 == null) { - hasValue2 = underlying.containsKey("scopes"); - } else { - hasValue2 = true; - } - if (hasValue2) { - try { - if (value1 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value1; - final int size4 = arrayValue3.size(); - java.util.List r1 = new java.util.AbstractList() { - private final java.util.concurrent.atomic.AtomicReferenceArray cachedValues = new java.util.concurrent.atomic.AtomicReferenceArray(size4); - - @Override public int size() { return size4; } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.ScopeRef get(int index) { - org.chromium.sdk.internal.v8native.protocol.input.ScopeRef result0 = cachedValues.get(index); - if (result0 == null) { - try { - Object unparsed = arrayValue3.get(index); - Value_18 parsed; - if (unparsed == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsed = Value_18.parse(unparsed); - } - result0 = parsed; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException(e); - } - cachedValues.compareAndSet(index, null, result0); - result0 = cachedValues.get(index); - } - return result0; - } - }; - parseResult0 = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field scopes in type org.chromium.sdk.internal.v8native.protocol.input.FrameObject", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: scopes"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - if (parseResult0 != null) { - lazyCachedField_2.compareAndSet(null, parseResult0); - java.util.List cachedResult = lazyCachedField_2.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.util.List arguments() { - java.util.List result = lazyCachedField_3.get(); - if (result != null) { - return result; - } - java.util.List parseResult0; - try { - Object value1 = underlying.get("arguments"); - boolean hasValue2; - if (value1 == null) { - hasValue2 = underlying.containsKey("arguments"); - } else { - hasValue2 = true; - } - if (hasValue2) { - try { - if (value1 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value1; - final int size4 = arrayValue3.size(); - java.util.List r1 = new java.util.AbstractList() { - private final java.util.concurrent.atomic.AtomicReferenceArray cachedValues = new java.util.concurrent.atomic.AtomicReferenceArray(size4); - - @Override public int size() { return size4; } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject get(int index) { - org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject result0 = cachedValues.get(index); - if (result0 == null) { - try { - Object unparsed = arrayValue3.get(index); - Value_27 parsed; - if (unparsed == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsed = Value_27.parse(unparsed); - } - result0 = parsed; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException(e); - } - cachedValues.compareAndSet(index, null, result0); - result0 = cachedValues.get(index); - } - return result0; - } - }; - parseResult0 = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field arguments in type org.chromium.sdk.internal.v8native.protocol.input.FrameObject", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: arguments"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - if (parseResult0 != null) { - lazyCachedField_3.compareAndSet(null, parseResult0); - java.util.List cachedResult = lazyCachedField_3.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.lang.String type() { - java.lang.String result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef script() { - return field_script; - } - @Override public long line() { - java.lang.Long result; - try { - Object value0 = underlying.get("line"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("line"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: line"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef receiver() { - org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef parseResult0; - try { - Object value1 = underlying.get("receiver"); - boolean hasValue2; - if (value1 == null) { - hasValue2 = underlying.containsKey("receiver"); - } else { - hasValue2 = true; - } - if (hasValue2) { - try { - Value_34 r1; - if (value1 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - r1 = Value_34.parse(value1); - } - parseResult0 = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field receiver in type org.chromium.sdk.internal.v8native.protocol.input.FrameObject", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: receiver"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public java.lang.Long position() { - java.lang.Long result; - try { - Object value0 = underlying.get("position"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("position"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: position"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Boolean constructCall() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("constructCall"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("constructCall"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: constructCall"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long index() { - java.lang.Long result; - try { - Object value0 = underlying.get("index"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("index"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: index"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String text() { - java.lang.String result; - try { - Object value0 = underlying.get("text"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("text"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: text"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.BreakpointBody - public static class Value_3 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.BreakpointBody { - public static Value_3 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_3 result = superTypeValue.asBreakpointBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_3(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.lang.String type() { - java.lang.String result; - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long line() { - java.lang.Long result; - Object value0 = underlying.get("line"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("line"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String script_name() { - java.lang.String result; - Object value0 = underlying.get("script_name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script_name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Object column() { - java.lang.Object result; - Object value0 = underlying.get("column"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("column"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long breakpoint() { - java.lang.Long result; - try { - Object value0 = underlying.get("breakpoint"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("breakpoint"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: breakpoint"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.ScopeBody - public static class Value_17 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.ScopeBody { - public static Value_17 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_17 result = superTypeValue.asScopeBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_17(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("object"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("object"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_26 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_26.parse(value0); - } - this.field_object = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field object", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: object"); - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle field_object; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public long frameIndex() { - java.lang.Long result; - try { - Object value0 = underlying.get("frameIndex"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("frameIndex"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: frameIndex"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle object() { - return field_object; - } - @Override public long type() { - java.lang.Long result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String text() { - java.lang.String result; - Object value0 = underlying.get("text"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("text"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long index() { - java.lang.Long result; - try { - Object value0 = underlying.get("index"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("index"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: index"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.ScopeRef - public static class Value_18 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.ScopeRef { - public static Value_18 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_18(input); - } - Value_18(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public long type() { - java.lang.Long result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long index() { - java.lang.Long result; - try { - Object value0 = underlying.get("index"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("index"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: index"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.VersionBody - public static class Value_21 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.VersionBody { - public static Value_21 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_21 result = superTypeValue.asVersionBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_21(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.lang.String getV8Version() { - java.lang.String result; - try { - Object value0 = underlying.get("V8Version"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("V8Version"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: V8Version"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.AfterCompileBody - public static class Value_0 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.AfterCompileBody { - public static Value_0 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_8 superTypeValue = Value_8.parse(input); - Value_0 result = superTypeValue.asAfterCompileBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_0(Object input, org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("script"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_31 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_31.parse(value0); - } - this.field_script = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field script", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: script"); - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle field_script; - private final org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle script() { - return field_script; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.ChangeLiveBody - public static class Value_4 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.ChangeLiveBody { - public static Value_4 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_4 result = superTypeValue.asChangeLiveBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_4(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("result"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("result"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - org.chromium.sdk.internal.liveeditprotocol.GeneratedLiveEditProtocolParser.Value_0 parsedValue2; - if (value0 == null) { - parsedValue2 = null; - } else { - parsedValue2 = org.chromium.sdk.internal.liveeditprotocol.GeneratedLiveEditProtocolParser.Value_0.parse(value0); - } - this.field_result = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field result", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: result"); - } - } - private final org.chromium.sdk.internal.liveeditprotocol.LiveEditResult field_result; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.lang.Boolean stepin_recommended() { - java.lang.Boolean result; - Object value0 = underlying.get("stepin_recommended"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("stepin_recommended"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Object getChangeLog() { - java.lang.Object result; - try { - Object value0 = underlying.get("change_log"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("change_log"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: change_log"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.liveeditprotocol.LiveEditResult getResultDescription() { - return field_result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody - public static class Value_15 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody { - public static Value_15 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_15 result = superTypeValue.asRestartFrameBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_15(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("result"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("result"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_16 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_16.parse(value0); - } - this.field_result = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field result", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: result"); - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody.ResultDescription field_result; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody.ResultDescription getResultDescription() { - return field_result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody$ResultDescription - public static class Value_16 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.RestartFrameBody.ResultDescription { - public static Value_16 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_16(input); - } - Value_16(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public java.lang.Boolean stack_update_needs_step_in() { - java.lang.Boolean result; - Object value0 = underlying.get("stack_update_needs_step_in"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("stack_update_needs_step_in"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - result = null; - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.ListBreakpointsBody - public static class Value_14 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.ListBreakpointsBody { - public static Value_14 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_14 result = superTypeValue.asListBreakpointsBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_14(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("breakpoints"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("breakpoints"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value0; - int size4 = arrayValue3.size(); - java.util.List list5 = new java.util.ArrayList(size4); - for (int index6 = 0; index6 < size4; index6++) { - Value_22 arrayComponent7; - if (arrayValue3.get(index6) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent7 = Value_22.parse(arrayValue3.get(index6)); - } - list5.add(arrayComponent7); - } - java.util.List parsedValue2 = java.util.Collections.unmodifiableList(list5); - this.field_breakpoints = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field breakpoints", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: breakpoints"); - } - } - private final java.util.List field_breakpoints; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.util.List breakpoints() { - return field_breakpoints; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.ScriptCollectedBody - public static class Value_19 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.ScriptCollectedBody { - public static Value_19 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_8 superTypeValue = Value_8.parse(input); - Value_19 result = superTypeValue.asScriptCollectedBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_19(Object input, org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("script"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_32 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_32.parse(value0); - } - this.field_script = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field script", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: script"); - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.ScriptWithId field_script; - private final org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ScriptWithId script() { - return field_script; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.EventNotificationBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.FlagsBody - public static class Value_10 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.FlagsBody { - public static Value_10 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_6 superTypeValue = Value_6.parse(input); - Value_10 result = superTypeValue.asFlagsBody(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_10(Object input, org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("flags"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("flags"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value0; - int size4 = arrayValue3.size(); - java.util.List list5 = new java.util.ArrayList(size4); - for (int index6 = 0; index6 < size4; index6++) { - Value_11 arrayComponent7; - if (arrayValue3.get(index6) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent7 = Value_11.parse(arrayValue3.get(index6)); - } - list5.add(arrayComponent7); - } - java.util.List parsedValue2 = java.util.Collections.unmodifiableList(list5); - this.field_flags = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field flags", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: flags"); - } - } - private final java.util.List field_flags; - private final org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody superTypeValue; - @Override public java.util.List flags() { - return field_flags; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.CommandResponseBody getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.FlagsBody$FlagInfo - public static class Value_11 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.FlagsBody.FlagInfo { - public static Value_11 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_11(input); - } - Value_11(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public java.lang.Object value() { - java.lang.Object result; - try { - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: value"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String name() { - java.lang.String result; - try { - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: name"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle - public static class Value_33 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle { - public static Value_33 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_35 superTypeValue = Value_35.parse(input); - Value_33 result = superTypeValue.auto_alg_field_1; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_33(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_1 = new java.util.concurrent.atomic.AtomicReference(null); - private final java.util.concurrent.atomic.AtomicReference lazyCachedField_2 = new java.util.concurrent.atomic.AtomicReference(null); - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized superTypeValue; - @Override public java.lang.String type() { - java.lang.String result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public Value_31 asScriptHandle() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_31 result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - Value_31 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_31(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - Value_31 cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_36 asValueHandle() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_36 result = lazyCachedField_1.get(); - if (result != null) { - return result; - } - Value_36 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_36(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_1.compareAndSet(null, parseResult0); - Value_36 cachedResult = lazyCachedField_1.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public Value_24 asContextHandle() throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_24 result = lazyCachedField_2.get(); - if (result != null) { - return result; - } - Value_24 parseResult0; - if (underlying == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parseResult0 = new Value_24(underlying, this); - } - if (parseResult0 != null) { - lazyCachedField_2.compareAndSet(null, parseResult0); - Value_24 cachedResult = lazyCachedField_2.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public long handle() { - java.lang.Long result; - try { - Object value0 = underlying.get("handle"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("handle"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: handle"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("handle"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("handle"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle - public static class Value_31 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle { - public static Value_31 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_33 superTypeValue = Value_33.parse(input); - Value_31 result = superTypeValue.asScriptHandle(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_31(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("context"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("context"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_34 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_34.parse(value0); - } - this.field_context = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field context", e); - } - } else { - this.field_context = null; - } - - Object value3 = underlying.get("evalFromScript"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("evalFromScript"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - Value_35 parsedValue5; - if (value3 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue5 = Value_35.parse(value3); - } - this.field_evalFromScript = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field evalFromScript", e); - } - } else { - this.field_evalFromScript = null; - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_context; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized field_evalFromScript; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef context() { - return field_context; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized evalFromScript() { - return field_evalFromScript; - } - @Override public long lineCount() { - java.lang.Long result; - try { - Object value0 = underlying.get("lineCount"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("lineCount"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: lineCount"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long compilationType() { - java.lang.Long result; - try { - Object value0 = underlying.get("compilationType"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("compilationType"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: compilationType"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String source() { - java.lang.String result; - Object value0 = underlying.get("source"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("source"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String name() { - java.lang.String result; - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long sourceLength() { - java.lang.Long result; - try { - Object value0 = underlying.get("sourceLength"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceLength"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: sourceLength"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long id() { - java.lang.Long result; - try { - Object value0 = underlying.get("id"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("id"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: id"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.json.simple.JSONObject evalFromLocation() { - org.json.simple.JSONObject result; - Object value0 = underlying.get("evalFromLocation"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("evalFromLocation"); - } else { - hasValue1 = true; - } - if (hasValue1) { - org.json.simple.JSONObject r1 = (org.json.simple.JSONObject) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long columnOffset() { - java.lang.Long result; - try { - Object value0 = underlying.get("columnOffset"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("columnOffset"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: columnOffset"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Object data() { - java.lang.Object result; - Object value0 = underlying.get("data"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("data"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String sourceStart() { - java.lang.String result; - Object value0 = underlying.get("sourceStart"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("sourceStart"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long scriptType() { - java.lang.Long result; - try { - Object value0 = underlying.get("scriptType"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("scriptType"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: scriptType"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long lineOffset() { - java.lang.Long result; - try { - Object value0 = underlying.get("lineOffset"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("lineOffset"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: lineOffset"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String text() { - java.lang.String result; - try { - Object value0 = underlying.get("text"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("text"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: text"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle - public static class Value_36 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle { - public static Value_36 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_33 superTypeValue = Value_33.parse(input); - Value_36 result = superTypeValue.asValueHandle(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_36(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - int code = -1; - if (Value_26.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - auto_alg_field_0 = (code == 0) ? new Value_26(underlying, this) : null; - } - private final Value_26 auto_alg_field_0; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superTypeValue; - @Override public java.lang.String className() { - java.lang.String result; - Object value0 = underlying.get("className"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("className"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Object value() { - java.lang.Object result; - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long length() { - java.lang.Long result; - Object value0 = underlying.get("length"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("length"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle asObject() { - return auto_alg_field_0; - } - @Override public java.lang.Long fromIndex() { - java.lang.Long result; - Object value0 = underlying.get("fromIndex"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("fromIndex"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String type() { - java.lang.String result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long toIndex() { - java.lang.Long result; - Object value0 = underlying.get("toIndex"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("toIndex"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public void asNotObject() { - } - @Override public long handle() { - java.lang.Long result; - try { - Object value0 = underlying.get("handle"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("handle"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: handle"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String text() { - java.lang.String result; - try { - Object value0 = underlying.get("text"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("text"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: text"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.RefWithDisplayData - public static class Value_30 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.RefWithDisplayData { - public static Value_30 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_34 superTypeValue = Value_34.parse(input); - Value_30 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_30(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef superTypeValue; - @Override public java.lang.String type() { - java.lang.String result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Object value() { - java.lang.Object result; - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long scriptId() { - java.lang.Long result; - Object value0 = underlying.get("scriptId"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("scriptId"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String className() { - java.lang.String result; - Object value0 = underlying.get("className"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("className"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String inferredName() { - java.lang.String result; - Object value0 = underlying.get("inferredName"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("inferredName"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long ref() { - java.lang.Long result; - try { - Object value0 = underlying.get("ref"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("ref"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: ref"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("type"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("type"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject - public static class Value_27 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject { - public static Value_27 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_27(input); - } - Value_27(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - int code = -1; - if (Value_28.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (Value_29.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (code == -1) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Not a singe case matches"); - } - auto_alg_field_0 = (code == 0) ? new Value_28(underlying, this) : null; - auto_alg_field_1 = (code == 1) ? new Value_29(underlying, this) : null; - } - private final Value_28 auto_alg_field_0; - private final Value_29 auto_alg_field_1; - @Override public java.lang.Object name() { - java.lang.Object result; - try { - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: name"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithValue asPropertyWithValue() { - return auto_alg_field_1; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithRef asPropertyWithRef() { - return auto_alg_field_0; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithRef - public static class Value_28 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithRef { - public static Value_28 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_27 superTypeValue = Value_27.parse(input); - Value_28 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_28(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject superTypeValue; - @Override public java.lang.Object attributes() { - java.lang.Object result; - Object value0 = underlying.get("attributes"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("attributes"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Void value() { - Void result; - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - Void r1 = null; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long propertyType() { - java.lang.Long result; - Object value0 = underlying.get("propertyType"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("propertyType"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long ref() { - java.lang.Long result; - try { - Object value0 = underlying.get("ref"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("ref"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: ref"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("value"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("value"); - } else { - hasValue = true; - } - boolean conditionRes = !hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithValue - public static class Value_29 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.PropertyWithValue { - public static Value_29 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_27 superTypeValue = Value_27.parse(input); - Value_29 result = superTypeValue.auto_alg_field_1; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_29(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_34 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_34.parse(value0); - } - this.field_value = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field value", e); - } - } else { - this.field_value = null; - } - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_value; - private final org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject superTypeValue; - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef value() { - return field_value; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.PropertyObject getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("value"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("value"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle - public static class Value_26 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle { - public static Value_26 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_36 superTypeValue = Value_36.parse(input); - Value_26 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_26(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - - Object value0 = underlying.get("primitiveValue"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("primitiveValue"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - Value_34 parsedValue2; - if (value0 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue2 = Value_34.parse(value0); - } - this.field_primitiveValue = parsedValue2; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field primitiveValue", e); - } - } else { - this.field_primitiveValue = null; - } - - Object value3 = underlying.get("prototypeObject"); - boolean hasValue4; - if (value3 == null) { - hasValue4 = underlying.containsKey("prototypeObject"); - } else { - hasValue4 = true; - } - if (hasValue4) { - try { - Value_34 parsedValue5; - if (value3 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue5 = Value_34.parse(value3); - } - this.field_prototypeObject = parsedValue5; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field prototypeObject", e); - } - } else { - this.field_prototypeObject = null; - } - - Object value6 = underlying.get("protoObject"); - boolean hasValue7; - if (value6 == null) { - hasValue7 = underlying.containsKey("protoObject"); - } else { - hasValue7 = true; - } - if (hasValue7) { - try { - Value_34 parsedValue8; - if (value6 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue8 = Value_34.parse(value6); - } - this.field_protoObject = parsedValue8; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field protoObject", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: protoObject"); - } - - Object value9 = underlying.get("constructorFunction"); - boolean hasValue10; - if (value9 == null) { - hasValue10 = underlying.containsKey("constructorFunction"); - } else { - hasValue10 = true; - } - if (hasValue10) { - try { - Value_34 parsedValue11; - if (value9 == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsedValue11 = Value_34.parse(value9); - } - this.field_constructorFunction = parsedValue11; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field constructorFunction", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: constructorFunction"); - } - - Object value12 = underlying.get("properties"); - boolean hasValue13; - if (value12 == null) { - hasValue13 = underlying.containsKey("properties"); - } else { - hasValue13 = true; - } - if (hasValue13) { - try { - if (value12 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue15 = (org.json.simple.JSONArray) value12; - int size16 = arrayValue15.size(); - java.util.List list17 = new java.util.ArrayList(size16); - for (int index18 = 0; index18 < size16; index18++) { - Value_27 arrayComponent19; - if (arrayValue15.get(index18) == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - arrayComponent19 = Value_27.parse(arrayValue15.get(index18)); - } - list17.add(arrayComponent19); - } - java.util.List parsedValue14 = java.util.Collections.unmodifiableList(list17); - this.field_properties = parsedValue14; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field properties", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: properties"); - } - int code = -1; - if (Value_25.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - auto_alg_field_0 = (code == 0) ? new Value_25(underlying, this) : null; - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_primitiveValue; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_prototypeObject; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_protoObject; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef field_constructorFunction; - private final java.util.List field_properties; - private final Value_25 auto_alg_field_0; - private final org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle superTypeValue; - @Override public java.util.List properties() { - return field_properties; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef primitiveValue() { - return field_primitiveValue; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.FunctionValueHandle asFunction() { - return auto_alg_field_0; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef prototypeObject() { - return field_prototypeObject; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef protoObject() { - return field_protoObject; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef constructorFunction() { - return field_constructorFunction; - } - @Override public void notFunction() { - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("properties"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("properties"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.FunctionValueHandle - public static class Value_25 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.FunctionValueHandle { - public static Value_25 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_26 superTypeValue = Value_26.parse(input); - Value_25 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_25(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final java.util.concurrent.atomic.AtomicReference > lazyCachedField_0 = new java.util.concurrent.atomic.AtomicReference>(null); - private final org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle superTypeValue; - @Override public java.lang.Long scriptId() { - java.lang.Long result; - Object value0 = underlying.get("scriptId"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("scriptId"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long column() { - java.lang.Long result; - Object value0 = underlying.get("column"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("column"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String name() { - java.lang.String result; - Object value0 = underlying.get("name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String inferredName() { - java.lang.String result; - Object value0 = underlying.get("inferredName"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("inferredName"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public boolean resolved() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("resolved"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("resolved"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: resolved"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String source() { - java.lang.String result; - Object value0 = underlying.get("source"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("source"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.util.List scopes() { - java.util.List result = lazyCachedField_0.get(); - if (result != null) { - return result; - } - java.util.List parseResult0; - try { - Object value1 = underlying.get("scopes"); - boolean hasValue2; - if (value1 == null) { - hasValue2 = underlying.containsKey("scopes"); - } else { - hasValue2 = true; - } - if (hasValue2) { - try { - if (value1 instanceof org.json.simple.JSONArray == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Array value expected"); - } - final org.json.simple.JSONArray arrayValue3 = (org.json.simple.JSONArray) value1; - final int size4 = arrayValue3.size(); - java.util.List r1 = new java.util.AbstractList() { - private final java.util.concurrent.atomic.AtomicReferenceArray cachedValues = new java.util.concurrent.atomic.AtomicReferenceArray(size4); - - @Override public int size() { return size4; } - - @Override public org.chromium.sdk.internal.v8native.protocol.input.ScopeRef get(int index) { - org.chromium.sdk.internal.v8native.protocol.input.ScopeRef result0 = cachedValues.get(index); - if (result0 == null) { - try { - Object unparsed = arrayValue3.get(index); - Value_18 parsed; - if (unparsed == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("null input"); - } else { - parsed = Value_18.parse(unparsed); - } - result0 = parsed; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException(e); - } - cachedValues.compareAndSet(index, null, result0); - result0 = cachedValues.get(index); - } - return result0; - } - }; - parseResult0 = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field scopes in type org.chromium.sdk.internal.v8native.protocol.input.data.FunctionValueHandle", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: scopes"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - if (parseResult0 != null) { - lazyCachedField_0.compareAndSet(null, parseResult0); - java.util.List cachedResult = lazyCachedField_0.get(); - parseResult0 = cachedResult; - } - return parseResult0; - } - @Override public org.json.simple.JSONObject script() { - org.json.simple.JSONObject result; - Object value0 = underlying.get("script"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script"); - } else { - hasValue1 = true; - } - if (hasValue1) { - org.json.simple.JSONObject r1 = (org.json.simple.JSONObject) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long line() { - java.lang.Long result; - Object value0 = underlying.get("line"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("line"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.Long position() { - java.lang.Long result; - Object value0 = underlying.get("position"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("position"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.ObjectValueHandle getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("resolved"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("resolved"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef - public static class Value_34 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef { - public static Value_34 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_35 superTypeValue = Value_35.parse(input); - Value_34 result = superTypeValue.auto_alg_field_0; - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_34(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - int code = -1; - if (Value_30.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - auto_alg_field_0 = (code == 0) ? new Value_30(underlying, this) : null; - } - private final Value_30 auto_alg_field_0; - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized superTypeValue; - @Override public long ref() { - java.lang.Long result; - try { - Object value0 = underlying.get("ref"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("ref"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: ref"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.RefWithDisplayData asWithDisplayData() { - return auto_alg_field_0; - } - @Override public void asJustSomeRef() { - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - { - Object value = input.get("ref"); - boolean hasValue; - if (value == null) { - hasValue = input.containsKey("ref"); - } else { - hasValue = true; - } - boolean conditionRes = hasValue; - if (!conditionRes) { - return false; - } - } - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized - public static class Value_35 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.SomeSerialized { - public static Value_35 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_35(input); - } - Value_35(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - int code = -1; - if (Value_34.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 0; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (Value_33.checkSubtypeConditions(underlying)) { - if (code == -1) { - code = 1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("More than one case match"); - } - } - if (code == -1) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Not a singe case matches"); - } - auto_alg_field_0 = (code == 0) ? new Value_34(underlying, this) : null; - auto_alg_field_1 = (code == 1) ? new Value_33(underlying, this) : null; - } - private final Value_34 auto_alg_field_0; - private final Value_33 auto_alg_field_1; - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeRef asSomeRef() { - return auto_alg_field_0; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle asSmthWithHandle() { - return auto_alg_field_1; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ContextHandle - public static class Value_24 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ContextHandle { - public static Value_24 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - Value_33 superTypeValue = Value_33.parse(input); - Value_24 result = superTypeValue.asContextHandle(); - if (result == null) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to get subtype object while parsing"); - } - return result; - } - Value_24(Object input, org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superValueParam) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - this.superTypeValue = superValueParam; - } - private final org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle superTypeValue; - @Override public java.lang.Object data() { - java.lang.Object result; - Object value0 = underlying.get("data"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("data"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Object r1 = (java.lang.Object) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.SomeHandle getSuper() { - return superTypeValue; - } - public static boolean checkSubtypeConditions(org.json.simple.JSONObject input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return true; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ContextData - public static class Value_23 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ContextData { - public static Value_23 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_23(input); - } - Value_23(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public java.lang.String type() { - java.lang.String result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long value() { - java.lang.Long result; - try { - Object value0 = underlying.get("value"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("value"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: value"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo - public static class Value_22 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo { - public static Value_22 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_22(input); - } - Value_22(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public java.lang.String condition() { - java.lang.String result; - try { - Object value0 = underlying.get("condition"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("condition"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: condition"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long number() { - java.lang.Long result; - try { - Object value0 = underlying.get("number"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("number"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: number"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long script_id() { - java.lang.Long result; - Object value0 = underlying.get("script_id"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script_id"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public java.lang.String script_name() { - java.lang.String result; - Object value0 = underlying.get("script_name"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script_name"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - @Override public long ignoreCount() { - java.lang.Long result; - try { - Object value0 = underlying.get("ignoreCount"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("ignoreCount"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: ignoreCount"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long line() { - java.lang.Long result; - try { - Object value0 = underlying.get("line"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("line"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: line"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo.Type type() { - org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo.Type result; - try { - Object value0 = underlying.get("type"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("type"); - } else { - hasValue1 = true; - } - if (hasValue1) { - try { - if (value0 instanceof String == false) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("String value expected"); - } - String stringValue = (String) value0; - stringValue = stringValue.toUpperCase(); - org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo.Type r1 = org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo.Type.valueOf(stringValue); - result = r1; - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Failed to parse field type in type org.chromium.sdk.internal.v8native.protocol.input.data.BreakpointInfo", e); - } - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: type"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public long hit_count() { - java.lang.Long result; - try { - Object value0 = underlying.get("hit_count"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("hit_count"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: hit_count"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long groupId() { - java.lang.Long result; - try { - Object value0 = underlying.get("groupId"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("groupId"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: groupId"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.Long column() { - java.lang.Long result; - try { - Object value0 = underlying.get("column"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("column"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: column"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public boolean active() { - java.lang.Boolean result; - try { - Object value0 = underlying.get("active"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("active"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Boolean r1 = (java.lang.Boolean) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: active"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - @Override public java.lang.String script_regexp() { - java.lang.String result; - Object value0 = underlying.get("script_regexp"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("script_regexp"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.String r1 = (java.lang.String) value0; - result = r1; - } else { - result = null; - } - return result; - } - } - - // Type org.chromium.sdk.internal.v8native.protocol.input.data.ScriptWithId - public static class Value_32 extends org.chromium.sdk.internal.protocolparser.implutil.GeneratedCodeLibrary.JsonValueBase implements org.chromium.sdk.internal.v8native.protocol.input.data.ScriptWithId { - public static Value_32 parse(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - return new Value_32(input); - } - Value_32(Object input) throws org.chromium.sdk.internal.protocolparser.JsonProtocolParseException { - super(input); - } - @Override public long id() { - java.lang.Long result; - try { - Object value0 = underlying.get("id"); - boolean hasValue1; - if (value0 == null) { - hasValue1 = underlying.containsKey("id"); - } else { - hasValue1 = true; - } - if (hasValue1) { - java.lang.Long r1 = (java.lang.Long) value0; - result = r1; - } else { - throw new org.chromium.sdk.internal.protocolparser.JsonProtocolParseException("Field is not optional: id"); - } - } catch (org.chromium.sdk.internal.protocolparser.JsonProtocolParseException e) { - throw new org.chromium.sdk.internal.protocolparser.implutil.CommonImpl.ParseRuntimeException("On demand parsing failed for " + underlying, e); - } - return result; - } - } - - private static final org.chromium.sdk.internal.v8native.protocol.input.EventNotification.TypeValueCondition CUSTOM_CONDITION_0 = new org.chromium.sdk.internal.v8native.protocol.input.EventNotification.TypeValueCondition(); - private static final org.chromium.sdk.internal.v8native.protocol.input.CommandResponse.TypeValueCondition CUSTOM_CONDITION_1 = new org.chromium.sdk.internal.v8native.protocol.input.CommandResponse.TypeValueCondition(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBackendBase.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBackendBase.java deleted file mode 100644 index 94379263..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBackendBase.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.wip; - -import java.io.IOException; -import java.util.List; - -import org.chromium.sdk.wip.WipBackend; -import org.chromium.sdk.wip.WipBrowser; - -/** - * An internal interface to {@link WipBackend} implementation. - */ -public abstract class WipBackendBase implements WipBackend { - private final String id; - private final String description; - - public WipBackendBase(String id, String description) { - this.id = id; - this.description = description; - } - - @Override - public String getId() { - return id; - } - - @Override - public String getDescription() { - return description; - } - - static WipBackendBase castArgument(WipBackend wipBackend) { - try { - return (WipBackendBase) wipBackend; - } catch (ClassCastException e) { - throw new IllegalArgumentException("Incorrect backend argument type", e); - } - } - - public abstract List getTabs( - WipBrowserImpl browserImpl) throws IOException; -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserFactoryImpl.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserFactoryImpl.java deleted file mode 100644 index d77b26ab..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserFactoryImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.wip; - -import java.net.InetSocketAddress; - -import org.chromium.sdk.wip.WipBrowser; -import org.chromium.sdk.wip.WipBrowserFactory; - -public class WipBrowserFactoryImpl implements WipBrowserFactory { - @Override - public WipBrowser createBrowser(InetSocketAddress socketAddress, - LoggerFactory connectionLoggerFactory) { - return new WipBrowserImpl(socketAddress, connectionLoggerFactory); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserImpl.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserImpl.java deleted file mode 100644 index 94626954..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/internal/wip/WipBrowserImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.internal.wip; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.List; - -import org.chromium.sdk.Browser; -import org.chromium.sdk.wip.WipBackend; -import org.chromium.sdk.wip.WipBrowser; -import org.chromium.sdk.wip.WipBrowserFactory; - -/** - * Implements {@link Browser} API that offers connection to a browser tab - * via WebInspector 'WIP' Protocol. - */ -public class WipBrowserImpl implements WipBrowser { - private final InetSocketAddress socketAddress; - private final WipBrowserFactory.LoggerFactory connectionLoggerFactory; - - public WipBrowserImpl(InetSocketAddress socketAddress, - WipBrowserFactory.LoggerFactory connectionLoggerFactory) { - this.socketAddress = socketAddress; - this.connectionLoggerFactory = connectionLoggerFactory; - } - - @Override - public List getTabs(WipBackend wipBackend) throws IOException { - WipBackendBase backendBase = WipBackendBase.castArgument(wipBackend); - return backendBase.getTabs(this); - } - - public InetSocketAddress getSocketAddress() { - return socketAddress; - } - - public WipBrowserFactory.LoggerFactory getConnectionLoggerFactory() { - return connectionLoggerFactory; - } - - /** - * A convenience method for any currently unsupported operation. It nicely co-works with - * a return statements. - */ - public static T throwUnsupported() { - throw new UnsupportedOperationException(); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/EvaluateToMappingExtension.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/EvaluateToMappingExtension.java deleted file mode 100644 index 184bf754..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/EvaluateToMappingExtension.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -import java.util.Map; - -import org.chromium.sdk.JsEvaluateContext; -import org.chromium.sdk.JsObject; -import org.chromium.sdk.RelayOk; -import org.chromium.sdk.RemoteValueMapping; -import org.chromium.sdk.SyncCallback; -import org.chromium.sdk.JsEvaluateContext.EvaluateCallback; -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * An extension to evaluate methods, that allows to specify {@link RemoteValueMapping} - * as an additional argument 'targetMapping'. - * The extension is available from - * {@link WipJavascriptVm#getEvaluateWithDestinationMappingExtension()}. - */ -public interface EvaluateToMappingExtension { - /** - * Synchronously evaluates an arbitrary JavaScript {@code expression} in - * the particular context. - * Previously loaded {@link JsObject}s can be addressed from the expression if listed in - * additionalContext parameter. - * The evaluation result is reported to the specified {@code evaluateCallback}. - * The method will block until the evaluation result is available. - * - * @param expression to evaluate - * @param additionalContext a name-to-object-ref-id map that adds new values to an expression - * scope; may be null - * @param targetMapping mapping the result must belong to - * @param evaluateCallback to report the evaluation result to - * @throws MethodIsBlockingException if called from a callback because it blocks - * until remote VM returns result - */ - void evaluateSync(JsEvaluateContext evaluateContext, String expression, - Map additionalContext, RemoteValueMapping targetMapping, - EvaluateCallback evaluateCallback) throws MethodIsBlockingException; - - /** - * Asynchronously evaluates an arbitrary JavaScript {@code expression} in - * the particular context. - * Previously loaded {@link JsObject}s can be addressed from the expression if listed in - * additionalContext parameter. - * The evaluation result is reported to the specified {@code evaluateCallback}. - * The method doesn't block. - * - * @param expression to evaluate - * @param additionalContext a name-to-object-ref-id map that adds new values to an expression - * scope; may be null - * @param targetMapping mapping the result must belong to - * @param evaluateCallback to report the evaluation result to - * @param syncCallback to report the end of any processing - */ - RelayOk evaluateAsync(JsEvaluateContext evaluateContext, String expression, - Map additionalContext, RemoteValueMapping targetMapping, - EvaluateCallback evaluateCallback, SyncCallback syncCallback); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/PermanentRemoteValueMapping.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/PermanentRemoteValueMapping.java deleted file mode 100644 index 1b786e9d..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/PermanentRemoteValueMapping.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -import org.chromium.sdk.JsEvaluateContext; -import org.chromium.sdk.RelayOk; -import org.chromium.sdk.RemoteValueMapping; -import org.chromium.sdk.SyncCallback; -import org.chromium.sdk.util.GenericCallback; - -/** - * A {@link RemoteValueMapping} that outlives suspend/resume cycle of debugger. - * It represents both remote pointer table and local property caches. - * The remote table should be explicitly deleted when the mapping is no longer used. - * The table has a unique id. - */ -public interface PermanentRemoteValueMapping extends RemoteValueMapping { - String getId(); - - /** - * Asynchronously deletes mapping on remote VM. No values from this {@link RemoteValueMapping} - * must be used after this call. - */ - RelayOk delete(GenericCallback callback, SyncCallback syncCallback); - - /** - * Returns {@link JsEvaluateContext} that is tied with this {@link RemoteValueMapping}. - * By default all evaluate result values will use this {@link RemoteValueMapping}. - * (This can be overriden by {@link EvaluateToMappingExtension}). - */ - JsEvaluateContext getEvaluateContext(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBackend.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBackend.java deleted file mode 100644 index 59921f6f..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBackend.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -/** - * Abstract interface to WIP implementation, that is delivered in a separate library. - * It allows to have several versions of implementation in the system at the same time, - * which may be needed because WIP is not stable yet and is evolving quite rapidly. - *

- * A particular set-up should choose it's own way to get backed instances. For example - * Eclipse may use its extension point mechanism. Other frameworks can dynamically instantiate - * {@link Factory}. - */ -public interface WipBackend { - - /** - * @return a unique name of backend implementation - */ - String getId(); - - /** - * @return a human-readable implementation description that should help to tell what protocol - * version it supports - */ - String getDescription(); - - /** - * Used to dynamically instantiate {@link WipBackend}. Instance of {@link Factory} should be - * available via {@link ClassLoader}. - */ - interface Factory { - WipBackend create(); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowser.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowser.java deleted file mode 100644 index 763bd88a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowser.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -import java.io.IOException; -import java.util.List; - -import org.chromium.sdk.Browser; -import org.chromium.sdk.TabDebugEventListener; - -/** - * WIP interface to browser similar to {@link Browser}. - */ -public interface WipBrowser { - - /** - * @param backend wip implementation - */ - List getTabs(WipBackend backend) throws IOException; - - interface WipTabConnector { - String getTitle(); - - /** - * @return tab url that should be shown to user to let him select one tab from list - */ - String getUrl(); - - /** - * @return true if the tab is already attached at this moment - */ - boolean isAlreadyAttached(); - - /** - * Attaches to the related tab debugger. - * - * @param listener to report the debug events to - * @return null if operation failed - */ - WipBrowserTab attach(TabDebugEventListener listener) throws IOException; - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserFactory.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserFactory.java deleted file mode 100644 index e98814e2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserFactory.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -import java.net.InetSocketAddress; - -import org.chromium.sdk.ConnectionLogger; - -/** - * A factory for connections via WebInspector protocol (WIP). - */ -public interface WipBrowserFactory { - - WipBrowserFactory INSTANCE = new org.chromium.sdk.internal.wip.WipBrowserFactoryImpl(); - - WipBrowser createBrowser(InetSocketAddress socketAddress, - LoggerFactory connectionLoggerFactory); - - interface LoggerFactory { - ConnectionLogger newBrowserConnectionLogger(); - - ConnectionLogger newTabConnectionLogger(); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserTab.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserTab.java deleted file mode 100644 index aa42fa3a..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipBrowserTab.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -/** - * An abstraction of a remote Browser tab. Each browser tab contains - * a Javascript Virtual Machine. - */ -public interface WipBrowserTab { - /** - * @return the "parent" Browser instance - */ - WipBrowser getBrowser(); - - /** - * @return JavaScript VM representation of this tab - */ - WipJavascriptVm getJavascriptVm(); - - /** - * @return a URL of the corresponding browser tab - */ - String getUrl(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipJavascriptVm.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipJavascriptVm.java deleted file mode 100644 index f7a6f025..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/WipJavascriptVm.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk.wip; - -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.RemoteValueMapping; - -/** - * WIP-specific extension to {@link JavascriptVm}. - */ -public interface WipJavascriptVm extends JavascriptVm { - - /** - * Creates new {@link PermanentRemoteValueMapping}. If the groups with the - * same id already exists, another copy of local caches will be created which - * might be undesired result. It is user's responsibility to choose unique group id. - */ - PermanentRemoteValueMapping createPermanentValueMapping(String id); - - /** - * @return extension to evaluate operations that supports {@link RemoteValueMapping}; not null - */ - EvaluateToMappingExtension getEvaluateWithDestinationMappingExtension(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/package-info.java b/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/package-info.java deleted file mode 100644 index bab9aaf2..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src-wip/org/chromium/sdk/wip/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** - * Contains all WIP-specific interfaces. WIP implementation is currently experimental. - * These interfaces are subject to change. - */ -package org.chromium.sdk.wip; - diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Breakpoint.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Breakpoint.java deleted file mode 100755 index 67cb6069..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Breakpoint.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * A breakpoint in the browser JavaScript virtual machine. The {@code set*} - * method invocations will not take effect until - * {@link #flush} is called. - */ -public interface Breakpoint { - - /** - * This value is used when the corresponding parameter is absent. - * - * @see JavascriptVm#setBreakpoint - */ - int EMPTY_VALUE = -1; - - /** - * A breakpoint has this ID if it does not reflect an actual breakpoint in a - * JavaScript VM debugger. - */ - long INVALID_ID = -1; - - /** - * @return where this breakpoint was targeted to (e.g. script with a particular name or - * script with specified id) - */ - Target getTarget(); - - /** - * @return the breakpoint unique ID or {@link #INVALID_ID} if breakpoint was deleted - */ - long getId(); - - /** - * Returns line number of the breakpoint. As source is changed (typically with LiveEdit feature, - * and particularly by calling {@link UpdatableScript#setSourceOnRemote}) this value - * may become stale. It gets updated when {@link JavascriptVm#listBreakpoints} asynchronous - * method completes. - * - * @return 1-based line number in script source - */ - long getLineNumber(); - - /** - * @return whether this breakpoint is enabled - */ - boolean isEnabled(); - - /** - * Sets whether this breakpoint is enabled. - * Requires subsequent {@link #flush} call. - * @param enabled whether the breakpoint should be enabled - */ - void setEnabled(boolean enabled); - - /** - * @return breakpoint condition as plain JavaScript or {@code null} if none - */ - String getCondition(); - - /** - * Sets the breakpoint condition as plain JavaScript ({@code null} to clear). - * Requires subsequent {@link #flush} call. - * @param condition the new breakpoint condition - */ - void setCondition(String condition); - - /** - * Removes the breakpoint from the JS debugger and invokes the - * callback once the operation has finished. This operation does not require - * a {@code flush} invocation. - * - * @param callback to invoke once the operation result is available - */ - RelayOk clear(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback); - - /** - * Flushes the breakpoint parameter changes (set* methods) into the browser - * and invokes the callback once the operation has finished. This method must - * be called for the set* method invocations to take effect. - * - * @param callback to invoke once the operation result is available - */ - RelayOk flush(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback); - - /** - * @return extension that supports ignore count property of breakpoint, same instance - * that {@link JavascriptVm#getBreakpointTypeExtension()} returns - */ - IgnoreCountBreakpointExtension getIgnoreCountBreakpointExtension(); - - /** - * A reference to some JavaScript text that you can set breakpoints on. The reference may - * be in form of script name, script id etc. - * This type is essentially an Algebraic Type with several cases. Additional cases are provided - * in form of optional extensions. - * @see Target.ScriptName - * @see Target.ScriptId - * @see BreakpointTypeExtension - */ - abstract class Target { - /** - * Dispatches call on the actual Target type. - * @param visitor user-provided {@link Visitor} that may also implement some additional - * interfaces (for extended types) that is checked on runtime - * @see BreakpointTypeExtension - */ - public abstract R accept(Visitor visitor); - - public interface Visitor { - R visitScriptName(String scriptName); - R visitScriptId(Object scriptId); - R visitUnknown(Target target); - } - - /** - * A target that refers to a script by its id. - */ - public static class ScriptId extends Target { - private final Object id; - public ScriptId(Object id) { - this.id = id; - } - @Override public R accept(Visitor visitor) { - return visitor.visitScriptId(id); - } - } - - /** - * A target that refers to a script by its name. After {@link JavascriptVm#setBreakpoint} - * is called, breakpoint will be set on every matching script currently loaded in VM. - * E.g. you can safely set a breakpoint before the script is actually loaded. - */ - public static class ScriptName extends Target { - private final String name; - public ScriptName(String name) { - this.name = name; - } - @Override public R accept(Visitor visitor) { - return visitor.visitScriptName(name); - } - } - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BreakpointTypeExtension.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BreakpointTypeExtension.java deleted file mode 100644 index d343c9be..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BreakpointTypeExtension.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * An extension to supported breakpoint target types. The extension is put separate because - * {@link JavascriptVm} may or may not support it (depends on back-end and remote VM). - * Each additional breakpoint target type has a dedicated XXXSupport interface and the - * corresponding getter. Getter returns null if the type is unsupported by the current - * {@link JavascriptVm}. The support interface provides target constructor method and - * additional visitor subinterface that {@link Breakpoint.Target#accept} will recognize. - *

- * The instance may be obtained by {@link JavascriptVm#getBreakpointTypeExtension()}. - *

- * This API is designed to keep user code fully compilable when new extension is added. - * This API doesn't allow to add user target types. - */ -public interface BreakpointTypeExtension { - - /** - * Supports targets that refer to function text in form of function-returning - * JavaScript expression. - * E.g. you can set a breakpoint on the 5th line of user method addressed as - * 'PropertiesDialog.prototype.loadData'. - * Expression is calculated immediately and never recalculated again. - */ - interface FunctionSupport { - /** - * @return not null - */ - Breakpoint.Target createTarget(String expression); - - /** - * Additional interface that user visitor may implement for {@link Breakpoint.Target#accept} - * method. - */ - interface Visitor extends Breakpoint.Target.Visitor { - R visitFunction(String expression); - } - } - - /** - * @return null if 'function' target type is unsupported. - */ - FunctionSupport getFunctionSupport(); - - /** - * Supports targets that refer to a script by a 'regexp' of its name. - * After {@link JavascriptVm#setBreakpoint} is - * called, breakpoint will be set on every script currently loaded in VM whose name matches. - * E.g. you can safely set a breakpoint before the script is actually loaded. - */ - interface ScriptRegExpSupport { - /** - * @param regExp JavaScript RegExp - * @return not null - */ - Breakpoint.Target createTarget(String regExp); - - /** - * Additional interface that user visitor may implement for {@link Breakpoint.Target#accept} - * method. - */ - interface Visitor extends Breakpoint.Target.Visitor { - /** - * @param regExp regular expression pattern (as specified in JavaScript) that will be - * used to match script names - */ - R visitRegExp(String regExp); - } - } - - /** - * @return null if 'regexp' target type is unsupported. - */ - ScriptRegExpSupport getScriptRegExpSupport(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Browser.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Browser.java deleted file mode 100755 index 5080491e..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/Browser.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.io.IOException; -import java.util.List; - -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * An "entry point" of the SDK. A Browser instance is usually constructed once - * per a debugged browser instance. - */ -public interface Browser { - - /** - * Establishes the browser connection and checks for the protocol version - * supported by the remote, then creates object that downloads list of tabs. - * - * @return new instance of TabFetcher that must be dismissed after use to control - * connection use - * @throws IOException if there was a transport layer error - * @throws UnsupportedVersionException if the SDK protocol version is not - * compatible with that supported by the browser - */ - TabFetcher createTabFetcher() throws IOException, UnsupportedVersionException; - - - /** - * Helps to fetch currently opened browser tabs. It also holds open connection to - * browser. After instance was used {@code #dismiss} should be called to release - * connection. - */ - interface TabFetcher { - /** - * Retrieves all browser tabs currently opened. It lists all tabs, including - * those already attached. - * - * @return tabs that can be debugged in the associated Browser instance. An - * empty list is returned if no tabs are available. - * @throws IOException if there was a transport layer failure - * @throws IllegalStateException if this method is called while another - * invocation of the same method is in flight, or the Browser instance - * is not connected - */ - List getTabs() throws IOException, IllegalStateException; - - /** - * Should release connection. If no browser tabs is attached at the moment, - * connection may actually close. - */ - void dismiss(); - } - - /** - * Tab list item that is fetched from browser. Connector is either can used to attach to tab or - * can be already attached. - */ - interface TabConnector { - /** - * @return tab url that should be shown to user to let him select one tab from list - */ - String getUrl(); - - /** - * @return true if the tab is already attached at this moment - */ - boolean isAlreadyAttached(); - - /** - * Attaches to the related tab debugger. - * - * @param listener to report the debug events to - * @return null if operation failed - * @throws MethodIsBlockingException because initialization implies couple of remote calls - * (to request version etc) - */ - BrowserTab attach(TabDebugEventListener listener) - throws IOException, MethodIsBlockingException; - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserFactory.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserFactory.java deleted file mode 100755 index 4823dfea..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserFactory.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.net.SocketAddress; -import java.util.logging.Logger; - -import org.chromium.sdk.internal.BrowserFactoryImpl; - -/** - * A factory for Browser instances. - */ -public abstract class BrowserFactory { - - private static BrowserFactory instance; - - /** - * Gets a {@link BrowserFactory} instance. This method should be overridden by - * implementations that want to construct other implementations of - * {@link Browser}. - * - * @return a BrowserFactory singleton instance - */ - public static BrowserFactory getInstance() { - if (instance == null) { - instance = new BrowserFactoryImpl(); - } - return instance; - } - - /** - * Returns a Browser implementor instance that talks to a browser listening at - * {@code socketAddress}. Note that you shouldn't try to create several instances - * of Browser connecting to the same {@code socketAddress}. - * - * @param socketAddress the browser is listening on - * @param connectionLoggerFactory provides facility for listening to network - * traffic; may be null - * @return a Browser instance for the {@code socketAddress} - */ - public abstract Browser create(SocketAddress socketAddress, - ConnectionLogger.Factory connectionLoggerFactory); - - /** - * Constructs StandaloneVm instance that talks to a V8 JavaScript VM via - * DebuggerAgent opened at {@code socketAddress}. - * @param socketAddress V8 DebuggerAgent is listening on - * @param connectionLogger provides facility for listening to network - * traffic; may be null - */ - public abstract StandaloneVm createStandalone(SocketAddress socketAddress, - ConnectionLogger connectionLogger); - - /** - * @return SDK root logger that can be used to add handlers or to adjust log level - */ - public static Logger getRootLogger() { - return LOGGER; - } - - private static final Logger LOGGER = Logger.getLogger("org.chromium.sdk"); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserTab.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserTab.java deleted file mode 100755 index 61bb3072..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/BrowserTab.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - - -/** - * A lightweight abstraction of a remote Browser tab. Each browser tab - * corresponds to a Javascript Virtual Machine and is_a {code JavascriptVm}. - */ -public interface BrowserTab extends JavascriptVm { - - /** - * @return the "parent" Browser instance - */ - Browser getBrowser(); - - /** - * @return a current URL of the corresponding browser tab - */ - String getUrl(); - -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallFrame.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallFrame.java deleted file mode 100755 index a9218167..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallFrame.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.util.List; - -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * An object that represents a browser JavaScript VM call frame. - */ -public interface CallFrame { - - /** - * @return the scopes known in this frame; ordered, innermost first, global scope last - */ - List getVariableScopes(); - - /** - * @return the receiver variable known in this frame - * @throws MethodIsBlockingException because it may need to load value from remote - */ - JsVariable getReceiverVariable() throws MethodIsBlockingException; - - /** - * @return the source script this call frame is associated with; {@code null} - * if no script is associated with the call frame (e.g. an exception - * could have been thrown in a native script) - */ - Script getScript(); - - /** - * @return the start position (absolute) of the current statement in the Script corresponding - * to this frame or null if position in not available - */ - TextStreamPosition getStatementStartPosition(); - - /** - * @return the name of the current function of this frame - */ - String getFunctionName(); - - /** - * @return context for evaluating expressions in scope of this frame - */ - JsEvaluateContext getEvaluateContext(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallbackSemaphore.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallbackSemaphore.java deleted file mode 100644 index 820ee762..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/CallbackSemaphore.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; - -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * Convenient implementation of {@code SyncCallback}. Client may create one, - * then call asynchronous command, and finally wait on blocking method - * {@code #tryAcquire()} or {@link #acquireDefault}. - *

- * Class uses symbolic parameter {@link RelayOk} in its methods that suggests that - * user should first call some asynchronous method, then pass it to the acquire method. - */ -public class CallbackSemaphore implements SyncCallback { - public static final long OPERATION_TIMEOUT_MS = 120000; - - private final Semaphore sem = new Semaphore(0); - private Exception savedException; - - /** - * Tries to acquire semaphore with some reasonable default timeout. - * @param relayOk symbolic return value from the asynchronous operation that we are waiting for - * @return false if {@code #OPERATION_TIMEOUT_MS} was exceeded and we gave up - * @throws MethodIsBlockingException if called from a callback - */ - public boolean tryAcquireDefault(RelayOk relayOk) throws MethodIsBlockingException { - return tryAcquire(OPERATION_TIMEOUT_MS, TimeUnit.MILLISECONDS); - } - - /** - * @param relayOk symbolic return value from the asynchronous operation that we are waiting for - */ - public void acquireDefault(RelayOk relayOk) throws MethodIsBlockingException { - boolean res = tryAcquireDefault(relayOk); - if (!res) { - throw new RuntimeException("Failed to acquire semaphore (timeout)"); - } - } - - /** - * Tries to acquire the semaphore. This method blocks until the semaphore is - * released; typically release call comes from a worker thread of - * org.chromium.sdk, the same thread that may call all other callbacks. - * It is vital not to call this method from any callback of org.chromium.sdk, - * because it's a sure deadlock. - * To prevent, this the method declares throwing - * {@code MethodIsBlockingException} which is symbolically thrown whenever - * someone violates this rule (i.e. invokes this method from a callback). - * Though currently nobody actually throws it, such declarations help to - * track blocking methods. - * @return false if {@code timeout} was exceeded and we gave up - * @throws MethodIsBlockingException if called from a callback - */ - public boolean tryAcquire(long timeout, TimeUnit unit) throws MethodIsBlockingException { - boolean res; - try { - res = sem.tryAcquire(timeout, unit); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - if (savedException != null) { - throw new RuntimeException("Exception occured in callback", savedException); - } - return res; - } - /** - * Implementation of {@code SyncCallback#callbackDone(RuntimeException)}. - */ - @Override - public void callbackDone(RuntimeException e) { - if (e == null) { - savedException = null; - } else { - savedException = new Exception("Exception saved from callback", e); - } - sem.release(); - } -} \ No newline at end of file diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ConnectionLogger.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ConnectionLogger.java deleted file mode 100644 index 2a7cb4c6..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ConnectionLogger.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * Logger facility for the Chromium debugger connection. It can eavesdrop both - * incoming and outgoing streams and log them somewhere. - * {@link ConnectionLogger} instance is not reconnectable. - */ -public interface ConnectionLogger { - - /** - * Listens to stream data traffic. Traffic is a series of {@link CharSequence}s and - * separators. It is a connection's responsibility to convert actual bytes transmitted into - * characters and separators. Connection should try to make output human-readable. - * All calls to the interface must be serialized (for example, but not necessarily, made from - * a single thread). - */ - interface StreamListener { - void addContent(CharSequence text); - void addSeparator(); - } - - /** - * @return listener for incoming socket stream or null - */ - StreamListener getIncomingStreamListener(); - - /** - * @return listener for outgoing socket stream or null - */ - StreamListener getOutgoingStreamListener(); - - /** - * Connection may allow the logger to close it. It is nice for UI, where - * user sees logger and the corresponding stop button. - */ - // TODO: consider removing it out of logging. - void setConnectionCloser(ConnectionCloser connectionCloser); - - /** - * Interface that gives you control over underlying connection. - */ - interface ConnectionCloser { - void closeConnection(); - } - - /** - * Notifies logger that actual transmission is starting. After this {@link #handleEos()} - * is guaranteed to be called. - */ - void start(); - - /** - * Notifies logger that EOS has been received from remote. Technically some - * traffic still may go through writer (i.e. be sent to remote) after this. - */ - void handleEos(); - - /** - * Factory for connection logger. - */ - interface Factory { - /** - * Creates new instance of {@link ConnectionLogger}. - */ - ConnectionLogger newConnectionLogger(); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugContext.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugContext.java deleted file mode 100755 index ed958efd..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugContext.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.util.Collection; -import java.util.List; - -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * An object that matches the execution state of the browser JavaScript VM while - * suspended. It reconstructs and provides access to the current state of the - * JavaScript VM. - */ -public interface DebugContext { - - /** - * JavaScript debugger step actions. - */ - public enum StepAction { - /** - * Resume the JavaScript execution. - */ - CONTINUE, - - /** - * Step into the current statement. - */ - IN, - - /** - * Step over the current statement. - */ - OVER, - - /** - * Step out of the current function. - */ - OUT - } - - /** - * The suspension state. - */ - public enum State { - /** - * A normal suspension (a step end or a breakpoint). - */ - NORMAL, - - /** - * A suspension due to an exception. - */ - EXCEPTION - } - - /** - * A callback for the "continue" request. - */ - interface ContinueCallback { - void success(); - - void failure(String errorMessage); - } - - /** - * @return the JavaScript VM suspension state - * TODO: consider redesigning it with subtypes. - */ - State getState(); - - /** - * @return the current exception state, or {@code null} if current state is - * not {@code EXCEPTION} - * @see #getState() - */ - ExceptionData getExceptionData(); - - /** - * @return a list of call frames for the current JavaScript suspended state (from the - * innermost (top) frame to the main (bottom) frame) - * @throws MethodIsBlockingException if called from a callback because it may - * need to load necessary scripts - */ - List getCallFrames(); - - /** - * @return a set of the breakpoints hit on VM suspension with which this - * context is associated. An empty collection if the suspension was - * not related to hitting breakpoints (e.g. a step end) - */ - Collection getBreakpointsHit(); - - /** - * Resumes the JavaScript VM execution using a "continue" request. This - * context becomes invalid until another context is supplied through the - * {@link DebugEventListener#suspended(DebugContext)} event. - * - * @param stepAction to perform - * @param stepCount steps to perform (not used if - * {@code stepAction == CONTINUE}) - * @param callback to invoke when the request result is ready - */ - RelayOk continueVm(StepAction stepAction, int stepCount, - ContinueCallback callback, SyncCallback syncCallback); - - /** - * @deprecated see {@link #continueVm(StepAction, int, ContinueCallback, SyncCallback)} - */ - void continueVm(StepAction stepAction, int stepCount, ContinueCallback callback); - - /** - * @return evaluate context for evaluating expressions in global scope - */ - JsEvaluateContext getGlobalEvaluateContext(); - - /** - * @return {@link JavascriptVm} instance this context was created for - */ - JavascriptVm getJavascriptVm(); - - /** - * @return value mapping that all values have by default; typically unique for a particular - * {@link DebugContext} - */ - RemoteValueMapping getDefaultRemoteValueMapping(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugEventListener.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugEventListener.java deleted file mode 100755 index f77f3c05..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/DebugEventListener.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * This interface is used by the SDK to report debug events for a certain {@link JavascriptVm} to - * the clients. - */ -public interface DebugEventListener { - - /** - * Reports the browser JavaScript virtual machine has suspended (on hitting - * breakpoints or a step end). The {@code context} can be used to access the - * current backtrace. - * - * @param context associated with the current suspended state - */ - void suspended(DebugContext context); - - /** - * Reports the browser JavaScript virtual machine has resumed. This can happen - * asynchronously, due to a user action in the browser (without explicitly - * resuming the VM through - * {@link DebugContext#continueVm(org.chromium.sdk.DebugContext.StepAction, int, org.chromium.sdk.DebugContext.ContinueCallback)}). - */ - void resumed(); - - /** - * Reports the debug connection has terminated and {@link JavascriptVm} has stopped operating. - * This event is reported always, regardless of which reason causes termination. - * TODO: consider adding disconnect reason here. - */ - void disconnected(); - - /** - * Reports that a new script has been loaded into a tab. - * - * @param newScript loaded into the tab - */ - void scriptLoaded(Script newScript); - - /** - * Reports that the script has been collected and is no longer used in VM. - */ - void scriptCollected(Script script); - - /** - * Gets {@link VmStatusListener} that is considered a part of {@link DebugEventListener}. - * The value this method returns may be cached by caller. - * @return {@link VmStatusListener} or null - */ - VmStatusListener getVmStatusListener(); - - /** - * A specialized listener for status of remote VM command queue. After we have sent a request and - * before VM answers, it is considered busy processing this request. - */ - interface VmStatusListener { - /** - * Reports a new status of remote VM. - * @param currentRequest name of the oldest request that hasn't been answered yet or null - * @param numberOfEnqueued number of requests that are expected to be waiting in VM queue; does - * not make sense if currentRequest is null - */ - void busyStatusChanged(String currentRequest, int numberOfEnqueued); - } - - /** - * Reports that script source has been altered in remote VM. - */ - void scriptContentChanged(Script newScript); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ExceptionData.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ExceptionData.java deleted file mode 100755 index e13b57f8..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/ExceptionData.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * A JavaScript exception data holder for exceptions reported by a JavaScript - * virtual machine. - */ -public interface ExceptionData { - - /** - * @return the thrown exception value - */ - JsValue getExceptionValue(); - - /** - * @return whether this exception is uncaught - */ - boolean isUncaught(); - - /** - * @return the text of the source line where the exception was thrown or null - */ - String getSourceText(); - - /** - * @return the exception description (plain text) - */ - String getExceptionMessage(); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/FunctionScopeExtension.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/FunctionScopeExtension.java deleted file mode 100644 index 3fd13a97..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/FunctionScopeExtension.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.util.List; - -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * An extension to {@link JsFunction} API that returns function (closure) hidden scope. - * @see JavascriptVm#getFunctionScopeExtension() - */ -public interface FunctionScopeExtension { - /** - * @return list of hidden function scopes (possibly empty) - * @throws MethodIsBlockingException because function may need to load scope data - * on demand - */ - List getScopes(JsFunction function) throws MethodIsBlockingException; -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/IgnoreCountBreakpointExtension.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/IgnoreCountBreakpointExtension.java deleted file mode 100644 index c2ac73c8..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/IgnoreCountBreakpointExtension.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import org.chromium.sdk.JavascriptVm.BreakpointCallback; -import org.chromium.sdk.util.GenericCallback; - -/** - * An extension to breakpoint API that supports 'ignore count' property. Some backends - * or VM versions may not support it. - * @see JavascriptVm#getIgnoreCountBreakpointExtension() - * @see Breakpoint#getIgnoreCountBreakpointExtension() - */ -public interface IgnoreCountBreakpointExtension { - - /** - * This value is used when the corresponding parameter is absent. - * - * @see #setIgnoreCount - */ - int EMPTY_VALUE = Breakpoint.EMPTY_VALUE; - - /** - * Sets a breakpoint with the specified parameters. - * @param target of the breakpoint - * @param line in the script or function (1-based). If none, use - * {@link Breakpoint#EMPTY_VALUE} - * @param column of the target start within the line (1-based). If none, use - * {@link Breakpoint#EMPTY_VALUE} - * @param enabled whether the breakpoint is enabled initially - * @param ignoreCount number specifying the amount of breakpoint hits to - * ignore. If none, use {@link #EMPTY_VALUE} - * @param condition nullable string with breakpoint condition - * @param callback to invoke when the evaluation result is ready, - * may be {@code null} - */ - RelayOk setBreakpoint(JavascriptVm javascriptVm, Breakpoint.Target target, int line, int column, - boolean enabled, String condition, int ignoreCount, - BreakpointCallback callback, SyncCallback syncCallback); - - /** - * Sets the ignore count for this breakpoint ({@code EMPTY_VALUE} to clear). - * Does not require subsequent flush call. - * @param ignoreCount the new ignored hits count to set - */ - RelayOk setIgnoreCount(Breakpoint breakpoint, int ignoreCount, - GenericCallback callback, SyncCallback syncCallback); -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/InvalidContextException.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/InvalidContextException.java deleted file mode 100644 index 69137fc5..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/InvalidContextException.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -/** - * Signals that operation is not available because related {@link DebugContext} - * is no more valid. However, there is no guarantee this exception will be thrown - * in each case. Note also that {@link DebugContext#continueVm} throws - * simple {@link IllegalStateException}. - */ -public class InvalidContextException extends RuntimeException { - InvalidContextException() { - super(); - } - InvalidContextException(String message, Throwable cause) { - super(message, cause); - } - InvalidContextException(String message) { - super(message); - } - public InvalidContextException(Throwable cause) { - super(cause); - } -} diff --git a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java b/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java deleted file mode 100644 index bca5e331..00000000 --- a/chromedevtools/plugins/org.chromium.sdk/src/org/chromium/sdk/JavascriptVm.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.sdk; - -import java.util.Collection; - -import org.chromium.sdk.util.GenericCallback; -import org.chromium.sdk.util.MethodIsBlockingException; - -/** - * Abstraction of a remote JavaScript virtual machine. Clients can use it to - * conduct debugging process. - * @see Browser.TabConnector#attach - * @see BrowserFactory#createStandalone - * @see org.chromium.sdk.wip.WipBrowser.WipTabConnector#attach(TabDebugEventListener) - */ -public interface JavascriptVm { - - /** - * A callback for breakpoint-related requests. - */ - interface BreakpointCallback { - - void success(Breakpoint breakpoint); - - void failure(String errorMessage); - } - - /** - * A callback for retrieving scripts. - */ - public interface ScriptsCallback { - - /** - * This method provides a synchronous access to script collection. All script events - * are postponed for the time of this call. - */ - void success(Collection - org.chromium.sdk.tests.system:main.html - - -

Welcome to org.chromium.sdk.tests.system test web page.

- Script is running: [
 
] - - - -

- This script is created for test purposes for running inside - Chrome/Chromium browser. - The browser should be run from command line to have debug port open: -
- chrome --remote-shell-port=9222 - -

- See also: http://code.google.com/p/chromedevtools - -

- Additional test elements: unicode symbols "хорошо". -
- - \ No newline at end of file diff --git a/chromedevtools/utils/org.chromium.sdk.tests.system/testwebsite/script1.js b/chromedevtools/utils/org.chromium.sdk.tests.system/testwebsite/script1.js deleted file mode 100644 index 389fc63a..00000000 --- a/chromedevtools/utils/org.chromium.sdk.tests.system/testwebsite/script1.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -counter = 0; - -function PeriodicRun() { - var x = 1; - var y = 2; - // #breakpoint#1# - var sum = x + y; - - SetStatus(counter++); - - return sum; -} - -function Fibonacci(number) { - var res = 1; - while (number > 1) { - res = res * number; - number--; - } - return res; -} - -periodic_run_id = window.setInterval(PeriodicRun, 1000); - -// Additional test element: unicode symbols in script source. -var unicode_symbols = "Хорошо"; diff --git a/features/org.nodeclipse.bundle.coffee.feature/.project b/features/org.nodeclipse.bundle.coffee.feature/.project deleted file mode 100644 index 5bf9f501..00000000 --- a/features/org.nodeclipse.bundle.coffee.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.bundle.coffee.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.bundle.coffee.feature/build.properties b/features/org.nodeclipse.bundle.coffee.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.bundle.coffee.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.bundle.coffee.feature/feature.xml b/features/org.nodeclipse.bundle.coffee.feature/feature.xml deleted file mode 100644 index 2e650659..00000000 --- a/features/org.nodeclipse.bundle.coffee.feature/feature.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CoffeeScript is a little language that compiles into JavaScript. - - - - Copyright (c) 2009-2013 Jeremy Ashkenas - - - -(The MIT License) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - - diff --git a/features/org.nodeclipse.bundle.coffee.feature/pom.xml b/features/org.nodeclipse.bundle.coffee.feature/pom.xml deleted file mode 100644 index 3d1d3ffc..00000000 --- a/features/org.nodeclipse.bundle.coffee.feature/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.bundle.coffee.feature - 1.6.3 - eclipse-feature - - org.nodeclipse.bundle.coffee.feature - org.nodeclipse.bundle.coffee.feature - - diff --git a/features/org.nodeclipse.bundle.express.feature/.project b/features/org.nodeclipse.bundle.express.feature/.project deleted file mode 100644 index e691deb2..00000000 --- a/features/org.nodeclipse.bundle.express.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.bundle.express.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.bundle.express.feature/build.properties b/features/org.nodeclipse.bundle.express.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.bundle.express.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.bundle.express.feature/feature.xml b/features/org.nodeclipse.bundle.express.feature/feature.xml deleted file mode 100644 index 879a78be..00000000 --- a/features/org.nodeclipse.bundle.express.feature/feature.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Express is a minimal and flexible node.js web application framework, -providing a robust set of features for building single and multi-page, -and hybrid web applications. - - - - Copyright (c) 2009-2011 TJ Holowaychuk <tj@vision-media.ca> - - - - (The MIT License) - -Copyright (c) 2009-2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - - diff --git a/features/org.nodeclipse.bundle.express.feature/pom.xml b/features/org.nodeclipse.bundle.express.feature/pom.xml deleted file mode 100644 index afa697f5..00000000 --- a/features/org.nodeclipse.bundle.express.feature/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.bundle.express.feature - 3.2.5 - eclipse-feature - - org.nodeclipse.bundle.express.feature - org.nodeclipse.bundle.express.feature - - diff --git a/features/org.nodeclipse.enide.editors.gradle.feature/.project b/features/org.nodeclipse.enide.editors.gradle.feature/.project deleted file mode 100644 index 3f280c00..00000000 --- a/features/org.nodeclipse.enide.editors.gradle.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.editors.gradle.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.editors.gradle.feature/build.properties b/features/org.nodeclipse.enide.editors.gradle.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.editors.gradle.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.editors.gradle.feature/feature.xml b/features/org.nodeclipse.enide.editors.gradle.feature/feature.xml deleted file mode 100644 index ddff2065..00000000 --- a/features/org.nodeclipse.enide.editors.gradle.feature/feature.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Minimalist Gradle Editor gives you minimal Editor for build.gradle files. -It has highlight for keywords, strings and matching brackets. -See https://github.com/nodeclipse/nodeclipse-1/ - -For full-featured Gradle tools check Gradle Integration for Eclipse by Pivotal -http://marketplace.eclipse.org/content/gradle-integration-eclipse - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.editors.gradle.feature/pom.xml b/features/org.nodeclipse.enide.editors.gradle.feature/pom.xml deleted file mode 100644 index e0efacc1..00000000 --- a/features/org.nodeclipse.enide.editors.gradle.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.editors.gradle.feature - eclipse-feature - - org.nodeclipse.enide.editors.gradle.feature - org.nodeclipse.enide.editors.gradle.feature Minimalist Gradle Editor - - diff --git a/features/org.nodeclipse.enide.editors.jade.feature/.project b/features/org.nodeclipse.enide.editors.jade.feature/.project deleted file mode 100644 index 3f280c00..00000000 --- a/features/org.nodeclipse.enide.editors.jade.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.editors.gradle.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.editors.jade.feature/build.properties b/features/org.nodeclipse.enide.editors.jade.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.editors.jade.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.editors.jade.feature/feature.xml b/features/org.nodeclipse.enide.editors.jade.feature/feature.xml deleted file mode 100644 index 65e1894d..00000000 --- a/features/org.nodeclipse.enide.editors.jade.feature/feature.xml +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Minimalist Jade Editor gives you minimal Editor for .jade files. -It has highlight for HTML tage and JavaScript keywords. -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.editors.jade.feature/pom.xml b/features/org.nodeclipse.enide.editors.jade.feature/pom.xml deleted file mode 100644 index c68b889c..00000000 --- a/features/org.nodeclipse.enide.editors.jade.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.editors.jade.feature - eclipse-feature - - org.nodeclipse.enide.editors.jade.feature - org.nodeclipse.enide.editors.jade.feature Minimalist Jade Editor - - diff --git a/features/org.nodeclipse.enide.gradle.feature/.project b/features/org.nodeclipse.enide.gradle.feature/.project deleted file mode 100644 index 1d09ba37..00000000 --- a/features/org.nodeclipse.enide.gradle.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.gradle.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.gradle.feature/build.properties b/features/org.nodeclipse.enide.gradle.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.gradle.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.gradle.feature/feature.xml b/features/org.nodeclipse.enide.gradle.feature/feature.xml deleted file mode 100644 index ced7c4f6..00000000 --- a/features/org.nodeclipse.enide.gradle.feature/feature.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - Enide Gradle is alternative and completion to `Gradle Integration for Eclipse`. -See https://github.com/nodeclipse/nodeclipse-1/ - -Launch build or Gradle GUI. -Project does not need to be Gradle project. Just `build.gradle` would be enough. -(The project may be General, old classic Java, Maven or -broken Gradle project.) -No miracles, this plugins just launches `gradle` with options, as -you can do from command line. -Full path to maven `gradle.bat` or `gradle` is used, so you can try -different versions. -Specify options to `gradle` that will be Workspace-wide. -Executed string is shown is Console, so you can check and learn. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - The MIT License (MIT) - -Copyright (c) 2014 Paul Verest, Nodeclipse - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.gradle.feature/pom.xml b/features/org.nodeclipse.enide.gradle.feature/pom.xml deleted file mode 100644 index 198b31fe..00000000 --- a/features/org.nodeclipse.enide.gradle.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.gradle.feature - eclipse-feature - - org.nodeclipse.enide.gradle.feature - org.nodeclipse.enide.gradle.feature - - diff --git a/features/org.nodeclipse.enide.maven.feature/.project b/features/org.nodeclipse.enide.maven.feature/.project deleted file mode 100644 index f6754b14..00000000 --- a/features/org.nodeclipse.enide.maven.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.maven.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.maven.feature/build.properties b/features/org.nodeclipse.enide.maven.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.maven.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.maven.feature/feature.xml b/features/org.nodeclipse.enide.maven.feature/feature.xml deleted file mode 100644 index 4c96ae45..00000000 --- a/features/org.nodeclipse.enide.maven.feature/feature.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Enide Maven is alternative and completion to m2e (Maven Integration for Eclipse). -See https://github.com/nodeclipse/nodeclipse-1/ - -Launch build or execute Java class. -Project does not need to be Maven project. Just `pom.xml` would be enough. -(The project may be General, old classic Java, Eclipse plugin with Tycho, broken Maven or Gradle project.) - -No miracles, this plugins just launches `mvn` with options, as you can do from command line. -Full path to maven `mvn.bat` or `mvn` is used, so you can try different versions. -Specify options to `mvn` that will be Workspace-wide. -Executed string is shown is Console, so you can check and learn. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - The MIT License (MIT) - -Copyright (c) 2014 Paul Verest, Nodeclipse - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.maven.feature/pom.xml b/features/org.nodeclipse.enide.maven.feature/pom.xml deleted file mode 100644 index 69acd5b7..00000000 --- a/features/org.nodeclipse.enide.maven.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.maven.feature - eclipse-feature - - org.nodeclipse.enide.maven.feature - org.nodeclipse.enide.maven.feature - - diff --git a/features/org.nodeclipse.enide.nodejs.feature/.project b/features/org.nodeclipse.enide.nodejs.feature/.project deleted file mode 100644 index 07b6fd38..00000000 --- a/features/org.nodeclipse.enide.nodejs.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.nodejs.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.nodejs.feature/build.properties b/features/org.nodeclipse.enide.nodejs.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.nodejs.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.nodejs.feature/feature.xml b/features/org.nodeclipse.enide.nodejs.feature/feature.xml deleted file mode 100644 index 27b9b840..00000000 --- a/features/org.nodeclipse.enide.nodejs.feature/feature.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - - Node.js in Eclipse (Nodeclipse Core, Chromedevtools incl. Remote Debugger) -See https://github.com/nodeclipse/nodeclipse-1/ - - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.nodejs.feature/pom.xml b/features/org.nodeclipse.enide.nodejs.feature/pom.xml deleted file mode 100644 index 0827dc74..00000000 --- a/features/org.nodeclipse.enide.nodejs.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.nodejs.feature - eclipse-feature - - org.nodeclipse.enide.nodejs.feature - Inide Node.js (Combined features dependencies) - - diff --git a/features/org.nodeclipse.enide.studio.included.feature/.project b/features/org.nodeclipse.enide.studio.included.feature/.project deleted file mode 100644 index 8ce4c90b..00000000 --- a/features/org.nodeclipse.enide.studio.included.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.enide.studio.included.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.enide.studio.included.feature/build.properties b/features/org.nodeclipse.enide.studio.included.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.enide.studio.included.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.enide.studio.included.feature/feature.xml b/features/org.nodeclipse.enide.studio.included.feature/feature.xml deleted file mode 100644 index 93304181..00000000 --- a/features/org.nodeclipse.enide.studio.included.feature/feature.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Features included in Enide Studio -See https://github.com/nodeclipse/nodeclipse-1/ - - (nodejs jjs mongodb phantomjs vertx maven gradle - pluginslist markdown gfm startexplorer restclient) - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.enide.studio.included.feature/pom.xml b/features/org.nodeclipse.enide.studio.included.feature/pom.xml deleted file mode 100644 index 1b2af064..00000000 --- a/features/org.nodeclipse.enide.studio.included.feature/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.enide.studio.included.feature - eclipse-feature - - org.nodeclipse.enide.studio.included.feature - Features included in Enide Studio - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.feature/.project b/features/org.nodeclipse.feature/.project deleted file mode 100644 index 6e325864..00000000 --- a/features/org.nodeclipse.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.feature/build.properties b/features/org.nodeclipse.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.feature/feature.xml b/features/org.nodeclipse.feature/feature.xml deleted file mode 100644 index 02464f91..00000000 --- a/features/org.nodeclipse.feature/feature.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - Nodeclipse Core and Node.js in Eclipse -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.feature/pom.xml b/features/org.nodeclipse.feature/pom.xml deleted file mode 100644 index 15088236..00000000 --- a/features/org.nodeclipse.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse - eclipse-feature - - org.nodeclipse (feature) - org.nodeclipse (feature) - - diff --git a/features/org.nodeclipse.jjs.feature/.project b/features/org.nodeclipse.jjs.feature/.project deleted file mode 100644 index 1df38e92..00000000 --- a/features/org.nodeclipse.jjs.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.jjs.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.jjs.feature/build.properties b/features/org.nodeclipse.jjs.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.jjs.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.jjs.feature/feature.xml b/features/org.nodeclipse.jjs.feature/feature.xml deleted file mode 100644 index 0c1a35e0..00000000 --- a/features/org.nodeclipse.jjs.feature/feature.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Java 8 Nashorn JJS in Eclipse -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.jjs.feature/pom.xml b/features/org.nodeclipse.jjs.feature/pom.xml deleted file mode 100644 index a1cee122..00000000 --- a/features/org.nodeclipse.jjs.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.jjs.feature - eclipse-feature - - org.nodeclipse.jjs.feature - org.nodeclipse.jjs.feature Nodeclipse JJS - - diff --git a/features/org.nodeclipse.mongodb.feature/.project b/features/org.nodeclipse.mongodb.feature/.project deleted file mode 100644 index 4938b2be..00000000 --- a/features/org.nodeclipse.mongodb.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.mongodb.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.mongodb.feature/build.properties b/features/org.nodeclipse.mongodb.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.mongodb.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.mongodb.feature/feature.xml b/features/org.nodeclipse.mongodb.feature/feature.xml deleted file mode 100644 index 898ef0ad..00000000 --- a/features/org.nodeclipse.mongodb.feature/feature.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - MongoDB Shell inegration in Eclipse -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.mongodb.feature/pom.xml b/features/org.nodeclipse.mongodb.feature/pom.xml deleted file mode 100644 index 1354752d..00000000 --- a/features/org.nodeclipse.mongodb.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.mongodb.feature - eclipse-feature - - org.nodeclipse.mongodb.feature - org.nodeclipse.mongodb.feature Nodeclipse MongoDB Shell Integration - - diff --git a/features/org.nodeclipse.phantomjs.feature/.project b/features/org.nodeclipse.phantomjs.feature/.project deleted file mode 100644 index fe809ce6..00000000 --- a/features/org.nodeclipse.phantomjs.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.phantomjs.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.phantomjs.feature/build.properties b/features/org.nodeclipse.phantomjs.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.phantomjs.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.phantomjs.feature/feature.xml b/features/org.nodeclipse.phantomjs.feature/feature.xml deleted file mode 100644 index c819673f..00000000 --- a/features/org.nodeclipse.phantomjs.feature/feature.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - PhantomJS in Eclipse -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - - - Copyright (c) 2012 - 2015 The Nodeclipse Authors. All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.phantomjs.feature/pom.xml b/features/org.nodeclipse.phantomjs.feature/pom.xml deleted file mode 100644 index 0f087801..00000000 --- a/features/org.nodeclipse.phantomjs.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.phantomjs.feature - eclipse-feature - - org.nodeclipse.phantomjs.feature - org.nodeclipse.phantomjs.feature - - diff --git a/features/org.nodeclipse.pluginslist.feature/build.properties b/features/org.nodeclipse.pluginslist.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.pluginslist.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.pluginslist.feature/feature.xml b/features/org.nodeclipse.pluginslist.feature/feature.xml deleted file mode 100644 index eef5c5b9..00000000 --- a/features/org.nodeclipse.pluginslist.feature/feature.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Nodeclipse Plugins List is convenient way to install Eclipse plugins. -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - - - - diff --git a/features/org.nodeclipse.pluginslist.feature/pom.xml b/features/org.nodeclipse.pluginslist.feature/pom.xml deleted file mode 100644 index e4d55605..00000000 --- a/features/org.nodeclipse.pluginslist.feature/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.pluginslist.feature - eclipse-feature - org.nodeclipse.pluginslist (feature) - diff --git a/features/org.nodeclipse.vertx.feature/.project b/features/org.nodeclipse.vertx.feature/.project deleted file mode 100644 index c833e61f..00000000 --- a/features/org.nodeclipse.vertx.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.nodeclipse.vertx.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.nodeclipse.vertx.feature/build.properties b/features/org.nodeclipse.vertx.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/features/org.nodeclipse.vertx.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/features/org.nodeclipse.vertx.feature/feature.xml b/features/org.nodeclipse.vertx.feature/feature.xml deleted file mode 100644 index 84a0a427..00000000 --- a/features/org.nodeclipse.vertx.feature/feature.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Vert.x JS -See https://github.com/nodeclipse/nodeclipse-1/ - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - - - Copyright (c) 2014, 2015 Paul Verest, All rights reserved. - - Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2012, 2013 The Nodeclipse Authors. All rights reserved. - - 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. - - - - - - - - - - - - - - diff --git a/features/org.nodeclipse.vertx.feature/pom.xml b/features/org.nodeclipse.vertx.feature/pom.xml deleted file mode 100644 index 5ea12c0c..00000000 --- a/features/org.nodeclipse.vertx.feature/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - ../../pom.xml - - - org.nodeclipse.vertx.feature - eclipse-feature - - org.nodeclipse.vertx.feature - org.nodeclipse.vertx.feature Nodeclipse Vert.x - - diff --git a/markdown/README.md b/markdown/README.md deleted file mode 100644 index 93827ca0..00000000 --- a/markdown/README.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Markdown dependencies - -ATTENSION: There is no more using of git submodules. However `pom.xml` shows example of build for that case. - -Currently there is no direct code dependencies on markdown modules. - -- `Eclipse-Markdown-Editor-Plugin` is expected to be installed together with Nodeclipse-1. -The HTML Preview is added to Node perspective and Makrdown Editor feature is required for update site `org.nodeclipse.site` as follows: -`` - -- `gfm_viewer` is fully optional. - -## Building from source (depricated) - -Update site defines Markdown Editor dependency in `org.nodeclipse.site\category.xml`. - You need build and install in your maven repository before Nodeclipse-1 build. - (This is one time operation) - -1. `git clone https://github.com/Nodeclipse/Eclipse-Markdown-Editor-Plugin.git` -2. `cd Eclipse-Markdown-Editor-Plugin\parent` -3. `mvn install` - -Then just run `mvn package`. Run offline when to re-build `mvn clean package -o`. From Nodeclipse-1 base folder: - -1. `mvn package` \ No newline at end of file diff --git a/markdown/pom.xml b/markdown/pom.xml deleted file mode 100644 index 14627562..00000000 --- a/markdown/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 0.5.0-SNAPSHOT - - - org.nodeclipse.markdown - org.nodeclipse.markdown.parent - pom - - org.nodeclipse.markdown.parent - org.nodeclipse.markdown.parent - - - Eclipse-Markdown-Editor-Plugin/plugin - Eclipse-Markdown-Editor-Plugin/feature - - - - - - diff --git a/nodeclipse-logo-rough.png b/nodeclipse-logo-rough.png deleted file mode 100644 index 941c39ad..00000000 Binary files a/nodeclipse-logo-rough.png and /dev/null differ diff --git a/org.nodeclipse.android/.classpath b/org.nodeclipse.android/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.android/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.android/.project b/org.nodeclipse.android/.project deleted file mode 100644 index a1d6f840..00000000 --- a/org.nodeclipse.android/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.android - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.android/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.android/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.android/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.android/META-INF/MANIFEST.MF b/org.nodeclipse.android/META-INF/MANIFEST.MF deleted file mode 100644 index 2fab45a9..00000000 --- a/org.nodeclipse.android/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse Android -Bundle-SymbolicName: org.nodeclipse.android;singleton:=true -Bundle-Version: 0.17.0.qualifier -Bundle-Activator: org.nodeclipse.ui.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.ui.ide, - org.eclipse.jface.text, - org.eclipse.ui.editors, - org.eclipse.ui.console, - org.eclipse.debug.ui, - org.eclipse.ui.navigator -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-Vendor: Nodeclipse organization diff --git a/org.nodeclipse.android/build.properties b/org.nodeclipse.android/build.properties deleted file mode 100644 index 5790750d..00000000 --- a/org.nodeclipse.android/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/ \ No newline at end of file diff --git a/org.nodeclipse.android/iconbank/android.png b/org.nodeclipse.android/iconbank/android.png deleted file mode 100644 index 47f4e163..00000000 Binary files a/org.nodeclipse.android/iconbank/android.png and /dev/null differ diff --git a/org.nodeclipse.android/iconbank/run.png b/org.nodeclipse.android/iconbank/run.png deleted file mode 100644 index 3e93738d..00000000 Binary files a/org.nodeclipse.android/iconbank/run.png and /dev/null differ diff --git a/org.nodeclipse.android/iconbank/run_half_size.png b/org.nodeclipse.android/iconbank/run_half_size.png deleted file mode 100644 index 7235cd37..00000000 Binary files a/org.nodeclipse.android/iconbank/run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.android/icons/android_bottom_right_corner_run_half_size.png b/org.nodeclipse.android/icons/android_bottom_right_corner_run_half_size.png deleted file mode 100644 index e547ffef..00000000 Binary files a/org.nodeclipse.android/icons/android_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.android/plugin.xml b/org.nodeclipse.android/plugin.xml deleted file mode 100644 index 48d19db0..00000000 --- a/org.nodeclipse.android/plugin.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.android/pom.xml b/org.nodeclipse.android/pom.xml deleted file mode 100644 index 389b48d4..00000000 --- a/org.nodeclipse.android/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 0.17.0-SNAPSHOT - - - org.nodeclipse.android - eclipse-plugin - - org.nodeclipse.android - org.nodeclipse.android - - diff --git a/org.nodeclipse.bundle.coffee/.classpath b/org.nodeclipse.bundle.coffee/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/org.nodeclipse.bundle.coffee/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.bundle.coffee/.project b/org.nodeclipse.bundle.coffee/.project deleted file mode 100644 index 96779b75..00000000 --- a/org.nodeclipse.bundle.coffee/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.bundle.coffee - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.bundle.coffee/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.bundle.coffee/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index af0f20f9..00000000 --- a/org.nodeclipse.bundle.coffee/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.nodeclipse.bundle.coffee/META-INF/MANIFEST.MF b/org.nodeclipse.bundle.coffee/META-INF/MANIFEST.MF deleted file mode 100644 index 9766cda0..00000000 --- a/org.nodeclipse.bundle.coffee/META-INF/MANIFEST.MF +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Coffee -Bundle-SymbolicName: org.nodeclipse.bundle.coffee -Bundle-Version: 1.6.3 -Bundle-Activator: org.nodeclipse.bundle.coffee.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.nodeclipse.bundle.coffee diff --git a/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/Activator.class b/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/Activator.class deleted file mode 100644 index d8a41103..00000000 Binary files a/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/Activator.class and /dev/null differ diff --git a/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/BundlePath.class b/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/BundlePath.class deleted file mode 100644 index 9ff460b2..00000000 Binary files a/org.nodeclipse.bundle.coffee/bin/org/nodeclipse/bundle/coffee/BundlePath.class and /dev/null differ diff --git a/org.nodeclipse.bundle.coffee/build.properties b/org.nodeclipse.bundle.coffee/build.properties deleted file mode 100644 index bc3c6a91..00000000 --- a/org.nodeclipse.bundle.coffee/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - coffee-script/ - diff --git a/org.nodeclipse.bundle.coffee/coffee-script/.npmignore b/org.nodeclipse.bundle.coffee/coffee-script/.npmignore deleted file mode 100644 index 21e430d2..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -*.coffee -*.html -.DS_Store -.git* -Cakefile -documentation/ -examples/ -extras/coffee-script.js -raw/ -src/ -test/ diff --git a/org.nodeclipse.bundle.coffee/coffee-script/CNAME b/org.nodeclipse.bundle.coffee/coffee-script/CNAME deleted file mode 100644 index faadabe5..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/CNAME +++ /dev/null @@ -1 +0,0 @@ -coffeescript.org \ No newline at end of file diff --git a/org.nodeclipse.bundle.coffee/coffee-script/CONTRIBUTING.md b/org.nodeclipse.bundle.coffee/coffee-script/CONTRIBUTING.md deleted file mode 100644 index 6390c68b..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -## How to contribute to CoffeeScript - -* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. - -* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test). - -* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). - -* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release. \ No newline at end of file diff --git a/org.nodeclipse.bundle.coffee/coffee-script/LICENSE b/org.nodeclipse.bundle.coffee/coffee-script/LICENSE deleted file mode 100644 index a396eaed..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2009-2013 Jeremy Ashkenas - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.coffee/coffee-script/README b/org.nodeclipse.bundle.coffee/coffee-script/README deleted file mode 100644 index 69ee6f43..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/README +++ /dev/null @@ -1,51 +0,0 @@ - - { - } } { - { { } } - } }{ { - { }{ } } _____ __ __ - ( }{ }{ { ) / ____| / _|/ _| - .- { { } { }} -. | | ___ | |_| |_ ___ ___ - ( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \ - |`-..________ ..-'| | |___| (_) | | | || __/ __/ - | | \_____\___/|_| |_| \___|\___| - | ;--. - | (__ \ _____ _ _ - | | ) ) / ____| (_) | | - | |/ / | (___ ___ _ __ _ _ __ | |_ - | ( / \___ \ / __| '__| | '_ \| __| - | |/ ____) | (__| | | | |_) | |_ - | | |_____/ \___|_| |_| .__/ \__| - `-.._________..-' | | - |_| - - - CoffeeScript is a little language that compiles into JavaScript. - - Install Node.js, and then the CoffeeScript compiler: - sudo bin/cake install - - Or, if you have the Node Package Manager installed: - npm install -g coffee-script - (Leave off the -g if you don't wish to install globally.) - - Execute a script: - coffee /path/to/script.coffee - - Compile a script: - coffee -c /path/to/script.coffee - - For documentation, usage, and examples, see: - http://coffeescript.org/ - - To suggest a feature, report a bug, or general discussion: - http://github.com/jashkenas/coffee-script/issues/ - - If you'd like to chat, drop by #coffeescript on Freenode IRC, - or on webchat.freenode.net. - - The source repository: - git://github.com/jashkenas/coffee-script.git - - All contributors are listed here: - http://github.com/jashkenas/coffee-script/contributors diff --git a/org.nodeclipse.bundle.coffee/coffee-script/Rakefile b/org.nodeclipse.bundle.coffee/coffee-script/Rakefile deleted file mode 100644 index d90cce36..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/Rakefile +++ /dev/null @@ -1,79 +0,0 @@ -require 'rubygems' -require 'erb' -require 'fileutils' -require 'rake/testtask' -require 'json' - -desc "Build the documentation page" -task :doc do - source = 'documentation/index.html.erb' - child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" } - at_exit { Process.kill("INT", child) } - Signal.trap("INT") { exit } - loop do - mtime = File.stat(source).mtime - if !@mtime || mtime > @mtime - rendered = ERB.new(File.read(source)).result(binding) - File.open('index.html', 'w+') {|f| f.write(rendered) } - end - @mtime = mtime - sleep 1 - end -end - -desc "Build coffee-script-source gem" -task :gem do - require 'rubygems' - require 'rubygems/package' - - gemspec = Gem::Specification.new do |s| - s.name = 'coffee-script-source' - s.version = JSON.parse(File.read('package.json'))["version"] - s.date = Time.now.strftime("%Y-%m-%d") - - s.homepage = "http://jashkenas.github.com/coffee-script/" - s.summary = "The CoffeeScript Compiler" - s.description = <<-EOS - CoffeeScript is a little language that compiles into JavaScript. - Underneath all of those embarrassing braces and semicolons, - JavaScript has always had a gorgeous object model at its heart. - CoffeeScript is an attempt to expose the good parts of JavaScript - in a simple way. - EOS - - s.files = [ - 'lib/coffee_script/coffee-script.js', - 'lib/coffee_script/source.rb' - ] - - s.authors = ['Jeremy Ashkenas'] - s.email = 'jashkenas@gmail.com' - s.rubyforge_project = 'coffee-script-source' - s.license = "MIT" - end - - file = File.open("coffee-script-source.gem", "w") - Gem::Package.open(file, 'w') do |pkg| - pkg.metadata = gemspec.to_yaml - - path = "lib/coffee_script/source.rb" - contents = <<-ERUBY -module CoffeeScript - module Source - def self.bundled_path - File.expand_path("../coffee-script.js", __FILE__) - end - end -end - ERUBY - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - - contents = File.read("extras/coffee-script.js") - path = "lib/coffee_script/coffee-script.js" - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - end -end diff --git a/org.nodeclipse.bundle.coffee/coffee-script/bin/cake b/org.nodeclipse.bundle.coffee/coffee-script/bin/cake deleted file mode 100755 index 5965f4ee..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/bin/cake +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/cake').run(); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/bin/coffee b/org.nodeclipse.bundle.coffee/coffee-script/bin/coffee deleted file mode 100755 index 3d1d71c8..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/bin/coffee +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/command').run(); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/browser.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/browser.js deleted file mode 100644 index e5411d8c..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/browser.js +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, compile, runScripts, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - CoffeeScript = require('./coffee-script'); - - CoffeeScript.require = require; - - compile = CoffeeScript.compile; - - CoffeeScript["eval"] = function(code, options) { - if (options == null) { - options = {}; - } - if (options.bare == null) { - options.bare = true; - } - return eval(compile(code, options)); - }; - - CoffeeScript.run = function(code, options) { - if (options == null) { - options = {}; - } - options.bare = true; - options.shiftLine = true; - return Function(compile(code, options))(); - }; - - if (typeof window === "undefined" || window === null) { - return; - } - - if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { - compile = function(code, options) { - var js, v3SourceMap, _ref; - if (options == null) { - options = {}; - } - options.sourceMap = true; - options.inline = true; - _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; - return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript"; - }; - } - - CoffeeScript.load = function(url, callback, options) { - var xhr; - if (options == null) { - options = {}; - } - options.sourceFiles = [url]; - xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); - xhr.open('GET', url, true); - if ('overrideMimeType' in xhr) { - xhr.overrideMimeType('text/plain'); - } - xhr.onreadystatechange = function() { - var _ref; - if (xhr.readyState === 4) { - if ((_ref = xhr.status) === 0 || _ref === 200) { - CoffeeScript.run(xhr.responseText, options); - } else { - throw new Error("Could not load " + url); - } - if (callback) { - return callback(); - } - } - }; - return xhr.send(null); - }; - - runScripts = function() { - var coffees, coffeetypes, execute, index, length, s, scripts; - scripts = window.document.getElementsByTagName('script'); - coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; - coffees = (function() { - var _i, _len, _ref, _results; - _results = []; - for (_i = 0, _len = scripts.length; _i < _len; _i++) { - s = scripts[_i]; - if (_ref = s.type, __indexOf.call(coffeetypes, _ref) >= 0) { - _results.push(s); - } - } - return _results; - })(); - index = 0; - length = coffees.length; - (execute = function() { - var mediatype, options, script; - script = coffees[index++]; - mediatype = script != null ? script.type : void 0; - if (__indexOf.call(coffeetypes, mediatype) >= 0) { - options = { - literate: mediatype === 'text/literate-coffeescript' - }; - if (script.src) { - return CoffeeScript.load(script.src, execute, options); - } else { - options.sourceFiles = ['embedded']; - CoffeeScript.run(script.innerHTML, options); - return execute(); - } - } - })(); - return null; - }; - - if (window.addEventListener) { - window.addEventListener('DOMContentLoaded', runScripts, false); - } else { - window.attachEvent('onload', runScripts); - } - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/cake.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/cake.js deleted file mode 100644 index 68bd7c30..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/cake.js +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - existsSync = fs.existsSync || path.existsSync; - - tasks = {}; - - options = {}; - - switches = []; - - oparse = null; - - helpers.extend(global, { - task: function(name, description, action) { - var _ref; - if (!action) { - _ref = [description, action], action = _ref[0], description = _ref[1]; - } - return tasks[name] = { - name: name, - description: description, - action: action - }; - }, - option: function(letter, flag, description) { - return switches.push([letter, flag, description]); - }, - invoke: function(name) { - if (!tasks[name]) { - missingTask(name); - } - return tasks[name].action(options); - } - }); - - exports.run = function() { - var arg, args, e, _i, _len, _ref, _results; - global.__originalDirname = fs.realpathSync('.'); - process.chdir(cakefileDirectory(__originalDirname)); - args = process.argv.slice(2); - CoffeeScript.run(fs.readFileSync('Cakefile').toString(), { - filename: 'Cakefile' - }); - oparse = new optparse.OptionParser(switches); - if (!args.length) { - return printTasks(); - } - try { - options = oparse.parse(args); - } catch (_error) { - e = _error; - return fatalError("" + e); - } - _ref = options["arguments"]; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - arg = _ref[_i]; - _results.push(invoke(arg)); - } - return _results; - }; - - printTasks = function() { - var cakefilePath, desc, name, relative, spaces, task; - relative = path.relative || path.resolve; - cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); - console.log("" + cakefilePath + " defines the following tasks:\n"); - for (name in tasks) { - task = tasks[name]; - spaces = 20 - name.length; - spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; - desc = task.description ? "# " + task.description : ''; - console.log("cake " + name + spaces + " " + desc); - } - if (switches.length) { - return console.log(oparse.help()); - } - }; - - fatalError = function(message) { - console.error(message + '\n'); - console.log('To see a list of all tasks/options, run "cake"'); - return process.exit(1); - }; - - missingTask = function(task) { - return fatalError("No such task: " + task); - }; - - cakefileDirectory = function(dir) { - var parent; - if (existsSync(path.join(dir, 'Cakefile'))) { - return dir; - } - parent = path.normalize(path.join(dir, '..')); - if (parent !== dir) { - return cakefileDirectory(parent); - } - throw new Error("Cakefile not found in " + (process.cwd())); - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/coffee-script.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/coffee-script.js deleted file mode 100644 index 11ccd810..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/coffee-script.js +++ /dev/null @@ -1,358 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref, - __hasProp = {}.hasOwnProperty; - - fs = require('fs'); - - vm = require('vm'); - - path = require('path'); - - child_process = require('child_process'); - - Lexer = require('./lexer').Lexer; - - parser = require('./parser').parser; - - helpers = require('./helpers'); - - SourceMap = require('./sourcemap'); - - exports.VERSION = '1.6.3'; - - exports.helpers = helpers; - - exports.compile = compile = function(code, options) { - var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len; - if (options == null) { - options = {}; - } - merge = helpers.merge; - if (options.sourceMap) { - map = new SourceMap; - } - fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); - currentLine = 0; - if (options.header) { - currentLine += 1; - } - if (options.shiftLine) { - currentLine += 1; - } - currentColumn = 0; - js = ""; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - if (options.sourceMap) { - if (fragment.locationData) { - map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { - noReplace: true - }); - } - newLines = helpers.count(fragment.code, "\n"); - currentLine += newLines; - currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0); - } - js += fragment.code; - } - if (options.header) { - header = "Generated by CoffeeScript " + this.VERSION; - js = "// " + header + "\n" + js; - } - if (options.sourceMap) { - answer = { - js: js - }; - answer.sourceMap = map; - answer.v3SourceMap = map.generate(options, code); - return answer; - } else { - return js; - } - }; - - exports.tokens = function(code, options) { - return lexer.tokenize(code, options); - }; - - exports.nodes = function(source, options) { - if (typeof source === 'string') { - return parser.parse(lexer.tokenize(source, options)); - } else { - return parser.parse(source); - } - }; - - exports.run = function(code, options) { - var answer, mainModule; - if (options == null) { - options = {}; - } - mainModule = require.main; - if (options.sourceMap == null) { - options.sourceMap = true; - } - mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; - mainModule.moduleCache && (mainModule.moduleCache = {}); - mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename || '.'))); - if (!helpers.isCoffee(mainModule.filename) || require.extensions) { - answer = compile(code, options); - patchStackTrace(); - sourceMaps[mainModule.filename] = answer.sourceMap; - return mainModule._compile(answer.js, mainModule.filename); - } else { - return mainModule._compile(code, mainModule.filename); - } - }; - - exports["eval"] = function(code, options) { - var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; - if (options == null) { - options = {}; - } - if (!(code = code.trim())) { - return; - } - Script = vm.Script; - if (Script) { - if (options.sandbox != null) { - if (options.sandbox instanceof Script.createContext().constructor) { - sandbox = options.sandbox; - } else { - sandbox = Script.createContext(); - _ref = options.sandbox; - for (k in _ref) { - if (!__hasProp.call(_ref, k)) continue; - v = _ref[k]; - sandbox[k] = v; - } - } - sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; - } else { - sandbox = global; - } - sandbox.__filename = options.filename || 'eval'; - sandbox.__dirname = path.dirname(sandbox.__filename); - if (!(sandbox !== global || sandbox.module || sandbox.require)) { - Module = require('module'); - sandbox.module = _module = new Module(options.modulename || 'eval'); - sandbox.require = _require = function(path) { - return Module._load(path, _module, true); - }; - _module.filename = sandbox.__filename; - _ref1 = Object.getOwnPropertyNames(require); - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - r = _ref1[_i]; - if (r !== 'paths') { - _require[r] = require[r]; - } - } - _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); - _require.resolve = function(request) { - return Module._resolveFilename(request, _module); - }; - } - } - o = {}; - for (k in options) { - if (!__hasProp.call(options, k)) continue; - v = options[k]; - o[k] = v; - } - o.bare = true; - js = compile(code, o); - if (sandbox === global) { - return vm.runInThisContext(js); - } else { - return vm.runInContext(js, sandbox); - } - }; - - loadFile = function(module, filename) { - var answer, raw, stripped; - raw = fs.readFileSync(filename, 'utf8'); - stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; - answer = compile(stripped, { - filename: filename, - sourceMap: true, - literate: helpers.isLiterate(filename) - }); - sourceMaps[filename] = answer.sourceMap; - return module._compile(answer.js, filename); - }; - - if (require.extensions) { - _ref = ['.coffee', '.litcoffee', '.coffee.md']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ext = _ref[_i]; - require.extensions[ext] = loadFile; - } - Module = require('module'); - findExtension = function(filename) { - var curExtension, extensions; - extensions = path.basename(filename).split('.'); - if (extensions[0] === '') { - extensions.shift(); - } - while (extensions.shift()) { - curExtension = '.' + extensions.join('.'); - if (Module._extensions[curExtension]) { - return curExtension; - } - } - return '.js'; - }; - Module.prototype.load = function(filename) { - var extension; - this.filename = filename; - this.paths = Module._nodeModulePaths(path.dirname(filename)); - extension = findExtension(filename); - Module._extensions[extension](this, filename); - return this.loaded = true; - }; - } - - if (child_process) { - fork = child_process.fork; - child_process.fork = function(path, args, options) { - var execPath; - if (args == null) { - args = []; - } - if (options == null) { - options = {}; - } - execPath = helpers.isCoffee(path) ? 'coffee' : null; - if (!Array.isArray(args)) { - args = []; - options = args || {}; - } - options.execPath || (options.execPath = execPath); - return fork(path, args, options); - }; - } - - lexer = new Lexer; - - parser.lexer = { - lex: function() { - var tag, token; - token = this.tokens[this.pos++]; - if (token) { - tag = token[0], this.yytext = token[1], this.yylloc = token[2]; - this.yylineno = this.yylloc.first_line; - } else { - tag = ''; - } - return tag; - }, - setInput: function(tokens) { - this.tokens = tokens; - return this.pos = 0; - }, - upcomingInput: function() { - return ""; - } - }; - - parser.yy = require('./nodes'); - - parser.yy.parseError = function(message, _arg) { - var token; - token = _arg.token; - message = "unexpected " + (token === 1 ? 'end of input' : token); - return helpers.throwSyntaxError(message, parser.lexer.yylloc); - }; - - patched = false; - - sourceMaps = {}; - - patchStackTrace = function() { - var mainModule; - if (patched) { - return; - } - patched = true; - mainModule = require.main; - return Error.prepareStackTrace = function(err, stack) { - var frame, frames, getSourceMapping, sourceFiles, _ref1; - sourceFiles = {}; - getSourceMapping = function(filename, line, column) { - var answer, sourceMap; - sourceMap = sourceMaps[filename]; - if (sourceMap) { - answer = sourceMap.sourceLocation([line - 1, column - 1]); - } - if (answer) { - return [answer[0] + 1, answer[1] + 1]; - } else { - return null; - } - }; - frames = (function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = stack.length; _j < _len1; _j++) { - frame = stack[_j]; - if (frame.getFunction() === exports.run) { - break; - } - _results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); - } - return _results; - })(); - return "" + err.name + ": " + ((_ref1 = err.message) != null ? _ref1 : '') + "\n" + (frames.join('\n')) + "\n"; - }; - }; - - formatSourcePosition = function(frame, getSourceMapping) { - var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; - fileName = void 0; - fileLocation = ''; - if (frame.isNative()) { - fileLocation = "native"; - } else { - if (frame.isEval()) { - fileName = frame.getScriptNameOrSourceURL(); - if (!fileName) { - fileLocation = "" + (frame.getEvalOrigin()) + ", "; - } - } else { - fileName = frame.getFileName(); - } - fileName || (fileName = ""); - line = frame.getLineNumber(); - column = frame.getColumnNumber(); - source = getSourceMapping(fileName, line, column); - fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] + ", :" + line + ":" + column : "" + fileName + ":" + line + ":" + column; - } - functionName = frame.getFunctionName(); - isConstructor = frame.isConstructor(); - isMethodCall = !(frame.isToplevel() || isConstructor); - if (isMethodCall) { - methodName = frame.getMethodName(); - typeName = frame.getTypeName(); - if (functionName) { - tp = as = ''; - if (typeName && functionName.indexOf(typeName)) { - tp = "" + typeName + "."; - } - if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { - as = " [as " + methodName + "]"; - } - return "" + tp + functionName + as + " (" + fileLocation + ")"; - } else { - return "" + typeName + "." + (methodName || '') + " (" + fileLocation + ")"; - } - } else if (isConstructor) { - return "new " + (functionName || '') + " (" + fileLocation + ")"; - } else if (functionName) { - return "" + functionName + " (" + fileLocation + ")"; - } else { - return fileLocation; - } - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/command.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/command.js deleted file mode 100644 index 26b25540..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/command.js +++ /dev/null @@ -1,526 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec; - - EventEmitter = require('events').EventEmitter; - - exists = fs.exists || path.exists; - - useWinPathSep = path.sep === '\\'; - - helpers.extend(CoffeeScript, new EventEmitter); - - printLine = function(line) { - return process.stdout.write(line + '\n'); - }; - - printWarn = function(line) { - return process.stderr.write(line + '\n'); - }; - - hidden = function(file) { - return /^\.|~$/.test(file); - }; - - BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; - - SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; - - opts = {}; - - sources = []; - - sourceCode = []; - - notSources = {}; - - watchers = {}; - - optionParser = null; - - exports.run = function() { - var literals, source, _i, _len, _results; - parseOptions(); - if (opts.nodejs) { - return forkNode(); - } - if (opts.help) { - return usage(); - } - if (opts.version) { - return version(); - } - if (opts.interactive) { - return require('./repl').start(); - } - if (opts.watch && !fs.watch) { - return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + "."); - } - if (opts.stdio) { - return compileStdio(); - } - if (opts["eval"]) { - return compileScript(null, sources[0]); - } - if (!sources.length) { - return require('./repl').start(); - } - literals = opts.run ? sources.splice(1) : []; - process.argv = process.argv.slice(0, 2).concat(literals); - process.argv[0] = 'coffee'; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - source = sources[_i]; - _results.push(compilePath(source, true, path.normalize(source))); - } - return _results; - }; - - compilePath = function(source, topLevel, base) { - return fs.stat(source, function(err, stats) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - console.error("File not found: " + source); - process.exit(1); - } - if (stats.isDirectory() && path.dirname(source) !== 'node_modules') { - if (opts.watch) { - watchDir(source, base); - } - return fs.readdir(source, function(err, files) { - var file, index, _ref1, _ref2; - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - index = sources.indexOf(source); - files = files.filter(function(file) { - return !hidden(file); - }); - [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(path.join(source, file)); - } - return _results; - })())), _ref1; - [].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() { - return null; - }))), _ref2; - return files.forEach(function(file) { - return compilePath(path.join(source, file), false, base); - }); - }); - } else if (topLevel || helpers.isCoffee(source)) { - if (opts.watch) { - watch(source, base); - } - return fs.readFile(source, function(err, code) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - return compileScript(source, code.toString(), base); - }); - } else { - notSources[source] = true; - return removeSource(source, base); - } - }); - }; - - compileScript = function(file, input, base) { - var compiled, err, message, o, options, t, task, useColors; - if (base == null) { - base = null; - } - o = opts; - options = compileOptions(file, base); - try { - t = task = { - file: file, - input: input, - options: options - }; - CoffeeScript.emit('compile', task); - if (o.tokens) { - return printTokens(CoffeeScript.tokens(t.input, t.options)); - } else if (o.nodes) { - return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim()); - } else if (o.run) { - return CoffeeScript.run(t.input, t.options); - } else if (o.join && t.file !== o.join) { - if (helpers.isLiterate(file)) { - t.input = helpers.invertLiterate(t.input); - } - sourceCode[sources.indexOf(t.file)] = t.input; - return compileJoin(); - } else { - compiled = CoffeeScript.compile(t.input, t.options); - t.output = compiled; - if (o.map) { - t.output = compiled.js; - t.sourceMap = compiled.v3SourceMap; - } - CoffeeScript.emit('success', task); - if (o.print) { - return printLine(t.output.trim()); - } else if (o.compile || o.map) { - return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); - } - } - } catch (_error) { - err = _error; - CoffeeScript.emit('failure', err, task); - if (CoffeeScript.listeners('failure').length) { - return; - } - useColors = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; - message = helpers.prettyErrorMessage(err, file || '[stdin]', input, useColors); - if (o.watch) { - return printLine(message + '\x07'); - } else { - printWarn(message); - return process.exit(1); - } - } - }; - - compileStdio = function() { - var code, stdin; - code = ''; - stdin = process.openStdin(); - stdin.on('data', function(buffer) { - if (buffer) { - return code += buffer.toString(); - } - }); - return stdin.on('end', function() { - return compileScript(null, code); - }); - }; - - joinTimeout = null; - - compileJoin = function() { - if (!opts.join) { - return; - } - if (!sourceCode.some(function(code) { - return code === null; - })) { - clearTimeout(joinTimeout); - return joinTimeout = wait(100, function() { - return compileScript(opts.join, sourceCode.join('\n'), opts.join); - }); - } - }; - - watch = function(source, base) { - var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher; - prevStats = null; - compileTimeout = null; - watchErr = function(e) { - if (e.code === 'ENOENT') { - if (sources.indexOf(source) === -1) { - return; - } - try { - rewatch(); - return compile(); - } catch (_error) { - e = _error; - removeSource(source, base, true); - return compileJoin(); - } - } else { - throw e; - } - }; - compile = function() { - clearTimeout(compileTimeout); - return compileTimeout = wait(25, function() { - return fs.stat(source, function(err, stats) { - if (err) { - return watchErr(err); - } - if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) { - return rewatch(); - } - prevStats = stats; - return fs.readFile(source, function(err, code) { - if (err) { - return watchErr(err); - } - compileScript(source, code.toString(), base); - return rewatch(); - }); - }); - }); - }; - try { - watcher = fs.watch(source, compile); - } catch (_error) { - e = _error; - watchErr(e); - } - return rewatch = function() { - if (watcher != null) { - watcher.close(); - } - return watcher = fs.watch(source, compile); - }; - }; - - watchDir = function(source, base) { - var e, readdirTimeout, watcher; - readdirTimeout = null; - try { - return watcher = fs.watch(source, function() { - clearTimeout(readdirTimeout); - return readdirTimeout = wait(25, function() { - return fs.readdir(source, function(err, files) { - var file, _i, _len, _results; - if (err) { - if (err.code !== 'ENOENT') { - throw err; - } - watcher.close(); - return unwatchDir(source, base); - } - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - if (!(!hidden(file) && !notSources[file])) { - continue; - } - file = path.join(source, file); - if (sources.some(function(s) { - return s.indexOf(file) >= 0; - })) { - continue; - } - sources.push(file); - sourceCode.push(null); - _results.push(compilePath(file, false, base)); - } - return _results; - }); - }); - }); - } catch (_error) { - e = _error; - if (e.code !== 'ENOENT') { - throw e; - } - } - }; - - unwatchDir = function(source, base) { - var file, prevSources, toRemove, _i, _len; - prevSources = sources.slice(0); - toRemove = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - file = sources[_i]; - if (file.indexOf(source) >= 0) { - _results.push(file); - } - } - return _results; - })(); - for (_i = 0, _len = toRemove.length; _i < _len; _i++) { - file = toRemove[_i]; - removeSource(file, base, true); - } - if (!sources.some(function(s, i) { - return prevSources[i] !== s; - })) { - return; - } - return compileJoin(); - }; - - removeSource = function(source, base, removeJs) { - var index, jsPath; - index = sources.indexOf(source); - sources.splice(index, 1); - sourceCode.splice(index, 1); - if (removeJs && !opts.join) { - jsPath = outputPath(source, base); - return exists(jsPath, function(itExists) { - if (itExists) { - return fs.unlink(jsPath, function(err) { - if (err && err.code !== 'ENOENT') { - throw err; - } - return timeLog("removed " + source); - }); - } - }); - } - }; - - outputPath = function(source, base, extension) { - var baseDir, basename, dir, srcDir; - if (extension == null) { - extension = ".js"; - } - basename = helpers.baseFileName(source, true, useWinPathSep); - srcDir = path.dirname(source); - baseDir = base === '.' ? srcDir : srcDir.substring(base.length); - dir = opts.output ? path.join(opts.output, baseDir) : srcDir; - return path.join(dir, basename + extension); - }; - - writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { - var compile, jsDir, sourceMapPath; - if (generatedSourceMap == null) { - generatedSourceMap = null; - } - sourceMapPath = outputPath(sourcePath, base, ".map"); - jsDir = path.dirname(jsPath); - compile = function() { - if (opts.compile) { - if (js.length <= 0) { - js = ' '; - } - if (generatedSourceMap) { - js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n"; - } - fs.writeFile(jsPath, js, function(err) { - if (err) { - return printLine(err.message); - } else if (opts.compile && opts.watch) { - return timeLog("compiled " + sourcePath); - } - }); - } - if (generatedSourceMap) { - return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) { - if (err) { - return printLine("Could not write source map: " + err.message); - } - }); - } - }; - return exists(jsDir, function(itExists) { - if (itExists) { - return compile(); - } else { - return exec("mkdir -p " + jsDir, compile); - } - }); - }; - - wait = function(milliseconds, func) { - return setTimeout(func, milliseconds); - }; - - timeLog = function(message) { - return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message); - }; - - printTokens = function(tokens) { - var strings, tag, token, value; - strings = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = tokens.length; _i < _len; _i++) { - token = tokens[_i]; - tag = token[0]; - value = token[1].toString().replace(/\n/, '\\n'); - _results.push("[" + tag + " " + value + "]"); - } - return _results; - })(); - return printLine(strings.join(' ')); - }; - - parseOptions = function() { - var i, o, source, _i, _len; - optionParser = new optparse.OptionParser(SWITCHES, BANNER); - o = opts = optionParser.parse(process.argv.slice(2)); - o.compile || (o.compile = !!o.output); - o.run = !(o.compile || o.print || o.map); - o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); - sources = o["arguments"]; - for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) { - source = sources[i]; - sourceCode[i] = null; - } - }; - - compileOptions = function(filename, base) { - var answer, cwd, jsDir, jsPath; - answer = { - filename: filename, - literate: opts.literate || helpers.isLiterate(filename), - bare: opts.bare, - header: opts.compile, - sourceMap: opts.map - }; - if (filename) { - if (base) { - cwd = process.cwd(); - jsPath = outputPath(filename, base); - jsDir = path.dirname(jsPath); - answer = helpers.merge(answer, { - jsPath: jsPath, - sourceRoot: path.relative(jsDir, cwd), - sourceFiles: [path.relative(cwd, filename)], - generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) - }); - } else { - answer = helpers.merge(answer, { - sourceRoot: "", - sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], - generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" - }); - } - } - return answer; - }; - - forkNode = function() { - var args, nodeArgs; - nodeArgs = opts.nodejs.split(/\s+/); - args = process.argv.slice(1); - args.splice(args.indexOf('--nodejs'), 2); - return spawn(process.execPath, nodeArgs.concat(args), { - cwd: process.cwd(), - env: process.env, - customFds: [0, 1, 2] - }); - }; - - usage = function() { - return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help()); - }; - - version = function() { - return printLine("CoffeeScript version " + CoffeeScript.VERSION); - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/grammar.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/grammar.js deleted file mode 100644 index 24d5bacc..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/grammar.js +++ /dev/null @@ -1,625 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; - - Parser = require('jison').Parser; - - unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; - - o = function(patternString, action, options) { - var addLocationDataFn, match, patternCount; - patternString = patternString.replace(/\s{2,}/g, ' '); - patternCount = patternString.split(' ').length; - if (!action) { - return [patternString, '$$ = $1;', options]; - } - action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())"; - action = action.replace(/\bnew /g, '$&yy.'); - action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&'); - addLocationDataFn = function(first, last) { - if (!last) { - return "yy.addLocationDataFn(@" + first + ")"; - } else { - return "yy.addLocationDataFn(@" + first + ", @" + last + ")"; - } - }; - action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1')); - action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2')); - return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options]; - }; - - grammar = { - Root: [ - o('', function() { - return new Block; - }), o('Body'), o('Block TERMINATOR') - ], - Body: [ - o('Line', function() { - return Block.wrap([$1]); - }), o('Body TERMINATOR Line', function() { - return $1.push($3); - }), o('Body TERMINATOR') - ], - Line: [o('Expression'), o('Statement')], - Statement: [ - o('Return'), o('Comment'), o('STATEMENT', function() { - return new Literal($1); - }) - ], - Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')], - Block: [ - o('INDENT OUTDENT', function() { - return new Block; - }), o('INDENT Body OUTDENT', function() { - return $2; - }) - ], - Identifier: [ - o('IDENTIFIER', function() { - return new Literal($1); - }) - ], - AlphaNumeric: [ - o('NUMBER', function() { - return new Literal($1); - }), o('STRING', function() { - return new Literal($1); - }) - ], - Literal: [ - o('AlphaNumeric'), o('JS', function() { - return new Literal($1); - }), o('REGEX', function() { - return new Literal($1); - }), o('DEBUGGER', function() { - return new Literal($1); - }), o('UNDEFINED', function() { - return new Undefined; - }), o('NULL', function() { - return new Null; - }), o('BOOL', function() { - return new Bool($1); - }) - ], - Assign: [ - o('Assignable = Expression', function() { - return new Assign($1, $3); - }), o('Assignable = TERMINATOR Expression', function() { - return new Assign($1, $4); - }), o('Assignable = INDENT Expression OUTDENT', function() { - return new Assign($1, $4); - }) - ], - AssignObj: [ - o('ObjAssignable', function() { - return new Value($1); - }), o('ObjAssignable : Expression', function() { - return new Assign(LOC(1)(new Value($1)), $3, 'object'); - }), o('ObjAssignable :\ - INDENT Expression OUTDENT', function() { - return new Assign(LOC(1)(new Value($1)), $4, 'object'); - }), o('Comment') - ], - ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')], - Return: [ - o('RETURN Expression', function() { - return new Return($2); - }), o('RETURN', function() { - return new Return; - }) - ], - Comment: [ - o('HERECOMMENT', function() { - return new Comment($1); - }) - ], - Code: [ - o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() { - return new Code($2, $5, $4); - }), o('FuncGlyph Block', function() { - return new Code([], $2, $1); - }) - ], - FuncGlyph: [ - o('->', function() { - return 'func'; - }), o('=>', function() { - return 'boundfunc'; - }) - ], - OptComma: [o(''), o(',')], - ParamList: [ - o('', function() { - return []; - }), o('Param', function() { - return [$1]; - }), o('ParamList , Param', function() { - return $1.concat($3); - }), o('ParamList OptComma TERMINATOR Param', function() { - return $1.concat($4); - }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Param: [ - o('ParamVar', function() { - return new Param($1); - }), o('ParamVar ...', function() { - return new Param($1, null, true); - }), o('ParamVar = Expression', function() { - return new Param($1, $3); - }) - ], - ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')], - Splat: [ - o('Expression ...', function() { - return new Splat($1); - }) - ], - SimpleAssignable: [ - o('Identifier', function() { - return new Value($1); - }), o('Value Accessor', function() { - return $1.add($2); - }), o('Invocation Accessor', function() { - return new Value($1, [].concat($2)); - }), o('ThisProperty') - ], - Assignable: [ - o('SimpleAssignable'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - Value: [ - o('Assignable'), o('Literal', function() { - return new Value($1); - }), o('Parenthetical', function() { - return new Value($1); - }), o('Range', function() { - return new Value($1); - }), o('This') - ], - Accessor: [ - o('. Identifier', function() { - return new Access($2); - }), o('?. Identifier', function() { - return new Access($2, 'soak'); - }), o(':: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'))), LOC(2)(new Access($2))]; - }), o('?:: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'), 'soak')), LOC(2)(new Access($2))]; - }), o('::', function() { - return new Access(new Literal('prototype')); - }), o('Index') - ], - Index: [ - o('INDEX_START IndexValue INDEX_END', function() { - return $2; - }), o('INDEX_SOAK Index', function() { - return extend($2, { - soak: true - }); - }) - ], - IndexValue: [ - o('Expression', function() { - return new Index($1); - }), o('Slice', function() { - return new Slice($1); - }) - ], - Object: [ - o('{ AssignList OptComma }', function() { - return new Obj($2, $1.generated); - }) - ], - AssignList: [ - o('', function() { - return []; - }), o('AssignObj', function() { - return [$1]; - }), o('AssignList , AssignObj', function() { - return $1.concat($3); - }), o('AssignList OptComma TERMINATOR AssignObj', function() { - return $1.concat($4); - }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Class: [ - o('CLASS', function() { - return new Class; - }), o('CLASS Block', function() { - return new Class(null, null, $2); - }), o('CLASS EXTENDS Expression', function() { - return new Class(null, $3); - }), o('CLASS EXTENDS Expression Block', function() { - return new Class(null, $3, $4); - }), o('CLASS SimpleAssignable', function() { - return new Class($2); - }), o('CLASS SimpleAssignable Block', function() { - return new Class($2, null, $3); - }), o('CLASS SimpleAssignable EXTENDS Expression', function() { - return new Class($2, $4); - }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() { - return new Class($2, $4, $5); - }) - ], - Invocation: [ - o('Value OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('Invocation OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('SUPER', function() { - return new Call('super', [new Splat(new Literal('arguments'))]); - }), o('SUPER Arguments', function() { - return new Call('super', $2); - }) - ], - OptFuncExist: [ - o('', function() { - return false; - }), o('FUNC_EXIST', function() { - return true; - }) - ], - Arguments: [ - o('CALL_START CALL_END', function() { - return []; - }), o('CALL_START ArgList OptComma CALL_END', function() { - return $2; - }) - ], - This: [ - o('THIS', function() { - return new Value(new Literal('this')); - }), o('@', function() { - return new Value(new Literal('this')); - }) - ], - ThisProperty: [ - o('@ Identifier', function() { - return new Value(LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'); - }) - ], - Array: [ - o('[ ]', function() { - return new Arr([]); - }), o('[ ArgList OptComma ]', function() { - return new Arr($2); - }) - ], - RangeDots: [ - o('..', function() { - return 'inclusive'; - }), o('...', function() { - return 'exclusive'; - }) - ], - Range: [ - o('[ Expression RangeDots Expression ]', function() { - return new Range($2, $4, $3); - }) - ], - Slice: [ - o('Expression RangeDots Expression', function() { - return new Range($1, $3, $2); - }), o('Expression RangeDots', function() { - return new Range($1, null, $2); - }), o('RangeDots Expression', function() { - return new Range(null, $2, $1); - }), o('RangeDots', function() { - return new Range(null, null, $1); - }) - ], - ArgList: [ - o('Arg', function() { - return [$1]; - }), o('ArgList , Arg', function() { - return $1.concat($3); - }), o('ArgList OptComma TERMINATOR Arg', function() { - return $1.concat($4); - }), o('INDENT ArgList OptComma OUTDENT', function() { - return $2; - }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Arg: [o('Expression'), o('Splat')], - SimpleArgs: [ - o('Expression'), o('SimpleArgs , Expression', function() { - return [].concat($1, $3); - }) - ], - Try: [ - o('TRY Block', function() { - return new Try($2); - }), o('TRY Block Catch', function() { - return new Try($2, $3[0], $3[1]); - }), o('TRY Block FINALLY Block', function() { - return new Try($2, null, null, $4); - }), o('TRY Block Catch FINALLY Block', function() { - return new Try($2, $3[0], $3[1], $5); - }) - ], - Catch: [ - o('CATCH Identifier Block', function() { - return [$2, $3]; - }), o('CATCH Object Block', function() { - return [LOC(2)(new Value($2)), $3]; - }), o('CATCH Block', function() { - return [null, $2]; - }) - ], - Throw: [ - o('THROW Expression', function() { - return new Throw($2); - }) - ], - Parenthetical: [ - o('( Body )', function() { - return new Parens($2); - }), o('( INDENT Body OUTDENT )', function() { - return new Parens($3); - }) - ], - WhileSource: [ - o('WHILE Expression', function() { - return new While($2); - }), o('WHILE Expression WHEN Expression', function() { - return new While($2, { - guard: $4 - }); - }), o('UNTIL Expression', function() { - return new While($2, { - invert: true - }); - }), o('UNTIL Expression WHEN Expression', function() { - return new While($2, { - invert: true, - guard: $4 - }); - }) - ], - While: [ - o('WhileSource Block', function() { - return $1.addBody($2); - }), o('Statement WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Expression WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Loop', function() { - return $1; - }) - ], - Loop: [ - o('LOOP Block', function() { - return new While(LOC(1)(new Literal('true'))).addBody($2); - }), o('LOOP Expression', function() { - return new While(LOC(1)(new Literal('true'))).addBody(LOC(2)(Block.wrap([$2]))); - }) - ], - For: [ - o('Statement ForBody', function() { - return new For($1, $2); - }), o('Expression ForBody', function() { - return new For($1, $2); - }), o('ForBody Block', function() { - return new For($2, $1); - }) - ], - ForBody: [ - o('FOR Range', function() { - return { - source: LOC(2)(new Value($2)) - }; - }), o('ForStart ForSource', function() { - $2.own = $1.own; - $2.name = $1[0]; - $2.index = $1[1]; - return $2; - }) - ], - ForStart: [ - o('FOR ForVariables', function() { - return $2; - }), o('FOR OWN ForVariables', function() { - $3.own = true; - return $3; - }) - ], - ForValue: [ - o('Identifier'), o('ThisProperty'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - ForVariables: [ - o('ForValue', function() { - return [$1]; - }), o('ForValue , ForValue', function() { - return [$1, $3]; - }) - ], - ForSource: [ - o('FORIN Expression', function() { - return { - source: $2 - }; - }), o('FOROF Expression', function() { - return { - source: $2, - object: true - }; - }), o('FORIN Expression WHEN Expression', function() { - return { - source: $2, - guard: $4 - }; - }), o('FOROF Expression WHEN Expression', function() { - return { - source: $2, - guard: $4, - object: true - }; - }), o('FORIN Expression BY Expression', function() { - return { - source: $2, - step: $4 - }; - }), o('FORIN Expression WHEN Expression BY Expression', function() { - return { - source: $2, - guard: $4, - step: $6 - }; - }), o('FORIN Expression BY Expression WHEN Expression', function() { - return { - source: $2, - step: $4, - guard: $6 - }; - }) - ], - Switch: [ - o('SWITCH Expression INDENT Whens OUTDENT', function() { - return new Switch($2, $4); - }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() { - return new Switch($2, $4, $6); - }), o('SWITCH INDENT Whens OUTDENT', function() { - return new Switch(null, $3); - }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() { - return new Switch(null, $3, $5); - }) - ], - Whens: [ - o('When'), o('Whens When', function() { - return $1.concat($2); - }) - ], - When: [ - o('LEADING_WHEN SimpleArgs Block', function() { - return [[$2, $3]]; - }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() { - return [[$2, $3]]; - }) - ], - IfBlock: [ - o('IF Expression Block', function() { - return new If($2, $3, { - type: $1 - }); - }), o('IfBlock ELSE IF Expression Block', function() { - return $1.addElse(new If($4, $5, { - type: $3 - })); - }) - ], - If: [ - o('IfBlock'), o('IfBlock ELSE Block', function() { - return $1.addElse($3); - }), o('Statement POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }), o('Expression POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }) - ], - Operation: [ - o('UNARY Expression', function() { - return new Op($1, $2); - }), o('- Expression', (function() { - return new Op('-', $2); - }), { - prec: 'UNARY' - }), o('+ Expression', (function() { - return new Op('+', $2); - }), { - prec: 'UNARY' - }), o('-- SimpleAssignable', function() { - return new Op('--', $2); - }), o('++ SimpleAssignable', function() { - return new Op('++', $2); - }), o('SimpleAssignable --', function() { - return new Op('--', $1, null, true); - }), o('SimpleAssignable ++', function() { - return new Op('++', $1, null, true); - }), o('Expression ?', function() { - return new Existence($1); - }), o('Expression + Expression', function() { - return new Op('+', $1, $3); - }), o('Expression - Expression', function() { - return new Op('-', $1, $3); - }), o('Expression MATH Expression', function() { - return new Op($2, $1, $3); - }), o('Expression SHIFT Expression', function() { - return new Op($2, $1, $3); - }), o('Expression COMPARE Expression', function() { - return new Op($2, $1, $3); - }), o('Expression LOGIC Expression', function() { - return new Op($2, $1, $3); - }), o('Expression RELATION Expression', function() { - if ($2.charAt(0) === '!') { - return new Op($2.slice(1), $1, $3).invert(); - } else { - return new Op($2, $1, $3); - } - }), o('SimpleAssignable COMPOUND_ASSIGN\ - Expression', function() { - return new Assign($1, $3, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN\ - INDENT Expression OUTDENT', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR\ - Expression', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable EXTENDS Expression', function() { - return new Extends($1, $3); - }) - ] - }; - - operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']]; - - tokens = []; - - for (name in grammar) { - alternatives = grammar[name]; - grammar[name] = (function() { - var _i, _j, _len, _len1, _ref, _results; - _results = []; - for (_i = 0, _len = alternatives.length; _i < _len; _i++) { - alt = alternatives[_i]; - _ref = alt[0].split(' '); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - token = _ref[_j]; - if (!grammar[token]) { - tokens.push(token); - } - } - if (name === 'Root') { - alt[1] = "return " + alt[1]; - } - _results.push(alt); - } - return _results; - })(); - } - - exports.parser = new Parser({ - tokens: tokens.join(' '), - bnf: grammar, - operators: operators.reverse(), - startSymbol: 'Root' - }); - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/helpers.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/helpers.js deleted file mode 100644 index 352dc366..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/helpers.js +++ /dev/null @@ -1,223 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var buildLocationData, extend, flatten, last, repeat, _ref; - - exports.starts = function(string, literal, start) { - return literal === string.substr(start, literal.length); - }; - - exports.ends = function(string, literal, back) { - var len; - len = literal.length; - return literal === string.substr(string.length - len - (back || 0), len); - }; - - exports.repeat = repeat = function(str, n) { - var res; - res = ''; - while (n > 0) { - if (n & 1) { - res += str; - } - n >>>= 1; - str += str; - } - return res; - }; - - exports.compact = function(array) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - item = array[_i]; - if (item) { - _results.push(item); - } - } - return _results; - }; - - exports.count = function(string, substr) { - var num, pos; - num = pos = 0; - if (!substr.length) { - return 1 / 0; - } - while (pos = 1 + string.indexOf(substr, pos)) { - num++; - } - return num; - }; - - exports.merge = function(options, overrides) { - return extend(extend({}, options), overrides); - }; - - extend = exports.extend = function(object, properties) { - var key, val; - for (key in properties) { - val = properties[key]; - object[key] = val; - } - return object; - }; - - exports.flatten = flatten = function(array) { - var element, flattened, _i, _len; - flattened = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - element = array[_i]; - if (element instanceof Array) { - flattened = flattened.concat(flatten(element)); - } else { - flattened.push(element); - } - } - return flattened; - }; - - exports.del = function(obj, key) { - var val; - val = obj[key]; - delete obj[key]; - return val; - }; - - exports.last = last = function(array, back) { - return array[array.length - (back || 0) - 1]; - }; - - exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { - var e, _i, _len; - for (_i = 0, _len = this.length; _i < _len; _i++) { - e = this[_i]; - if (fn(e)) { - return true; - } - } - return false; - }; - - exports.invertLiterate = function(code) { - var line, lines, maybe_code; - maybe_code = true; - lines = (function() { - var _i, _len, _ref1, _results; - _ref1 = code.split('\n'); - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - line = _ref1[_i]; - if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { - _results.push(line); - } else if (maybe_code = /^\s*$/.test(line)) { - _results.push(line); - } else { - _results.push('# ' + line); - } - } - return _results; - })(); - return lines.join('\n'); - }; - - buildLocationData = function(first, last) { - if (!last) { - return first; - } else { - return { - first_line: first.first_line, - first_column: first.first_column, - last_line: last.last_line, - last_column: last.last_column - }; - } - }; - - exports.addLocationDataFn = function(first, last) { - return function(obj) { - if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { - obj.updateLocationDataIfMissing(buildLocationData(first, last)); - } - return obj; - }; - }; - - exports.locationDataToString = function(obj) { - var locationData; - if (("2" in obj) && ("first_line" in obj[2])) { - locationData = obj[2]; - } else if ("first_line" in obj) { - locationData = obj; - } - if (locationData) { - return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); - } else { - return "No location data"; - } - }; - - exports.baseFileName = function(file, stripExt, useWinPathSep) { - var parts, pathSep; - if (stripExt == null) { - stripExt = false; - } - if (useWinPathSep == null) { - useWinPathSep = false; - } - pathSep = useWinPathSep ? /\\|\// : /\//; - parts = file.split(pathSep); - file = parts[parts.length - 1]; - if (!stripExt) { - return file; - } - parts = file.split('.'); - parts.pop(); - if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { - parts.pop(); - } - return parts.join('.'); - }; - - exports.isCoffee = function(file) { - return /\.((lit)?coffee|coffee\.md)$/.test(file); - }; - - exports.isLiterate = function(file) { - return /\.(litcoffee|coffee\.md)$/.test(file); - }; - - exports.throwSyntaxError = function(message, location) { - var error; - if (location.last_line == null) { - location.last_line = location.first_line; - } - if (location.last_column == null) { - location.last_column = location.first_column; - } - error = new SyntaxError(message); - error.location = location; - throw error; - }; - - exports.prettyErrorMessage = function(error, fileName, code, useColors) { - var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1; - if (!error.location) { - return error.stack || ("" + error); - } - _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; - codeLine = code.split('\n')[first_line]; - start = first_column; - end = first_line === last_line ? last_column + 1 : codeLine.length; - marker = repeat(' ', start) + repeat('^', end - start); - if (useColors) { - colorize = function(str) { - return "\x1B[1;31m" + str + "\x1B[0m"; - }; - codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); - marker = colorize(marker); - } - message = "" + fileName + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker; - return message; - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/index.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/index.js deleted file mode 100644 index 68787dfd..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var key, val, _ref; - - _ref = require('./coffee-script'); - for (key in _ref) { - val = _ref[key]; - exports[key] = val; - } - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/lexer.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/lexer.js deleted file mode 100644 index b4db45fd..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/lexer.js +++ /dev/null @@ -1,889 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; - - _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.Lexer = Lexer = (function() { - function Lexer() {} - - Lexer.prototype.tokenize = function(code, opts) { - var consumed, i, tag, _ref2; - if (opts == null) { - opts = {}; - } - this.literate = opts.literate; - this.indent = 0; - this.indebt = 0; - this.outdebt = 0; - this.indents = []; - this.ends = []; - this.tokens = []; - this.chunkLine = opts.line || 0; - this.chunkColumn = opts.column || 0; - code = this.clean(code); - i = 0; - while (this.chunk = code.slice(i)) { - consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); - _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; - i += consumed; - } - this.closeIndentation(); - if (tag = this.ends.pop()) { - this.error("missing " + tag); - } - if (opts.rewrite === false) { - return this.tokens; - } - return (new Rewriter).rewrite(this.tokens); - }; - - Lexer.prototype.clean = function(code) { - if (code.charCodeAt(0) === BOM) { - code = code.slice(1); - } - code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); - if (WHITESPACE.test(code)) { - code = "\n" + code; - this.chunkLine--; - } - if (this.literate) { - code = invertLiterate(code); - } - return code; - }; - - Lexer.prototype.identifierToken = function() { - var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; - if (!(match = IDENTIFIER.exec(this.chunk))) { - return 0; - } - input = match[0], id = match[1], colon = match[2]; - idLength = id.length; - poppedToken = void 0; - if (id === 'own' && this.tag() === 'FOR') { - this.token('OWN', id); - return id.length; - } - forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); - tag = 'IDENTIFIER'; - if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { - tag = id.toUpperCase(); - if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { - tag = 'LEADING_WHEN'; - } else if (tag === 'FOR') { - this.seenFor = true; - } else if (tag === 'UNLESS') { - tag = 'IF'; - } else if (__indexOf.call(UNARY, tag) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(RELATION, tag) >= 0) { - if (tag !== 'INSTANCEOF' && this.seenFor) { - tag = 'FOR' + tag; - this.seenFor = false; - } else { - tag = 'RELATION'; - if (this.value() === '!') { - poppedToken = this.tokens.pop(); - id = '!' + id; - } - } - } - } - if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { - if (forcedIdentifier) { - tag = 'IDENTIFIER'; - id = new String(id); - id.reserved = true; - } else if (__indexOf.call(RESERVED, id) >= 0) { - this.error("reserved word \"" + id + "\""); - } - } - if (!forcedIdentifier) { - if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { - id = COFFEE_ALIAS_MAP[id]; - } - tag = (function() { - switch (id) { - case '!': - return 'UNARY'; - case '==': - case '!=': - return 'COMPARE'; - case '&&': - case '||': - return 'LOGIC'; - case 'true': - case 'false': - return 'BOOL'; - case 'break': - case 'continue': - return 'STATEMENT'; - default: - return tag; - } - })(); - } - tagToken = this.token(tag, id, 0, idLength); - if (poppedToken) { - _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; - } - if (colon) { - colonOffset = input.lastIndexOf(':'); - this.token(':', ':', colonOffset, colon.length); - } - return input.length; - }; - - Lexer.prototype.numberToken = function() { - var binaryLiteral, lexedLength, match, number, octalLiteral; - if (!(match = NUMBER.exec(this.chunk))) { - return 0; - } - number = match[0]; - if (/^0[BOX]/.test(number)) { - this.error("radix prefix '" + number + "' must be lowercase"); - } else if (/E/.test(number) && !/^0x/.test(number)) { - this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); - } else if (/^0\d*[89]/.test(number)) { - this.error("decimal literal '" + number + "' must not be prefixed with '0'"); - } else if (/^0\d+/.test(number)) { - this.error("octal literal '" + number + "' must be prefixed with '0o'"); - } - lexedLength = number.length; - if (octalLiteral = /^0o([0-7]+)/.exec(number)) { - number = '0x' + parseInt(octalLiteral[1], 8).toString(16); - } - if (binaryLiteral = /^0b([01]+)/.exec(number)) { - number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); - } - this.token('NUMBER', number, 0, lexedLength); - return lexedLength; - }; - - Lexer.prototype.stringToken = function() { - var match, octalEsc, string; - switch (this.chunk.charAt(0)) { - case "'": - if (!(match = SIMPLESTR.exec(this.chunk))) { - return 0; - } - string = match[0]; - this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length); - break; - case '"': - if (!(string = this.balancedString(this.chunk, '"'))) { - return 0; - } - if (0 < string.indexOf('#{', 1)) { - this.interpolateString(string.slice(1, -1), { - strOffset: 1, - lexedLength: string.length - }); - } else { - this.token('STRING', this.escapeLines(string, 0, string.length)); - } - break; - default: - return 0; - } - if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { - this.error("octal escape sequences " + string + " are not allowed"); - } - return string.length; - }; - - Lexer.prototype.heredocToken = function() { - var doc, heredoc, match, quote; - if (!(match = HEREDOC.exec(this.chunk))) { - return 0; - } - heredoc = match[0]; - quote = heredoc.charAt(0); - doc = this.sanitizeHeredoc(match[2], { - quote: quote, - indent: null - }); - if (quote === '"' && 0 <= doc.indexOf('#{')) { - this.interpolateString(doc, { - heredoc: true, - strOffset: 3, - lexedLength: heredoc.length - }); - } else { - this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); - } - return heredoc.length; - }; - - Lexer.prototype.commentToken = function() { - var comment, here, match; - if (!(match = this.chunk.match(COMMENT))) { - return 0; - } - comment = match[0], here = match[1]; - if (here) { - this.token('HERECOMMENT', this.sanitizeHeredoc(here, { - herecomment: true, - indent: repeat(' ', this.indent) - }), 0, comment.length); - } - return comment.length; - }; - - Lexer.prototype.jsToken = function() { - var match, script; - if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { - return 0; - } - this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); - return script.length; - }; - - Lexer.prototype.regexToken = function() { - var flags, length, match, prev, regex, _ref2, _ref3; - if (this.chunk.charAt(0) !== '/') { - return 0; - } - if (match = HEREGEX.exec(this.chunk)) { - length = this.heregexToken(match); - return length; - } - prev = last(this.tokens); - if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { - return 0; - } - if (!(match = REGEX.exec(this.chunk))) { - return 0; - } - _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; - if (regex.slice(0, 2) === '/*') { - this.error('regular expressions cannot begin with `*`'); - } - if (regex === '//') { - regex = '/(?:)/'; - } - this.token('REGEX', "" + regex + flags, 0, match.length); - return match.length; - }; - - Lexer.prototype.heregexToken = function(match) { - var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - heregex = match[0], body = match[1], flags = match[2]; - if (0 > body.indexOf('#{')) { - re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/'); - if (re.match(/^\*/)) { - this.error('regular expressions cannot begin with `*`'); - } - this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); - return heregex.length; - } - this.token('IDENTIFIER', 'RegExp', 0, 0); - this.token('CALL_START', '(', 0, 0); - tokens = []; - _ref2 = this.interpolateString(body, { - regex: true - }); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - token = _ref2[_i]; - tag = token[0], value = token[1]; - if (tag === 'TOKENS') { - tokens.push.apply(tokens, value); - } else if (tag === 'NEOSTRING') { - if (!(value = value.replace(HEREGEX_OMIT, ''))) { - continue; - } - value = value.replace(/\\/g, '\\\\'); - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', true); - tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - prev = last(this.tokens); - plusToken = ['+', '+']; - plusToken[2] = prev[2]; - tokens.push(plusToken); - } - tokens.pop(); - if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { - this.token('STRING', '""', 0, 0); - this.token('+', '+', 0, 0); - } - (_ref4 = this.tokens).push.apply(_ref4, tokens); - if (flags) { - flagsOffset = heregex.lastIndexOf(flags); - this.token(',', ',', flagsOffset, 0); - this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); - } - this.token(')', ')', heregex.length - 1, 0); - return heregex.length; - }; - - Lexer.prototype.lineToken = function() { - var diff, indent, match, noNewlines, size; - if (!(match = MULTI_DENT.exec(this.chunk))) { - return 0; - } - indent = match[0]; - this.seenFor = false; - size = indent.length - 1 - indent.lastIndexOf('\n'); - noNewlines = this.unfinished(); - if (size - this.indebt === this.indent) { - if (noNewlines) { - this.suppressNewlines(); - } else { - this.newlineToken(0); - } - return indent.length; - } - if (size > this.indent) { - if (noNewlines) { - this.indebt = size - this.indent; - this.suppressNewlines(); - return indent.length; - } - diff = size - this.indent + this.outdebt; - this.token('INDENT', diff, indent.length - size, size); - this.indents.push(diff); - this.ends.push('OUTDENT'); - this.outdebt = this.indebt = 0; - } else { - this.indebt = 0; - this.outdentToken(this.indent - size, noNewlines, indent.length); - } - this.indent = size; - return indent.length; - }; - - Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { - var dent, len; - while (moveOut > 0) { - len = this.indents.length - 1; - if (this.indents[len] === void 0) { - moveOut = 0; - } else if (this.indents[len] === this.outdebt) { - moveOut -= this.outdebt; - this.outdebt = 0; - } else if (this.indents[len] < this.outdebt) { - this.outdebt -= this.indents[len]; - moveOut -= this.indents[len]; - } else { - dent = this.indents.pop() + this.outdebt; - moveOut -= dent; - this.outdebt = 0; - this.pair('OUTDENT'); - this.token('OUTDENT', dent, 0, outdentLength); - } - } - if (dent) { - this.outdebt -= moveOut; - } - while (this.value() === ';') { - this.tokens.pop(); - } - if (!(this.tag() === 'TERMINATOR' || noNewlines)) { - this.token('TERMINATOR', '\n', outdentLength, 0); - } - return this; - }; - - Lexer.prototype.whitespaceToken = function() { - var match, nline, prev; - if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { - return 0; - } - prev = last(this.tokens); - if (prev) { - prev[match ? 'spaced' : 'newLine'] = true; - } - if (match) { - return match[0].length; - } else { - return 0; - } - }; - - Lexer.prototype.newlineToken = function(offset) { - while (this.value() === ';') { - this.tokens.pop(); - } - if (this.tag() !== 'TERMINATOR') { - this.token('TERMINATOR', '\n', offset, 0); - } - return this; - }; - - Lexer.prototype.suppressNewlines = function() { - if (this.value() === '\\') { - this.tokens.pop(); - } - return this; - }; - - Lexer.prototype.literalToken = function() { - var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; - if (match = OPERATOR.exec(this.chunk)) { - value = match[0]; - if (CODE.test(value)) { - this.tagParameters(); - } - } else { - value = this.chunk.charAt(0); - } - tag = value; - prev = last(this.tokens); - if (value === '=' && prev) { - if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { - this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); - } - if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { - prev[0] = 'COMPOUND_ASSIGN'; - prev[1] += '='; - return value.length; - } - } - if (value === ';') { - this.seenFor = false; - tag = 'TERMINATOR'; - } else if (__indexOf.call(MATH, value) >= 0) { - tag = 'MATH'; - } else if (__indexOf.call(COMPARE, value) >= 0) { - tag = 'COMPARE'; - } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { - tag = 'COMPOUND_ASSIGN'; - } else if (__indexOf.call(UNARY, value) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(SHIFT, value) >= 0) { - tag = 'SHIFT'; - } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { - tag = 'LOGIC'; - } else if (prev && !prev.spaced) { - if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { - if (prev[0] === '?') { - prev[0] = 'FUNC_EXIST'; - } - tag = 'CALL_START'; - } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { - tag = 'INDEX_START'; - switch (prev[0]) { - case '?': - prev[0] = 'INDEX_SOAK'; - } - } - } - switch (value) { - case '(': - case '{': - case '[': - this.ends.push(INVERSES[value]); - break; - case ')': - case '}': - case ']': - this.pair(value); - } - this.token(tag, value); - return value.length; - }; - - Lexer.prototype.sanitizeHeredoc = function(doc, options) { - var attempt, herecomment, indent, match, _ref2; - indent = options.indent, herecomment = options.herecomment; - if (herecomment) { - if (HEREDOC_ILLEGAL.test(doc)) { - this.error("block comment cannot contain \"*/\", starting"); - } - if (doc.indexOf('\n') < 0) { - return doc; - } - } else { - while (match = HEREDOC_INDENT.exec(doc)) { - attempt = match[1]; - if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { - indent = attempt; - } - } - } - if (indent) { - doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); - } - if (!herecomment) { - doc = doc.replace(/^\n/, ''); - } - return doc; - }; - - Lexer.prototype.tagParameters = function() { - var i, stack, tok, tokens; - if (this.tag() !== ')') { - return this; - } - stack = []; - tokens = this.tokens; - i = tokens.length; - tokens[--i][0] = 'PARAM_END'; - while (tok = tokens[--i]) { - switch (tok[0]) { - case ')': - stack.push(tok); - break; - case '(': - case 'CALL_START': - if (stack.length) { - stack.pop(); - } else if (tok[0] === '(') { - tok[0] = 'PARAM_START'; - return this; - } else { - return this; - } - } - } - return this; - }; - - Lexer.prototype.closeIndentation = function() { - return this.outdentToken(this.indent); - }; - - Lexer.prototype.balancedString = function(str, end) { - var continueCount, i, letter, match, prev, stack, _i, _ref2; - continueCount = 0; - stack = [end]; - for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { - if (continueCount) { - --continueCount; - continue; - } - switch (letter = str.charAt(i)) { - case '\\': - ++continueCount; - continue; - case end: - stack.pop(); - if (!stack.length) { - return str.slice(0, +i + 1 || 9e9); - } - end = stack[stack.length - 1]; - continue; - } - if (end === '}' && (letter === '"' || letter === "'")) { - stack.push(end = letter); - } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { - continueCount += match[0].length - 1; - } else if (end === '}' && letter === '{') { - stack.push(end = '}'); - } else if (end === '"' && prev === '#' && letter === '{') { - stack.push(end = '}'); - } - prev = letter; - } - return this.error("missing " + (stack.pop()) + ", starting"); - }; - - Lexer.prototype.interpolateString = function(str, options) { - var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - if (options == null) { - options = {}; - } - heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; - offsetInChunk = offsetInChunk || 0; - strOffset = strOffset || 0; - lexedLength = lexedLength || str.length; - if (heredoc && str.length > 0 && str[0] === '\n') { - str = str.slice(1); - strOffset++; - } - tokens = []; - pi = 0; - i = -1; - while (letter = str.charAt(i += 1)) { - if (letter === '\\') { - i += 1; - continue; - } - if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { - continue; - } - if (pi < i) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); - } - inner = expr.slice(1, -1); - if (inner.length) { - _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; - nested = new Lexer().tokenize(inner, { - line: line, - column: column, - rewrite: false - }); - popped = nested.pop(); - if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { - popped = nested.shift(); - } - if (len = nested.length) { - if (len > 1) { - nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); - nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); - } - tokens.push(['TOKENS', nested]); - } - } - i += expr.length; - pi = i + 1; - } - if ((i > pi && pi < str.length)) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); - } - if (regex) { - return tokens; - } - if (!tokens.length) { - return this.token('STRING', '""', offsetInChunk, lexedLength); - } - if (tokens[0][0] !== 'NEOSTRING') { - tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); - } - if (interpolated = tokens.length > 1) { - this.token('(', '(', offsetInChunk, 0); - } - for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { - token = tokens[i]; - tag = token[0], value = token[1]; - if (i) { - if (i) { - plusToken = this.token('+', '+'); - } - locationToken = tag === 'TOKENS' ? value[0] : token; - plusToken[2] = { - first_line: locationToken[2].first_line, - first_column: locationToken[2].first_column, - last_line: locationToken[2].first_line, - last_column: locationToken[2].first_column - }; - } - if (tag === 'TOKENS') { - (_ref4 = this.tokens).push.apply(_ref4, value); - } else if (tag === 'NEOSTRING') { - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', heredoc); - this.tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - } - if (interpolated) { - rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); - rparen.stringEnd = true; - this.tokens.push(rparen); - } - return tokens; - }; - - Lexer.prototype.pair = function(tag) { - var size, wanted; - if (tag !== (wanted = last(this.ends))) { - if ('OUTDENT' !== wanted) { - this.error("unmatched " + tag); - } - this.indent -= size = last(this.indents); - this.outdentToken(size, true); - return this.pair(tag); - } - return this.ends.pop(); - }; - - Lexer.prototype.getLineAndColumnFromChunk = function(offset) { - var column, lineCount, lines, string; - if (offset === 0) { - return [this.chunkLine, this.chunkColumn]; - } - if (offset >= this.chunk.length) { - string = this.chunk; - } else { - string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); - } - lineCount = count(string, '\n'); - column = this.chunkColumn; - if (lineCount > 0) { - lines = string.split('\n'); - column = last(lines).length; - } else { - column += string.length; - } - return [this.chunkLine + lineCount, column]; - }; - - Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { - var lastCharacter, locationData, token, _ref2, _ref3; - if (offsetInChunk == null) { - offsetInChunk = 0; - } - if (length == null) { - length = value.length; - } - locationData = {}; - _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; - lastCharacter = Math.max(0, length - 1); - _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; - token = [tag, value, locationData]; - return token; - }; - - Lexer.prototype.token = function(tag, value, offsetInChunk, length) { - var token; - token = this.makeToken(tag, value, offsetInChunk, length); - this.tokens.push(token); - return token; - }; - - Lexer.prototype.tag = function(index, tag) { - var tok; - return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); - }; - - Lexer.prototype.value = function(index, val) { - var tok; - return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); - }; - - Lexer.prototype.unfinished = function() { - var _ref2; - return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); - }; - - Lexer.prototype.escapeLines = function(str, heredoc) { - return str.replace(MULTILINER, heredoc ? '\\n' : ''); - }; - - Lexer.prototype.makeString = function(body, quote, heredoc) { - if (!body) { - return quote + quote; - } - body = body.replace(/\\([\s\S])/g, function(match, contents) { - if (contents === '\n' || contents === quote) { - return contents; - } else { - return match; - } - }); - body = body.replace(RegExp("" + quote, "g"), '\\$&'); - return quote + this.escapeLines(body, heredoc) + quote; - }; - - Lexer.prototype.error = function(message) { - return throwSyntaxError(message, { - first_line: this.chunkLine, - first_column: this.chunkColumn - }); - }; - - return Lexer; - - })(); - - JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; - - COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; - - COFFEE_ALIAS_MAP = { - and: '&&', - or: '||', - is: '==', - isnt: '!=', - not: '!', - yes: 'true', - no: 'false', - on: 'true', - off: 'false' - }; - - COFFEE_ALIASES = (function() { - var _results; - _results = []; - for (key in COFFEE_ALIAS_MAP) { - _results.push(key); - } - return _results; - })(); - - COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); - - RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; - - STRICT_PROSCRIBED = ['arguments', 'eval']; - - JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); - - exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); - - exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; - - BOM = 65279; - - IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; - - NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; - - HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/; - - OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/; - - WHITESPACE = /^[^\n\S]+/; - - COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/; - - CODE = /^[-=]>/; - - MULTI_DENT = /^(?:\n[^\n\S]*)+/; - - SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/; - - JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; - - REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; - - HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/; - - HEREGEX_OMIT = /\s+(?:#.*)?/g; - - MULTILINER = /\n/g; - - HEREDOC_INDENT = /\n+([^\n\S]*)/g; - - HEREDOC_ILLEGAL = /\*\//; - - LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; - - TRAILING_SPACES = /\s+$/; - - COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; - - UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; - - LOGIC = ['&&', '||', '&', '|', '^']; - - SHIFT = ['<<', '>>', '>>>']; - - COMPARE = ['==', '!=', '<', '>', '<=', '>=']; - - MATH = ['*', '/', '%']; - - RELATION = ['IN', 'OF', 'INSTANCEOF']; - - BOOL = ['TRUE', 'FALSE']; - - NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; - - NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); - - CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; - - INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); - - LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/nodes.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/nodes.js deleted file mode 100644 index 0edbcf61..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/nodes.js +++ /dev/null @@ -1,3048 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - Error.stackTraceLimit = Infinity; - - Scope = require('./scope').Scope; - - _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; - - _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.extend = extend; - - exports.addLocationDataFn = addLocationDataFn; - - YES = function() { - return true; - }; - - NO = function() { - return false; - }; - - THIS = function() { - return this; - }; - - NEGATE = function() { - this.negated = !this.negated; - return this; - }; - - exports.CodeFragment = CodeFragment = (function() { - function CodeFragment(parent, code) { - var _ref2; - this.code = "" + code; - this.locationData = parent != null ? parent.locationData : void 0; - this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; - } - - CodeFragment.prototype.toString = function() { - return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); - }; - - return CodeFragment; - - })(); - - fragmentsToText = function(fragments) { - var fragment; - return ((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - _results.push(fragment.code); - } - return _results; - })()).join(''); - }; - - exports.Base = Base = (function() { - function Base() {} - - Base.prototype.compile = function(o, lvl) { - return fragmentsToText(this.compileToFragments(o, lvl)); - }; - - Base.prototype.compileToFragments = function(o, lvl) { - var node; - o = extend({}, o); - if (lvl) { - o.level = lvl; - } - node = this.unfoldSoak(o) || this; - node.tab = o.indent; - if (o.level === LEVEL_TOP || !node.isStatement(o)) { - return node.compileNode(o); - } else { - return node.compileClosure(o); - } - }; - - Base.prototype.compileClosure = function(o) { - var jumpNode; - if (jumpNode = this.jumps()) { - jumpNode.error('cannot use a pure statement in an expression'); - } - o.sharedScope = true; - return Closure.wrap(this).compileNode(o); - }; - - Base.prototype.cache = function(o, level, reused) { - var ref, sub; - if (!this.isComplex()) { - ref = level ? this.compileToFragments(o, level) : this; - return [ref, ref]; - } else { - ref = new Literal(reused || o.scope.freeVariable('ref')); - sub = new Assign(ref, this); - if (level) { - return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; - } else { - return [sub, ref]; - } - } - }; - - Base.prototype.cacheToCodeFragments = function(cacheValues) { - return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; - }; - - Base.prototype.makeReturn = function(res) { - var me; - me = this.unwrapAll(); - if (res) { - return new Call(new Literal("" + res + ".push"), [me]); - } else { - return new Return(me); - } - }; - - Base.prototype.contains = function(pred) { - var node; - node = void 0; - this.traverseChildren(false, function(n) { - if (pred(n)) { - node = n; - return false; - } - }); - return node; - }; - - Base.prototype.lastNonComment = function(list) { - var i; - i = list.length; - while (i--) { - if (!(list[i] instanceof Comment)) { - return list[i]; - } - } - return null; - }; - - Base.prototype.toString = function(idt, name) { - var tree; - if (idt == null) { - idt = ''; - } - if (name == null) { - name = this.constructor.name; - } - tree = '\n' + idt + name; - if (this.soak) { - tree += '?'; - } - this.eachChild(function(node) { - return tree += node.toString(idt + TAB); - }); - return tree; - }; - - Base.prototype.eachChild = function(func) { - var attr, child, _i, _j, _len, _len1, _ref2, _ref3; - if (!this.children) { - return this; - } - _ref2 = this.children; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - attr = _ref2[_i]; - if (this[attr]) { - _ref3 = flatten([this[attr]]); - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - child = _ref3[_j]; - if (func(child) === false) { - return this; - } - } - } - } - return this; - }; - - Base.prototype.traverseChildren = function(crossScope, func) { - return this.eachChild(function(child) { - var recur; - recur = func(child); - if (recur !== false) { - return child.traverseChildren(crossScope, func); - } - }); - }; - - Base.prototype.invert = function() { - return new Op('!', this); - }; - - Base.prototype.unwrapAll = function() { - var node; - node = this; - while (node !== (node = node.unwrap())) { - continue; - } - return node; - }; - - Base.prototype.children = []; - - Base.prototype.isStatement = NO; - - Base.prototype.jumps = NO; - - Base.prototype.isComplex = YES; - - Base.prototype.isChainable = NO; - - Base.prototype.isAssignable = NO; - - Base.prototype.unwrap = THIS; - - Base.prototype.unfoldSoak = NO; - - Base.prototype.assigns = NO; - - Base.prototype.updateLocationDataIfMissing = function(locationData) { - this.locationData || (this.locationData = locationData); - return this.eachChild(function(child) { - return child.updateLocationDataIfMissing(locationData); - }); - }; - - Base.prototype.error = function(message) { - return throwSyntaxError(message, this.locationData); - }; - - Base.prototype.makeCode = function(code) { - return new CodeFragment(this, code); - }; - - Base.prototype.wrapInBraces = function(fragments) { - return [].concat(this.makeCode('('), fragments, this.makeCode(')')); - }; - - Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { - var answer, fragments, i, _i, _len; - answer = []; - for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { - fragments = fragmentsList[i]; - if (i) { - answer.push(this.makeCode(joinStr)); - } - answer = answer.concat(fragments); - } - return answer; - }; - - return Base; - - })(); - - exports.Block = Block = (function(_super) { - __extends(Block, _super); - - function Block(nodes) { - this.expressions = compact(flatten(nodes || [])); - } - - Block.prototype.children = ['expressions']; - - Block.prototype.push = function(node) { - this.expressions.push(node); - return this; - }; - - Block.prototype.pop = function() { - return this.expressions.pop(); - }; - - Block.prototype.unshift = function(node) { - this.expressions.unshift(node); - return this; - }; - - Block.prototype.unwrap = function() { - if (this.expressions.length === 1) { - return this.expressions[0]; - } else { - return this; - } - }; - - Block.prototype.isEmpty = function() { - return !this.expressions.length; - }; - - Block.prototype.isStatement = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.isStatement(o)) { - return true; - } - } - return false; - }; - - Block.prototype.jumps = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.jumps(o)) { - return exp; - } - } - }; - - Block.prototype.makeReturn = function(res) { - var expr, len; - len = this.expressions.length; - while (len--) { - expr = this.expressions[len]; - if (!(expr instanceof Comment)) { - this.expressions[len] = expr.makeReturn(res); - if (expr instanceof Return && !expr.expression) { - this.expressions.splice(len, 1); - } - break; - } - } - return this; - }; - - Block.prototype.compileToFragments = function(o, level) { - if (o == null) { - o = {}; - } - if (o.scope) { - return Block.__super__.compileToFragments.call(this, o, level); - } else { - return this.compileRoot(o); - } - }; - - Block.prototype.compileNode = function(o) { - var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; - this.tab = o.indent; - top = o.level === LEVEL_TOP; - compiledNodes = []; - _ref2 = this.expressions; - for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { - node = _ref2[index]; - node = node.unwrapAll(); - node = node.unfoldSoak(o) || node; - if (node instanceof Block) { - compiledNodes.push(node.compileNode(o)); - } else if (top) { - node.front = true; - fragments = node.compileToFragments(o); - if (!node.isStatement(o)) { - fragments.unshift(this.makeCode("" + this.tab)); - fragments.push(this.makeCode(";")); - } - compiledNodes.push(fragments); - } else { - compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); - } - } - if (top) { - if (this.spaced) { - return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); - } else { - return this.joinFragmentArrays(compiledNodes, '\n'); - } - } - if (compiledNodes.length) { - answer = this.joinFragmentArrays(compiledNodes, ', '); - } else { - answer = [this.makeCode("void 0")]; - } - if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Block.prototype.compileRoot = function(o) { - var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; - o.indent = o.bare ? '' : TAB; - o.level = LEVEL_TOP; - this.spaced = true; - o.scope = new Scope(null, this, null); - _ref2 = o.locals || []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - name = _ref2[_i]; - o.scope.parameter(name); - } - prelude = []; - if (!o.bare) { - preludeExps = (function() { - var _j, _len1, _ref3, _results; - _ref3 = this.expressions; - _results = []; - for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { - exp = _ref3[i]; - if (!(exp.unwrap() instanceof Comment)) { - break; - } - _results.push(exp); - } - return _results; - }).call(this); - rest = this.expressions.slice(preludeExps.length); - this.expressions = preludeExps; - if (preludeExps.length) { - prelude = this.compileNode(merge(o, { - indent: '' - })); - prelude.push(this.makeCode("\n")); - } - this.expressions = rest; - } - fragments = this.compileWithDeclarations(o); - if (o.bare) { - return fragments; - } - return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); - }; - - Block.prototype.compileWithDeclarations = function(o) { - var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; - fragments = []; - post = []; - _ref2 = this.expressions; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - exp = _ref2[i]; - exp = exp.unwrap(); - if (!(exp instanceof Comment || exp instanceof Literal)) { - break; - } - } - o = merge(o, { - level: LEVEL_TOP - }); - if (i) { - rest = this.expressions.splice(i, 9e9); - _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; - _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; - this.expressions = rest; - } - post = this.compileNode(o); - scope = o.scope; - if (scope.expressions === this) { - declars = o.scope.hasDeclarations(); - assigns = scope.hasAssignments; - if (declars || assigns) { - if (i) { - fragments.push(this.makeCode('\n')); - } - fragments.push(this.makeCode("" + this.tab + "var ")); - if (declars) { - fragments.push(this.makeCode(scope.declaredVariables().join(', '))); - } - if (assigns) { - if (declars) { - fragments.push(this.makeCode(",\n" + (this.tab + TAB))); - } - fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); - } - fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); - } else if (fragments.length && post.length) { - fragments.push(this.makeCode("\n")); - } - } - return fragments.concat(post); - }; - - Block.wrap = function(nodes) { - if (nodes.length === 1 && nodes[0] instanceof Block) { - return nodes[0]; - } - return new Block(nodes); - }; - - return Block; - - })(Base); - - exports.Literal = Literal = (function(_super) { - __extends(Literal, _super); - - function Literal(value) { - this.value = value; - } - - Literal.prototype.makeReturn = function() { - if (this.isStatement()) { - return this; - } else { - return Literal.__super__.makeReturn.apply(this, arguments); - } - }; - - Literal.prototype.isAssignable = function() { - return IDENTIFIER.test(this.value); - }; - - Literal.prototype.isStatement = function() { - var _ref2; - return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; - }; - - Literal.prototype.isComplex = NO; - - Literal.prototype.assigns = function(name) { - return name === this.value; - }; - - Literal.prototype.jumps = function(o) { - if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { - return this; - } - if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { - return this; - } - }; - - Literal.prototype.compileNode = function(o) { - var answer, code, _ref2; - code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; - answer = this.isStatement() ? "" + this.tab + code + ";" : code; - return [this.makeCode(answer)]; - }; - - Literal.prototype.toString = function() { - return ' "' + this.value + '"'; - }; - - return Literal; - - })(Base); - - exports.Undefined = (function(_super) { - __extends(Undefined, _super); - - function Undefined() { - _ref2 = Undefined.__super__.constructor.apply(this, arguments); - return _ref2; - } - - Undefined.prototype.isAssignable = NO; - - Undefined.prototype.isComplex = NO; - - Undefined.prototype.compileNode = function(o) { - return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; - }; - - return Undefined; - - })(Base); - - exports.Null = (function(_super) { - __extends(Null, _super); - - function Null() { - _ref3 = Null.__super__.constructor.apply(this, arguments); - return _ref3; - } - - Null.prototype.isAssignable = NO; - - Null.prototype.isComplex = NO; - - Null.prototype.compileNode = function() { - return [this.makeCode("null")]; - }; - - return Null; - - })(Base); - - exports.Bool = (function(_super) { - __extends(Bool, _super); - - Bool.prototype.isAssignable = NO; - - Bool.prototype.isComplex = NO; - - Bool.prototype.compileNode = function() { - return [this.makeCode(this.val)]; - }; - - function Bool(val) { - this.val = val; - } - - return Bool; - - })(Base); - - exports.Return = Return = (function(_super) { - __extends(Return, _super); - - function Return(expr) { - if (expr && !expr.unwrap().isUndefined) { - this.expression = expr; - } - } - - Return.prototype.children = ['expression']; - - Return.prototype.isStatement = YES; - - Return.prototype.makeReturn = THIS; - - Return.prototype.jumps = THIS; - - Return.prototype.compileToFragments = function(o, level) { - var expr, _ref4; - expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0; - if (expr && !(expr instanceof Return)) { - return expr.compileToFragments(o, level); - } else { - return Return.__super__.compileToFragments.call(this, o, level); - } - }; - - Return.prototype.compileNode = function(o) { - var answer; - answer = []; - answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); - if (this.expression) { - answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); - } - answer.push(this.makeCode(";")); - return answer; - }; - - return Return; - - })(Base); - - exports.Value = Value = (function(_super) { - __extends(Value, _super); - - function Value(base, props, tag) { - if (!props && base instanceof Value) { - return base; - } - this.base = base; - this.properties = props || []; - if (tag) { - this[tag] = true; - } - return this; - } - - Value.prototype.children = ['base', 'properties']; - - Value.prototype.add = function(props) { - this.properties = this.properties.concat(props); - return this; - }; - - Value.prototype.hasProperties = function() { - return !!this.properties.length; - }; - - Value.prototype.isArray = function() { - return !this.properties.length && this.base instanceof Arr; - }; - - Value.prototype.isComplex = function() { - return this.hasProperties() || this.base.isComplex(); - }; - - Value.prototype.isAssignable = function() { - return this.hasProperties() || this.base.isAssignable(); - }; - - Value.prototype.isSimpleNumber = function() { - return this.base instanceof Literal && SIMPLENUM.test(this.base.value); - }; - - Value.prototype.isString = function() { - return this.base instanceof Literal && IS_STRING.test(this.base.value); - }; - - Value.prototype.isAtomic = function() { - var node, _i, _len, _ref4; - _ref4 = this.properties.concat(this.base); - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - node = _ref4[_i]; - if (node.soak || node instanceof Call) { - return false; - } - } - return true; - }; - - Value.prototype.isStatement = function(o) { - return !this.properties.length && this.base.isStatement(o); - }; - - Value.prototype.assigns = function(name) { - return !this.properties.length && this.base.assigns(name); - }; - - Value.prototype.jumps = function(o) { - return !this.properties.length && this.base.jumps(o); - }; - - Value.prototype.isObject = function(onlyGenerated) { - if (this.properties.length) { - return false; - } - return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); - }; - - Value.prototype.isSplice = function() { - return last(this.properties) instanceof Slice; - }; - - Value.prototype.unwrap = function() { - if (this.properties.length) { - return this; - } else { - return this.base; - } - }; - - Value.prototype.cacheReference = function(o) { - var base, bref, name, nref; - name = last(this.properties); - if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { - return [this, this]; - } - base = new Value(this.base, this.properties.slice(0, -1)); - if (base.isComplex()) { - bref = new Literal(o.scope.freeVariable('base')); - base = new Value(new Parens(new Assign(bref, base))); - } - if (!name) { - return [base, bref]; - } - if (name.isComplex()) { - nref = new Literal(o.scope.freeVariable('name')); - name = new Index(new Assign(nref, name.index)); - nref = new Index(nref); - } - return [base.add(name), new Value(bref || base.base, [nref || name])]; - }; - - Value.prototype.compileNode = function(o) { - var fragments, prop, props, _i, _len; - this.base.front = this.front; - props = this.properties; - fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); - if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { - fragments.push(this.makeCode('.')); - } - for (_i = 0, _len = props.length; _i < _len; _i++) { - prop = props[_i]; - fragments.push.apply(fragments, prop.compileToFragments(o)); - } - return fragments; - }; - - Value.prototype.unfoldSoak = function(o) { - var _this = this; - return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() { - var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5; - if (ifn = _this.base.unfoldSoak(o)) { - (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties); - return ifn; - } - _ref5 = _this.properties; - for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) { - prop = _ref5[i]; - if (!prop.soak) { - continue; - } - prop.soak = false; - fst = new Value(_this.base, _this.properties.slice(0, i)); - snd = new Value(_this.base, _this.properties.slice(i)); - if (fst.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, fst)); - snd.base = ref; - } - return new If(new Existence(fst), snd, { - soak: true - }); - } - return false; - })(); - }; - - return Value; - - })(Base); - - exports.Comment = Comment = (function(_super) { - __extends(Comment, _super); - - function Comment(comment) { - this.comment = comment; - } - - Comment.prototype.isStatement = YES; - - Comment.prototype.makeReturn = THIS; - - Comment.prototype.compileNode = function(o, level) { - var code; - code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n"; - if ((level || o.level) === LEVEL_TOP) { - code = o.indent + code; - } - return [this.makeCode(code)]; - }; - - return Comment; - - })(Base); - - exports.Call = Call = (function(_super) { - __extends(Call, _super); - - function Call(variable, args, soak) { - this.args = args != null ? args : []; - this.soak = soak; - this.isNew = false; - this.isSuper = variable === 'super'; - this.variable = this.isSuper ? null : variable; - } - - Call.prototype.children = ['variable', 'args']; - - Call.prototype.newInstance = function() { - var base, _ref4; - base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable; - if (base instanceof Call && !base.isNew) { - base.newInstance(); - } else { - this.isNew = true; - } - return this; - }; - - Call.prototype.superReference = function(o) { - var accesses, method; - method = o.scope.namedMethod(); - if (method != null ? method.klass : void 0) { - accesses = [new Access(new Literal('__super__'))]; - if (method["static"]) { - accesses.push(new Access(new Literal('constructor'))); - } - accesses.push(new Access(new Literal(method.name))); - return (new Value(new Literal(method.klass), accesses)).compile(o); - } else if (method != null ? method.ctor : void 0) { - return "" + method.name + ".__super__.constructor"; - } else { - return this.error('cannot call super outside of an instance method.'); - } - }; - - Call.prototype.superThis = function(o) { - var method; - method = o.scope.method; - return (method && !method.klass && method.context) || "this"; - }; - - Call.prototype.unfoldSoak = function(o) { - var call, ifn, left, list, rite, _i, _len, _ref4, _ref5; - if (this.soak) { - if (this.variable) { - if (ifn = unfoldSoak(o, this, 'variable')) { - return ifn; - } - _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1]; - } else { - left = new Literal(this.superReference(o)); - rite = new Value(left); - } - rite = new Call(rite, this.args); - rite.isNew = this.isNew; - left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); - return new If(left, new Value(rite), { - soak: true - }); - } - call = this; - list = []; - while (true) { - if (call.variable instanceof Call) { - list.push(call); - call = call.variable; - continue; - } - if (!(call.variable instanceof Value)) { - break; - } - list.push(call); - if (!((call = call.variable.base) instanceof Call)) { - break; - } - } - _ref5 = list.reverse(); - for (_i = 0, _len = _ref5.length; _i < _len; _i++) { - call = _ref5[_i]; - if (ifn) { - if (call.variable instanceof Call) { - call.variable = ifn; - } else { - call.variable.base = ifn; - } - } - ifn = unfoldSoak(o, call, 'variable'); - } - return ifn; - }; - - Call.prototype.compileNode = function(o) { - var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5; - if ((_ref4 = this.variable) != null) { - _ref4.front = this.front; - } - compiledArray = Splat.compileSplattedArray(o, this.args, true); - if (compiledArray.length) { - return this.compileSplat(o, compiledArray); - } - compiledArgs = []; - _ref5 = this.args; - for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) { - arg = _ref5[argIndex]; - if (argIndex) { - compiledArgs.push(this.makeCode(", ")); - } - compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); - } - fragments = []; - if (this.isSuper) { - preface = this.superReference(o) + (".call(" + (this.superThis(o))); - if (compiledArgs.length) { - preface += ", "; - } - fragments.push(this.makeCode(preface)); - } else { - if (this.isNew) { - fragments.push(this.makeCode('new ')); - } - fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); - fragments.push(this.makeCode("(")); - } - fragments.push.apply(fragments, compiledArgs); - fragments.push(this.makeCode(")")); - return fragments; - }; - - Call.prototype.compileSplat = function(o, splatArgs) { - var answer, base, fun, idt, name, ref; - if (this.isSuper) { - return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); - } - if (this.isNew) { - idt = this.tab + TAB; - return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); - } - answer = []; - base = new Value(this.variable); - if ((name = base.properties.pop()) && base.isComplex()) { - ref = o.scope.freeVariable('ref'); - answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); - } else { - fun = base.compileToFragments(o, LEVEL_ACCESS); - if (SIMPLENUM.test(fragmentsToText(fun))) { - fun = this.wrapInBraces(fun); - } - if (name) { - ref = fragmentsToText(fun); - fun.push.apply(fun, name.compileToFragments(o)); - } else { - ref = 'null'; - } - answer = answer.concat(fun); - } - return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); - }; - - return Call; - - })(Base); - - exports.Extends = Extends = (function(_super) { - __extends(Extends, _super); - - function Extends(child, parent) { - this.child = child; - this.parent = parent; - } - - Extends.prototype.children = ['child', 'parent']; - - Extends.prototype.compileToFragments = function(o) { - return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); - }; - - return Extends; - - })(Base); - - exports.Access = Access = (function(_super) { - __extends(Access, _super); - - function Access(name, tag) { - this.name = name; - this.name.asKey = true; - this.soak = tag === 'soak'; - } - - Access.prototype.children = ['name']; - - Access.prototype.compileToFragments = function(o) { - var name; - name = this.name.compileToFragments(o); - if (IDENTIFIER.test(fragmentsToText(name))) { - name.unshift(this.makeCode(".")); - } else { - name.unshift(this.makeCode("[")); - name.push(this.makeCode("]")); - } - return name; - }; - - Access.prototype.isComplex = NO; - - return Access; - - })(Base); - - exports.Index = Index = (function(_super) { - __extends(Index, _super); - - function Index(index) { - this.index = index; - } - - Index.prototype.children = ['index']; - - Index.prototype.compileToFragments = function(o) { - return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); - }; - - Index.prototype.isComplex = function() { - return this.index.isComplex(); - }; - - return Index; - - })(Base); - - exports.Range = Range = (function(_super) { - __extends(Range, _super); - - Range.prototype.children = ['from', 'to']; - - function Range(from, to, tag) { - this.from = from; - this.to = to; - this.exclusive = tag === 'exclusive'; - this.equals = this.exclusive ? '' : '='; - } - - Range.prototype.compileVariables = function(o) { - var step, _ref4, _ref5, _ref6, _ref7; - o = merge(o, { - top: true - }); - _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1]; - _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1]; - if (step = del(o, 'step')) { - _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1]; - } - _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1]; - if (this.stepVar) { - return this.stepNum = this.stepVar.match(SIMPLENUM); - } - }; - - Range.prototype.compileNode = function(o) { - var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5; - if (!this.fromVar) { - this.compileVariables(o); - } - if (!o.index) { - return this.compileArray(o); - } - known = this.fromNum && this.toNum; - idx = del(o, 'index'); - idxName = del(o, 'name'); - namedIndex = idxName && idxName !== idx; - varPart = "" + idx + " = " + this.fromC; - if (this.toC !== this.toVar) { - varPart += ", " + this.toC; - } - if (this.step !== this.stepVar) { - varPart += ", " + this.step; - } - _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1]; - condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); - stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; - if (namedIndex) { - varPart = "" + idxName + " = " + varPart; - } - if (namedIndex) { - stepPart = "" + idxName + " = " + stepPart; - } - return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; - }; - - Range.prototype.compileArray = function(o) { - var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results; - if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { - range = (function() { - _results = []; - for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); } - return _results; - }).apply(this); - if (this.exclusive) { - range.pop(); - } - return [this.makeCode("[" + (range.join(', ')) + "]")]; - } - idt = this.tab + TAB; - i = o.scope.freeVariable('i'); - result = o.scope.freeVariable('results'); - pre = "\n" + idt + result + " = [];"; - if (this.fromNum && this.toNum) { - o.index = i; - body = fragmentsToText(this.compileNode(o)); - } else { - vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); - cond = "" + this.fromVar + " <= " + this.toVar; - body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; - } - post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; - hasArgs = function(node) { - return node != null ? node.contains(function(n) { - return n instanceof Literal && n.value === 'arguments' && !n.asKey; - }) : void 0; - }; - if (hasArgs(this.from) || hasArgs(this.to)) { - args = ', arguments'; - } - return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; - }; - - return Range; - - })(Base); - - exports.Slice = Slice = (function(_super) { - __extends(Slice, _super); - - Slice.prototype.children = ['range']; - - function Slice(range) { - this.range = range; - Slice.__super__.constructor.call(this); - } - - Slice.prototype.compileNode = function(o) { - var compiled, compiledText, from, fromCompiled, to, toStr, _ref4; - _ref4 = this.range, to = _ref4.to, from = _ref4.from; - fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; - if (to) { - compiled = to.compileToFragments(o, LEVEL_PAREN); - compiledText = fragmentsToText(compiled); - if (!(!this.range.exclusive && +compiledText === -1)) { - toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); - } - } - return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; - }; - - return Slice; - - })(Base); - - exports.Obj = Obj = (function(_super) { - __extends(Obj, _super); - - function Obj(props, generated) { - this.generated = generated != null ? generated : false; - this.objects = this.properties = props || []; - } - - Obj.prototype.children = ['properties']; - - Obj.prototype.compileNode = function(o) { - var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; - props = this.properties; - if (!props.length) { - return [this.makeCode(this.front ? '({})' : '{}')]; - } - if (this.generated) { - for (_i = 0, _len = props.length; _i < _len; _i++) { - node = props[_i]; - if (node instanceof Value) { - node.error('cannot have an implicit value in an implicit object'); - } - } - } - idt = o.indent += TAB; - lastNoncom = this.lastNonComment(this.properties); - answer = []; - for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { - prop = props[i]; - join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; - indent = prop instanceof Comment ? '' : idt; - if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { - prop.variable.error('Invalid object key'); - } - if (prop instanceof Value && prop["this"]) { - prop = new Assign(prop.properties[0].name, prop, 'object'); - } - if (!(prop instanceof Comment)) { - if (!(prop instanceof Assign)) { - prop = new Assign(prop, prop, 'object'); - } - (prop.variable.base || prop.variable).asKey = true; - } - if (indent) { - answer.push(this.makeCode(indent)); - } - answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); - if (join) { - answer.push(this.makeCode(join)); - } - } - answer.unshift(this.makeCode("{" + (props.length && '\n'))); - answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); - if (this.front) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Obj.prototype.assigns = function(name) { - var prop, _i, _len, _ref4; - _ref4 = this.properties; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - prop = _ref4[_i]; - if (prop.assigns(name)) { - return true; - } - } - return false; - }; - - return Obj; - - })(Base); - - exports.Arr = Arr = (function(_super) { - __extends(Arr, _super); - - function Arr(objs) { - this.objects = objs || []; - } - - Arr.prototype.children = ['objects']; - - Arr.prototype.compileNode = function(o) { - var answer, compiledObjs, fragments, index, obj, _i, _len; - if (!this.objects.length) { - return [this.makeCode('[]')]; - } - o.indent += TAB; - answer = Splat.compileSplattedArray(o, this.objects); - if (answer.length) { - return answer; - } - answer = []; - compiledObjs = (function() { - var _i, _len, _ref4, _results; - _ref4 = this.objects; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - _results.push(obj.compileToFragments(o, LEVEL_LIST)); - } - return _results; - }).call(this); - for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { - fragments = compiledObjs[index]; - if (index) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, fragments); - } - if (fragmentsToText(answer).indexOf('\n') >= 0) { - answer.unshift(this.makeCode("[\n" + o.indent)); - answer.push(this.makeCode("\n" + this.tab + "]")); - } else { - answer.unshift(this.makeCode("[")); - answer.push(this.makeCode("]")); - } - return answer; - }; - - Arr.prototype.assigns = function(name) { - var obj, _i, _len, _ref4; - _ref4 = this.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj.assigns(name)) { - return true; - } - } - return false; - }; - - return Arr; - - })(Base); - - exports.Class = Class = (function(_super) { - __extends(Class, _super); - - function Class(variable, parent, body) { - this.variable = variable; - this.parent = parent; - this.body = body != null ? body : new Block; - this.boundFuncs = []; - this.body.classBody = true; - } - - Class.prototype.children = ['variable', 'parent', 'body']; - - Class.prototype.determineName = function() { - var decl, tail; - if (!this.variable) { - return null; - } - decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; - if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { - this.variable.error("class variable name may not be " + decl); - } - return decl && (decl = IDENTIFIER.test(decl) && decl); - }; - - Class.prototype.setContext = function(name) { - return this.body.traverseChildren(false, function(node) { - if (node.classBody) { - return false; - } - if (node instanceof Literal && node.value === 'this') { - return node.value = name; - } else if (node instanceof Code) { - node.klass = name; - if (node.bound) { - return node.context = name; - } - } - }); - }; - - Class.prototype.addBoundFunctions = function(o) { - var bvar, lhs, _i, _len, _ref4; - _ref4 = this.boundFuncs; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - bvar = _ref4[_i]; - lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); - this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); - } - }; - - Class.prototype.addProperties = function(node, name, o) { - var assign, base, exprs, func, props; - props = node.base.properties.slice(0); - exprs = (function() { - var _results; - _results = []; - while (assign = props.shift()) { - if (assign instanceof Assign) { - base = assign.variable.base; - delete assign.context; - func = assign.value; - if (base.value === 'constructor') { - if (this.ctor) { - assign.error('cannot define more than one constructor in a class'); - } - if (func.bound) { - assign.error('cannot define a constructor as a bound function'); - } - if (func instanceof Code) { - assign = this.ctor = func; - } else { - this.externalCtor = o.scope.freeVariable('class'); - assign = new Assign(new Literal(this.externalCtor), func); - } - } else { - if (assign.variable["this"]) { - func["static"] = true; - if (func.bound) { - func.context = name; - } - } else { - assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); - if (func instanceof Code && func.bound) { - this.boundFuncs.push(base); - func.bound = false; - } - } - } - } - _results.push(assign); - } - return _results; - }).call(this); - return compact(exprs); - }; - - Class.prototype.walkBody = function(name, o) { - var _this = this; - return this.traverseChildren(false, function(child) { - var cont, exps, i, node, _i, _len, _ref4; - cont = true; - if (child instanceof Class) { - return false; - } - if (child instanceof Block) { - _ref4 = exps = child.expressions; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - node = _ref4[i]; - if (node instanceof Value && node.isObject(true)) { - cont = false; - exps[i] = _this.addProperties(node, name, o); - } - } - child.expressions = exps = flatten(exps); - } - return cont && !(child instanceof Class); - }); - }; - - Class.prototype.hoistDirectivePrologue = function() { - var expressions, index, node; - index = 0; - expressions = this.body.expressions; - while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { - ++index; - } - return this.directives = expressions.splice(0, index); - }; - - Class.prototype.ensureConstructor = function(name, o) { - var missing, ref, superCall; - missing = !this.ctor; - this.ctor || (this.ctor = new Code); - this.ctor.ctor = this.ctor.name = name; - this.ctor.klass = null; - this.ctor.noReturn = true; - if (missing) { - if (this.parent) { - superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)"); - } - if (this.externalCtor) { - superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)"); - } - if (superCall) { - ref = new Literal(o.scope.freeVariable('ref')); - this.ctor.body.unshift(new Assign(ref, superCall)); - } - this.addBoundFunctions(o); - if (superCall) { - this.ctor.body.push(ref); - this.ctor.body.makeReturn(); - } - return this.body.expressions.unshift(this.ctor); - } else { - return this.addBoundFunctions(o); - } - }; - - Class.prototype.compileNode = function(o) { - var call, decl, klass, lname, name, params, _ref4; - decl = this.determineName(); - name = decl || '_Class'; - if (name.reserved) { - name = "_" + name; - } - lname = new Literal(name); - this.hoistDirectivePrologue(); - this.setContext(name); - this.walkBody(name, o); - this.ensureConstructor(name, o); - this.body.spaced = true; - if (!(this.ctor instanceof Code)) { - this.body.expressions.unshift(this.ctor); - } - this.body.expressions.push(lname); - (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives); - call = Closure.wrap(this.body); - if (this.parent) { - this.superClass = new Literal(o.scope.freeVariable('super', false)); - this.body.expressions.unshift(new Extends(lname, this.superClass)); - call.args.push(this.parent); - params = call.variable.params || call.variable.base.params; - params.push(new Param(this.superClass)); - } - klass = new Parens(call, true); - if (this.variable) { - klass = new Assign(this.variable, klass); - } - return klass.compileToFragments(o); - }; - - return Class; - - })(Base); - - exports.Assign = Assign = (function(_super) { - __extends(Assign, _super); - - function Assign(variable, value, context, options) { - var forbidden, name, _ref4; - this.variable = variable; - this.value = value; - this.context = context; - this.param = options && options.param; - this.subpattern = options && options.subpattern; - forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0); - if (forbidden && this.context !== 'object') { - this.variable.error("variable name may not be \"" + name + "\""); - } - } - - Assign.prototype.children = ['variable', 'value']; - - Assign.prototype.isStatement = function(o) { - return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; - }; - - Assign.prototype.assigns = function(name) { - return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); - }; - - Assign.prototype.unfoldSoak = function(o) { - return unfoldSoak(o, this, 'variable'); - }; - - Assign.prototype.compileNode = function(o) { - var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7; - if (isValue = this.variable instanceof Value) { - if (this.variable.isArray() || this.variable.isObject()) { - return this.compilePatternMatch(o); - } - if (this.variable.isSplice()) { - return this.compileSplice(o); - } - if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') { - return this.compileConditional(o); - } - } - compiledName = this.variable.compileToFragments(o, LEVEL_LIST); - name = fragmentsToText(compiledName); - if (!this.context) { - varBase = this.variable.unwrapAll(); - if (!varBase.isAssignable()) { - this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); - } - if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { - if (this.param) { - o.scope.add(name, 'var'); - } else { - o.scope.find(name); - } - } - } - if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { - if (match[1]) { - this.value.klass = match[1]; - } - this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5]; - } - val = this.value.compileToFragments(o, LEVEL_LIST); - if (this.context === 'object') { - return compiledName.concat(this.makeCode(": "), val); - } - answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); - if (o.level <= LEVEL_LIST) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Assign.prototype.compilePatternMatch = function(o) { - var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - top = o.level === LEVEL_TOP; - value = this.value; - objects = this.variable.base.objects; - if (!(olen = objects.length)) { - code = value.compileToFragments(o); - if (o.level >= LEVEL_OP) { - return this.wrapInBraces(code); - } else { - return code; - } - } - isObject = this.variable.isObject(); - if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { - if (obj instanceof Assign) { - _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value; - } else { - idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); - } - acc = IDENTIFIER.test(idx.unwrap().value || 0); - value = new Value(value); - value.properties.push(new (acc ? Access : Index)(idx)); - if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - return new Assign(obj, value, null, { - param: this.param - }).compileToFragments(o, LEVEL_TOP); - } - vvar = value.compileToFragments(o, LEVEL_LIST); - vvarText = fragmentsToText(vvar); - assigns = []; - splat = false; - if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { - assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); - vvar = [this.makeCode(ref)]; - vvarText = ref; - } - for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { - obj = objects[i]; - idx = i; - if (isObject) { - if (obj instanceof Assign) { - _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value; - } else { - if (obj.base instanceof Parens) { - _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1]; - } else { - idx = obj["this"] ? obj.properties[0].name : obj; - } - } - } - if (!splat && obj instanceof Splat) { - name = obj.name.unwrap().value; - obj = obj.unwrap(); - val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; - if (rest = olen - i - 1) { - ivar = o.scope.freeVariable('i'); - val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; - } else { - val += ") : []"; - } - val = new Literal(val); - splat = "" + ivar + "++"; - } else { - name = obj.unwrap().value; - if (obj instanceof Splat) { - obj.error("multiple splats are disallowed in an assignment"); - } - if (typeof idx === 'number') { - idx = new Literal(splat || idx); - acc = false; - } else { - acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); - } - val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); - } - if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - assigns.push(new Assign(obj, val, null, { - param: this.param, - subpattern: true - }).compileToFragments(o, LEVEL_LIST)); - } - if (!(top || this.subpattern)) { - assigns.push(vvar); - } - fragments = this.joinFragmentArrays(assigns, ', '); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - Assign.prototype.compileConditional = function(o) { - var left, right, _ref4; - _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1]; - if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { - this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); - } - if (__indexOf.call(this.context, "?") >= 0) { - o.isExistentialEquals = true; - } - return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); - }; - - Assign.prototype.compileSplice = function(o) { - var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6; - _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive; - name = this.variable.compile(o); - if (from) { - _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1]; - } else { - fromDecl = fromRef = '0'; - } - if (to) { - if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) { - to = +to.compile(o) - +fromRef; - if (!exclusive) { - to += 1; - } - } else { - to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; - if (!exclusive) { - to += ' + 1'; - } - } - } else { - to = "9e9"; - } - _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1]; - answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); - if (o.level > LEVEL_TOP) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - return Assign; - - })(Base); - - exports.Code = Code = (function(_super) { - __extends(Code, _super); - - function Code(params, body, tag) { - this.params = params || []; - this.body = body || new Block; - this.bound = tag === 'boundfunc'; - if (this.bound) { - this.context = '_this'; - } - } - - Code.prototype.children = ['params', 'body']; - - Code.prototype.isStatement = function() { - return !!this.ctor; - }; - - Code.prototype.jumps = NO; - - Code.prototype.compileNode = function(o) { - var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8; - o.scope = new Scope(o.scope, this.body, this); - o.scope.shared = del(o, 'sharedScope'); - o.indent += TAB; - delete o.bare; - delete o.isExistentialEquals; - params = []; - exprs = []; - this.eachParamName(function(name) { - if (!o.scope.check(name)) { - return o.scope.parameter(name); - } - }); - _ref4 = this.params; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (!param.splat) { - continue; - } - _ref5 = this.params; - for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) { - p = _ref5[_j].name; - if (p["this"]) { - p = p.properties[0].name; - } - if (p.value) { - o.scope.add(p.value, 'var', true); - } - } - splats = new Assign(new Value(new Arr((function() { - var _k, _len2, _ref6, _results; - _ref6 = this.params; - _results = []; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - p = _ref6[_k]; - _results.push(p.asReference(o)); - } - return _results; - }).call(this))), new Value(new Literal('arguments'))); - break; - } - _ref6 = this.params; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - param = _ref6[_k]; - if (param.isComplex()) { - val = ref = param.asReference(o); - if (param.value) { - val = new Op('?', ref, param.value); - } - exprs.push(new Assign(new Value(param.name), val, '=', { - param: true - })); - } else { - ref = param; - if (param.value) { - lit = new Literal(ref.name.value + ' == null'); - val = new Assign(new Value(param.name), param.value, '='); - exprs.push(new If(lit, val)); - } - } - if (!splats) { - params.push(ref); - } - } - wasEmpty = this.body.isEmpty(); - if (splats) { - exprs.unshift(splats); - } - if (exprs.length) { - (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); - } - for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) { - p = params[i]; - params[i] = p.compileToFragments(o); - o.scope.parameter(fragmentsToText(params[i])); - } - uniqs = []; - this.eachParamName(function(name, node) { - if (__indexOf.call(uniqs, name) >= 0) { - node.error("multiple parameters named '" + name + "'"); - } - return uniqs.push(name); - }); - if (!(wasEmpty || this.noReturn)) { - this.body.makeReturn(); - } - if (this.bound) { - if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) { - this.bound = this.context = o.scope.parent.method.context; - } else if (!this["static"]) { - o.scope.parent.assign('_this', 'this'); - } - } - idt = o.indent; - code = 'function'; - if (this.ctor) { - code += ' ' + this.name; - } - code += '('; - answer = [this.makeCode(code)]; - for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { - p = params[i]; - if (i) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, p); - } - answer.push(this.makeCode(') {')); - if (!this.body.isEmpty()) { - answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); - } - answer.push(this.makeCode('}')); - if (this.ctor) { - return [this.makeCode(this.tab)].concat(__slice.call(answer)); - } - if (this.front || (o.level >= LEVEL_ACCESS)) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Code.prototype.eachParamName = function(iterator) { - var param, _i, _len, _ref4, _results; - _ref4 = this.params; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - _results.push(param.eachName(iterator)); - } - return _results; - }; - - Code.prototype.traverseChildren = function(crossScope, func) { - if (crossScope) { - return Code.__super__.traverseChildren.call(this, crossScope, func); - } - }; - - return Code; - - })(Base); - - exports.Param = Param = (function(_super) { - __extends(Param, _super); - - function Param(name, value, splat) { - var _ref4; - this.name = name; - this.value = value; - this.splat = splat; - if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) { - this.name.error("parameter name \"" + name + "\" is not allowed"); - } - } - - Param.prototype.children = ['name', 'value']; - - Param.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o, LEVEL_LIST); - }; - - Param.prototype.asReference = function(o) { - var node; - if (this.reference) { - return this.reference; - } - node = this.name; - if (node["this"]) { - node = node.properties[0].name; - if (node.value.reserved) { - node = new Literal(o.scope.freeVariable(node.value)); - } - } else if (node.isComplex()) { - node = new Literal(o.scope.freeVariable('arg')); - } - node = new Value(node); - if (this.splat) { - node = new Splat(node); - } - return this.reference = node; - }; - - Param.prototype.isComplex = function() { - return this.name.isComplex(); - }; - - Param.prototype.eachName = function(iterator, name) { - var atParam, node, obj, _i, _len, _ref4; - if (name == null) { - name = this.name; - } - atParam = function(obj) { - var node; - node = obj.properties[0].name; - if (!node.value.reserved) { - return iterator(node.value, node); - } - }; - if (name instanceof Literal) { - return iterator(name.value, name); - } - if (name instanceof Value) { - return atParam(name); - } - _ref4 = name.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj instanceof Assign) { - this.eachName(iterator, obj.value.unwrap()); - } else if (obj instanceof Splat) { - node = obj.name.unwrap(); - iterator(node.value, node); - } else if (obj instanceof Value) { - if (obj.isArray() || obj.isObject()) { - this.eachName(iterator, obj.base); - } else if (obj["this"]) { - atParam(obj); - } else { - iterator(obj.base.value, obj.base); - } - } else { - obj.error("illegal parameter " + (obj.compile())); - } - } - }; - - return Param; - - })(Base); - - exports.Splat = Splat = (function(_super) { - __extends(Splat, _super); - - Splat.prototype.children = ['name']; - - Splat.prototype.isAssignable = YES; - - function Splat(name) { - this.name = name.compile ? name : new Literal(name); - } - - Splat.prototype.assigns = function(name) { - return this.name.assigns(name); - }; - - Splat.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o); - }; - - Splat.prototype.unwrap = function() { - return this.name; - }; - - Splat.compileSplattedArray = function(o, list, apply) { - var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; - index = -1; - while ((node = list[++index]) && !(node instanceof Splat)) { - continue; - } - if (index >= list.length) { - return []; - } - if (list.length === 1) { - node = list[0]; - fragments = node.compileToFragments(o, LEVEL_LIST); - if (apply) { - return fragments; - } - return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); - } - args = list.slice(index); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - node = args[i]; - compiledNode = node.compileToFragments(o, LEVEL_LIST); - args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); - } - if (index === 0) { - node = list[0]; - concatPart = node.joinFragmentArrays(args.slice(1), ', '); - return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); - } - base = (function() { - var _j, _len1, _ref4, _results; - _ref4 = list.slice(0, index); - _results = []; - for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { - node = _ref4[_j]; - _results.push(node.compileToFragments(o, LEVEL_LIST)); - } - return _results; - })(); - base = list[0].joinFragmentArrays(base, ', '); - concatPart = list[index].joinFragmentArrays(args, ', '); - return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); - }; - - return Splat; - - })(Base); - - exports.While = While = (function(_super) { - __extends(While, _super); - - function While(condition, options) { - this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; - this.guard = options != null ? options.guard : void 0; - } - - While.prototype.children = ['condition', 'guard', 'body']; - - While.prototype.isStatement = YES; - - While.prototype.makeReturn = function(res) { - if (res) { - return While.__super__.makeReturn.apply(this, arguments); - } else { - this.returns = !this.jumps({ - loop: true - }); - return this; - } - }; - - While.prototype.addBody = function(body) { - this.body = body; - return this; - }; - - While.prototype.jumps = function() { - var expressions, node, _i, _len; - expressions = this.body.expressions; - if (!expressions.length) { - return false; - } - for (_i = 0, _len = expressions.length; _i < _len; _i++) { - node = expressions[_i]; - if (node.jumps({ - loop: true - })) { - return node; - } - } - return false; - }; - - While.prototype.compileNode = function(o) { - var answer, body, rvar, set; - o.indent += TAB; - set = ''; - body = this.body; - if (body.isEmpty()) { - body = this.makeCode(''); - } else { - if (this.returns) { - body.makeReturn(rvar = o.scope.freeVariable('results')); - set = "" + this.tab + rvar + " = [];\n"; - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); - } - answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); - if (this.returns) { - answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); - } - return answer; - }; - - return While; - - })(Base); - - exports.Op = Op = (function(_super) { - var CONVERSIONS, INVERSIONS; - - __extends(Op, _super); - - function Op(op, first, second, flip) { - if (op === 'in') { - return new In(first, second); - } - if (op === 'do') { - return this.generateDo(first); - } - if (op === 'new') { - if (first instanceof Call && !first["do"] && !first.isNew) { - return first.newInstance(); - } - if (first instanceof Code && first.bound || first["do"]) { - first = new Parens(first); - } - } - this.operator = CONVERSIONS[op] || op; - this.first = first; - this.second = second; - this.flip = !!flip; - return this; - } - - CONVERSIONS = { - '==': '===', - '!=': '!==', - 'of': 'in' - }; - - INVERSIONS = { - '!==': '===', - '===': '!==' - }; - - Op.prototype.children = ['first', 'second']; - - Op.prototype.isSimpleNumber = NO; - - Op.prototype.isUnary = function() { - return !this.second; - }; - - Op.prototype.isComplex = function() { - var _ref4; - return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex(); - }; - - Op.prototype.isChainable = function() { - var _ref4; - return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!=='; - }; - - Op.prototype.invert = function() { - var allInvertable, curr, fst, op, _ref4; - if (this.isChainable() && this.first.isChainable()) { - allInvertable = true; - curr = this; - while (curr && curr.operator) { - allInvertable && (allInvertable = curr.operator in INVERSIONS); - curr = curr.first; - } - if (!allInvertable) { - return new Parens(this).invert(); - } - curr = this; - while (curr && curr.operator) { - curr.invert = !curr.invert; - curr.operator = INVERSIONS[curr.operator]; - curr = curr.first; - } - return this; - } else if (op = INVERSIONS[this.operator]) { - this.operator = op; - if (this.first.unwrap() instanceof Op) { - this.first.invert(); - } - return this; - } else if (this.second) { - return new Parens(this).invert(); - } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) { - return fst; - } else { - return new Op('!', this); - } - }; - - Op.prototype.unfoldSoak = function(o) { - var _ref4; - return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first'); - }; - - Op.prototype.generateDo = function(exp) { - var call, func, param, passedParams, ref, _i, _len, _ref4; - passedParams = []; - func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; - _ref4 = func.params || []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (param.value) { - passedParams.push(param.value); - delete param.value; - } else { - passedParams.push(param); - } - } - call = new Call(exp, passedParams); - call["do"] = true; - return call; - }; - - Op.prototype.compileNode = function(o) { - var answer, isChain, _ref4, _ref5; - isChain = this.isChainable() && this.first.isChainable(); - if (!isChain) { - this.first.front = this.front; - } - if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { - this.error('delete operand may not be argument or var'); - } - if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) { - this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); - } - if (this.isUnary()) { - return this.compileUnary(o); - } - if (isChain) { - return this.compileChain(o); - } - if (this.operator === '?') { - return this.compileExistence(o); - } - answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP)); - if (o.level <= LEVEL_OP) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Op.prototype.compileChain = function(o) { - var fragments, fst, shared, _ref4; - _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1]; - fst = this.first.compileToFragments(o, LEVEL_OP); - fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); - return this.wrapInBraces(fragments); - }; - - Op.prototype.compileExistence = function(o) { - var fst, ref; - if (!o.isExistentialEquals && this.first.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, this.first)); - } else { - fst = this.first; - ref = fst; - } - return new If(new Existence(fst), ref, { - type: 'if' - }).addElse(this.second).compileToFragments(o); - }; - - Op.prototype.compileUnary = function(o) { - var op, parts, plusMinus; - parts = []; - op = this.operator; - parts.push([this.makeCode(op)]); - if (op === '!' && this.first instanceof Existence) { - this.first.negated = !this.first.negated; - return this.first.compileToFragments(o); - } - if (o.level >= LEVEL_ACCESS) { - return (new Parens(this)).compileToFragments(o); - } - plusMinus = op === '+' || op === '-'; - if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { - parts.push([this.makeCode(' ')]); - } - if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { - this.first = new Parens(this.first); - } - parts.push(this.first.compileToFragments(o, LEVEL_OP)); - if (this.flip) { - parts.reverse(); - } - return this.joinFragmentArrays(parts, ''); - }; - - Op.prototype.toString = function(idt) { - return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); - }; - - return Op; - - })(Base); - - exports.In = In = (function(_super) { - __extends(In, _super); - - function In(object, array) { - this.object = object; - this.array = array; - } - - In.prototype.children = ['object', 'array']; - - In.prototype.invert = NEGATE; - - In.prototype.compileNode = function(o) { - var hasSplat, obj, _i, _len, _ref4; - if (this.array instanceof Value && this.array.isArray()) { - _ref4 = this.array.base.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (!(obj instanceof Splat)) { - continue; - } - hasSplat = true; - break; - } - if (!hasSplat) { - return this.compileOrTest(o); - } - } - return this.compileLoopTest(o); - }; - - In.prototype.compileOrTest = function(o) { - var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6; - if (this.array.base.objects.length === 0) { - return [this.makeCode("" + (!!this.negated))]; - } - _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1]; - _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1]; - tests = []; - _ref6 = this.array.base.objects; - for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) { - item = _ref6[i]; - if (i) { - tests.push(this.makeCode(cnj)); - } - tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); - } - if (o.level < LEVEL_OP) { - return tests; - } else { - return this.wrapInBraces(tests); - } - }; - - In.prototype.compileLoopTest = function(o) { - var fragments, ref, sub, _ref4; - _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1]; - fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); - if (fragmentsToText(sub) === fragmentsToText(ref)) { - return fragments; - } - fragments = sub.concat(this.makeCode(', '), fragments); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - In.prototype.toString = function(idt) { - return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); - }; - - return In; - - })(Base); - - exports.Try = Try = (function(_super) { - __extends(Try, _super); - - function Try(attempt, errorVariable, recovery, ensure) { - this.attempt = attempt; - this.errorVariable = errorVariable; - this.recovery = recovery; - this.ensure = ensure; - } - - Try.prototype.children = ['attempt', 'recovery', 'ensure']; - - Try.prototype.isStatement = YES; - - Try.prototype.jumps = function(o) { - var _ref4; - return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0); - }; - - Try.prototype.makeReturn = function(res) { - if (this.attempt) { - this.attempt = this.attempt.makeReturn(res); - } - if (this.recovery) { - this.recovery = this.recovery.makeReturn(res); - } - return this; - }; - - Try.prototype.compileNode = function(o) { - var catchPart, ensurePart, placeholder, tryPart; - o.indent += TAB; - tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); - catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; - ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; - return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); - }; - - return Try; - - })(Base); - - exports.Throw = Throw = (function(_super) { - __extends(Throw, _super); - - function Throw(expression) { - this.expression = expression; - } - - Throw.prototype.children = ['expression']; - - Throw.prototype.isStatement = YES; - - Throw.prototype.jumps = NO; - - Throw.prototype.makeReturn = THIS; - - Throw.prototype.compileNode = function(o) { - return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); - }; - - return Throw; - - })(Base); - - exports.Existence = Existence = (function(_super) { - __extends(Existence, _super); - - function Existence(expression) { - this.expression = expression; - } - - Existence.prototype.children = ['expression']; - - Existence.prototype.invert = NEGATE; - - Existence.prototype.compileNode = function(o) { - var cmp, cnj, code, _ref4; - this.expression.front = this.front; - code = this.expression.compile(o, LEVEL_OP); - if (IDENTIFIER.test(code) && !o.scope.check(code)) { - _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1]; - code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; - } else { - code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; - } - return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; - }; - - return Existence; - - })(Base); - - exports.Parens = Parens = (function(_super) { - __extends(Parens, _super); - - function Parens(body) { - this.body = body; - } - - Parens.prototype.children = ['body']; - - Parens.prototype.unwrap = function() { - return this.body; - }; - - Parens.prototype.isComplex = function() { - return this.body.isComplex(); - }; - - Parens.prototype.compileNode = function(o) { - var bare, expr, fragments; - expr = this.body.unwrap(); - if (expr instanceof Value && expr.isAtomic()) { - expr.front = this.front; - return expr.compileToFragments(o); - } - fragments = expr.compileToFragments(o, LEVEL_PAREN); - bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); - if (bare) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - return Parens; - - })(Base); - - exports.For = For = (function(_super) { - __extends(For, _super); - - function For(body, source) { - var _ref4; - this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; - this.body = Block.wrap([body]); - this.own = !!source.own; - this.object = !!source.object; - if (this.object) { - _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1]; - } - if (this.index instanceof Value) { - this.index.error('index cannot be a pattern matching expression'); - } - this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; - this.pattern = this.name instanceof Value; - if (this.range && this.index) { - this.index.error('indexes do not apply to range loops'); - } - if (this.range && this.pattern) { - this.name.error('cannot pattern match over range loops'); - } - if (this.own && !this.object) { - this.index.error('cannot use own with for-in'); - } - this.returns = false; - } - - For.prototype.children = ['body', 'source', 'guard', 'step']; - - For.prototype.compileNode = function(o) { - var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5; - body = Block.wrap([this.body]); - lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0; - if (lastJumps && lastJumps instanceof Return) { - this.returns = false; - } - source = this.range ? this.source.base : this.source; - scope = o.scope; - name = this.name && (this.name.compile(o, LEVEL_LIST)); - index = this.index && (this.index.compile(o, LEVEL_LIST)); - if (name && !this.pattern) { - scope.find(name); - } - if (index) { - scope.find(index); - } - if (this.returns) { - rvar = scope.freeVariable('results'); - } - ivar = (this.object && index) || scope.freeVariable('i'); - kvar = (this.range && name) || index || ivar; - kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; - if (this.step && !this.range) { - _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1]; - stepNum = stepVar.match(SIMPLENUM); - } - if (this.pattern) { - name = ivar; - } - varPart = ''; - guardPart = ''; - defPart = ''; - idt1 = this.tab + TAB; - if (this.range) { - forPartFragments = source.compileToFragments(merge(o, { - index: ivar, - name: name, - step: this.step - })); - } else { - svar = this.source.compile(o, LEVEL_LIST); - if ((name || this.own) && !IDENTIFIER.test(svar)) { - defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; - svar = ref; - } - if (name && !this.pattern) { - namePart = "" + name + " = " + svar + "[" + kvar + "]"; - } - if (!this.object) { - if (step !== stepVar) { - defPart += "" + this.tab + step + ";\n"; - } - if (!(this.step && stepNum && (down = +stepNum < 0))) { - lvar = scope.freeVariable('len'); - } - declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; - declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; - compare = "" + ivar + " < " + lvar; - compareDown = "" + ivar + " >= 0"; - if (this.step) { - if (stepNum) { - if (down) { - compare = compareDown; - declare = declareDown; - } - } else { - compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; - declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; - } - increment = "" + ivar + " += " + stepVar; - } else { - increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); - } - forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; - } - } - if (this.returns) { - resultPart = "" + this.tab + rvar + " = [];\n"; - returnResult = "\n" + this.tab + "return " + rvar + ";"; - body.makeReturn(rvar); - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - if (this.pattern) { - body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); - } - defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); - if (namePart) { - varPart = "\n" + idt1 + namePart + ";"; - } - if (this.object) { - forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; - if (this.own) { - guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; - } - } - bodyFragments = body.compileToFragments(merge(o, { - indent: idt1 - }), LEVEL_TOP); - if (bodyFragments && (bodyFragments.length > 0)) { - bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); - } - return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); - }; - - For.prototype.pluckDirectCall = function(o, body) { - var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - defs = []; - _ref4 = body.expressions; - for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) { - expr = _ref4[idx]; - expr = expr.unwrapAll(); - if (!(expr instanceof Call)) { - continue; - } - val = expr.variable.unwrapAll(); - if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) { - continue; - } - fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val; - ref = new Literal(o.scope.freeVariable('fn')); - base = new Value(ref); - if (val.base) { - _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1]; - } - body.expressions[idx] = new Call(base, expr.args); - defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); - } - return defs; - }; - - return For; - - })(While); - - exports.Switch = Switch = (function(_super) { - __extends(Switch, _super); - - function Switch(subject, cases, otherwise) { - this.subject = subject; - this.cases = cases; - this.otherwise = otherwise; - } - - Switch.prototype.children = ['subject', 'cases', 'otherwise']; - - Switch.prototype.isStatement = YES; - - Switch.prototype.jumps = function(o) { - var block, conds, _i, _len, _ref4, _ref5, _ref6; - if (o == null) { - o = { - block: true - }; - } - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1]; - if (block.jumps(o)) { - return block; - } - } - return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0; - }; - - Switch.prototype.makeReturn = function(res) { - var pair, _i, _len, _ref4, _ref5; - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - pair = _ref4[_i]; - pair[1].makeReturn(res); - } - if (res) { - this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); - } - if ((_ref5 = this.otherwise) != null) { - _ref5.makeReturn(res); - } - return this; - }; - - Switch.prototype.compileNode = function(o) { - var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6; - idt1 = o.indent + TAB; - idt2 = o.indent = idt1 + TAB; - fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); - _ref4 = this.cases; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1]; - _ref6 = flatten([conditions]); - for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { - cond = _ref6[_j]; - if (!this.subject) { - cond = cond.invert(); - } - fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); - } - if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { - fragments = fragments.concat(body, this.makeCode('\n')); - } - if (i === this.cases.length - 1 && !this.otherwise) { - break; - } - expr = this.lastNonComment(block.expressions); - if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { - continue; - } - fragments.push(cond.makeCode(idt2 + 'break;\n')); - } - if (this.otherwise && this.otherwise.expressions.length) { - fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); - } - fragments.push(this.makeCode(this.tab + '}')); - return fragments; - }; - - return Switch; - - })(Base); - - exports.If = If = (function(_super) { - __extends(If, _super); - - function If(condition, body, options) { - this.body = body; - if (options == null) { - options = {}; - } - this.condition = options.type === 'unless' ? condition.invert() : condition; - this.elseBody = null; - this.isChain = false; - this.soak = options.soak; - } - - If.prototype.children = ['condition', 'body', 'elseBody']; - - If.prototype.bodyNode = function() { - var _ref4; - return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.elseBodyNode = function() { - var _ref4; - return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.addElse = function(elseBody) { - if (this.isChain) { - this.elseBodyNode().addElse(elseBody); - } else { - this.isChain = elseBody instanceof If; - this.elseBody = this.ensureBlock(elseBody); - } - return this; - }; - - If.prototype.isStatement = function(o) { - var _ref4; - return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0); - }; - - If.prototype.jumps = function(o) { - var _ref4; - return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0); - }; - - If.prototype.compileNode = function(o) { - if (this.isStatement(o)) { - return this.compileStatement(o); - } else { - return this.compileExpression(o); - } - }; - - If.prototype.makeReturn = function(res) { - if (res) { - this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); - } - this.body && (this.body = new Block([this.body.makeReturn(res)])); - this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); - return this; - }; - - If.prototype.ensureBlock = function(node) { - if (node instanceof Block) { - return node; - } else { - return new Block([node]); - } - }; - - If.prototype.compileStatement = function(o) { - var answer, body, child, cond, exeq, ifPart, indent; - child = del(o, 'chainChild'); - exeq = del(o, 'isExistentialEquals'); - if (exeq) { - return new If(this.condition.invert(), this.elseBodyNode(), { - type: 'if' - }).compileToFragments(o); - } - indent = o.indent + TAB; - cond = this.condition.compileToFragments(o, LEVEL_PAREN); - body = this.ensureBlock(this.body).compileToFragments(merge(o, { - indent: indent - })); - ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); - if (!child) { - ifPart.unshift(this.makeCode(this.tab)); - } - if (!this.elseBody) { - return ifPart; - } - answer = ifPart.concat(this.makeCode(' else ')); - if (this.isChain) { - o.chainChild = true; - answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); - } else { - answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { - indent: indent - }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); - } - return answer; - }; - - If.prototype.compileExpression = function(o) { - var alt, body, cond, fragments; - cond = this.condition.compileToFragments(o, LEVEL_COND); - body = this.bodyNode().compileToFragments(o, LEVEL_LIST); - alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; - fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); - if (o.level >= LEVEL_COND) { - return this.wrapInBraces(fragments); - } else { - return fragments; - } - }; - - If.prototype.unfoldSoak = function() { - return this.soak && this; - }; - - return If; - - })(Base); - - Closure = { - wrap: function(expressions, statement, noReturn) { - var args, argumentsNode, call, func, meth; - if (expressions.jumps()) { - return expressions; - } - func = new Code([], Block.wrap([expressions])); - args = []; - argumentsNode = expressions.contains(this.isLiteralArguments); - if (argumentsNode && expressions.classBody) { - argumentsNode.error("Class bodies shouldn't reference arguments"); - } - if (argumentsNode || expressions.contains(this.isLiteralThis)) { - meth = new Literal(argumentsNode ? 'apply' : 'call'); - args = [new Literal('this')]; - if (argumentsNode) { - args.push(new Literal('arguments')); - } - func = new Value(func, [new Access(meth)]); - } - func.noReturn = noReturn; - call = new Call(func, args); - if (statement) { - return Block.wrap([call]); - } else { - return call; - } - }, - isLiteralArguments: function(node) { - return node instanceof Literal && node.value === 'arguments' && !node.asKey; - }, - isLiteralThis: function(node) { - return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); - } - }; - - unfoldSoak = function(o, parent, name) { - var ifn; - if (!(ifn = parent[name].unfoldSoak(o))) { - return; - } - parent[name] = ifn.body; - ifn.body = new Value(parent); - return ifn; - }; - - UTILITIES = { - "extends": function() { - return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"; - }, - bind: function() { - return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }'; - }, - indexOf: function() { - return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; - }, - hasProp: function() { - return '{}.hasOwnProperty'; - }, - slice: function() { - return '[].slice'; - } - }; - - LEVEL_TOP = 1; - - LEVEL_PAREN = 2; - - LEVEL_LIST = 3; - - LEVEL_COND = 4; - - LEVEL_OP = 5; - - LEVEL_ACCESS = 6; - - TAB = ' '; - - IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; - - IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); - - SIMPLENUM = /^[+-]?\d+$/; - - METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$"); - - IS_STRING = /^['"]/; - - utility = function(name) { - var ref; - ref = "__" + name; - Scope.root.assign(ref, UTILITIES[name]()); - return ref; - }; - - multident = function(code, tab) { - code = code.replace(/\n/g, '$&' + tab); - return code.replace(/\s+$/, ''); - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/optparse.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/optparse.js deleted file mode 100644 index 0f19ae7d..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/optparse.js +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; - - repeat = require('./helpers').repeat; - - exports.OptionParser = OptionParser = (function() { - function OptionParser(rules, banner) { - this.banner = banner; - this.rules = buildRules(rules); - } - - OptionParser.prototype.parse = function(args) { - var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref; - options = { - "arguments": [] - }; - skippingArgument = false; - originalArgs = args; - args = normalizeArguments(args); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - arg = args[i]; - if (skippingArgument) { - skippingArgument = false; - continue; - } - if (arg === '--') { - pos = originalArgs.indexOf('--'); - options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1)); - break; - } - isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG)); - seenNonOptionArg = options["arguments"].length > 0; - if (!seenNonOptionArg) { - matchedRule = false; - _ref = this.rules; - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - rule = _ref[_j]; - if (rule.shortFlag === arg || rule.longFlag === arg) { - value = true; - if (rule.hasArgument) { - skippingArgument = true; - value = args[i + 1]; - } - options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value; - matchedRule = true; - break; - } - } - if (isOption && !matchedRule) { - throw new Error("unrecognized option: " + arg); - } - } - if (seenNonOptionArg || !isOption) { - options["arguments"].push(arg); - } - } - return options; - }; - - OptionParser.prototype.help = function() { - var letPart, lines, rule, spaces, _i, _len, _ref; - lines = []; - if (this.banner) { - lines.unshift("" + this.banner + "\n"); - } - _ref = this.rules; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - rule = _ref[_i]; - spaces = 15 - rule.longFlag.length; - spaces = spaces > 0 ? repeat(' ', spaces) : ''; - letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; - lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); - } - return "\n" + (lines.join('\n')) + "\n"; - }; - - return OptionParser; - - })(); - - LONG_FLAG = /^(--\w[\w\-]*)/; - - SHORT_FLAG = /^(-\w)$/; - - MULTI_FLAG = /^-(\w{2,})/; - - OPTIONAL = /\[(\w+(\*?))\]/; - - buildRules = function(rules) { - var tuple, _i, _len, _results; - _results = []; - for (_i = 0, _len = rules.length; _i < _len; _i++) { - tuple = rules[_i]; - if (tuple.length < 3) { - tuple.unshift(null); - } - _results.push(buildRule.apply(null, tuple)); - } - return _results; - }; - - buildRule = function(shortFlag, longFlag, description, options) { - var match; - if (options == null) { - options = {}; - } - match = longFlag.match(OPTIONAL); - longFlag = longFlag.match(LONG_FLAG)[1]; - return { - name: longFlag.substr(2), - shortFlag: shortFlag, - longFlag: longFlag, - description: description, - hasArgument: !!(match && match[1]), - isList: !!(match && match[2]) - }; - }; - - normalizeArguments = function(args) { - var arg, l, match, result, _i, _j, _len, _len1, _ref; - args = args.slice(0); - result = []; - for (_i = 0, _len = args.length; _i < _len; _i++) { - arg = args[_i]; - if (match = arg.match(MULTI_FLAG)) { - _ref = match[1].split(''); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - l = _ref[_j]; - result.push('-' + l); - } - } else { - result.push(arg); - } - } - return result; - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/parser.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/parser.js deleted file mode 100755 index 9f23cc47..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/parser.js +++ /dev/null @@ -1,610 +0,0 @@ -/* parser generated by jison 0.4.2 */ -var parser = (function(){ -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, -terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, -productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], -performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { - -var $0 = $$.length - 1; -switch (yystate) { -case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); -break; -case 2:return this.$ = $$[$0]; -break; -case 3:return this.$ = $$[$0-1]; -break; -case 4:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); -break; -case 5:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); -break; -case 6:this.$ = $$[$0-1]; -break; -case 7:this.$ = $$[$0]; -break; -case 8:this.$ = $$[$0]; -break; -case 9:this.$ = $$[$0]; -break; -case 10:this.$ = $$[$0]; -break; -case 11:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 12:this.$ = $$[$0]; -break; -case 13:this.$ = $$[$0]; -break; -case 14:this.$ = $$[$0]; -break; -case 15:this.$ = $$[$0]; -break; -case 16:this.$ = $$[$0]; -break; -case 17:this.$ = $$[$0]; -break; -case 18:this.$ = $$[$0]; -break; -case 19:this.$ = $$[$0]; -break; -case 20:this.$ = $$[$0]; -break; -case 21:this.$ = $$[$0]; -break; -case 22:this.$ = $$[$0]; -break; -case 23:this.$ = $$[$0]; -break; -case 24:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); -break; -case 25:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 28:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 29:this.$ = $$[$0]; -break; -case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); -break; -case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); -break; -case 35:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); -break; -case 36:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); -break; -case 37:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); -break; -case 38:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); -break; -case 39:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 40:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); -break; -case 41:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); -break; -case 42:this.$ = $$[$0]; -break; -case 43:this.$ = $$[$0]; -break; -case 44:this.$ = $$[$0]; -break; -case 45:this.$ = $$[$0]; -break; -case 46:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); -break; -case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); -break; -case 48:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); -break; -case 49:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); -break; -case 50:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); -break; -case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); -break; -case 52:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); -break; -case 53:this.$ = $$[$0]; -break; -case 54:this.$ = $$[$0]; -break; -case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 56:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 57:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 58:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 59:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 60:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); -break; -case 61:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); -break; -case 62:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); -break; -case 63:this.$ = $$[$0]; -break; -case 64:this.$ = $$[$0]; -break; -case 65:this.$ = $$[$0]; -break; -case 66:this.$ = $$[$0]; -break; -case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); -break; -case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); -break; -case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); -break; -case 71:this.$ = $$[$0]; -break; -case 72:this.$ = $$[$0]; -break; -case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 75:this.$ = $$[$0]; -break; -case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 79:this.$ = $$[$0]; -break; -case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); -break; -case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); -break; -case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); -break; -case 85:this.$ = $$[$0]; -break; -case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { - soak: true - })); -break; -case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); -break; -case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); -break; -case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); -break; -case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); -break; -case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); -break; -case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); -break; -case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); -break; -case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); -break; -case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); -break; -case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); -break; -case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); -break; -case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); -break; -case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); -break; -case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); -break; -case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); -break; -case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); -break; -case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); -break; -case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); -break; -case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); -break; -case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); -break; -case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); -break; -case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); -break; -case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); -break; -case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); -break; -case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); -break; -case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); -break; -case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 129:this.$ = $$[$0]; -break; -case 130:this.$ = $$[$0]; -break; -case 131:this.$ = $$[$0]; -break; -case 132:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); -break; -case 133:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); -break; -case 134:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); -break; -case 135:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); -break; -case 136:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); -break; -case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); -break; -case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); -break; -case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); -break; -case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); -break; -case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); -break; -case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); -break; -case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); -break; -case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - guard: $$[$0] - })); -break; -case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { - invert: true - })); -break; -case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - invert: true, - guard: $$[$0] - })); -break; -case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); -break; -case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); -break; -case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); -break; -case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); -break; -case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); -break; -case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) - }); -break; -case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { - $$[$0].own = $$[$0-1].own; - $$[$0].name = $$[$0-1][0]; - $$[$0].index = $$[$0-1][1]; - return $$[$0]; - }())); -break; -case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); -break; -case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - $$[$0].own = true; - return $$[$0]; - }())); -break; -case 160:this.$ = $$[$0]; -break; -case 161:this.$ = $$[$0]; -break; -case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); -break; -case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0] - }); -break; -case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0], - object: true - }); -break; -case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0] - }); -break; -case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0], - object: true - }); -break; -case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - step: $$[$0] - }); -break; -case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - guard: $$[$0-2], - step: $$[$0] - }); -break; -case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - step: $$[$0-2], - guard: $$[$0] - }); -break; -case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); -break; -case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); -break; -case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); -break; -case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); -break; -case 177:this.$ = $$[$0]; -break; -case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); -break; -case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); -break; -case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); -break; -case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - })); -break; -case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - }))); -break; -case 183:this.$ = $$[$0]; -break; -case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); -break; -case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); -break; -case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); -break; -case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); -break; -case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); -break; -case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); -break; -case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); -break; -case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); -break; -case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); -break; -case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); -break; -case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); -break; -case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - if ($$[$0-1].charAt(0) === '!') { - return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); - } else { - return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); - } - }())); -break; -case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); -break; -case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); -break; -case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); -break; -case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); -break; -} -}, -table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], -defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]}, -parseError: function parseError(str, hash) { - throw new Error(str); -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -undefined -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} \ No newline at end of file diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/repl.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/repl.js deleted file mode 100644 index 6c792913..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/repl.js +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref; - - fs = require('fs'); - - path = require('path'); - - vm = require('vm'); - - nodeREPL = require('repl'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('./helpers'), merge = _ref.merge, prettyErrorMessage = _ref.prettyErrorMessage; - - replDefaults = { - prompt: 'coffee> ', - historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, - historyMaxInputSize: 10240, - "eval": function(input, context, filename, cb) { - var Assign, Block, Literal, Value, ast, err, js, _ref1; - input = input.replace(/\uFF00/g, '\n'); - input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); - _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal; - try { - ast = CoffeeScript.nodes(input); - ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); - js = ast.compile({ - bare: true, - locals: Object.keys(context) - }); - return cb(null, vm.runInContext(js, context, filename)); - } catch (_error) { - err = _error; - return cb(prettyErrorMessage(err, filename, input, true)); - } - } - }; - - addMultilineHandler = function(repl) { - var inputStream, multiline, nodeLineListener, outputStream, rli; - rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; - multiline = { - enabled: false, - initialPrompt: repl.prompt.replace(/^[^> ]*/, function(x) { - return x.replace(/./g, '-'); - }), - prompt: repl.prompt.replace(/^[^> ]*>?/, function(x) { - return x.replace(/./g, '.'); - }), - buffer: '' - }; - nodeLineListener = rli.listeners('line')[0]; - rli.removeListener('line', nodeLineListener); - rli.on('line', function(cmd) { - if (multiline.enabled) { - multiline.buffer += "" + cmd + "\n"; - rli.setPrompt(multiline.prompt); - rli.prompt(true); - } else { - nodeLineListener(cmd); - } - }); - return inputStream.on('keypress', function(char, key) { - if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) { - return; - } - if (multiline.enabled) { - if (!multiline.buffer.match(/\n/)) { - multiline.enabled = !multiline.enabled; - rli.setPrompt(repl.prompt); - rli.prompt(true); - return; - } - if ((rli.line != null) && !rli.line.match(/^\s*$/)) { - return; - } - multiline.enabled = !multiline.enabled; - rli.line = ''; - rli.cursor = 0; - rli.output.cursorTo(0); - rli.output.clearLine(1); - multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00'); - rli.emit('line', multiline.buffer); - multiline.buffer = ''; - } else { - multiline.enabled = !multiline.enabled; - rli.setPrompt(multiline.initialPrompt); - rli.prompt(true); - } - }); - }; - - addHistory = function(repl, filename, maxSize) { - var buffer, fd, lastLine, readFd, size, stat; - lastLine = null; - try { - stat = fs.statSync(filename); - size = Math.min(maxSize, stat.size); - readFd = fs.openSync(filename, 'r'); - buffer = new Buffer(size); - fs.readSync(readFd, buffer, 0, size, stat.size - size); - repl.rli.history = buffer.toString().split('\n').reverse(); - if (stat.size > maxSize) { - repl.rli.history.pop(); - } - if (repl.rli.history[0] === '') { - repl.rli.history.shift(); - } - repl.rli.historyIndex = -1; - lastLine = repl.rli.history[0]; - } catch (_error) {} - fd = fs.openSync(filename, 'a'); - repl.rli.addListener('line', function(code) { - if (code && code.length && code !== '.history' && lastLine !== code) { - fs.write(fd, "" + code + "\n"); - return lastLine = code; - } - }); - repl.rli.on('exit', function() { - return fs.close(fd); - }); - return repl.commands['.history'] = { - help: 'Show command history', - action: function() { - repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); - return repl.displayPrompt(); - } - }; - }; - - module.exports = { - start: function(opts) { - var build, major, minor, repl, _ref1; - if (opts == null) { - opts = {}; - } - _ref1 = process.versions.node.split('.').map(function(n) { - return parseInt(n); - }), major = _ref1[0], minor = _ref1[1], build = _ref1[2]; - if (major === 0 && minor < 8) { - console.warn("Node 0.8.0+ required for CoffeeScript REPL"); - process.exit(1); - } - opts = merge(replDefaults, opts); - repl = nodeREPL.start(opts); - repl.on('exit', function() { - return repl.outputStream.write('\n'); - }); - addMultilineHandler(repl); - if (opts.historyFile) { - addHistory(repl, opts.historyFile, opts.historyMaxInputSize); - } - return repl; - } - }; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/rewriter.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/rewriter.js deleted file mode 100644 index 11f36a3e..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/rewriter.js +++ /dev/null @@ -1,485 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - generate = function(tag, value) { - var tok; - tok = [tag, value]; - tok.generated = true; - return tok; - }; - - exports.Rewriter = (function() { - function Rewriter() {} - - Rewriter.prototype.rewrite = function(tokens) { - this.tokens = tokens; - this.removeLeadingNewlines(); - this.removeMidExpressionNewlines(); - this.closeOpenCalls(); - this.closeOpenIndexes(); - this.addImplicitIndentation(); - this.tagPostfixConditionals(); - this.addImplicitBracesAndParens(); - this.addLocationDataToGeneratedTokens(); - return this.tokens; - }; - - Rewriter.prototype.scanTokens = function(block) { - var i, token, tokens; - tokens = this.tokens; - i = 0; - while (token = tokens[i]) { - i += block.call(this, token, i, tokens); - } - return true; - }; - - Rewriter.prototype.detectEnd = function(i, condition, action) { - var levels, token, tokens, _ref, _ref1; - tokens = this.tokens; - levels = 0; - while (token = tokens[i]) { - if (levels === 0 && condition.call(this, token, i)) { - return action.call(this, token, i); - } - if (!token || levels < 0) { - return action.call(this, token, i - 1); - } - if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) { - levels += 1; - } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { - levels -= 1; - } - i += 1; - } - return i - 1; - }; - - Rewriter.prototype.removeLeadingNewlines = function() { - var i, tag, _i, _len, _ref; - _ref = this.tokens; - for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { - tag = _ref[i][0]; - if (tag !== 'TERMINATOR') { - break; - } - } - if (i) { - return this.tokens.splice(0, i); - } - }; - - Rewriter.prototype.removeMidExpressionNewlines = function() { - return this.scanTokens(function(token, i, tokens) { - var _ref; - if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) { - return 1; - } - tokens.splice(i, 1); - return 0; - }); - }; - - Rewriter.prototype.closeOpenCalls = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; - }; - action = function(token, i) { - return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'CALL_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.closeOpenIndexes = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; - }; - action = function(token, i) { - return token[0] = 'INDEX_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'INDEX_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.matchTags = function() { - var fuzz, i, j, pattern, _i, _ref, _ref1; - i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - fuzz = 0; - for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { - while (this.tag(i + j + fuzz) === 'HERECOMMENT') { - fuzz += 2; - } - if (pattern[j] == null) { - continue; - } - if (typeof pattern[j] === 'string') { - pattern[j] = [pattern[j]]; - } - if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { - return false; - } - } - return true; - }; - - Rewriter.prototype.looksObjectish = function(j) { - return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); - }; - - Rewriter.prototype.findTagsBackwards = function(i, tags) { - var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - backStack = []; - while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { - if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { - backStack.push(this.tag(i)); - } - if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { - backStack.pop(); - } - i -= 1; - } - return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; - }; - - Rewriter.prototype.addImplicitBracesAndParens = function() { - var stack; - stack = []; - return this.scanTokens(function(token, i, tokens) { - var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - tag = token[0]; - prevTag = (i > 0 ? tokens[i - 1] : [])[0]; - nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; - stackTop = function() { - return stack[stack.length - 1]; - }; - startIdx = i; - forward = function(n) { - return i - startIdx + n; - }; - inImplicit = function() { - var _ref, _ref1; - return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; - }; - inImplicitCall = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; - }; - inImplicitObject = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; - }; - inImplicitControl = function() { - var _ref; - return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; - }; - startImplicitCall = function(j) { - var idx; - idx = j != null ? j : i; - stack.push([ - '(', idx, { - ours: true - } - ]); - tokens.splice(idx, 0, generate('CALL_START', '(')); - if (j == null) { - return i += 1; - } - }; - endImplicitCall = function() { - stack.pop(); - tokens.splice(i, 0, generate('CALL_END', ')')); - return i += 1; - }; - startImplicitObject = function(j, startsLine) { - var idx; - if (startsLine == null) { - startsLine = true; - } - idx = j != null ? j : i; - stack.push([ - '{', idx, { - sameLine: true, - startsLine: startsLine, - ours: true - } - ]); - tokens.splice(idx, 0, generate('{', generate(new String('{')))); - if (j == null) { - return i += 1; - } - }; - endImplicitObject = function(j) { - j = j != null ? j : i; - stack.pop(); - tokens.splice(j, 0, generate('}', '}')); - return i += 1; - }; - if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { - stack.push([ - 'CONTROL', i, { - ours: true - } - ]); - return forward(1); - } - if (tag === 'INDENT' && inImplicit()) { - if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { - while (inImplicitCall()) { - endImplicitCall(); - } - } - if (inImplicitControl()) { - stack.pop(); - } - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_START, tag) >= 0) { - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_END, tag) >= 0) { - while (inImplicit()) { - if (inImplicitCall()) { - endImplicitCall(); - } else if (inImplicitObject()) { - endImplicitObject(); - } else { - stack.pop(); - } - } - stack.pop(); - } - if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { - if (tag === '?') { - tag = token[0] = 'FUNC_EXIST'; - } - startImplicitCall(i + 1); - return forward(2); - } - if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { - startImplicitCall(i + 1); - stack.push(['INDENT', i + 2]); - return forward(3); - } - if (tag === ':') { - if (this.tag(i - 2) === '@') { - s = i - 2; - } else { - s = i - 1; - } - while (this.tag(s - 2) === 'HERECOMMENT') { - s -= 2; - } - startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; - if (stackTop()) { - _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; - if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { - return forward(1); - } - } - startImplicitObject(s, !!startsLine); - return forward(2); - } - if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) { - endImplicitCall(); - return forward(1); - } - if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { - stackTop()[2].sameLine = false; - } - if (__indexOf.call(IMPLICIT_END, tag) >= 0) { - while (inImplicit()) { - _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); - if (inImplicitCall() && prevTag !== ',') { - endImplicitCall(); - } else if (inImplicitObject() && sameLine && !startsLine) { - endImplicitObject(); - } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { - endImplicitObject(); - } else { - break; - } - } - } - if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { - offset = nextTag === 'OUTDENT' ? 1 : 0; - while (inImplicitObject()) { - endImplicitObject(i + offset); - } - } - return forward(1); - }); - }; - - Rewriter.prototype.addLocationDataToGeneratedTokens = function() { - return this.scanTokens(function(token, i, tokens) { - var column, line, nextLocation, prevLocation, _ref, _ref1; - if (token[2]) { - return 1; - } - if (!(token.generated || token.explicit)) { - return 1; - } - if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { - line = nextLocation.first_line, column = nextLocation.first_column; - } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { - line = prevLocation.last_line, column = prevLocation.last_column; - } else { - line = column = 0; - } - token[2] = { - first_line: line, - first_column: column, - last_line: line, - last_column: column - }; - return 1; - }); - }; - - Rewriter.prototype.addImplicitIndentation = function() { - var action, condition, indent, outdent, starter; - starter = indent = outdent = null; - condition = function(token, i) { - var _ref, _ref1; - return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>')); - }; - action = function(token, i) { - return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); - }; - return this.scanTokens(function(token, i, tokens) { - var j, tag, _i, _ref, _ref1; - tag = token[0]; - if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { - tokens.splice(i, 1); - return 0; - } - if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { - tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation()))); - return 2; - } - if (tag === 'CATCH') { - for (j = _i = 1; _i <= 2; j = ++_i) { - if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { - continue; - } - tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); - return 2 + j; - } - } - if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { - starter = tag; - _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1]; - if (starter === 'THEN') { - indent.fromThen = true; - } - tokens.splice(i + 1, 0, indent); - this.detectEnd(i + 2, condition, action); - if (tag === 'THEN') { - tokens.splice(i, 1); - } - return 1; - } - return 1; - }); - }; - - Rewriter.prototype.tagPostfixConditionals = function() { - var action, condition, original; - original = null; - condition = function(token, i) { - var prevTag, tag; - tag = token[0]; - prevTag = this.tokens[i - 1][0]; - return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); - }; - action = function(token, i) { - if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { - return original[0] = 'POST_' + original[0]; - } - }; - return this.scanTokens(function(token, i) { - if (token[0] !== 'IF') { - return 1; - } - original = token; - this.detectEnd(i + 1, condition, action); - return 1; - }); - }; - - Rewriter.prototype.indentation = function(implicit) { - var indent, outdent; - if (implicit == null) { - implicit = false; - } - indent = ['INDENT', 2]; - outdent = ['OUTDENT', 2]; - if (implicit) { - indent.generated = outdent.generated = true; - } - if (!implicit) { - indent.explicit = outdent.explicit = true; - } - return [indent, outdent]; - }; - - Rewriter.prototype.generate = generate; - - Rewriter.prototype.tag = function(i) { - var _ref; - return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; - }; - - return Rewriter; - - })(); - - BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; - - exports.INVERSES = INVERSES = {}; - - EXPRESSION_START = []; - - EXPRESSION_END = []; - - for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { - _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; - EXPRESSION_START.push(INVERSES[rite] = left); - EXPRESSION_END.push(INVERSES[left] = rite); - } - - EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); - - IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; - - IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; - - IMPLICIT_UNSPACED_CALL = ['+', '-']; - - IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; - - SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; - - SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; - - LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/scope.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/scope.js deleted file mode 100644 index a09ba970..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/scope.js +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Scope, extend, last, _ref; - - _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; - - exports.Scope = Scope = (function() { - Scope.root = null; - - function Scope(parent, expressions, method) { - this.parent = parent; - this.expressions = expressions; - this.method = method; - this.variables = [ - { - name: 'arguments', - type: 'arguments' - } - ]; - this.positions = {}; - if (!this.parent) { - Scope.root = this; - } - } - - Scope.prototype.add = function(name, type, immediate) { - if (this.shared && !immediate) { - return this.parent.add(name, type, immediate); - } - if (Object.prototype.hasOwnProperty.call(this.positions, name)) { - return this.variables[this.positions[name]].type = type; - } else { - return this.positions[name] = this.variables.push({ - name: name, - type: type - }) - 1; - } - }; - - Scope.prototype.namedMethod = function() { - var _ref1; - if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { - return this.method; - } - return this.parent.namedMethod(); - }; - - Scope.prototype.find = function(name) { - if (this.check(name)) { - return true; - } - this.add(name, 'var'); - return false; - }; - - Scope.prototype.parameter = function(name) { - if (this.shared && this.parent.check(name, true)) { - return; - } - return this.add(name, 'param'); - }; - - Scope.prototype.check = function(name) { - var _ref1; - return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); - }; - - Scope.prototype.temporary = function(name, index) { - if (name.length > 1) { - return '_' + name + (index > 1 ? index - 1 : ''); - } else { - return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); - } - }; - - Scope.prototype.type = function(name) { - var v, _i, _len, _ref1; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.name === name) { - return v.type; - } - } - return null; - }; - - Scope.prototype.freeVariable = function(name, reserve) { - var index, temp; - if (reserve == null) { - reserve = true; - } - index = 0; - while (this.check((temp = this.temporary(name, index)))) { - index++; - } - if (reserve) { - this.add(temp, 'var', true); - } - return temp; - }; - - Scope.prototype.assign = function(name, value) { - this.add(name, { - value: value, - assigned: true - }, true); - return this.hasAssignments = true; - }; - - Scope.prototype.hasDeclarations = function() { - return !!this.declaredVariables().length; - }; - - Scope.prototype.declaredVariables = function() { - var realVars, tempVars, v, _i, _len, _ref1; - realVars = []; - tempVars = []; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type === 'var') { - (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); - } - } - return realVars.sort().concat(tempVars.sort()); - }; - - Scope.prototype.assignedVariables = function() { - var v, _i, _len, _ref1, _results; - _ref1 = this.variables; - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type.assigned) { - _results.push("" + v.name + " = " + v.type.value); - } - } - return _results; - }; - - return Scope; - - })(); - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/sourcemap.js b/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/sourcemap.js deleted file mode 100644 index 4bb6f258..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/lib/coffee-script/sourcemap.js +++ /dev/null @@ -1,161 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LineMap, SourceMap; - - LineMap = (function() { - function LineMap(line) { - this.line = line; - this.columns = []; - } - - LineMap.prototype.add = function(column, _arg, options) { - var sourceColumn, sourceLine; - sourceLine = _arg[0], sourceColumn = _arg[1]; - if (options == null) { - options = {}; - } - if (this.columns[column] && options.noReplace) { - return; - } - return this.columns[column] = { - line: this.line, - column: column, - sourceLine: sourceLine, - sourceColumn: sourceColumn - }; - }; - - LineMap.prototype.sourceLocation = function(column) { - var mapping; - while (!((mapping = this.columns[column]) || (column <= 0))) { - column--; - } - return mapping && [mapping.sourceLine, mapping.sourceColumn]; - }; - - return LineMap; - - })(); - - SourceMap = (function() { - var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; - - function SourceMap() { - this.lines = []; - } - - SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { - var column, line, lineMap, _base; - if (options == null) { - options = {}; - } - line = generatedLocation[0], column = generatedLocation[1]; - lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); - return lineMap.add(column, sourceLocation, options); - }; - - SourceMap.prototype.sourceLocation = function(_arg) { - var column, line, lineMap; - line = _arg[0], column = _arg[1]; - while (!((lineMap = this.lines[line]) || (line <= 0))) { - line--; - } - return lineMap && lineMap.sourceLocation(column); - }; - - SourceMap.prototype.generate = function(options, code) { - var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; - if (options == null) { - options = {}; - } - if (code == null) { - code = null; - } - writingline = 0; - lastColumn = 0; - lastSourceLine = 0; - lastSourceColumn = 0; - needComma = false; - buffer = ""; - _ref = this.lines; - for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { - lineMap = _ref[lineNumber]; - if (lineMap) { - _ref1 = lineMap.columns; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - mapping = _ref1[_j]; - if (!(mapping)) { - continue; - } - while (writingline < mapping.line) { - lastColumn = 0; - needComma = false; - buffer += ";"; - writingline++; - } - if (needComma) { - buffer += ","; - needComma = false; - } - buffer += this.encodeVlq(mapping.column - lastColumn); - lastColumn = mapping.column; - buffer += this.encodeVlq(0); - buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); - lastSourceLine = mapping.sourceLine; - buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); - lastSourceColumn = mapping.sourceColumn; - needComma = true; - } - } - } - v3 = { - version: 3, - file: options.generatedFile || '', - sourceRoot: options.sourceRoot || '', - sources: options.sourceFiles || [''], - names: [], - mappings: buffer - }; - if (options.inline) { - v3.sourcesContent = [code]; - } - return JSON.stringify(v3, null, 2); - }; - - VLQ_SHIFT = 5; - - VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; - - VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; - - SourceMap.prototype.encodeVlq = function(value) { - var answer, nextChunk, signBit, valueToEncode; - answer = ''; - signBit = value < 0 ? 1 : 0; - valueToEncode = (Math.abs(value) << 1) + signBit; - while (valueToEncode || !answer) { - nextChunk = valueToEncode & VLQ_VALUE_MASK; - valueToEncode = valueToEncode >> VLQ_SHIFT; - if (valueToEncode) { - nextChunk |= VLQ_CONTINUATION_BIT; - } - answer += this.encodeBase64(nextChunk); - } - return answer; - }; - - BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - SourceMap.prototype.encodeBase64 = function(value) { - return BASE64_CHARS[value] || (function() { - throw new Error("Cannot Base64 encode value: " + value); - })(); - }; - - return SourceMap; - - })(); - - module.exports = SourceMap; - -}).call(this); diff --git a/org.nodeclipse.bundle.coffee/coffee-script/package.json b/org.nodeclipse.bundle.coffee/coffee-script/package.json deleted file mode 100644 index 56ebca53..00000000 --- a/org.nodeclipse.bundle.coffee/coffee-script/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "coffee-script", - "description": "Unfancy JavaScript", - "keywords": [ - "javascript", - "language", - "coffeescript", - "compiler" - ], - "author": { - "name": "Jeremy Ashkenas" - }, - "version": "1.6.3", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE" - } - ], - "engines": { - "node": ">=0.8.0" - }, - "directories": { - "lib": "./lib/coffee-script" - }, - "main": "./lib/coffee-script/coffee-script", - "bin": { - "coffee": "./bin/coffee", - "cake": "./bin/cake" - }, - "scripts": { - "test": "node ./bin/cake test" - }, - "homepage": "http://coffeescript.org", - "bugs": "https://github.com/jashkenas/coffee-script/issues", - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/coffee-script.git" - }, - "devDependencies": { - "uglify-js": "~2.2", - "jison": ">=0.2.0" - }, - "readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n", - "readmeFilename": "README", - "_id": "coffee-script@1.6.3", - "dist": { - "shasum": "7beeba14163622a128468e773111a8affe10880c" - }, - "_from": "coffee-script" -} diff --git a/org.nodeclipse.bundle.coffee/pom.xml b/org.nodeclipse.bundle.coffee/pom.xml deleted file mode 100644 index 55f3c3c7..00000000 --- a/org.nodeclipse.bundle.coffee/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.bundle.coffee - 1.6.3 - eclipse-plugin - - org.nodeclipse.bundle.coffee - org.nodeclipse.bundle.coffee - - diff --git a/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/Activator.java b/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/Activator.java deleted file mode 100644 index 658c5b5e..00000000 --- a/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nodeclipse.bundle.coffee; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.bundle.coffee"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/BundlePath.java b/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/BundlePath.java deleted file mode 100644 index ea490ec3..00000000 --- a/org.nodeclipse.bundle.coffee/src/org/nodeclipse/bundle/coffee/BundlePath.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.nodeclipse.bundle.coffee; - -import java.io.File; -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.osgi.framework.Bundle; - -public class BundlePath { - public static String getPath() { - return getBundledPath("coffee-script/bin/coffee"); - } - - private static String getBundledPath(String path) { - Bundle bundle = Activator.getDefault().getBundle(); - if (bundle == null) { - //LogUtil.info("getBundlePath(" + path + " bundle is null"); - return ""; - } - try { - URL location = FileLocator.toFileURL(bundle.getEntry("/")); - File file = new File(location.getPath(), path); - //LogUtil.info("BundledPath: " + file.getAbsolutePath()); - - return file.getAbsolutePath(); - } catch(Exception ex) { - //LogUtil.error(ex); - return ""; - } - } -} diff --git a/org.nodeclipse.bundle.express/.classpath b/org.nodeclipse.bundle.express/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/org.nodeclipse.bundle.express/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.bundle.express/.project b/org.nodeclipse.bundle.express/.project deleted file mode 100644 index bff586de..00000000 --- a/org.nodeclipse.bundle.express/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.bundle.express - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.bundle.express/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.bundle.express/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index af0f20f9..00000000 --- a/org.nodeclipse.bundle.express/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.nodeclipse.bundle.express/META-INF/MANIFEST.MF b/org.nodeclipse.bundle.express/META-INF/MANIFEST.MF deleted file mode 100644 index ec2ed250..00000000 --- a/org.nodeclipse.bundle.express/META-INF/MANIFEST.MF +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse-Express -Bundle-SymbolicName: org.nodeclipse.bundle.express -Bundle-Version: 3.2.5 -Bundle-Activator: org.nodeclipse.bundle.express.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.nodeclipse.bundle.express diff --git a/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/Activator.class b/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/Activator.class deleted file mode 100644 index 32d9f59d..00000000 Binary files a/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/Activator.class and /dev/null differ diff --git a/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/BundlePath.class b/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/BundlePath.class deleted file mode 100644 index 816a7a02..00000000 Binary files a/org.nodeclipse.bundle.express/bin/org/nodeclipse/bundle/express/BundlePath.class and /dev/null differ diff --git a/org.nodeclipse.bundle.express/build.properties b/org.nodeclipse.bundle.express/build.properties deleted file mode 100644 index 9a88fb0e..00000000 --- a/org.nodeclipse.bundle.express/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - express/ diff --git a/org.nodeclipse.bundle.express/express/.npmignore b/org.nodeclipse.bundle.express/express/.npmignore deleted file mode 100644 index caf574de..00000000 --- a/org.nodeclipse.bundle.express/express/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.git* -docs/ -examples/ -support/ -test/ -testing.js -.DS_Store -coverage.html -lib-cov diff --git a/org.nodeclipse.bundle.express/express/.travis.yml b/org.nodeclipse.bundle.express/express/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/org.nodeclipse.bundle.express/express/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/org.nodeclipse.bundle.express/express/History.md b/org.nodeclipse.bundle.express/express/History.md deleted file mode 100644 index 1f92c8b6..00000000 --- a/org.nodeclipse.bundle.express/express/History.md +++ /dev/null @@ -1,1152 +0,0 @@ - -3.2.6 / 2013-06-02 -================== - - * update connect - -3.2.5 / 2013-05-21 -================== - - * update connect - * update node-cookie - * add: throw a meaningful error when there is no default engine - * change generation of ETags with res.send() to GET requests only. Closes #1619 - -3.2.4 / 2013-05-09 -================== - - * fix `req.subdomains` when no Host is present - * fix `req.host` when no Host is present, return undefined - -3.2.3 / 2013-05-07 -================== - - * update connect / qs - -3.2.2 / 2013-05-03 -================== - - * update qs - -3.2.1 / 2013-04-29 -================== - - * add app.VERB() paths array deprecation warning - * update connect - * update qs and remove all ~ semver crap - * fix: accept number as value of Signed Cookie - -3.2.0 / 2013-04-15 -================== - - * add "view" constructor setting to override view behaviour - * add req.acceptsEncoding(name) - * add req.acceptedEncodings - * revert cookie signature change causing session race conditions - * fix sorting of Accept values of the same quality - -3.1.2 / 2013-04-12 -================== - - * add support for custom Accept parameters - * update cookie-signature - -3.1.1 / 2013-04-01 -================== - - * add X-Forwarded-Host support to `req.host` - * fix relative redirects - * update mkdirp - * update buffer-crc32 - * remove legacy app.configure() method from app template. - -3.1.0 / 2013-01-25 -================== - - * add support for leading "." in "view engine" setting - * add array support to `res.set()` - * add node 0.8.x to travis.yml - * add "subdomain offset" setting for tweaking `req.subdomains` - * add `res.location(url)` implementing `res.redirect()`-like setting of Location - * use app.get() for x-powered-by setting for inheritance - * fix colons in passwords for `req.auth` - -3.0.6 / 2013-01-04 -================== - - * add http verb methods to Router - * update connect - * fix mangling of the `res.cookie()` options object - * fix jsonp whitespace escape. Closes #1132 - -3.0.5 / 2012-12-19 -================== - - * add throwing when a non-function is passed to a route - * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses - * revert "add 'etag' option" - -3.0.4 / 2012-12-05 -================== - - * add 'etag' option to disable `res.send()` Etags - * add escaping of urls in text/plain in `res.redirect()` - for old browsers interpreting as html - * change crc32 module for a more liberal license - * update connect - -3.0.3 / 2012-11-13 -================== - - * update connect - * update cookie module - * fix cookie max-age - -3.0.2 / 2012-11-08 -================== - - * add OPTIONS to cors example. Closes #1398 - * fix route chaining regression. Closes #1397 - -3.0.1 / 2012-11-01 -================== - - * update connect - -3.0.0 / 2012-10-23 -================== - - * add `make clean` - * add "Basic" check to req.auth - * add `req.auth` test coverage - * add cb && cb(payload) to `res.jsonp()`. Closes #1374 - * add backwards compat for `res.redirect()` status. Closes #1336 - * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 - * update connect - * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 - * remove non-primitive string support for `res.send()` - * fix view-locals example. Closes #1370 - * fix route-separation example - -3.0.0rc5 / 2012-09-18 -================== - - * update connect - * add redis search example - * add static-files example - * add "x-powered-by" setting (`app.disable('x-powered-by')`) - * add "application/octet-stream" redirect Accept test case. Closes #1317 - -3.0.0rc4 / 2012-08-30 -================== - - * add `res.jsonp()`. Closes #1307 - * add "verbose errors" option to error-pages example - * add another route example to express(1) so people are not so confused - * add redis online user activity tracking example - * update connect dep - * fix etag quoting. Closes #1310 - * fix error-pages 404 status - * fix jsonp callback char restrictions - * remove old OPTIONS default response - -3.0.0rc3 / 2012-08-13 -================== - - * update connect dep - * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] - * fix `res.render()` clobbering of "locals" - -3.0.0rc2 / 2012-08-03 -================== - - * add CORS example - * update connect dep - * deprecate `.createServer()` & remove old stale examples - * fix: escape `res.redirect()` link - * fix vhost example - -3.0.0rc1 / 2012-07-24 -================== - - * add more examples to view-locals - * add scheme-relative redirects (`res.redirect("//foo.com")`) support - * update cookie dep - * update connect dep - * update send dep - * fix `express(1)` -h flag, use -H for hogan. Closes #1245 - * fix `res.sendfile()` socket error handling regression - -3.0.0beta7 / 2012-07-16 -================== - - * update connect dep for `send()` root normalization regression - -3.0.0beta6 / 2012-07-13 -================== - - * add `err.view` property for view errors. Closes #1226 - * add "jsonp callback name" setting - * add support for "/foo/:bar*" non-greedy matches - * change `res.sendfile()` to use `send()` module - * change `res.send` to use "response-send" module - * remove `app.locals.use` and `res.locals.use`, use regular middleware - -3.0.0beta5 / 2012-07-03 -================== - - * add "make check" support - * add route-map example - * add `res.json(obj, status)` support back for BC - * add "methods" dep, remove internal methods module - * update connect dep - * update auth example to utilize cores pbkdf2 - * updated tests to use "supertest" - -3.0.0beta4 / 2012-06-25 -================== - - * Added `req.auth` - * Added `req.range(size)` - * Added `res.links(obj)` - * Added `res.send(body, status)` support back for backwards compat - * Added `.default()` support to `res.format()` - * Added 2xx / 304 check to `req.fresh` - * Revert "Added + support to the router" - * Fixed `res.send()` freshness check, respect res.statusCode - -3.0.0beta3 / 2012-06-15 -================== - - * Added hogan `--hjs` to express(1) [nullfirm] - * Added another example to content-negotiation - * Added `fresh` dep - * Changed: `res.send()` always checks freshness - * Fixed: expose connects mime module. Cloases #1165 - -3.0.0beta2 / 2012-06-06 -================== - - * Added `+` support to the router - * Added `req.host` - * Changed `req.param()` to check route first - * Update connect dep - -3.0.0beta1 / 2012-06-01 -================== - - * Added `res.format()` callback to override default 406 behaviour - * Fixed `res.redirect()` 406. Closes #1154 - -3.0.0alpha5 / 2012-05-30 -================== - - * Added `req.ip` - * Added `{ signed: true }` option to `res.cookie()` - * Removed `res.signedCookie()` - * Changed: dont reverse `req.ips` - * Fixed "trust proxy" setting check for `req.ips` - -3.0.0alpha4 / 2012-05-09 -================== - - * Added: allow `[]` in jsonp callback. Closes #1128 - * Added `PORT` env var support in generated template. Closes #1118 [benatkin] - * Updated: connect 2.2.2 - -3.0.0alpha3 / 2012-05-04 -================== - - * Added public `app.routes`. Closes #887 - * Added _view-locals_ example - * Added _mvc_ example - * Added `res.locals.use()`. Closes #1120 - * Added conditional-GET support to `res.send()` - * Added: coerce `res.set()` values to strings - * Changed: moved `static()` in generated apps below router - * Changed: `res.send()` only set ETag when not previously set - * Changed connect 2.2.1 dep - * Changed: `make test` now runs unit / acceptance tests - * Fixed req/res proto inheritance - -3.0.0alpha2 / 2012-04-26 -================== - - * Added `make benchmark` back - * Added `res.send()` support for `String` objects - * Added client-side data exposing example - * Added `res.header()` and `req.header()` aliases for BC - * Added `express.createServer()` for BC - * Perf: memoize parsed urls - * Perf: connect 2.2.0 dep - * Changed: make `expressInit()` middleware self-aware - * Fixed: use app.get() for all core settings - * Fixed redis session example - * Fixed session example. Closes #1105 - * Fixed generated express dep. Closes #1078 - -3.0.0alpha1 / 2012-04-15 -================== - - * Added `app.locals.use(callback)` - * Added `app.locals` object - * Added `app.locals(obj)` - * Added `res.locals` object - * Added `res.locals(obj)` - * Added `res.format()` for content-negotiation - * Added `app.engine()` - * Added `res.cookie()` JSON cookie support - * Added "trust proxy" setting - * Added `req.subdomains` - * Added `req.protocol` - * Added `req.secure` - * Added `req.path` - * Added `req.ips` - * Added `req.fresh` - * Added `req.stale` - * Added comma-delmited / array support for `req.accepts()` - * Added debug instrumentation - * Added `res.set(obj)` - * Added `res.set(field, value)` - * Added `res.get(field)` - * Added `app.get(setting)`. Closes #842 - * Added `req.acceptsLanguage()` - * Added `req.acceptsCharset()` - * Added `req.accepted` - * Added `req.acceptedLanguages` - * Added `req.acceptedCharsets` - * Added "json replacer" setting - * Added "json spaces" setting - * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 - * Added `--less` support to express(1) - * Added `express.response` prototype - * Added `express.request` prototype - * Added `express.application` prototype - * Added `app.path()` - * Added `app.render()` - * Added `res.type()` to replace `res.contentType()` - * Changed: `res.redirect()` to add relative support - * Changed: enable "jsonp callback" by default - * Changed: renamed "case sensitive routes" to "case sensitive routing" - * Rewrite of all tests with mocha - * Removed "root" setting - * Removed `res.redirect('home')` support - * Removed `req.notify()` - * Removed `app.register()` - * Removed `app.redirect()` - * Removed `app.is()` - * Removed `app.helpers()` - * Removed `app.dynamicHelpers()` - * Fixed `res.sendfile()` with non-GET. Closes #723 - * Fixed express(1) public dir for windows. Closes #866 - -2.5.9/ 2012-04-02 -================== - - * Added support for PURGE request method [pbuyle] - * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] - -2.5.8 / 2012-02-08 -================== - - * Update mkdirp dep. Closes #991 - -2.5.7 / 2012-02-06 -================== - - * Fixed `app.all` duplicate DELETE requests [mscdex] - -2.5.6 / 2012-01-13 -================== - - * Updated hamljs dev dep. Closes #953 - -2.5.5 / 2012-01-08 -================== - - * Fixed: set `filename` on cached templates [matthewleon] - -2.5.4 / 2012-01-02 -================== - - * Fixed `express(1)` eol on 0.4.x. Closes #947 - -2.5.3 / 2011-12-30 -================== - - * Fixed `req.is()` when a charset is present - -2.5.2 / 2011-12-10 -================== - - * Fixed: express(1) LF -> CRLF for windows - -2.5.1 / 2011-11-17 -================== - - * Changed: updated connect to 1.8.x - * Removed sass.js support from express(1) - -2.5.0 / 2011-10-24 -================== - - * Added ./routes dir for generated app by default - * Added npm install reminder to express(1) app gen - * Added 0.5.x support - * Removed `make test-cov` since it wont work with node 0.5.x - * Fixed express(1) public dir for windows. Closes #866 - -2.4.7 / 2011-10-05 -================== - - * Added mkdirp to express(1). Closes #795 - * Added simple _json-config_ example - * Added shorthand for the parsed request's pathname via `req.path` - * Changed connect dep to 1.7.x to fix npm issue... - * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] - * Fixed `req.flash()`, only escape args - * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] - -2.4.6 / 2011-08-22 -================== - - * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] - -2.4.5 / 2011-08-19 -================== - - * Added support for routes to handle errors. Closes #809 - * Added `app.routes.all()`. Closes #803 - * Added "basepath" setting to work in conjunction with reverse proxies etc. - * Refactored `Route` to use a single array of callbacks - * Added support for multiple callbacks for `app.param()`. Closes #801 -Closes #805 - * Changed: removed .call(self) for route callbacks - * Dependency: `qs >= 0.3.1` - * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 - -2.4.4 / 2011-08-05 -================== - - * Fixed `res.header()` intention of a set, even when `undefined` - * Fixed `*`, value no longer required - * Fixed `res.send(204)` support. Closes #771 - -2.4.3 / 2011-07-14 -================== - - * Added docs for `status` option special-case. Closes #739 - * Fixed `options.filename`, exposing the view path to template engines - -2.4.2. / 2011-07-06 -================== - - * Revert "removed jsonp stripping" for XSS - -2.4.1 / 2011-07-06 -================== - - * Added `res.json()` JSONP support. Closes #737 - * Added _extending-templates_ example. Closes #730 - * Added "strict routing" setting for trailing slashes - * Added support for multiple envs in `app.configure()` calls. Closes #735 - * Changed: `res.send()` using `res.json()` - * Changed: when cookie `path === null` don't default it - * Changed; default cookie path to "home" setting. Closes #731 - * Removed _pids/logs_ creation from express(1) - -2.4.0 / 2011-06-28 -================== - - * Added chainable `res.status(code)` - * Added `res.json()`, an explicit version of `res.send(obj)` - * Added simple web-service example - -2.3.12 / 2011-06-22 -================== - - * \#express is now on freenode! come join! - * Added `req.get(field, param)` - * Added links to Japanese documentation, thanks @hideyukisaito! - * Added; the `express(1)` generated app outputs the env - * Added `content-negotiation` example - * Dependency: connect >= 1.5.1 < 2.0.0 - * Fixed view layout bug. Closes #720 - * Fixed; ignore body on 304. Closes #701 - -2.3.11 / 2011-06-04 -================== - - * Added `npm test` - * Removed generation of dummy test file from `express(1)` - * Fixed; `express(1)` adds express as a dep - * Fixed; prune on `prepublish` - -2.3.10 / 2011-05-27 -================== - - * Added `req.route`, exposing the current route - * Added _package.json_ generation support to `express(1)` - * Fixed call to `app.param()` function for optional params. Closes #682 - -2.3.9 / 2011-05-25 -================== - - * Fixed bug-ish with `../' in `res.partial()` calls - -2.3.8 / 2011-05-24 -================== - - * Fixed `app.options()` - -2.3.7 / 2011-05-23 -================== - - * Added route `Collection`, ex: `app.get('/user/:id').remove();` - * Added support for `app.param(fn)` to define param logic - * Removed `app.param()` support for callback with return value - * Removed module.parent check from express(1) generated app. Closes #670 - * Refactored router. Closes #639 - -2.3.6 / 2011-05-20 -================== - - * Changed; using devDependencies instead of git submodules - * Fixed redis session example - * Fixed markdown example - * Fixed view caching, should not be enabled in development - -2.3.5 / 2011-05-20 -================== - - * Added export `.view` as alias for `.View` - -2.3.4 / 2011-05-08 -================== - - * Added `./examples/say` - * Fixed `res.sendfile()` bug preventing the transfer of files with spaces - -2.3.3 / 2011-05-03 -================== - - * Added "case sensitive routes" option. - * Changed; split methods supported per rfc [slaskis] - * Fixed route-specific middleware when using the same callback function several times - -2.3.2 / 2011-04-27 -================== - - * Fixed view hints - -2.3.1 / 2011-04-26 -================== - - * Added `app.match()` as `app.match.all()` - * Added `app.lookup()` as `app.lookup.all()` - * Added `app.remove()` for `app.remove.all()` - * Added `app.remove.VERB()` - * Fixed template caching collision issue. Closes #644 - * Moved router over from connect and started refactor - -2.3.0 / 2011-04-25 -================== - - * Added options support to `res.clearCookie()` - * Added `res.helpers()` as alias of `res.locals()` - * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` - * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] - * Renamed "cache views" to "view cache". Closes #628 - * Fixed caching of views when using several apps. Closes #637 - * Fixed gotcha invoking `app.param()` callbacks once per route middleware. -Closes #638 - * Fixed partial lookup precedence. Closes #631 -Shaw] - -2.2.2 / 2011-04-12 -================== - - * Added second callback support for `res.download()` connection errors - * Fixed `filename` option passing to template engine - -2.2.1 / 2011-04-04 -================== - - * Added `layout(path)` helper to change the layout within a view. Closes #610 - * Fixed `partial()` collection object support. - Previously only anything with `.length` would work. - When `.length` is present one must still be aware of holes, - however now `{ collection: {foo: 'bar'}}` is valid, exposes - `keyInCollection` and `keysInCollection`. - - * Performance improved with better view caching - * Removed `request` and `response` locals - * Changed; errorHandler page title is now `Express` instead of `Connect` - -2.2.0 / 2011-03-30 -================== - - * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 - * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 - * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. - * Dependency `connect >= 1.2.0` - -2.1.1 / 2011-03-29 -================== - - * Added; expose `err.view` object when failing to locate a view - * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] - * Fixed; `res.send(undefined)` responds with 204 [aheckmann] - -2.1.0 / 2011-03-24 -================== - - * Added `/_?` partial lookup support. Closes #447 - * Added `request`, `response`, and `app` local variables - * Added `settings` local variable, containing the app's settings - * Added `req.flash()` exception if `req.session` is not available - * Added `res.send(bool)` support (json response) - * Fixed stylus example for latest version - * Fixed; wrap try/catch around `res.render()` - -2.0.0 / 2011-03-17 -================== - - * Fixed up index view path alternative. - * Changed; `res.locals()` without object returns the locals - -2.0.0rc3 / 2011-03-17 -================== - - * Added `res.locals(obj)` to compliment `res.local(key, val)` - * Added `res.partial()` callback support - * Fixed recursive error reporting issue in `res.render()` - -2.0.0rc2 / 2011-03-17 -================== - - * Changed; `partial()` "locals" are now optional - * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] - * Fixed .filename view engine option [reported by drudge] - * Fixed blog example - * Fixed `{req,res}.app` reference when mounting [Ben Weaver] - -2.0.0rc / 2011-03-14 -================== - - * Fixed; expose `HTTPSServer` constructor - * Fixed express(1) default test charset. Closes #579 [reported by secoif] - * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] - -2.0.0beta3 / 2011-03-09 -================== - - * Added support for `res.contentType()` literal - The original `res.contentType('.json')`, - `res.contentType('application/json')`, and `res.contentType('json')` - will work now. - * Added `res.render()` status option support back - * Added charset option for `res.render()` - * Added `.charset` support (via connect 1.0.4) - * Added view resolution hints when in development and a lookup fails - * Added layout lookup support relative to the page view. - For example while rendering `./views/user/index.jade` if you create - `./views/user/layout.jade` it will be used in favour of the root layout. - * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] - * Fixed; default `res.send()` string charset to utf8 - * Removed `Partial` constructor (not currently used) - -2.0.0beta2 / 2011-03-07 -================== - - * Added res.render() `.locals` support back to aid in migration process - * Fixed flash example - -2.0.0beta / 2011-03-03 -================== - - * Added HTTPS support - * Added `res.cookie()` maxAge support - * Added `req.header()` _Referrer_ / _Referer_ special-case, either works - * Added mount support for `res.redirect()`, now respects the mount-point - * Added `union()` util, taking place of `merge(clone())` combo - * Added stylus support to express(1) generated app - * Added secret to session middleware used in examples and generated app - * Added `res.local(name, val)` for progressive view locals - * Added default param support to `req.param(name, default)` - * Added `app.disabled()` and `app.enabled()` - * Added `app.register()` support for omitting leading ".", either works - * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 - * Added `app.param()` to map route params to async/sync logic - * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 - * Added extname with no leading "." support to `res.contentType()` - * Added `cache views` setting, defaulting to enabled in "production" env - * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. - * Added `req.accepts()` support for extensions - * Changed; `res.download()` and `res.sendfile()` now utilize Connect's - static file server `connect.static.send()`. - * Changed; replaced `connect.utils.mime()` with npm _mime_ module - * Changed; allow `req.query` to be pre-defined (via middleware or other parent - * Changed view partial resolution, now relative to parent view - * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. - * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 - * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` - * Fixed; using _qs_ module instead of _querystring_ - * Fixed; strip unsafe chars from jsonp callbacks - * Removed "stream threshold" setting - -1.0.8 / 2011-03-01 -================== - - * Allow `req.query` to be pre-defined (via middleware or other parent app) - * "connect": ">= 0.5.0 < 1.0.0". Closes #547 - * Removed the long deprecated __EXPRESS_ENV__ support - -1.0.7 / 2011-02-07 -================== - - * Fixed `render()` setting inheritance. - Mounted apps would not inherit "view engine" - -1.0.6 / 2011-02-07 -================== - - * Fixed `view engine` setting bug when period is in dirname - -1.0.5 / 2011-02-05 -================== - - * Added secret to generated app `session()` call - -1.0.4 / 2011-02-05 -================== - - * Added `qs` dependency to _package.json_ - * Fixed namespaced `require()`s for latest connect support - -1.0.3 / 2011-01-13 -================== - - * Remove unsafe characters from JSONP callback names [Ryan Grove] - -1.0.2 / 2011-01-10 -================== - - * Removed nested require, using `connect.router` - -1.0.1 / 2010-12-29 -================== - - * Fixed for middleware stacked via `createServer()` - previously the `foo` middleware passed to `createServer(foo)` - would not have access to Express methods such as `res.send()` - or props like `req.query` etc. - -1.0.0 / 2010-11-16 -================== - - * Added; deduce partial object names from the last segment. - For example by default `partial('forum/post', postObject)` will - give you the _post_ object, providing a meaningful default. - * Added http status code string representation to `res.redirect()` body - * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. - * Added `req.is()` to aid in content negotiation - * Added partial local inheritance [suggested by masylum]. Closes #102 - providing access to parent template locals. - * Added _-s, --session[s]_ flag to express(1) to add session related middleware - * Added _--template_ flag to express(1) to specify the - template engine to use. - * Added _--css_ flag to express(1) to specify the - stylesheet engine to use (or just plain css by default). - * Added `app.all()` support [thanks aheckmann] - * Added partial direct object support. - You may now `partial('user', user)` providing the "user" local, - vs previously `partial('user', { object: user })`. - * Added _route-separation_ example since many people question ways - to do this with CommonJS modules. Also view the _blog_ example for - an alternative. - * Performance; caching view path derived partial object names - * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 - * Fixed jsonp support; _text/javascript_ as per mailinglist discussion - -1.0.0rc4 / 2010-10-14 -================== - - * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 - * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) - * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] - * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] - * Added `partial()` support for array-like collections. Closes #434 - * Added support for swappable querystring parsers - * Added session usage docs. Closes #443 - * Added dynamic helper caching. Closes #439 [suggested by maritz] - * Added authentication example - * Added basic Range support to `res.sendfile()` (and `res.download()` etc) - * Changed; `express(1)` generated app using 2 spaces instead of 4 - * Default env to "development" again [aheckmann] - * Removed _context_ option is no more, use "scope" - * Fixed; exposing _./support_ libs to examples so they can run without installs - * Fixed mvc example - -1.0.0rc3 / 2010-09-20 -================== - - * Added confirmation for `express(1)` app generation. Closes #391 - * Added extending of flash formatters via `app.flashFormatters` - * Added flash formatter support. Closes #411 - * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" - * Added _stream threshold_ setting for `res.sendfile()` - * Added `res.send()` __HEAD__ support - * Added `res.clearCookie()` - * Added `res.cookie()` - * Added `res.render()` headers option - * Added `res.redirect()` response bodies - * Added `res.render()` status option support. Closes #425 [thanks aheckmann] - * Fixed `res.sendfile()` responding with 403 on malicious path - * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ - * Fixed; mounted apps settings now inherit from parent app [aheckmann] - * Fixed; stripping Content-Length / Content-Type when 204 - * Fixed `res.send()` 204. Closes #419 - * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 - * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] - - -1.0.0rc2 / 2010-08-17 -================== - - * Added `app.register()` for template engine mapping. Closes #390 - * Added `res.render()` callback support as second argument (no options) - * Added callback support to `res.download()` - * Added callback support for `res.sendfile()` - * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` - * Added "partials" setting to docs - * Added default expresso tests to `express(1)` generated app. Closes #384 - * Fixed `res.sendfile()` error handling, defer via `next()` - * Fixed `res.render()` callback when a layout is used [thanks guillermo] - * Fixed; `make install` creating ~/.node_libraries when not present - * Fixed issue preventing error handlers from being defined anywhere. Closes #387 - -1.0.0rc / 2010-07-28 -================== - - * Added mounted hook. Closes #369 - * Added connect dependency to _package.json_ - - * Removed "reload views" setting and support code - development env never caches, production always caches. - - * Removed _param_ in route callbacks, signature is now - simply (req, res, next), previously (req, res, params, next). - Use _req.params_ for path captures, _req.query_ for GET params. - - * Fixed "home" setting - * Fixed middleware/router precedence issue. Closes #366 - * Fixed; _configure()_ callbacks called immediately. Closes #368 - -1.0.0beta2 / 2010-07-23 -================== - - * Added more examples - * Added; exporting `Server` constructor - * Added `Server#helpers()` for view locals - * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 - * Added support for absolute view paths - * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 - * Added Guillermo Rauch to the contributor list - * Added support for "as" for non-collection partials. Closes #341 - * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] - * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] - * Fixed instanceof `Array` checks, now `Array.isArray()` - * Fixed express(1) expansion of public dirs. Closes #348 - * Fixed middleware precedence. Closes #345 - * Fixed view watcher, now async [thanks aheckmann] - -1.0.0beta / 2010-07-15 -================== - - * Re-write - - much faster - - much lighter - - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs - -0.14.0 / 2010-06-15 -================== - - * Utilize relative requires - * Added Static bufferSize option [aheckmann] - * Fixed caching of view and partial subdirectories [aheckmann] - * Fixed mime.type() comments now that ".ext" is not supported - * Updated haml submodule - * Updated class submodule - * Removed bin/express - -0.13.0 / 2010-06-01 -================== - - * Added node v0.1.97 compatibility - * Added support for deleting cookies via Request#cookie('key', null) - * Updated haml submodule - * Fixed not-found page, now using using charset utf-8 - * Fixed show-exceptions page, now using using charset utf-8 - * Fixed view support due to fs.readFile Buffers - * Changed; mime.type() no longer accepts ".type" due to node extname() changes - -0.12.0 / 2010-05-22 -================== - - * Added node v0.1.96 compatibility - * Added view `helpers` export which act as additional local variables - * Updated haml submodule - * Changed ETag; removed inode, modified time only - * Fixed LF to CRLF for setting multiple cookies - * Fixed cookie complation; values are now urlencoded - * Fixed cookies parsing; accepts quoted values and url escaped cookies - -0.11.0 / 2010-05-06 -================== - - * Added support for layouts using different engines - - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) - - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' - - this.render('page.html.haml', { layout: false }) // no layout - * Updated ext submodule - * Updated haml submodule - * Fixed EJS partial support by passing along the context. Issue #307 - -0.10.1 / 2010-05-03 -================== - - * Fixed binary uploads. - -0.10.0 / 2010-04-30 -================== - - * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s - encoding is set to 'utf8' or 'utf-8'. - * Added "encoding" option to Request#render(). Closes #299 - * Added "dump exceptions" setting, which is enabled by default. - * Added simple ejs template engine support - * Added error reponse support for text/plain, application/json. Closes #297 - * Added callback function param to Request#error() - * Added Request#sendHead() - * Added Request#stream() - * Added support for Request#respond(304, null) for empty response bodies - * Added ETag support to Request#sendfile() - * Added options to Request#sendfile(), passed to fs.createReadStream() - * Added filename arg to Request#download() - * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request - * Performance enhanced by preventing several calls to toLowerCase() in Router#match() - * Changed; Request#sendfile() now streams - * Changed; Renamed Request#halt() to Request#respond(). Closes #289 - * Changed; Using sys.inspect() instead of JSON.encode() for error output - * Changed; run() returns the http.Server instance. Closes #298 - * Changed; Defaulting Server#host to null (INADDR_ANY) - * Changed; Logger "common" format scale of 0.4f - * Removed Logger "request" format - * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found - * Fixed several issues with http client - * Fixed Logger Content-Length output - * Fixed bug preventing Opera from retaining the generated session id. Closes #292 - -0.9.0 / 2010-04-14 -================== - - * Added DSL level error() route support - * Added DSL level notFound() route support - * Added Request#error() - * Added Request#notFound() - * Added Request#render() callback function. Closes #258 - * Added "max upload size" setting - * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 - * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js - * Added callback function support to Request#halt() as 3rd/4th arg - * Added preprocessing of route param wildcards using param(). Closes #251 - * Added view partial support (with collections etc) - * Fixed bug preventing falsey params (such as ?page=0). Closes #286 - * Fixed setting of multiple cookies. Closes #199 - * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) - * Changed; session cookie is now httpOnly - * Changed; Request is no longer global - * Changed; Event is no longer global - * Changed; "sys" module is no longer global - * Changed; moved Request#download to Static plugin where it belongs - * Changed; Request instance created before body parsing. Closes #262 - * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 - * Changed; Pre-caching view partials in memory when "cache view partials" is enabled - * Updated support to node --version 0.1.90 - * Updated dependencies - * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) - * Removed utils.mixin(); use Object#mergeDeep() - -0.8.0 / 2010-03-19 -================== - - * Added coffeescript example app. Closes #242 - * Changed; cache api now async friendly. Closes #240 - * Removed deprecated 'express/static' support. Use 'express/plugins/static' - -0.7.6 / 2010-03-19 -================== - - * Added Request#isXHR. Closes #229 - * Added `make install` (for the executable) - * Added `express` executable for setting up simple app templates - * Added "GET /public/*" to Static plugin, defaulting to /public - * Added Static plugin - * Fixed; Request#render() only calls cache.get() once - * Fixed; Namespacing View caches with "view:" - * Fixed; Namespacing Static caches with "static:" - * Fixed; Both example apps now use the Static plugin - * Fixed set("views"). Closes #239 - * Fixed missing space for combined log format - * Deprecated Request#sendfile() and 'express/static' - * Removed Server#running - -0.7.5 / 2010-03-16 -================== - - * Added Request#flash() support without args, now returns all flashes - * Updated ext submodule - -0.7.4 / 2010-03-16 -================== - - * Fixed session reaper - * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) - -0.7.3 / 2010-03-16 -================== - - * Added package.json - * Fixed requiring of haml / sass due to kiwi removal - -0.7.2 / 2010-03-16 -================== - - * Fixed GIT submodules (HAH!) - -0.7.1 / 2010-03-16 -================== - - * Changed; Express now using submodules again until a PM is adopted - * Changed; chat example using millisecond conversions from ext - -0.7.0 / 2010-03-15 -================== - - * Added Request#pass() support (finds the next matching route, or the given path) - * Added Logger plugin (default "common" format replaces CommonLogger) - * Removed Profiler plugin - * Removed CommonLogger plugin - -0.6.0 / 2010-03-11 -================== - - * Added seed.yml for kiwi package management support - * Added HTTP client query string support when method is GET. Closes #205 - - * Added support for arbitrary view engines. - For example "foo.engine.html" will now require('engine'), - the exports from this module are cached after the first require(). - - * Added async plugin support - - * Removed usage of RESTful route funcs as http client - get() etc, use http.get() and friends - - * Removed custom exceptions - -0.5.0 / 2010-03-10 -================== - - * Added ext dependency (library of js extensions) - * Removed extname() / basename() utils. Use path module - * Removed toArray() util. Use arguments.values - * Removed escapeRegexp() util. Use RegExp.escape() - * Removed process.mixin() dependency. Use utils.mixin() - * Removed Collection - * Removed ElementCollection - * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) - -0.4.0 / 2010-02-11 -================== - - * Added flash() example to sample upload app - * Added high level restful http client module (express/http) - * Changed; RESTful route functions double as HTTP clients. Closes #69 - * Changed; throwing error when routes are added at runtime - * Changed; defaulting render() context to the current Request. Closes #197 - * Updated haml submodule - -0.3.0 / 2010-02-11 -================== - - * Updated haml / sass submodules. Closes #200 - * Added flash message support. Closes #64 - * Added accepts() now allows multiple args. fixes #117 - * Added support for plugins to halt. Closes #189 - * Added alternate layout support. Closes #119 - * Removed Route#run(). Closes #188 - * Fixed broken specs due to use(Cookie) missing - -0.2.1 / 2010-02-05 -================== - - * Added "plot" format option for Profiler (for gnuplot processing) - * Added request number to Profiler plugin - * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8 - * Fixed issue with routes not firing when not files are present. Closes #184 - * Fixed process.Promise -> events.Promise - -0.2.0 / 2010-02-03 -================== - - * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 - * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 - * Added expiration support to cache api with reaper. Closes #133 - * Added cache Store.Memory#reap() - * Added Cache; cache api now uses first class Cache instances - * Added abstract session Store. Closes #172 - * Changed; cache Memory.Store#get() utilizing Collection - * Renamed MemoryStore -> Store.Memory - * Fixed use() of the same plugin several time will always use latest options. Closes #176 - -0.1.0 / 2010-02-03 -================== - - * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context - * Updated node support to 0.1.27 Closes #169 - * Updated dirname(__filename) -> __dirname - * Updated libxmljs support to v0.2.0 - * Added session support with memory store / reaping - * Added quick uid() helper - * Added multi-part upload support - * Added Sass.js support / submodule - * Added production env caching view contents and static files - * Added static file caching. Closes #136 - * Added cache plugin with memory stores - * Added support to StaticFile so that it works with non-textual files. - * Removed dirname() helper - * Removed several globals (now their modules must be required) - -0.0.2 / 2010-01-10 -================== - - * Added view benchmarks; currently haml vs ejs - * Added Request#attachment() specs. Closes #116 - * Added use of node's parseQuery() util. Closes #123 - * Added `make init` for submodules - * Updated Haml - * Updated sample chat app to show messages on load - * Updated libxmljs parseString -> parseHtmlString - * Fixed `make init` to work with older versions of git - * Fixed specs can now run independant specs for those who cant build deps. Closes #127 - * Fixed issues introduced by the node url module changes. Closes 126. - * Fixed two assertions failing due to Collection#keys() returning strings - * Fixed faulty Collection#toArray() spec due to keys() returning strings - * Fixed `make test` now builds libxmljs.node before testing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/LICENSE b/org.nodeclipse.bundle.express/express/LICENSE deleted file mode 100644 index 36075a3b..00000000 --- a/org.nodeclipse.bundle.express/express/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2011 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/Makefile b/org.nodeclipse.bundle.express/express/Makefile deleted file mode 100644 index 228f299a..00000000 --- a/org.nodeclipse.bundle.express/express/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -MOCHA_OPTS= --check-leaks -REPORTER = dot - -check: test - -test: test-unit test-acceptance - -test-unit: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - $(MOCHA_OPTS) - -test-acceptance: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - --bail \ - test/acceptance/*.js - -test-cov: lib-cov - @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html - -lib-cov: - @jscoverage lib lib-cov - -benchmark: - @./support/bench - -clean: - rm -f coverage.html - rm -fr lib-cov - -.PHONY: test test-unit test-acceptance benchmark clean diff --git a/org.nodeclipse.bundle.express/express/Readme.md b/org.nodeclipse.bundle.express/express/Readme.md deleted file mode 100644 index 00158b89..00000000 --- a/org.nodeclipse.bundle.express/express/Readme.md +++ /dev/null @@ -1,179 +0,0 @@ -![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png) - - Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) [![Dependency Status](https://gemnasium.com/visionmedia/express.png)](https://gemnasium.com/visionmedia/express) - -```js -var express = require('express'); -var app = express(); - -app.get('/', function(req, res){ - res.send('Hello World'); -}); - -app.listen(3000); -``` - -## Installation - - $ npm install -g express - -## Quick Start - - The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below: - - Create the app: - - $ npm install -g express - $ express /tmp/foo && cd /tmp/foo - - Install dependencies: - - $ npm install - - Start the server: - - $ node app - -## Features - - * Built on [Connect](http://github.com/senchalabs/connect) - * Robust routing - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Focus on high performance - * Environment based configuration - * Executable for generating applications quickly - * High test coverage - -## Philosophy - - The Express philosophy is to provide small, robust tooling for HTTP servers. Making - it a great solution for single page applications, web sites, hybrids, or public - HTTP APIs. - - Built on Connect you can use _only_ what you need, and nothing more, applications - can be as big or as small as you like, even a single file. Express does - not force you to use any specific ORM or template engine. With support for over - 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js) - you can quickly craft your perfect framework. - -## More Information - - * Join #express on freenode - * [Google Group](http://groups.google.com/group/express-js) for discussion - * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates - * Visit the [Wiki](http://github.com/visionmedia/express/wiki) - * [Русскоязычная документация](http://jsman.ru/express/) - * Run express examples [online](https://runnable.com/express) - -## Viewing Examples - -Clone the Express repo, then install the dev dependencies to install all the example / test suite deps: - - $ git clone git://github.com/visionmedia/express.git --depth 1 - $ cd express - $ npm install - -then run whichever tests you want: - - $ node examples/content-negotiation - -## Running Tests - -To run the test suite first invoke the following command within the repo, installing the development dependencies: - - $ npm install - -then run the tests: - - $ make test - -## Contributors - -``` -project: express -commits: 3559 -active : 468 days -files : 237 -authors: - 1891 Tj Holowaychuk 53.1% - 1285 visionmedia 36.1% - 182 TJ Holowaychuk 5.1% - 54 Aaron Heckmann 1.5% - 34 csausdev 1.0% - 26 ciaranj 0.7% - 21 Robert Sköld 0.6% - 6 Guillermo Rauch 0.2% - 3 Dav Glass 0.1% - 3 Nick Poulden 0.1% - 2 Randy Merrill 0.1% - 2 Benny Wong 0.1% - 2 Hunter Loftis 0.1% - 2 Jake Gordon 0.1% - 2 Brian McKinney 0.1% - 2 Roman Shtylman 0.1% - 2 Ben Weaver 0.1% - 2 Dave Hoover 0.1% - 2 Eivind Fjeldstad 0.1% - 2 Daniel Shaw 0.1% - 1 Matt Colyer 0.0% - 1 Pau Ramon 0.0% - 1 Pero Pejovic 0.0% - 1 Peter Rekdal Sunde 0.0% - 1 Raynos 0.0% - 1 Teng Siong Ong 0.0% - 1 Viktor Kelemen 0.0% - 1 ctide 0.0% - 1 8bitDesigner 0.0% - 1 isaacs 0.0% - 1 mgutz 0.0% - 1 pikeas 0.0% - 1 shuwatto 0.0% - 1 tstrimple 0.0% - 1 ewoudj 0.0% - 1 Adam Sanderson 0.0% - 1 Andrii Kostenko 0.0% - 1 Andy Hiew 0.0% - 1 Arpad Borsos 0.0% - 1 Ashwin Purohit 0.0% - 1 Benjen 0.0% - 1 Darren Torpey 0.0% - 1 Greg Ritter 0.0% - 1 Gregory Ritter 0.0% - 1 James Herdman 0.0% - 1 Jim Snodgrass 0.0% - 1 Joe McCann 0.0% - 1 Jonathan Dumaine 0.0% - 1 Jonathan Palardy 0.0% - 1 Jonathan Zacsh 0.0% - 1 Justin Lilly 0.0% - 1 Ken Sato 0.0% - 1 Maciej Małecki 0.0% - 1 Masahiro Hayashi 0.0% -``` - -## License - -(The MIT License) - -Copyright (c) 2009-2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/bin/express b/org.nodeclipse.bundle.express/express/bin/express deleted file mode 100755 index d3df7d14..00000000 --- a/org.nodeclipse.bundle.express/express/bin/express +++ /dev/null @@ -1,422 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var exec = require('child_process').exec - , program = require('commander') - , mkdirp = require('mkdirp') - , pkg = require('../package.json') - , version = pkg.version - , os = require('os') - , fs = require('fs'); - -// CLI - -program - .version(version) - .option('-s, --sessions', 'add session support') - .option('-e, --ejs', 'add ejs engine support (defaults to jade)') - .option('-J, --jshtml', 'add jshtml engine support (defaults to jade)') - .option('-H, --hogan', 'add hogan.js engine support') - .option('-c, --css ', 'add stylesheet support (less|stylus) (defaults to plain css)') - .option('-f, --force', 'force on non-empty directory') - .parse(process.argv); - -// Path - -var path = program.args.shift() || '.'; - -// end-of-line code - -var eol = os.EOL - -// Template engine - -program.template = 'jade'; -if (program.ejs) program.template = 'ejs'; -if (program.jshtml) program.template = 'jshtml'; -if (program.hogan) program.template = 'hjs'; - -/** - * Routes index template. - */ - -var index = [ - '' - , '/*' - , ' * GET home page.' - , ' */' - , '' - , 'exports.index = function(req, res){' - , ' res.render(\'index\', { title: \'Express\' });' - , '};' -].join(eol); - -/** - * Routes users template. - */ - -var users = [ - '' - , '/*' - , ' * GET users listing.' - , ' */' - , '' - , 'exports.list = function(req, res){' - , ' res.send("respond with a resource");' - , '};' -].join(eol); - -/** - * Jade layout template. - */ - -var jadeLayout = [ - 'doctype html' - , 'html' - , ' head' - , ' title= title' - , ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')' - , ' body' - , ' block content' -].join(eol); - -/** - * Jade index template. - */ - -var jadeIndex = [ - 'extends layout' - , '' - , 'block content' - , ' h1= title' - , ' p Welcome to #{title}' -].join(eol); - -/** - * EJS index template. - */ - -var ejsIndex = [ - '' - , '' - , ' ' - , ' <%= title %>' - , ' ' - , ' ' - , ' ' - , '

<%= title %>

' - , '

Welcome to <%= title %>

' - , ' ' - , '' -].join(eol); - -/** - * JSHTML layout template. - */ - -var jshtmlLayout = [ - '' - , '' - , ' ' - , ' @write(title) ' - , ' ' - , ' ' - , ' ' - , ' @write(body)' - , ' ' - , '' -].join(eol); - -/** - * JSHTML index template. - */ - -var jshtmlIndex = [ - '

@write(title)

' - , '

Welcome to @write(title)

' -].join(eol); - -/** - * Hogan.js index template. - */ -var hoganIndex = [ - '' - , '' - , ' ' - , ' {{ title }}' - , ' ' - , ' ' - , ' ' - , '

{{ title }}

' - , '

Welcome to {{ title }}

' - , ' ' - , '' -].join(eol); - -/** - * Default css template. - */ - -var css = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default less template. - */ - -var less = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default stylus template. - */ - -var stylus = [ - 'body' - , ' padding: 50px' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif' - , 'a' - , ' color: #00B7FF' -].join(eol); - -/** - * App template. - */ - -var app = [ - '' - , '/**' - , ' * Module dependencies.' - , ' */' - , '' - , 'var express = require(\'express\')' - , ' , routes = require(\'./routes\')' - , ' , user = require(\'./routes/user\')' - , ' , http = require(\'http\')' - , ' , path = require(\'path\');' - , '' - , 'var app = express();' - , '' - , '// all environments' - , 'app.set(\'port\', process.env.PORT || 3000);' - , 'app.set(\'views\', __dirname + \'/views\');' - , 'app.set(\'view engine\', \':TEMPLATE\');' - , 'app.use(express.favicon());' - , 'app.use(express.logger(\'dev\'));' - , 'app.use(express.bodyParser());' - , 'app.use(express.methodOverride());{sess}' - , 'app.use(app.router);{css}' - , 'app.use(express.static(path.join(__dirname, \'public\')));' - , '' - , '// development only' - , 'if (\'development\' == app.get(\'env\')) {' - , ' app.use(express.errorHandler());' - , '}' - , '' - , 'app.get(\'/\', routes.index);' - , 'app.get(\'/users\', user.list);' - , '' - , 'http.createServer(app).listen(app.get(\'port\'), function(){' - , ' console.log(\'Express server listening on port \' + app.get(\'port\'));' - , '});' - , '' -].join(eol); - -// Generate application - -(function createApplication(path) { - emptyDirectory(path, function(empty){ - if (empty || program.force) { - createApplicationAt(path); - } else { - program.confirm('destination is not empty, continue? ', function(ok){ - if (ok) { - process.stdin.destroy(); - createApplicationAt(path); - } else { - abort('aborting'); - } - }); - } - }); -})(path); - -/** - * Create application at the given directory `path`. - * - * @param {String} path - */ - -function createApplicationAt(path) { - console.log(); - process.on('exit', function(){ - console.log(); - console.log(' install dependencies:'); - console.log(' $ cd %s && npm install', path); - console.log(); - console.log(' run the app:'); - console.log(' $ node app'); - console.log(); - }); - - mkdir(path, function(){ - mkdir(path + '/public'); - mkdir(path + '/public/javascripts'); - mkdir(path + '/public/images'); - mkdir(path + '/public/stylesheets', function(){ - switch (program.css) { - case 'less': - write(path + '/public/stylesheets/style.less', less); - break; - case 'stylus': - write(path + '/public/stylesheets/style.styl', stylus); - break; - default: - write(path + '/public/stylesheets/style.css', css); - } - }); - - mkdir(path + '/routes', function(){ - write(path + '/routes/index.js', index); - write(path + '/routes/user.js', users); - }); - - mkdir(path + '/views', function(){ - switch (program.template) { - case 'ejs': - write(path + '/views/index.ejs', ejsIndex); - break; - case 'jade': - write(path + '/views/layout.jade', jadeLayout); - write(path + '/views/index.jade', jadeIndex); - break; - case 'jshtml': - write(path + '/views/layout.jshtml', jshtmlLayout); - write(path + '/views/index.jshtml', jshtmlIndex); - break; - case 'hjs': - write(path + '/views/index.hjs', hoganIndex); - break; - - } - }); - - // CSS Engine support - switch (program.css) { - case 'less': - app = app.replace('{css}', eol + 'app.use(require(\'less-middleware\')({ src: __dirname + \'/public\' }));'); - break; - case 'stylus': - app = app.replace('{css}', eol + 'app.use(require(\'stylus\').middleware(__dirname + \'/public\'));'); - break; - default: - app = app.replace('{css}', ''); - } - - // Session support - app = app.replace('{sess}', program.sessions - ? eol + 'app.use(express.cookieParser(\'your secret here\'));' + eol + 'app.use(express.session());' - : ''); - - // Template support - app = app.replace(':TEMPLATE', program.template); - - // package.json - var pkg = { - name: 'application-name' - , version: '0.0.1' - , private: true - , scripts: { start: 'node app.js' } - , dependencies: { - express: version - } - } - - if (program.template) pkg.dependencies[program.template] = '*'; - - // CSS Engine support - switch (program.css) { - case 'less': - pkg.dependencies['less-middleware'] = '*'; - break; - default: - if (program.css) { - pkg.dependencies[program.css] = '*'; - } - } - - write(path + '/package.json', JSON.stringify(pkg, null, 2)); - write(path + '/app.js', app); - }); -} - -/** - * Check if the given directory `path` is empty. - * - * @param {String} path - * @param {Function} fn - */ - -function emptyDirectory(path, fn) { - fs.readdir(path, function(err, files){ - if (err && 'ENOENT' != err.code) throw err; - fn(!files || !files.length); - }); -} - -/** - * echo str > path. - * - * @param {String} path - * @param {String} str - */ - -function write(path, str) { - fs.writeFile(path, str); - console.log(' \x1b[36mcreate\x1b[0m : ' + path); -} - -/** - * Mkdir -p. - * - * @param {String} path - * @param {Function} fn - */ - -function mkdir(path, fn) { - mkdirp(path, 0755, function(err){ - if (err) throw err; - console.log(' \033[36mcreate\033[0m : ' + path); - fn && fn(); - }); -} - -/** - * Exit with the given `str`. - * - * @param {String} str - */ - -function abort(str) { - console.error(str); - process.exit(1); -} diff --git a/org.nodeclipse.bundle.express/express/index.js b/org.nodeclipse.bundle.express/express/index.js deleted file mode 100644 index bfe99345..00000000 --- a/org.nodeclipse.bundle.express/express/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.EXPRESS_COV - ? require('./lib-cov/express') - : require('./lib/express'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/lib/application.js b/org.nodeclipse.bundle.express/express/lib/application.js deleted file mode 100644 index 6a3cf138..00000000 --- a/org.nodeclipse.bundle.express/express/lib/application.js +++ /dev/null @@ -1,536 +0,0 @@ -/** - * Module dependencies. - */ - -var connect = require('connect') - , Router = require('./router') - , methods = require('methods') - , middleware = require('./middleware') - , debug = require('debug')('express:application') - , locals = require('./utils').locals - , View = require('./view') - , utils = connect.utils - , path = require('path') - , http = require('http') - , join = path.join; - -/** - * Application prototype. - */ - -var app = exports = module.exports = {}; - -/** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - * - * @api private - */ - -app.init = function(){ - this.cache = {}; - this.settings = {}; - this.engines = {}; - this.defaultConfiguration(); -}; - -/** - * Initialize application configuration. - * - * @api private - */ - -app.defaultConfiguration = function(){ - // default settings - this.enable('x-powered-by'); - this.set('env', process.env.NODE_ENV || 'development'); - this.set('subdomain offset', 2); - debug('booting in %s mode', this.get('env')); - - // implicit middleware - this.use(connect.query()); - this.use(middleware.init(this)); - - // inherit protos - this.on('mount', function(parent){ - this.request.__proto__ = parent.request; - this.response.__proto__ = parent.response; - this.engines.__proto__ = parent.engines; - this.settings.__proto__ = parent.settings; - }); - - // router - this._router = new Router(this); - this.routes = this._router.map; - this.__defineGetter__('router', function(){ - this._usedRouter = true; - this._router.caseSensitive = this.enabled('case sensitive routing'); - this._router.strict = this.enabled('strict routing'); - return this._router.middleware; - }); - - // setup locals - this.locals = locals(this); - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('view', View); - this.set('views', process.cwd() + '/views'); - this.set('jsonp callback name', 'callback'); - - this.configure('development', function(){ - this.set('json spaces', 2); - }); - - this.configure('production', function(){ - this.enable('view cache'); - }); -}; - -/** - * Proxy `connect#use()` to apply settings to - * mounted applications. - * - * @param {String|Function|Server} route - * @param {Function|Server} fn - * @return {app} for chaining - * @api public - */ - -app.use = function(route, fn){ - var app; - - // default route to '/' - if ('string' != typeof route) fn = route, route = '/'; - - // express app - if (fn.handle && fn.set) app = fn; - - // restore .app property on req and res - if (app) { - app.route = route; - fn = function(req, res, next) { - var orig = req.app; - app.handle(req, res, function(err){ - req.app = res.app = orig; - req.__proto__ = orig.request; - res.__proto__ = orig.response; - next(err); - }); - }; - } - - connect.proto.use.call(this, route, fn); - - // mounted an app - if (app) { - app.parent = this; - app.emit('mount', this); - } - - return this; -}; - -/** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.jade" file Express will invoke the following internally: - * - * app.engine('jade', require('jade').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you dont need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/visionmedia/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - * - * @param {String} ext - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.engine = function(ext, fn){ - if ('function' != typeof fn) throw new Error('callback function required'); - if ('.' != ext[0]) ext = '.' + ext; - this.engines[ext] = fn; - return this; -}; - -/** - * Map the given param placeholder `name`(s) to the given callback(s). - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code, - * - * The callback uses the samesignature as middleware, the only differencing - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * next(err); - * } else if (user) { - * req.user = user; - * next(); - * } else { - * next(new Error('failed to load user')); - * } - * }); - * }); - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.param = function(name, fn){ - var self = this - , fns = [].slice.call(arguments, 1); - - // array - if (Array.isArray(name)) { - name.forEach(function(name){ - fns.forEach(function(fn){ - self.param(name, fn); - }); - }); - // param logic - } else if ('function' == typeof name) { - this._router.param(name); - // single - } else { - if (':' == name[0]) name = name.substr(1); - fns.forEach(function(fn){ - self._router.param(name, fn); - }); - } - - return this; -}; - -/** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.get('foo'); - * // => "bar" - * - * Mounted servers inherit their parent server's settings. - * - * @param {String} setting - * @param {String} val - * @return {Server} for chaining - * @api public - */ - -app.set = function(setting, val){ - if (1 == arguments.length) { - return this.settings[setting]; - } else { - this.settings[setting] = val; - return this; - } -}; - -/** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - * - * @return {String} - * @api private - */ - -app.path = function(){ - return this.parent - ? this.parent.path() + this.route - : ''; -}; - -/** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.enabled = function(setting){ - return !!this.set(setting); -}; - -/** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.disabled = function(setting){ - return !this.set(setting); -}; - -/** - * Enable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.enable = function(setting){ - return this.set(setting, true); -}; - -/** - * Disable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.disable = function(setting){ - return this.set(setting, false); -}; - -/** - * Configure callback for zero or more envs, - * when no `env` is specified that callback will - * be invoked for all environments. Any combination - * can be used multiple times, in any order desired. - * - * Examples: - * - * app.configure(function(){ - * // executed for all envs - * }); - * - * app.configure('stage', function(){ - * // executed staging env - * }); - * - * app.configure('stage', 'production', function(){ - * // executed for stage and production - * }); - * - * Note: - * - * These callbacks are invoked immediately, and - * are effectively sugar for the following: - * - * var env = process.env.NODE_ENV || 'development'; - * - * switch (env) { - * case 'development': - * ... - * break; - * case 'stage': - * ... - * break; - * case 'production': - * ... - * break; - * } - * - * @param {String} env... - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.configure = function(env, fn){ - var envs = 'all' - , args = [].slice.call(arguments); - fn = args.pop(); - if (args.length) envs = args; - if ('all' == envs || ~envs.indexOf(this.settings.env)) fn.call(this); - return this; -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function(method){ - app[method] = function(path){ - if ('get' == method && 1 == arguments.length) return this.set(path); - - // deprecated - if (Array.isArray(path)) { - console.trace('passing an array to app.VERB() is deprecated and will be removed in 4.0'); - } - - // if no router attached yet, attach the router - if (!this._usedRouter) this.use(this.router); - - // setup route - this._router[method].apply(this._router, arguments); - return this; - }; -}); - -/** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - * - * @param {String} path - * @param {Function} ... - * @return {app} for chaining - * @api public - */ - -app.all = function(path){ - var args = arguments; - methods.forEach(function(method){ - app[method].apply(this, args); - }, this); - return this; -}; - -// del -> delete alias - -app.del = app.delete; - -/** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param {String} name - * @param {String|Function} options or fn - * @param {Function} fn - * @api public - */ - -app.render = function(name, options, fn){ - var opts = {} - , cache = this.cache - , engines = this.engines - , view; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge app.locals - utils.merge(opts, this.locals); - - // merge options._locals - if (options._locals) utils.merge(opts, options._locals); - - // merge options - utils.merge(opts, options); - - // set .cache unless explicitly provided - opts.cache = null == opts.cache - ? this.enabled('view cache') - : opts.cache; - - // primed cache - if (opts.cache) view = cache[name]; - - // view - if (!view) { - view = new (this.get('view'))(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var err = new Error('Failed to lookup view "' + name + '"'); - err.view = view; - return fn(err); - } - - // prime the cache - if (opts.cache) cache[name] = view; - } - - // render - try { - view.render(opts, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/org.nodeclipse.bundle.express/express/lib/express.js b/org.nodeclipse.bundle.express/express/lib/express.js deleted file mode 100644 index f4258f12..00000000 --- a/org.nodeclipse.bundle.express/express/lib/express.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Module dependencies. - */ - -var connect = require('connect') - , proto = require('./application') - , Route = require('./router/route') - , Router = require('./router') - , req = require('./request') - , res = require('./response') - , utils = connect.utils; - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Framework version. - */ - -exports.version = '3.2.5'; - -/** - * Expose mime. - */ - -exports.mime = connect.mime; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = connect(); - utils.merge(app, proto); - app.request = { __proto__: req }; - app.response = { __proto__: res }; - app.init(); - return app; -} - -/** - * Expose connect.middleware as express.* - * for example `express.logger` etc. - */ - -for (var key in connect.middleware) { - Object.defineProperty( - exports - , key - , Object.getOwnPropertyDescriptor(connect.middleware, key)); -} - -/** - * Error on createServer(). - */ - -exports.createServer = function(){ - console.warn('Warning: express.createServer() is deprecated, express'); - console.warn('applications no longer inherit from http.Server,'); - console.warn('please use:'); - console.warn(''); - console.warn(' var express = require("express");'); - console.warn(' var app = express();'); - console.warn(''); - return createApplication(); -}; - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -// Error handler title - -exports.errorHandler.title = 'Express'; - diff --git a/org.nodeclipse.bundle.express/express/lib/middleware.js b/org.nodeclipse.bundle.express/express/lib/middleware.js deleted file mode 100644 index 308c5bb6..00000000 --- a/org.nodeclipse.bundle.express/express/lib/middleware.js +++ /dev/null @@ -1,33 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('./utils'); - -/** - * Initialization middleware, exposing the - * request and response to eachother, as well - * as defaulting the X-Powered-By header field. - * - * @param {Function} app - * @return {Function} - * @api private - */ - -exports.init = function(app){ - return function expressInit(req, res, next){ - req.app = res.app = app; - if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); - req.res = res; - res.req = req; - req.next = next; - - req.__proto__ = app.request; - res.__proto__ = app.response; - - res.locals = res.locals || utils.locals(res); - - next(); - } -}; diff --git a/org.nodeclipse.bundle.express/express/lib/request.js b/org.nodeclipse.bundle.express/express/lib/request.js deleted file mode 100644 index 1205c6c2..00000000 --- a/org.nodeclipse.bundle.express/express/lib/request.js +++ /dev/null @@ -1,527 +0,0 @@ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , connect = require('connect') - , fresh = require('fresh') - , parseRange = require('range-parser') - , parse = connect.utils.parseUrl - , mime = connect.mime; - -/** - * Request prototype. - */ - -var req = exports = module.exports = { - __proto__: http.IncomingMessage.prototype -}; - -/** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - * - * @param {String} name - * @return {String} - * @api public - */ - -req.get = -req.header = function(name){ - switch (name = name.toLowerCase()) { - case 'referer': - case 'referrer': - return this.headers.referrer - || this.headers.referer; - default: - return this.headers[name]; - } -}; - -/** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json", a comma-delimted list such as "json, html, text/plain", - * or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html, json'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String} - * @api public - */ - -req.accepts = function(type){ - return utils.accepts(type, this.get('Accept')); -}; - -/** - * Check if the given `encoding` is accepted. - * - * @param {String} encoding - * @return {Boolean} - * @api public - */ - -req.acceptsEncoding = function(encoding){ - return ~this.acceptedEncodings.indexOf(encoding); -}; - -/** - * Check if the given `charset` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} charset - * @return {Boolean} - * @api public - */ - -req.acceptsCharset = function(charset){ - var accepted = this.acceptedCharsets; - return accepted.length - ? ~accepted.indexOf(charset) - : true; -}; - -/** - * Check if the given `lang` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} lang - * @return {Boolean} - * @api public - */ - -req.acceptsLanguage = function(lang){ - var accepted = this.acceptedLanguages; - return accepted.length - ? ~accepted.indexOf(lang) - : true; -}; - -/** - * Parse Range header field, - * capping to the given `size`. - * - * Unspecified ranges such as "0-" require - * knowledge of your resource length. In - * the case of a byte range this is of course - * the total number of bytes. If the Range - * header field is not given `null` is returned, - * `-1` when unsatisfiable, `-2` when syntactically invalid. - * - * NOTE: remember that ranges are inclusive, so - * for example "Range: users=0-3" should respond - * with 4 users when available, not 3. - * - * @param {Number} size - * @return {Array} - * @api public - */ - -req.range = function(size){ - var range = this.get('Range'); - if (!range) return; - return parseRange(size, range); -}; - -/** - * Return an array of encodings. - * - * Examples: - * - * ['gzip', 'deflate'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedEncodings', function(){ - var accept = this.get('Accept-Encoding'); - return accept - ? accept.trim().split(/ *, */) - : []; -}); - -/** - * Return an array of Accepted media types - * ordered from highest quality to lowest. - * - * Examples: - * - * [ { value: 'application/json', - * quality: 1, - * type: 'application', - * subtype: 'json' }, - * { value: 'text/html', - * quality: 0.5, - * type: 'text', - * subtype: 'html' } ] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('accepted', function(){ - var accept = this.get('Accept'); - return accept - ? utils.parseAccept(accept) - : []; -}); - -/** - * Return an array of Accepted languages - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Language: en;q=.5, en-us - * ['en-us', 'en'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedLanguages', function(){ - var accept = this.get('Accept-Language'); - return accept - ? utils - .parseParams(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * Return an array of Accepted charsets - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Charset: iso-8859-5;q=.2, unicode-1-1;q=0.8 - * ['unicode-1-1', 'iso-8859-5'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedCharsets', function(){ - var accept = this.get('Accept-Charset'); - return accept - ? utils - .parseParams(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * Return the value of param `name` when present or `defaultValue`. - * - * - Checks route placeholders, ex: _/user/:id_ - * - Checks body params, ex: id=12, {"id":12} - * - Checks query string params, ex: ?id=12 - * - * To utilize request bodies, `req.body` - * should be an object. This can be done by using - * the `connect.bodyParser()` middleware. - * - * @param {String} name - * @param {Mixed} [defaultValue] - * @return {String} - * @api public - */ - -req.param = function(name, defaultValue){ - var params = this.params || {}; - var body = this.body || {}; - var query = this.query || {}; - if (null != params[name] && params.hasOwnProperty(name)) return params[name]; - if (null != body[name]) return body[name]; - if (null != query[name]) return query[name]; - return defaultValue; -}; - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the give mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - * - * @param {String} type - * @return {Boolean} - * @api public - */ - -req.is = function(type){ - var ct = this.get('Content-Type'); - if (!ct) return false; - ct = ct.split(';')[0]; - if (!~type.indexOf('/')) type = mime.lookup(type); - if (~type.indexOf('*')) { - type = type.split('/'); - ct = ct.split('/'); - if ('*' == type[0] && type[1] == ct[1]) return true; - if ('*' == type[1] && type[0] == ct[0]) return true; - return false; - } - return !! ~ct.indexOf(type); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting is enabled the "X-Forwarded-Proto" header - * field will be trusted. If you're running behind - * a reverse proxy that supplies https for you this - * may be enabled. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('protocol', function(){ - var trustProxy = this.app.get('trust proxy'); - return this.connection.encrypted - ? 'https' - : trustProxy - ? (this.get('X-Forwarded-Proto') || 'http') - : 'http'; -}); - -/** - * Short-hand for: - * - * req.protocol == 'https' - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('secure', function(){ - return 'https' == this.protocol; -}); - -/** - * Return the remote address, or when - * "trust proxy" is `true` return - * the upstream addr. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('ip', function(){ - return this.ips[0] || this.connection.remoteAddress; -}); - -/** - * When "trust proxy" is `true`, parse - * the "X-Forwarded-For" ip address list. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream. - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('ips', function(){ - var trustProxy = this.app.get('trust proxy'); - var val = this.get('X-Forwarded-For'); - return trustProxy && val - ? val.split(/ *, */) - : []; -}); - -/** - * Return basic auth credentials. - * - * Examples: - * - * // http://tobi:hello@example.com - * req.auth - * // => { username: 'tobi', password: 'hello' } - * - * @return {Object} or undefined - * @api public - */ - -req.__defineGetter__('auth', function(){ - // missing - var auth = this.get('Authorization'); - if (!auth) return; - - // malformed - var parts = auth.split(' '); - if ('basic' != parts[0].toLowerCase()) return; - if (!parts[1]) return; - auth = parts[1]; - - // credentials - auth = new Buffer(auth, 'base64').toString().match(/^([^:]*):(.*)$/); - if (!auth) return; - return { username: auth[1], password: auth[2] }; -}); - -/** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('subdomains', function(){ - var offset = this.app.get('subdomain offset'); - return (this.host || '') - .split('.') - .reverse() - .slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('path', function(){ - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field hostname. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('host', function(){ - var trustProxy = this.app.get('trust proxy'); - var host = trustProxy && this.get('X-Forwarded-Host'); - host = host || this.get('Host'); - if (!host) return; - return host.split(':')[0]; -}); - -/** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('fresh', function(){ - var method = this.method; - var s = this.res.statusCode; - - // GET or HEAD for weak freshness validation only - if ('GET' != method && 'HEAD' != method) return false; - - // 2xx or 304 as per rfc2616 14.26 - if ((s >= 200 && s < 300) || 304 == s) { - return fresh(this.headers, this.res._headers); - } - - return false; -}); - -/** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('stale', function(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('xhr', function(){ - var val = this.get('X-Requested-With') || ''; - return 'xmlhttprequest' == val.toLowerCase(); -}); diff --git a/org.nodeclipse.bundle.express/express/lib/response.js b/org.nodeclipse.bundle.express/express/lib/response.js deleted file mode 100644 index 68b7266b..00000000 --- a/org.nodeclipse.bundle.express/express/lib/response.js +++ /dev/null @@ -1,757 +0,0 @@ -/** - * Module dependencies. - */ - -var http = require('http') - , path = require('path') - , connect = require('connect') - , utils = connect.utils - , sign = require('cookie-signature').sign - , normalizeType = require('./utils').normalizeType - , normalizeTypes = require('./utils').normalizeTypes - , etag = require('./utils').etag - , statusCodes = http.STATUS_CODES - , cookie = require('cookie') - , send = require('send') - , mime = connect.mime - , basename = path.basename - , extname = path.extname - , join = path.join; - -/** - * Response prototype. - */ - -var res = module.exports = { - __proto__: http.ServerResponse.prototype -}; - -/** - * Set status `code`. - * - * @param {Number} code - * @return {ServerResponse} - * @api public - */ - -res.status = function(code){ - this.statusCode = code; - return this; -}; - -/** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5' - * }); - * - * @param {Object} links - * @return {ServerResponse} - * @api public - */ - -res.links = function(links){ - return this.set('Link', Object.keys(links).map(function(rel){ - return '<' + links[rel] + '>; rel="' + rel + '"'; - }).join(', ')); -}; - -/** - * Send a response. - * - * Examples: - * - * res.send(new Buffer('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * res.send(404, 'Sorry, cant find that'); - * res.send(404); - * - * @param {Mixed} body or status - * @param {Mixed} body - * @return {ServerResponse} - * @api public - */ - -res.send = function(body){ - var req = this.req; - var head = 'HEAD' == req.method; - var len; - - // allow status / body - if (2 == arguments.length) { - // res.send(body, status) backwards compat - if ('number' != typeof body && 'number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = body; - body = arguments[1]; - } - } - - switch (typeof body) { - // response status - case 'number': - this.get('Content-Type') || this.type('txt'); - this.statusCode = body; - body = http.STATUS_CODES[body]; - break; - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.charset = this.charset || 'utf-8'; - this.type('html'); - } - break; - case 'boolean': - case 'object': - if (null == body) { - body = ''; - } else if (Buffer.isBuffer(body)) { - this.get('Content-Type') || this.type('bin'); - } else { - return this.json(body); - } - break; - } - - // populate Content-Length - if (undefined !== body && !this.get('Content-Length')) { - this.set('Content-Length', len = Buffer.isBuffer(body) - ? body.length - : Buffer.byteLength(body)); - } - - // ETag support - // TODO: W/ support - if (len > 1024 && 'GET' == req.method) { - if (!this.get('ETag')) { - this.set('ETag', etag(body)); - } - } - - // freshness - if (req.fresh) this.statusCode = 304; - - // strip irrelevant headers - if (204 == this.statusCode || 304 == this.statusCode) { - this.removeHeader('Content-Type'); - this.removeHeader('Content-Length'); - this.removeHeader('Transfer-Encoding'); - body = ''; - } - - // respond - this.end(head ? null : body); - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * res.json(500, 'oh noes!'); - * res.json(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.json = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces); - - // content-type - this.charset = this.charset || 'utf-8'; - this.get('Content-Type') || this.set('Content-Type', 'application/json'); - - return this.send(body); -}; - -/** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * res.jsonp(500, 'oh noes!'); - * res.jsonp(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.jsonp = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces) - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029'); - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - this.charset = this.charset || 'utf-8'; - this.set('Content-Type', 'application/json'); - - // jsonp - if (callback) { - this.set('Content-Type', 'text/javascript'); - var cb = callback.replace(/[^\[\]\w$.]/g, ''); - body = cb + ' && ' + cb + '(' + body + ');'; - } - - return this.send(body); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.sentHeader` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 - * - `root` root directory for relative filenames - * - * Examples: - * - * The following example illustrates how `res.sendfile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendfile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendfile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @param {String} path - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -res.sendfile = function(path, options, fn){ - var self = this - , req = self.req - , next = this.req.next - , options = options || {} - , done; - - // support function as second arg - if ('function' == typeof options) { - fn = options; - options = {}; - } - - // socket errors - req.socket.on('error', error); - - // errors - function error(err) { - if (done) return; - done = true; - - // clean up - cleanup(); - if (!self.headerSent) self.removeHeader('Content-Disposition'); - - // callback available - if (fn) return fn(err); - - // list in limbo if there's no callback - if (self.headerSent) return; - - // delegate - next(err); - } - - // streaming - function stream() { - if (done) return; - cleanup(); - if (fn) self.on('finish', fn); - } - - // cleanup - function cleanup() { - req.socket.removeListener('error', error); - } - - // transfer - var file = send(req, path); - if (options.root) file.root(options.root); - file.maxage(options.maxAge || 0); - file.on('error', error); - file.on('directory', next); - file.on('stream', stream); - file.pipe(this); - this.on('finish', cleanup); -}; - -/** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `fn(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * ocurred. Be sure to check `res.headerSent` if you plan to respond. - * - * This method uses `res.sendfile()`. - * - * @param {String} path - * @param {String|Function} filename or fn - * @param {Function} fn - * @api public - */ - -res.download = function(path, filename, fn){ - // support function as second arg - if ('function' == typeof filename) { - fn = filename; - filename = null; - } - - filename = filename || path; - this.set('Content-Disposition', 'attachment; filename="' + basename(filename) + '"'); - return this.sendfile(path, fn); -}; - -/** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param {String} type - * @return {ServerResponse} for chaining - * @api public - */ - -res.contentType = -res.type = function(type){ - return this.set('Content-Type', ~type.indexOf('/') - ? type - : mime.lookup(type)); -}; - -/** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'appliation/json': function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param {Object} obj - * @return {ServerResponse} for chaining - * @api public - */ - -res.format = function(obj){ - var req = this.req - , next = req.next; - - var fn = obj.default; - if (fn) delete obj.default; - var keys = Object.keys(obj); - - var key = req.accepts(keys); - - this.set('Vary', 'Accept'); - - if (key) { - this.set('Content-Type', normalizeType(key).value); - obj[key](req, this, next); - } else if (fn) { - fn(); - } else { - var err = new Error('Not Acceptable'); - err.status = 406; - err.types = normalizeTypes(keys).map(function(o){ return o.value }); - next(err); - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @api public - */ - -res.attachment = function(filename){ - if (filename) this.type(extname(filename)); - this.set('Content-Disposition', filename - ? 'attachment; filename="' + basename(filename) + '"' - : 'attachment'); - return this; -}; - -/** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - * - * @param {String|Object|Array} field - * @param {String} val - * @return {ServerResponse} for chaining - * @api public - */ - -res.set = -res.header = function(field, val){ - if (2 == arguments.length) { - if (Array.isArray(val)) val = val.map(String); - else val = String(val); - this.setHeader(field, val); - } else { - for (var key in field) { - this.set(key, field[key]); - } - } - return this; -}; - -/** - * Get value for header `field`. - * - * @param {String} field - * @return {String} - * @api public - */ - -res.get = function(field){ - return this.getHeader(field); -}; - -/** - * Clear cookie `name`. - * - * @param {String} name - * @param {Object} options - * @param {ServerResponse} for chaining - * @api public - */ - -res.clearCookie = function(name, options){ - var opts = { expires: new Date(1), path: '/' }; - return this.cookie(name, '', options - ? utils.merge(opts, options) - : opts); -}; - -/** - * Set cookie `name` to `val`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // save as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - * - * @param {String} name - * @param {String|Object} val - * @param {Options} options - * @api public - */ - -res.cookie = function(name, val, options){ - options = utils.merge({}, options); - var secret = this.req.secret; - var signed = options.signed; - if (signed && !secret) throw new Error('connect.cookieParser("secret") required for signed cookies'); - if ('number' == typeof val) val = val.toString(); - if ('object' == typeof val) val = 'j:' + JSON.stringify(val); - if (signed) val = 's:' + sign(val, secret); - if ('maxAge' in options) { - options.expires = new Date(Date.now() + options.maxAge); - options.maxAge /= 1000; - } - if (null == options.path) options.path = '/'; - this.set('Set-Cookie', cookie.serialize(name, String(val), options)); - return this; -}; - - -/** - * Set the location header to `url`. - * - * The given `url` can also be the name of a mapped url, for - * example by default express supports "back" which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); // /blog/post/1 -> /blog/login - * - * Mounting: - * - * When an application is mounted and `res.location()` - * is given a path that does _not_ lead with "/" it becomes - * relative to the mount-point. For example if the application - * is mounted at "/blog", the following would become "/blog/login". - * - * res.location('login'); - * - * While the leading slash would result in a location of "/login": - * - * res.location('/login'); - * - * @param {String} url - * @api public - */ - -res.location = function(url){ - var app = this.app - , req = this.req; - - // setup redirect map - var map = { back: req.get('Referrer') || '/' }; - - // perform redirect - url = map[url] || url; - - // relative - if (!~url.indexOf('://') && 0 != url.indexOf('//')) { - var path - - // relative to path - if ('.' == url[0]) { - path = req.originalUrl.split('?')[0] - url = path + ('/' == path[path.length - 1] ? '' : '/') + url; - // relative to mount-point - } else if ('/' != url[0]) { - path = app.path(); - url = path + '/' + url; - } - } - - // Respond - this.set('Location', url); - return this; -}; - -/** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('http://example.com', 301); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @param {String} url - * @param {Number} code - * @api public - */ - -res.redirect = function(url){ - var app = this.app - , head = 'HEAD' == this.req.method - , status = 302 - , body; - - // allow status / url - if (2 == arguments.length) { - if ('number' == typeof url) { - status = url; - url = arguments[1]; - } else { - status = arguments[1]; - } - } - - // Set location header - this.location(url); - url = this.get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statusCodes[status] + '. Redirecting to ' + encodeURI(url); - }, - - html: function(){ - var u = utils.escape(url); - body = '

' + statusCodes[status] + '. Redirecting to ' + u + '

'; - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.statusCode = status; - this.set('Content-Length', Buffer.byteLength(body)); - this.end(head ? null : body); -}; - -/** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - * - * @param {String} view - * @param {Object|Function} options or callback function - * @param {Function} fn - * @api public - */ - -res.render = function(view, options, fn){ - var self = this - , options = options || {} - , req = this.req - , app = req.app; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge res.locals - options._locals = self.locals; - - // default callback to respond - fn = fn || function(err, str){ - if (err) return req.next(err); - self.send(str); - }; - - // render - app.render(view, options, fn); -}; diff --git a/org.nodeclipse.bundle.express/express/lib/router/index.js b/org.nodeclipse.bundle.express/express/lib/router/index.js deleted file mode 100644 index 662dc29b..00000000 --- a/org.nodeclipse.bundle.express/express/lib/router/index.js +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Module dependencies. - */ - -var Route = require('./route') - , utils = require('../utils') - , methods = require('methods') - , debug = require('debug')('express:router') - , parse = require('connect').utils.parseUrl; - -/** - * Expose `Router` constructor. - */ - -exports = module.exports = Router; - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {Object} options - * @api private - */ - -function Router(options) { - options = options || {}; - var self = this; - this.map = {}; - this.params = {}; - this._params = []; - this.caseSensitive = options.caseSensitive; - this.strict = options.strict; - this.middleware = function router(req, res, next){ - self._dispatch(req, res, next); - }; -} - -/** - * Register a param callback `fn` for the given `name`. - * - * @param {String|Function} name - * @param {Function} fn - * @return {Router} for chaining - * @api public - */ - -Router.prototype.param = function(name, fn){ - // param logic - if ('function' == typeof name) { - this._params.push(name); - return; - } - - // apply param functions - var params = this._params - , len = params.length - , ret; - - for (var i = 0; i < len; ++i) { - if (ret = params[i](name, fn)) { - fn = ret; - } - } - - // ensure we end up with a - // middleware function - if ('function' != typeof fn) { - throw new Error('invalid param() call for ' + name + ', got ' + fn); - } - - (this.params[name] = this.params[name] || []).push(fn); - return this; -}; - -/** - * Route dispatcher aka the route "middleware". - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @param {Function} next - * @api private - */ - -Router.prototype._dispatch = function(req, res, next){ - var params = this.params - , self = this; - - debug('dispatching %s %s (%s)', req.method, req.url, req.originalUrl); - - // route dispatch - (function pass(i, err){ - var paramCallbacks - , paramIndex = 0 - , paramVal - , route - , keys - , key; - - // match next route - function nextRoute(err) { - pass(req._route_index + 1, err); - } - - // match route - req.route = route = self.matchRequest(req, i); - - // no route - if (!route) return next(err); - debug('matched %s %s', route.method, route.path); - - // we have a route - // start at param 0 - req.params = route.params; - keys = route.keys; - i = 0; - - // param callbacks - function param(err) { - paramIndex = 0; - key = keys[i++]; - paramVal = key && req.params[key.name]; - paramCallbacks = key && params[key.name]; - - try { - if ('route' == err) { - nextRoute(); - } else if (err) { - i = 0; - callbacks(err); - } else if (paramCallbacks && undefined !== paramVal) { - paramCallback(); - } else if (key) { - param(); - } else { - i = 0; - callbacks(); - } - } catch (err) { - param(err); - } - }; - - param(err); - - // single param callbacks - function paramCallback(err) { - var fn = paramCallbacks[paramIndex++]; - if (err || !fn) return param(err); - fn(req, res, paramCallback, paramVal, key.name); - } - - // invoke route callbacks - function callbacks(err) { - var fn = route.callbacks[i++]; - try { - if ('route' == err) { - nextRoute(); - } else if (err && fn) { - if (fn.length < 4) return callbacks(err); - fn(err, req, res, callbacks); - } else if (fn) { - if (fn.length < 4) return fn(req, res, callbacks); - callbacks(); - } else { - nextRoute(err); - } - } catch (err) { - callbacks(err); - } - } - })(0); -}; - -/** - * Attempt to match a route for `req` - * with optional starting index of `i` - * defaulting to 0. - * - * @param {IncomingMessage} req - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.matchRequest = function(req, i, head){ - var method = req.method.toLowerCase() - , url = parse(req) - , path = url.pathname - , routes = this.map - , i = i || 0 - , route; - - // HEAD support - if (!head && 'head' == method) { - route = this.matchRequest(req, i, true); - if (route) return route; - method = 'get'; - } - - // routes for this method - if (routes = routes[method]) { - - // matching routes - for (var len = routes.length; i < len; ++i) { - route = routes[i]; - if (route.match(path)) { - req._route_index = i; - return route; - } - } - } -}; - -/** - * Attempt to match a route for `method` - * and `url` with optional starting - * index of `i` defaulting to 0. - * - * @param {String} method - * @param {String} url - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.match = function(method, url, i, head){ - var req = { method: method, url: url }; - return this.matchRequest(req, i, head); -}; - -/** - * Route `method`, `path`, and one or more callbacks. - * - * @param {String} method - * @param {String} path - * @param {Function} callback... - * @return {Router} for chaining - * @api private - */ - -Router.prototype.route = function(method, path, callbacks){ - var method = method.toLowerCase() - , callbacks = utils.flatten([].slice.call(arguments, 2)); - - // ensure path was given - if (!path) throw new Error('Router#' + method + '() requires a path'); - - // ensure all callbacks are functions - callbacks.forEach(function(fn, i){ - if ('function' == typeof fn) return; - var type = {}.toString.call(fn); - var msg = '.' + method + '() requires callback functions but got a ' + type; - throw new Error(msg); - }); - - // create the route - debug('defined %s %s', method, path); - var route = new Route(method, path, callbacks, { - sensitive: this.caseSensitive, - strict: this.strict - }); - - // add it - (this.map[method] = this.map[method] || []).push(route); - return this; -}; - -methods.forEach(function(method){ - Router.prototype[method] = function(path){ - var args = [method].concat([].slice.call(arguments)); - this.route.apply(this, args); - return this; - }; -}); diff --git a/org.nodeclipse.bundle.express/express/lib/router/route.js b/org.nodeclipse.bundle.express/express/lib/router/route.js deleted file mode 100644 index c1a0b5ea..00000000 --- a/org.nodeclipse.bundle.express/express/lib/router/route.js +++ /dev/null @@ -1,72 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Expose `Route`. - */ - -module.exports = Route; - -/** - * Initialize `Route` with the given HTTP `method`, `path`, - * and an array of `callbacks` and `options`. - * - * Options: - * - * - `sensitive` enable case-sensitive routes - * - `strict` enable strict matching for trailing slashes - * - * @param {String} method - * @param {String} path - * @param {Array} callbacks - * @param {Object} options. - * @api private - */ - -function Route(method, path, callbacks, options) { - options = options || {}; - this.path = path; - this.method = method; - this.callbacks = callbacks; - this.regexp = utils.pathRegexp(path - , this.keys = [] - , options.sensitive - , options.strict); -} - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Route.prototype.match = function(path){ - var keys = this.keys - , params = this.params = [] - , m = this.regexp.exec(path); - - if (!m) return false; - - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - - var val = 'string' == typeof m[i] - ? decodeURIComponent(m[i]) - : m[i]; - - if (key) { - params[key.name] = val; - } else { - params.push(val); - } - } - - return true; -}; diff --git a/org.nodeclipse.bundle.express/express/lib/utils.js b/org.nodeclipse.bundle.express/express/lib/utils.js deleted file mode 100644 index fd245a8f..00000000 --- a/org.nodeclipse.bundle.express/express/lib/utils.js +++ /dev/null @@ -1,313 +0,0 @@ - -/** - * Module dependencies. - */ - -var mime = require('connect').mime - , crc32 = require('buffer-crc32'); - -/** - * toString ref. - */ - -var toString = {}.toString; - -/** - * Return ETag for `body`. - * - * @param {String|Buffer} body - * @return {String} - * @api private - */ - -exports.etag = function(body){ - return '"' + crc32.signed(body) + '"'; -}; - -/** - * Make `locals()` bound to the given `obj`. - * - * This is used for `app.locals` and `res.locals`. - * - * @param {Object} obj - * @return {Function} - * @api private - */ - -exports.locals = function(obj){ - function locals(obj){ - for (var key in obj) locals[key] = obj[key]; - return obj; - }; - - return locals; -}; - -/** - * Check if `path` looks absolute. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -exports.isAbsolute = function(path){ - if ('/' == path[0]) return true; - if (':' == path[1] && '\\' == path[2]) return true; -}; - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = function(arr, ret){ - var ret = ret || [] - , len = arr.length; - for (var i = 0; i < len; ++i) { - if (Array.isArray(arr[i])) { - exports.flatten(arr[i], ret); - } else { - ret.push(arr[i]); - } - } - return ret; -}; - -/** - * Normalize the given `type`, for example "html" becomes "text/html". - * - * @param {String} type - * @return {Object} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') - ? acceptParams(type) - : { value: mime.lookup(type), params: {} }; -}; - -/** - * Normalize `types`, for example "html" becomes "text/html". - * - * @param {Array} types - * @return {Array} - * @api private - */ - -exports.normalizeTypes = function(types){ - var ret = []; - - for (var i = 0; i < types.length; ++i) { - ret.push(exports.normalizeType(types[i])); - } - - return ret; -}; - -/** - * Return the acceptable type in `types`, if any. - * - * @param {Array} types - * @param {String} str - * @return {String} - * @api private - */ - -exports.acceptsArray = function(types, str){ - // accept anything when Accept is not present - if (!str) return types[0]; - - // parse - var accepted = exports.parseAccept(str) - , normalized = exports.normalizeTypes(types) - , len = accepted.length; - - for (var i = 0; i < len; ++i) { - for (var j = 0, jlen = types.length; j < jlen; ++j) { - if (exports.accept(normalized[j], accepted[i])) { - return types[j]; - } - } - } -}; - -/** - * Check if `type(s)` are acceptable based on - * the given `str`. - * - * @param {String|Array} type(s) - * @param {String} str - * @return {Boolean|String} - * @api private - */ - -exports.accepts = function(type, str){ - if ('string' == typeof type) type = type.split(/ *, */); - return exports.acceptsArray(type, str); -}; - -/** - * Check if `type` array is acceptable for `other`. - * - * @param {Object} type - * @param {Object} other - * @return {Boolean} - * @api private - */ - -exports.accept = function(type, other){ - var t = type.value.split('/'); - return (t[0] == other.type || '*' == other.type) - && (t[1] == other.subtype || '*' == other.subtype) - && paramsEqual(type.params, other.params); -}; - -/** - * Check if accept params are equal. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function paramsEqual(a, b){ - return !Object.keys(a).some(function(k) { - return a[k] != b[k]; - }); -} - -/** - * Parse accept `str`, returning - * an array objects containing - * `.type` and `.subtype` along - * with the values provided by - * `parseQuality()`. - * - * @param {Type} name - * @return {Type} - * @api private - */ - -exports.parseAccept = function(str){ - return exports - .parseParams(str) - .map(function(obj){ - var parts = obj.value.split('/'); - obj.type = parts[0]; - obj.subtype = parts[1]; - return obj; - }); -}; - -/** - * Parse quality `str`, returning an - * array of objects with `.value`, - * `.quality` and optional `.params` - * - * @param {String} str - * @return {Array} - * @api private - */ - -exports.parseParams = function(str){ - return str - .split(/ *, */) - .map(acceptParams) - .filter(function(obj){ - return obj.quality; - }) - .sort(function(a, b){ - if (a.quality === b.quality) { - return a.originalIndex - b.originalIndex; - } else { - return b.quality - a.quality; - } - }); -}; - -/** - * Parse accept params `str` returning an - * object with `.value`, `.quality` and `.params`. - * also includes `.originalIndex` for stable sorting - * - * @param {String} str - * @return {Object} - * @api private - */ - -function acceptParams(str, index) { - var parts = str.split(/ *; */); - var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index }; - - for (var i = 1; i < parts.length; ++i) { - var pms = parts[i].split(/ *= */); - if ('q' == pms[0]) { - ret.quality = parseFloat(pms[1]); - } else { - ret.params[pms[0]] = pms[1]; - } - } - - return ret; -} - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Normalize the given path string, - * returning a regular expression. - * - * An empty array should be passed, - * which will contain the placeholder - * key names. For example "/user/:id" will - * then contain ["id"]. - * - * @param {String|RegExp|Array} path - * @param {Array} keys - * @param {Boolean} sensitive - * @param {Boolean} strict - * @return {RegExp} - * @api private - */ - -exports.pathRegexp = function(path, keys, sensitive, strict) { - if (toString.call(path) == '[object RegExp]') return path; - if (Array.isArray(path)) path = '(' + path.join('|') + ')'; - path = path - .concat(strict ? '' : '/?') - .replace(/\/\(/g, '(?:/') - .replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?(\*)?/g, function(_, slash, format, key, capture, optional, star){ - keys.push({ name: key, optional: !! optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')' - + (optional || '') - + (star ? '(/*)?' : ''); - }) - .replace(/([\/.])/g, '\\$1') - .replace(/\*/g, '(.*)'); - return new RegExp('^' + path + '$', sensitive ? '' : 'i'); -} diff --git a/org.nodeclipse.bundle.express/express/lib/view.js b/org.nodeclipse.bundle.express/express/lib/view.js deleted file mode 100644 index b9dc69e0..00000000 --- a/org.nodeclipse.bundle.express/express/lib/view.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Module dependencies. - */ - -var path = require('path') - , fs = require('fs') - , utils = require('./utils') - , dirname = path.dirname - , basename = path.basename - , extname = path.extname - , exists = fs.existsSync || path.existsSync - , join = path.join; - -/** - * Expose `View`. - */ - -module.exports = View; - -/** - * Initialize a new `View` with the given `name`. - * - * Options: - * - * - `defaultEngine` the default template engine name - * - `engines` template engine require() cache - * - `root` root path for view lookup - * - * @param {String} name - * @param {Object} options - * @api private - */ - -function View(name, options) { - options = options || {}; - this.name = name; - this.root = options.root; - var engines = options.engines; - this.defaultEngine = options.defaultEngine; - var ext = this.ext = extname(name); - if (!ext && !this.defaultEngine) throw new Error('No default engine was specified and no extension was provided.'); - if (!ext) name += (ext = this.ext = ('.' != this.defaultEngine[0] ? '.' : '') + this.defaultEngine); - this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express); - this.path = this.lookup(name); -} - -/** - * Lookup view by the given `path` - * - * @param {String} path - * @return {String} - * @api private - */ - -View.prototype.lookup = function(path){ - var ext = this.ext; - - // . - if (!utils.isAbsolute(path)) path = join(this.root, path); - if (exists(path)) return path; - - // /index. - path = join(dirname(path), basename(path, ext), 'index' + ext); - if (exists(path)) return path; -}; - -/** - * Render with the given `options` and callback `fn(err, str)`. - * - * @param {Object} options - * @param {Function} fn - * @api private - */ - -View.prototype.render = function(options, fn){ - this.engine(this.path, options, fn); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.travis.yml deleted file mode 100644 index 7a902e8c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 -notifications: - email: - recipients: - - brianloveswords@gmail.com \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/README.md b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/README.md deleted file mode 100644 index 0d9d8b83..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# buffer-crc32 - -[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // -> - -// has convenience methods for getting signed or unsigned ints -crc32.signed(buf) // -> -1805997238 -crc32.unsigned(buf) // -> 2488970058 - -// will cast to buffer if given a string, so you can -// directly use foreign characters safely -crc32('自動販売機') // -> - -// and works in append mode too -var partialCrc = crc32('hey'); -var partialCrc = crc32(' ', partialCrc); -var partialCrc = crc32('sup', partialCrc); -var partialCrc = crc32(' ', partialCrc); -var finalCrc = crc32('bros', partialCrc); // -> -``` - -# tests -This was tested against the output of zlib's crc32 method. You can run -the tests with`npm test` (requires tap) - -# see also -https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also -supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). - -# license -MIT/X11 diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/index.js b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/index.js deleted file mode 100644 index e29ce3eb..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/index.js +++ /dev/null @@ -1,88 +0,0 @@ -var Buffer = require('buffer').Buffer; - -var CRC_TABLE = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d -]; - -function bufferizeInt(num) { - var tmp = Buffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} - -function _crc32(buf, previous) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - if (Buffer.isBuffer(previous)) { - previous = previous.readUInt32BE(0); - } - var crc = ~~previous ^ -1; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); - } - return (crc ^ -1); -} - -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); -}; -crc32.unsigned = function () { - return _crc32.apply(null, arguments) >>> 0; -}; - -module.exports = crc32; diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/package.json b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/package.json deleted file mode 100644 index e0a2df8d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "author": { - "name": "Brian J. Brennan", - "email": "brianloveswords@gmail.com", - "url": "http://bjb.io" - }, - "name": "buffer-crc32", - "description": "A pure javascript CRC32 algorithm that plays nice with binary data", - "version": "0.2.1", - "contributors": [ - { - "name": "Vladimir Kuznetsov" - } - ], - "homepage": "https://github.com/brianloveswords/buffer-crc32", - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/buffer-crc32.git" - }, - "main": "index.js", - "scripts": { - "test": "./node_modules/.bin/tap tests/*.test.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# buffer-crc32\n\n[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)\n\ncrc32 that works with binary data and fancy character sets, outputs\nbuffer, signed or unsigned data and has tests.\n\nDerived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix\n\n# install\n```\nnpm install buffer-crc32\n```\n\n# example\n```js\nvar crc32 = require('buffer-crc32');\n// works with buffers\nvar buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])\ncrc32(buf) // -> \n\n// has convenience methods for getting signed or unsigned ints\ncrc32.signed(buf) // -> -1805997238\ncrc32.unsigned(buf) // -> 2488970058\n\n// will cast to buffer if given a string, so you can\n// directly use foreign characters safely\ncrc32('自動販売機') // -> \n\n// and works in append mode too\nvar partialCrc = crc32('hey');\nvar partialCrc = crc32(' ', partialCrc);\nvar partialCrc = crc32('sup', partialCrc);\nvar partialCrc = crc32(' ', partialCrc);\nvar finalCrc = crc32('bros', partialCrc); // -> \n```\n\n# tests\nThis was tested against the output of zlib's crc32 method. You can run\nthe tests with`npm test` (requires tap)\n\n# see also\nhttps://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also\nsupports buffer inputs and return unsigned ints (thanks @tjholowaychuk).\n\n# license\nMIT/X11\n", - "readmeFilename": "README.md", - "_id": "buffer-crc32@0.2.1", - "dist": { - "shasum": "f69b85da4d6e160c3d450a41ae7cddb5cbec4c95" - }, - "_from": "buffer-crc32@0.2.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/tests/crc.test.js b/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/tests/crc.test.js deleted file mode 100644 index bb0f9efc..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/buffer-crc32/tests/crc.test.js +++ /dev/null @@ -1,89 +0,0 @@ -var crc32 = require('..'); -var test = require('tap').test; - -test('simple crc32 is no problem', function (t) { - var input = Buffer('hey sup bros'); - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - t.same(crc32(input), expected); - t.end(); -}); - -test('another simple one', function (t) { - var input = Buffer('IEND'); - var expected = Buffer([0xae, 0x42, 0x60, 0x82]); - t.same(crc32(input), expected); - t.end(); -}); - -test('slightly more complex', function (t) { - var input = Buffer([0x00, 0x00, 0x00]); - var expected = Buffer([0xff, 0x41, 0xd9, 0x12]); - t.same(crc32(input), expected); - t.end(); -}); - -test('complex crc32 gets calculated like a champ', function (t) { - var input = Buffer('शीर्षक'); - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('casts to buffer if necessary', function (t) { - var input = 'शीर्षक'; - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('can do signed', function (t) { - var input = 'ham sandwich'; - var expected = -1891873021; - t.same(crc32.signed(input), expected); - t.end(); -}); - -test('can do unsigned', function (t) { - var input = 'bear sandwich'; - var expected = 3711466352; - t.same(crc32.unsigned(input), expected); - t.end(); -}); - - -test('simple crc32 in append mode', function (t) { - var input = [Buffer('hey'), Buffer(' '), Buffer('sup'), Buffer(' '), Buffer('bros')]; - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - for (var crc = 0, i = 0; i < input.length; i++) { - crc = crc32(input[i], crc); - } - t.same(crc, expected); - t.end(); -}); - - -test('can do signed in append mode', function (t) { - var input1 = 'ham'; - var input2 = ' '; - var input3 = 'sandwich'; - var expected = -1891873021; - - var crc = crc32.signed(input1); - crc = crc32.signed(input2, crc); - crc = crc32.signed(input3, crc); - - t.same(crc, expected); - t.end(); -}); - -test('can do unsigned in append mode', function (t) { - var input1 = 'bear san'; - var input2 = 'dwich'; - var expected = 3711466352; - - var crc = crc32.unsigned(input1); - crc = crc32.unsigned(input2, crc); - t.same(crc, expected); - t.end(); -}); - diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/History.md b/org.nodeclipse.bundle.express/express/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/Makefile b/org.nodeclipse.bundle.express/express/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/index.js b/org.nodeclipse.bundle.express/express/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/lib/commander.js b/org.nodeclipse.bundle.express/express/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/commander/package.json b/org.nodeclipse.bundle.express/express/node_modules/commander/package.json deleted file mode 100644 index 93b7e289..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/commander/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "commander@0.6.1", - "dist": { - "shasum": "632891d7a48f964345c9d0d259c666843bd7dee0" - }, - "_from": "commander@0.6.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/.npmignore deleted file mode 100644 index 9046dde5..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -*.markdown -*.md -.git* -Makefile -benchmarks/ -docs/ -examples/ -install.sh -support/ -test/ -.DS_Store -coverage.html diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/connect/.travis.yml deleted file mode 100644 index a12e3f0f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/connect/LICENSE deleted file mode 100644 index 0c5d22d9..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/Readme.md deleted file mode 100644 index 7d65f9c1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/Readme.md +++ /dev/null @@ -1,133 +0,0 @@ -[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect) -# Connect - - Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance "plugins" known as _middleware_. - - Connect is bundled with over _20_ commonly used middleware, including - a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/). - -```js -var connect = require('connect') - , http = require('http'); - -var app = connect() - .use(connect.favicon()) - .use(connect.logger('dev')) - .use(connect.static('public')) - .use(connect.directory('public')) - .use(connect.cookieParser()) - .use(connect.session({ secret: 'my secret here' })) - .use(function(req, res){ - res.end('Hello from Connect!\n'); - }); - -http.createServer(app).listen(3000); -``` - -## Middleware - - - [csrf](http://www.senchalabs.org/connect/csrf.html) - - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html) - - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html) - - [json](http://www.senchalabs.org/connect/json.html) - - [multipart](http://www.senchalabs.org/connect/multipart.html) - - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html) - - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html) - - [directory](http://www.senchalabs.org/connect/directory.html) - - [compress](http://www.senchalabs.org/connect/compress.html) - - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html) - - [favicon](http://www.senchalabs.org/connect/favicon.html) - - [limit](http://www.senchalabs.org/connect/limit.html) - - [logger](http://www.senchalabs.org/connect/logger.html) - - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html) - - [query](http://www.senchalabs.org/connect/query.html) - - [responseTime](http://www.senchalabs.org/connect/responseTime.html) - - [session](http://www.senchalabs.org/connect/session.html) - - [static](http://www.senchalabs.org/connect/static.html) - - [staticCache](http://www.senchalabs.org/connect/staticCache.html) - - [vhost](http://www.senchalabs.org/connect/vhost.html) - - [subdomains](http://www.senchalabs.org/connect/subdomains.html) - - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html) - -## Running Tests - -first: - - $ npm install -d - -then: - - $ make test - -## Authors - - Below is the output from [git-summary](http://github.com/visionmedia/git-extras). - - - project: connect - commits: 2033 - active : 301 days - files : 171 - authors: - 1414 Tj Holowaychuk 69.6% - 298 visionmedia 14.7% - 191 Tim Caswell 9.4% - 51 TJ Holowaychuk 2.5% - 10 Ryan Olds 0.5% - 8 Astro 0.4% - 5 Nathan Rajlich 0.2% - 5 Jakub Nešetřil 0.2% - 3 Daniel Dickison 0.1% - 3 David Rio Deiros 0.1% - 3 Alexander Simmerl 0.1% - 3 Andreas Lind Petersen 0.1% - 2 Aaron Heckmann 0.1% - 2 Jacques Crocker 0.1% - 2 Fabian Jakobs 0.1% - 2 Brian J Brennan 0.1% - 2 Adam Malcontenti-Wilson 0.1% - 2 Glen Mailer 0.1% - 2 James Campos 0.1% - 1 Trent Mick 0.0% - 1 Troy Kruthoff 0.0% - 1 Wei Zhu 0.0% - 1 comerc 0.0% - 1 darobin 0.0% - 1 nateps 0.0% - 1 Marco Sanson 0.0% - 1 Arthur Taylor 0.0% - 1 Aseem Kishore 0.0% - 1 Bart Teeuwisse 0.0% - 1 Cameron Howey 0.0% - 1 Chad Weider 0.0% - 1 Craig Barnes 0.0% - 1 Eran Hammer-Lahav 0.0% - 1 Gregory McWhirter 0.0% - 1 Guillermo Rauch 0.0% - 1 Jae Kwon 0.0% - 1 Jakub Nesetril 0.0% - 1 Joshua Peek 0.0% - 1 Jxck 0.0% - 1 AJ ONeal 0.0% - 1 Michael Hemesath 0.0% - 1 Morten Siebuhr 0.0% - 1 Samori Gorse 0.0% - 1 Tom Jensen 0.0% - -## Node Compatibility - - Connect `< 1.x` is compatible with node 0.2.x - - - Connect `1.x` is compatible with node 0.4.x - - - Connect (_master_) `2.x` is compatible with node 0.6.x - -## CLA - - [http://sencha.com/cla](http://sencha.com/cla) - -## License - -View the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/). diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/index.js deleted file mode 100644 index 23240eed..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.CONNECT_COV - ? require('./lib-cov/connect') - : require('./lib/connect'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/cache.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/cache.js deleted file mode 100644 index 052fcdb3..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/cache.js +++ /dev/null @@ -1,81 +0,0 @@ - -/*! - * Connect - Cache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Expose `Cache`. - */ - -module.exports = Cache; - -/** - * LRU cache store. - * - * @param {Number} limit - * @api private - */ - -function Cache(limit) { - this.store = {}; - this.keys = []; - this.limit = limit; -} - -/** - * Touch `key`, promoting the object. - * - * @param {String} key - * @param {Number} i - * @api private - */ - -Cache.prototype.touch = function(key, i){ - this.keys.splice(i,1); - this.keys.push(key); -}; - -/** - * Remove `key`. - * - * @param {String} key - * @api private - */ - -Cache.prototype.remove = function(key){ - delete this.store[key]; -}; - -/** - * Get the object stored for `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.get = function(key){ - return this.store[key]; -}; - -/** - * Add a cache `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.add = function(key){ - // initialize store - var len = this.keys.push(key); - - // limit reached, invalidate LRU - if (len > this.limit) this.remove(this.keys.shift()); - - var arr = this.store[key] = []; - arr.createdAt = new Date; - return arr; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/connect.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/connect.js deleted file mode 100644 index 72961dca..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/connect.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Connect - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , proto = require('./proto') - , utils = require('./utils') - , path = require('path') - , basename = path.basename - , fs = require('fs'); - -// node patches - -require('./patch'); - -// expose createServer() as the module - -exports = module.exports = createServer; - -/** - * Framework version. - */ - -exports.version = '2.7.11'; - -/** - * Expose mime module. - */ - -exports.mime = require('./middleware/static').mime; - -/** - * Expose the prototype. - */ - -exports.proto = proto; - -/** - * Auto-load middleware getters. - */ - -exports.middleware = {}; - -/** - * Expose utilities. - */ - -exports.utils = utils; - -/** - * Create a new connect server. - * - * @return {Function} - * @api public - */ - -function createServer() { - function app(req, res, next){ app.handle(req, res, next); } - utils.merge(app, proto); - utils.merge(app, EventEmitter.prototype); - app.route = '/'; - app.stack = []; - for (var i = 0; i < arguments.length; ++i) { - app.use(arguments[i]); - } - return app; -}; - -/** - * Support old `.createServer()` method. - */ - -createServer.createServer = createServer; - -/** - * Auto-load bundled middleware with getters. - */ - -fs.readdirSync(__dirname + '/middleware').forEach(function(filename){ - if (!/\.js$/.test(filename)) return; - var name = basename(filename, '.js'); - function load(){ return require('./middleware/' + name); } - exports.middleware.__defineGetter__(name, load); - exports.__defineGetter__(name, load); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/index.js deleted file mode 100644 index 2618ddca..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ - -/** - * Connect is a middleware framework for node, - * shipping with over 18 bundled middleware and a rich selection of - * 3rd-party middleware. - * - * var app = connect() - * .use(connect.logger('dev')) - * .use(connect.static('public')) - * .use(function(req, res){ - * res.end('hello world\n'); - * }) - * .listen(3000); - * - * Installation: - * - * $ npm install connect - * - * Middleware: - * - * - [logger](logger.html) request logger with custom format support - * - [csrf](csrf.html) Cross-site request forgery protection - * - [compress](compress.html) Gzip compression middleware - * - [basicAuth](basicAuth.html) basic http authentication - * - [bodyParser](bodyParser.html) extensible request body parser - * - [json](json.html) application/json parser - * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser - * - [multipart](multipart.html) multipart/form-data parser - * - [timeout](timeout.html) request timeouts - * - [cookieParser](cookieParser.html) cookie parser - * - [session](session.html) session management support with bundled MemoryStore - * - [cookieSession](cookieSession.html) cookie-based session support - * - [methodOverride](methodOverride.html) faux HTTP method support - * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time - * - [staticCache](staticCache.html) memory cache layer for the static() middleware - * - [static](static.html) streaming static file server supporting `Range` and more - * - [directory](directory.html) directory listing middleware - * - [vhost](vhost.html) virtual host sub-domain mapping middleware - * - [favicon](favicon.html) efficient favicon server (with default icon) - * - [limit](limit.html) limit the bytesize of request bodies - * - [query](query.html) automatic querystring parser, populating `req.query` - * - [errorHandler](errorHandler.html) flexible error handler - * - * Links: - * - * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware - * - GitHub [repository](http://github.com/senchalabs/connect) - * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md) - * - */ \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/basicAuth.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/basicAuth.js deleted file mode 100644 index bc7ec97a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/basicAuth.js +++ /dev/null @@ -1,103 +0,0 @@ - -/*! - * Connect - basicAuth - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , unauthorized = utils.unauthorized; - -/** - * Basic Auth: - * - * Enfore basic authentication by providing a `callback(user, pass)`, - * which must return `true` in order to gain access. Alternatively an async - * method is provided as well, invoking `callback(user, pass, callback)`. Populates - * `req.user`. The final alternative is simply passing username / password - * strings. - * - * Simple username and password - * - * connect(connect.basicAuth('username', 'password')); - * - * Callback verification - * - * connect() - * .use(connect.basicAuth(function(user, pass){ - * return 'tj' == user & 'wahoo' == pass; - * })) - * - * Async callback verification, accepting `fn(err, user)`. - * - * connect() - * .use(connect.basicAuth(function(user, pass, fn){ - * User.authenticate({ user: user, pass: pass }, fn); - * })) - * - * @param {Function|String} callback or username - * @param {String} realm - * @api public - */ - -module.exports = function basicAuth(callback, realm) { - var username, password; - - // user / pass strings - if ('string' == typeof callback) { - username = callback; - password = realm; - if ('string' != typeof password) throw new Error('password argument required'); - realm = arguments[2]; - callback = function(user, pass){ - return user == username && pass == password; - } - } - - realm = realm || 'Authorization Required'; - - return function(req, res, next) { - var authorization = req.headers.authorization; - - if (req.user) return next(); - if (!authorization) return unauthorized(res, realm); - - var parts = authorization.split(' '); - - if (parts.length !== 2) return next(utils.error(400)); - - var scheme = parts[0] - , credentials = new Buffer(parts[1], 'base64').toString() - , index = credentials.indexOf(':'); - - if ('Basic' != scheme || index < 0) return next(utils.error(400)); - - var user = credentials.slice(0, index) - , pass = credentials.slice(index + 1); - - // async - if (callback.length >= 3) { - var pause = utils.pause(req); - callback(user, pass, function(err, user){ - if (err || !user) return unauthorized(res, realm); - req.user = req.remoteUser = user; - next(); - pause.resume(); - }); - // sync - } else { - if (callback(user, pass)) { - req.user = req.remoteUser = user; - next(); - } else { - unauthorized(res, realm); - } - } - } -}; - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/bodyParser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/bodyParser.js deleted file mode 100644 index 9f692cdc..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/bodyParser.js +++ /dev/null @@ -1,61 +0,0 @@ - -/*! - * Connect - bodyParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var multipart = require('./multipart') - , urlencoded = require('./urlencoded') - , json = require('./json'); - -/** - * Body parser: - * - * Parse request bodies, supports _application/json_, - * _application/x-www-form-urlencoded_, and _multipart/form-data_. - * - * This is equivalent to: - * - * app.use(connect.json()); - * app.use(connect.urlencoded()); - * app.use(connect.multipart()); - * - * Examples: - * - * connect() - * .use(connect.bodyParser()) - * .use(function(req, res) { - * res.end('viewing user ' + req.body.user.name); - * }); - * - * $ curl -d 'user[name]=tj' http://local/ - * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/ - * - * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function bodyParser(options){ - var _urlencoded = urlencoded(options) - , _multipart = multipart(options) - , _json = json(options); - - return function bodyParser(req, res, next) { - _json(req, res, function(err){ - if (err) return next(err); - _urlencoded(req, res, function(err){ - if (err) return next(err); - _multipart(req, res, next); - }); - }); - } -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/compress.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/compress.js deleted file mode 100644 index 97b24491..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/compress.js +++ /dev/null @@ -1,157 +0,0 @@ -/*! - * Connect - compress - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var zlib = require('zlib'); - -/** - * Supported content-encoding methods. - */ - -exports.methods = { - gzip: zlib.createGzip - , deflate: zlib.createDeflate -}; - -/** - * Default filter function. - */ - -exports.filter = function(req, res){ - return /json|text|javascript/.test(res.getHeader('Content-Type')); -}; - -/** - * Compress: - * - * Compress response data with gzip/deflate. - * - * Filter: - * - * A `filter` callback function may be passed to - * replace the default logic of: - * - * exports.filter = function(req, res){ - * return /json|text|javascript/.test(res.getHeader('Content-Type')); - * }; - * - * Options: - * - * All remaining options are passed to the gzip/deflate - * creation functions. Consult node's docs for additional details. - * - * - `chunkSize` (default: 16*1024) - * - `windowBits` - * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression - * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more - * - `strategy`: compression strategy - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function compress(options) { - options = options || {}; - var names = Object.keys(exports.methods) - , filter = options.filter || exports.filter; - - return function compress(req, res, next){ - var accept = req.headers['accept-encoding'] - , vary = res.getHeader('Vary') - , write = res.write - , end = res.end - , stream - , method; - - // vary - if (!vary) { - res.setHeader('Vary', 'Accept-Encoding'); - } else if (!~vary.indexOf('Accept-Encoding')) { - res.setHeader('Vary', vary + ', Accept-Encoding'); - } - - // see #724 - req.on('close', function(){ - res.write = res.end = function(){}; - }); - - // proxy - - res.write = function(chunk, encoding){ - if (!this.headerSent) this._implicitHeader(); - return stream - ? stream.write(new Buffer(chunk, encoding)) - : write.call(res, chunk, encoding); - }; - - res.end = function(chunk, encoding){ - if (chunk) this.write(chunk, encoding); - return stream - ? stream.end() - : end.call(res); - }; - - res.on('header', function(){ - var encoding = res.getHeader('Content-Encoding') || 'identity'; - - // already encoded - if ('identity' != encoding) return; - - // default request filter - if (!filter(req, res)) return; - - // SHOULD use identity - if (!accept) return; - - // head - if ('HEAD' == req.method) return; - - // default to gzip - if ('*' == accept.trim()) method = 'gzip'; - - // compression method - if (!method) { - for (var i = 0, len = names.length; i < len; ++i) { - if (~accept.indexOf(names[i])) { - method = names[i]; - break; - } - } - } - - // compression method - if (!method) return; - - // compression stream - stream = exports.methods[method](options); - - // header fields - res.setHeader('Content-Encoding', method); - res.removeHeader('Content-Length'); - - // compression - - stream.on('data', function(chunk){ - write.call(res, chunk); - }); - - stream.on('end', function(){ - end.call(res); - }); - - stream.on('drain', function() { - res.emit('drain'); - }); - }); - - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieParser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieParser.js deleted file mode 100644 index 5da23f25..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieParser.js +++ /dev/null @@ -1,62 +0,0 @@ - -/*! - * Connect - cookieParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , cookie = require('cookie'); - -/** - * Cookie parser: - * - * Parse _Cookie_ header and populate `req.cookies` - * with an object keyed by the cookie names. Optionally - * you may enabled signed cookie support by passing - * a `secret` string, which assigns `req.secret` so - * it may be used by other middleware. - * - * Examples: - * - * connect() - * .use(connect.cookieParser('optional secret string')) - * .use(function(req, res, next){ - * res.end(JSON.stringify(req.cookies)); - * }) - * - * @param {String} secret - * @return {Function} - * @api public - */ - -module.exports = function cookieParser(secret){ - return function cookieParser(req, res, next) { - if (req.cookies) return next(); - var cookies = req.headers.cookie; - - req.secret = secret; - req.cookies = {}; - req.signedCookies = {}; - - if (cookies) { - try { - req.cookies = cookie.parse(cookies); - if (secret) { - req.signedCookies = utils.parseSignedCookies(req.cookies, secret); - req.signedCookies = utils.parseJSONCookies(req.signedCookies); - } - req.cookies = utils.parseJSONCookies(req.cookies); - } catch (err) { - err.status = 400; - return next(err); - } - } - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieSession.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieSession.js deleted file mode 100644 index 402fd55f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/cookieSession.js +++ /dev/null @@ -1,117 +0,0 @@ - -/*! - * Connect - cookieSession - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , Cookie = require('./session/cookie') - , debug = require('debug')('connect:cookieSession') - , signature = require('cookie-signature') - , crc32 = require('buffer-crc32'); - -/** - * Cookie Session: - * - * Cookie session middleware. - * - * var app = connect(); - * app.use(connect.cookieParser()); - * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }})); - * - * Options: - * - * - `key` cookie name defaulting to `connect.sess` - * - `secret` prevents cookie tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Clearing sessions: - * - * To clear the session simply set its value to `null`, - * `cookieSession()` will then respond with a 1970 Set-Cookie. - * - * req.session = null; - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function cookieSession(options){ - // TODO: utilize Session/Cookie to unify API - options = options || {}; - var key = options.key || 'connect.sess' - , trustProxy = options.proxy; - - return function cookieSession(req, res, next) { - - // req.secret is for backwards compatibility - var secret = options.secret || req.secret; - if (!secret) throw new Error('`secret` option required for cookie sessions'); - - // default session - req.session = {}; - var cookie = req.session.cookie = new Cookie(options.cookie); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path)) return next(); - - // cookieParser secret - if (!options.secret && req.secret) { - req.session = req.signedCookies[key] || {}; - req.session.cookie = cookie; - } else { - // TODO: refactor - var rawCookie = req.cookies[key]; - if (rawCookie) { - var unsigned = utils.parseSignedCookie(rawCookie, secret); - if (unsigned) { - var originalHash = crc32.signed(unsigned); - req.session = utils.parseJSONCookie(unsigned) || {}; - req.session.cookie = cookie; - } - } - } - - res.on('header', function(){ - // removed - if (!req.session) { - debug('clear session'); - cookie.expires = new Date(0); - res.setHeader('Set-Cookie', cookie.serialize(key, '')); - return; - } - - delete req.session.cookie; - - // check security - var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , secured = cookie.secure && tls; - - // only send secure cookies via https - if (cookie.secure && !secured) return debug('not secured'); - - // serialize - debug('serializing %j', req.session); - var val = 'j:' + JSON.stringify(req.session); - - // compare hashes, no need to set-cookie if unchanged - if (originalHash == crc32.signed(val)) return debug('unmodified session'); - - // set-cookie - val = 's:' + signature.sign(val, secret); - val = cookie.serialize(key, val); - debug('set-cookie %j', cookie); - res.setHeader('Set-Cookie', val); - }); - - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/csrf.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/csrf.js deleted file mode 100644 index e3c353ea..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/csrf.js +++ /dev/null @@ -1,73 +0,0 @@ -/*! - * Connect - csrf - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Anti CSRF: - * - * CRSF protection middleware. - * - * By default this middleware generates a token named "_csrf" - * which should be added to requests which mutate - * state, within a hidden form field, query-string etc. This - * token is validated against the visitor's `req.session._csrf` - * property. - * - * The default `value` function checks `req.body` generated - * by the `bodyParser()` middleware, `req.query` generated - * by `query()`, and the "X-CSRF-Token" header field. - * - * This middleware requires session support, thus should be added - * somewhere _below_ `session()` and `cookieParser()`. - * - * Options: - * - * - `value` a function accepting the request, returning the token - * - * @param {Object} options - * @api public - */ - -module.exports = function csrf(options) { - options = options || {}; - var value = options.value || defaultValue; - - return function(req, res, next){ - // generate CSRF token - var token = req.session._csrf || (req.session._csrf = utils.uid(24)); - - // ignore these methods - if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next(); - - // determine value - var val = value(req); - - // check - if (val != token) return next(utils.error(403)); - - next(); - } -}; - -/** - * Default value function, checking the `req.body` - * and `req.query` for the CSRF token. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -function defaultValue(req) { - return (req.body && req.body._csrf) - || (req.query && req.query._csrf) - || (req.headers['x-csrf-token']); -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/directory.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/directory.js deleted file mode 100644 index 1c925a7d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/directory.js +++ /dev/null @@ -1,229 +0,0 @@ - -/*! - * Connect - directory - * Copyright(c) 2011 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -// TODO: icon / style for directories -// TODO: arrow key navigation -// TODO: make icons extensible - -/** - * Module dependencies. - */ - -var fs = require('fs') - , parse = require('url').parse - , utils = require('../utils') - , path = require('path') - , normalize = path.normalize - , extname = path.extname - , join = path.join; - -/*! - * Icon cache. - */ - -var cache = {}; - -/** - * Directory: - * - * Serve directory listings with the given `root` path. - * - * Options: - * - * - `hidden` display hidden (dot) files. Defaults to false. - * - `icons` display icons. Defaults to false. - * - `filter` Apply this filter function to files. Defaults to false. - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function directory(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('directory() root path required'); - var hidden = options.hidden - , icons = options.icons - , filter = options.filter - , root = normalize(root); - - return function directory(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - - var accept = req.headers.accept || 'text/plain' - , url = parse(req.url) - , dir = decodeURIComponent(url.pathname) - , path = normalize(join(root, dir)) - , originalUrl = parse(req.originalUrl) - , originalDir = decodeURIComponent(originalUrl.pathname) - , showUp = path != root && path != root + '/'; - - // null byte(s), bad request - if (~path.indexOf('\0')) return next(utils.error(400)); - - // malicious path, forbidden - if (0 != path.indexOf(root)) return next(utils.error(403)); - - // check if we have a directory - fs.stat(path, function(err, stat){ - if (err) return 'ENOENT' == err.code - ? next() - : next(err); - - if (!stat.isDirectory()) return next(); - - // fetch files - fs.readdir(path, function(err, files){ - if (err) return next(err); - if (!hidden) files = removeHidden(files); - if (filter) files = files.filter(filter); - files.sort(); - - // content-negotiation - for (var key in exports) { - if (~accept.indexOf(key) || ~accept.indexOf('*/*')) { - exports[key](req, res, files, next, originalDir, showUp, icons); - return; - } - } - - // not acceptable - next(utils.error(406)); - }); - }); - }; -}; - -/** - * Respond with text/html. - */ - -exports.html = function(req, res, files, next, dir, showUp, icons){ - fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){ - if (err) return next(err); - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){ - if (err) return next(err); - if (showUp) files.unshift('..'); - str = str - .replace('{style}', style) - .replace('{files}', html(files, dir, icons)) - .replace('{directory}', dir) - .replace('{linked-path}', htmlPath(dir)); - res.setHeader('Content-Type', 'text/html'); - res.setHeader('Content-Length', str.length); - res.end(str); - }); - }); -}; - -/** - * Respond with application/json. - */ - -exports.json = function(req, res, files){ - files = JSON.stringify(files); - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Respond with text/plain. - */ - -exports.plain = function(req, res, files){ - files = files.join('\n') + '\n'; - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Map html `dir`, returning a linked path. - */ - -function htmlPath(dir) { - var curr = []; - return dir.split('/').map(function(part){ - curr.push(part); - return '' + part + ''; - }).join(' / '); -} - -/** - * Map html `files`, returning an html unordered list. - */ - -function html(files, dir, useIcons) { - return '
    ' + files.map(function(file){ - var icon = '' - , classes = []; - - if (useIcons && '..' != file) { - icon = icons[extname(file)] || icons.default; - icon = ''; - classes.push('icon'); - } - - return '
  • ' - + icon + file + '
  • '; - - }).join('\n') + '
'; -} - -/** - * Load and cache the given `icon`. - * - * @param {String} icon - * @return {String} - * @api private - */ - -function load(icon) { - if (cache[icon]) return cache[icon]; - return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64'); -} - -/** - * Filter "hidden" `files`, aka files - * beginning with a `.`. - * - * @param {Array} files - * @return {Array} - * @api private - */ - -function removeHidden(files) { - return files.filter(function(file){ - return '.' != file[0]; - }); -} - -/** - * Icon map. - */ - -var icons = { - '.js': 'page_white_code_red.png' - , '.c': 'page_white_c.png' - , '.h': 'page_white_h.png' - , '.cc': 'page_white_cplusplus.png' - , '.php': 'page_white_php.png' - , '.rb': 'page_white_ruby.png' - , '.cpp': 'page_white_cplusplus.png' - , '.swf': 'page_white_flash.png' - , '.pdf': 'page_white_acrobat.png' - , 'default': 'page_white.png' -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/errorHandler.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/errorHandler.js deleted file mode 100644 index 4a84edca..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/errorHandler.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Connect - errorHandler - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , fs = require('fs'); - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Error handler: - * - * Development error handler, providing stack traces - * and error message responses for requests accepting text, html, - * or json. - * - * Text: - * - * By default, and when _text/plain_ is accepted a simple stack trace - * or error message will be returned. - * - * JSON: - * - * When _application/json_ is accepted, connect will respond with - * an object in the form of `{ "error": error }`. - * - * HTML: - * - * When accepted connect will output a nice html stack trace. - * - * @return {Function} - * @api public - */ - -exports = module.exports = function errorHandler(){ - return function errorHandler(err, req, res, next){ - if (err.status) res.statusCode = err.status; - if (res.statusCode < 400) res.statusCode = 500; - if ('test' != env) console.error(err.stack); - var accept = req.headers.accept || ''; - // html - if (~accept.indexOf('html')) { - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){ - fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){ - var stack = (err.stack || '') - .split('\n').slice(1) - .map(function(v){ return '
  • ' + v + '
  • '; }).join(''); - html = html - .replace('{style}', style) - .replace('{stack}', stack) - .replace('{title}', exports.title) - .replace('{statusCode}', res.statusCode) - .replace(/\{error\}/g, utils.escape(err.toString())); - res.setHeader('Content-Type', 'text/html; charset=utf-8'); - res.end(html); - }); - }); - // json - } else if (~accept.indexOf('json')) { - var error = { message: err.message, stack: err.stack }; - for (var prop in err) error[prop] = err[prop]; - var json = JSON.stringify({ error: error }); - res.setHeader('Content-Type', 'application/json'); - res.end(json); - // plain text - } else { - res.writeHead(res.statusCode, { 'Content-Type': 'text/plain' }); - res.end(err.stack); - } - }; -}; - -/** - * Template title, framework authors may override this value. - */ - -exports.title = 'Connect'; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/favicon.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/favicon.js deleted file mode 100644 index ef543544..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/favicon.js +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * Connect - favicon - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , utils = require('../utils'); - -/** - * Favicon: - * - * By default serves the connect favicon, or the favicon - * located by the given `path`. - * - * Options: - * - * - `maxAge` cache-control max-age directive, defaulting to 1 day - * - * Examples: - * - * Serve default favicon: - * - * connect() - * .use(connect.favicon()) - * - * Serve favicon before logging for brevity: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger('dev')) - * - * Serve custom favicon: - * - * connect() - * .use(connect.favicon('public/favicon.ico')) - * - * @param {String} path - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function favicon(path, options){ - var options = options || {} - , path = path || __dirname + '/../public/favicon.ico' - , maxAge = options.maxAge || 86400000 - , icon; // favicon cache - - return function favicon(req, res, next){ - if ('/favicon.ico' == req.url) { - if (icon) { - res.writeHead(200, icon.headers); - res.end(icon.body); - } else { - fs.readFile(path, function(err, buf){ - if (err) return next(err); - icon = { - headers: { - 'Content-Type': 'image/x-icon' - , 'Content-Length': buf.length - , 'ETag': '"' + utils.md5(buf) + '"' - , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) - }, - body: buf - }; - res.writeHead(200, icon.headers); - res.end(icon.body); - }); - } - } else { - next(); - } - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/json.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/json.js deleted file mode 100644 index 17e59183..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/json.js +++ /dev/null @@ -1,86 +0,0 @@ - -/*! - * Connect - json - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * JSON: - * - * Parse JSON request bodies, providing the - * parsed object as `req.body`. - * - * Options: - * - * - `strict` when `false` anything `JSON.parse()` accepts will be parsed - * - `reviver` used as the second "reviver" argument for JSON.parse - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - var options = options || {} - , strict = options.strict !== false; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function json(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/json' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - var first = buf.trim()[0]; - - if (0 == buf.length) { - return next(utils.error(400, 'invalid json, empty body')); - } - - if (strict && '{' != first && '[' != first) return next(utils.error(400, 'invalid json')); - try { - req.body = JSON.parse(buf, options.reviver); - } catch (err){ - err.body = buf; - err.status = 400; - return next(err); - } - next(); - }); - }); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/limit.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/limit.js deleted file mode 100644 index 09bd1c47..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/limit.js +++ /dev/null @@ -1,78 +0,0 @@ - -/*! - * Connect - limit - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'), - brokenPause = utils.brokenPause; - -/** - * Limit: - * - * Limit request bodies to the given size in `bytes`. - * - * A string representation of the bytesize may also be passed, - * for example "5mb", "200kb", "1gb", etc. - * - * connect() - * .use(connect.limit('5.5mb')) - * .use(handleImageUpload) - * - * @param {Number|String} bytes - * @return {Function} - * @api public - */ - -module.exports = function limit(bytes){ - if ('string' == typeof bytes) bytes = utils.parseBytes(bytes); - if ('number' != typeof bytes) throw new Error('limit() bytes required'); - return function limit(req, res, next){ - var received = 0 - , len = req.headers['content-length'] - ? parseInt(req.headers['content-length'], 10) - : null; - - // self-awareness - if (req._limit) return next(); - req._limit = true; - - // limit by content-length - if (len && len > bytes) return next(utils.error(413)); - - // limit - if (brokenPause) { - listen(); - } else { - req.on('newListener', function handler(event) { - if (event !== 'data') return; - - req.removeListener('newListener', handler); - // Start listening at the end of the current loop - // otherwise the request will be consumed too early. - // Sideaffect is `limit` will miss the first chunk, - // but that's not a big deal. - // Unfortunately, the tests don't have large enough - // request bodies to test this. - process.nextTick(listen); - }); - }; - - next(); - - function listen() { - req.on('data', function(chunk) { - received += Buffer.isBuffer(chunk) - ? chunk.length : - Buffer.byteLength(chunk); - - if (received > bytes) req.destroy(); - }); - }; - }; -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/logger.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/logger.js deleted file mode 100644 index de722449..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/logger.js +++ /dev/null @@ -1,339 +0,0 @@ -/*! - * Connect - logger - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var bytes = require('bytes'); - -/*! - * Log buffer. - */ - -var buf = []; - -/*! - * Default log buffer duration. - */ - -var defaultBufferDuration = 1000; - -/** - * Logger: - * - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `stream` Output stream, defaults to _stdout_ - * - `buffer` Buffer duration, defaults to 1000ms when _true_ - * - `immediate` Write log line on request instead of response (for response times) - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * Formats: - * - * Pre-defined formats that ship with connect: - * - * - `default` ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"' - * - `short` ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms' - * - `tiny` ':method :url :status :res[content-length] - :response-time ms' - * - `dev` concise output colored by response status for development use - * - * Examples: - * - * connect.logger() // default - * connect.logger('short') - * connect.logger('tiny') - * connect.logger({ immediate: true, format: 'dev' }) - * connect.logger(':method :url - :referrer') - * connect.logger(':req[content-type] -> :res[content-type]') - * connect.logger(function(tokens, req, res){ return 'some format string' }) - * - * Defining Tokens: - * - * To define a token, simply invoke `connect.logger.token()` with the - * name and a callback function. The value returned is then available - * as ":type" in this case. - * - * connect.logger.token('type', function(req, res){ return req.headers['content-type']; }) - * - * Defining Formats: - * - * All default formats are defined this way, however it's public API as well: - * - * connect.logger.format('name', 'string or function') - * - * @param {String|Function|Object} format or options - * @return {Function} - * @api public - */ - -exports = module.exports = function logger(options) { - if ('object' == typeof options) { - options = options || {}; - } else if (options) { - options = { format: options }; - } else { - options = {}; - } - - // output on request instead of response - var immediate = options.immediate; - - // format name - var fmt = exports[options.format] || options.format || exports.default; - - // compile format - if ('function' != typeof fmt) fmt = compile(fmt); - - // options - var stream = options.stream || process.stdout - , buffer = options.buffer; - - // buffering support - if (buffer) { - var realStream = stream - , interval = 'number' == typeof buffer - ? buffer - : defaultBufferDuration; - - // flush interval - setInterval(function(){ - if (buf.length) { - realStream.write(buf.join('')); - buf.length = 0; - } - }, interval); - - // swap the stream - stream = { - write: function(str){ - buf.push(str); - } - }; - } - - return function logger(req, res, next) { - req._startTime = new Date; - - // immediate - if (immediate) { - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - // proxy end to output logging - } else { - var end = res.end; - res.end = function(chunk, encoding){ - res.end = end; - res.end(chunk, encoding); - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - }; - } - - - next(); - }; -}; - -/** - * Compile `fmt` into a function. - * - * @param {String} fmt - * @return {Function} - * @api private - */ - -function compile(fmt) { - fmt = fmt.replace(/"/g, '\\"'); - var js = ' return "' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function(_, name, arg){ - return '"\n + (tokens["' + name + '"](req, res, "' + arg + '") || "-") + "'; - }) + '";' - return new Function('tokens, req, res', js); -}; - -/** - * Define a token function with the given `name`, - * and callback `fn(req, res)`. - * - * @param {String} name - * @param {Function} fn - * @return {Object} exports for chaining - * @api public - */ - -exports.token = function(name, fn) { - exports[name] = fn; - return this; -}; - -/** - * Define a `fmt` with the given `name`. - * - * @param {String} name - * @param {String|Function} fmt - * @return {Object} exports for chaining - * @api public - */ - -exports.format = function(name, str){ - exports[name] = str; - return this; -}; - -/** - * Default format. - */ - -exports.format('default', ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'); - -/** - * Short format. - */ - -exports.format('short', ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms'); - -/** - * Tiny format. - */ - -exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms'); - -/** - * dev (colored) - */ - -exports.format('dev', function(tokens, req, res){ - var status = res.statusCode - , len = parseInt(res.getHeader('Content-Length'), 10) - , color = 32; - - if (status >= 500) color = 31 - else if (status >= 400) color = 33 - else if (status >= 300) color = 36; - - len = isNaN(len) - ? '' - : len = ' - ' + bytes(len); - - return '\033[90m' + req.method - + ' ' + req.originalUrl + ' ' - + '\033[' + color + 'm' + res.statusCode - + ' \033[90m' - + (new Date - req._startTime) - + 'ms' + len - + '\033[0m'; -}); - -/** - * request url - */ - -exports.token('url', function(req){ - return req.originalUrl || req.url; -}); - -/** - * request method - */ - -exports.token('method', function(req){ - return req.method; -}); - -/** - * response time in milliseconds - */ - -exports.token('response-time', function(req){ - return new Date - req._startTime; -}); - -/** - * UTC date - */ - -exports.token('date', function(){ - return new Date().toUTCString(); -}); - -/** - * response status code - */ - -exports.token('status', function(req, res){ - return res.statusCode; -}); - -/** - * normalized referrer - */ - -exports.token('referrer', function(req){ - return req.headers['referer'] || req.headers['referrer']; -}); - -/** - * remote address - */ - -exports.token('remote-addr', function(req){ - if (req.ip) return req.ip; - var sock = req.socket; - if (sock.socket) return sock.socket.remoteAddress; - return sock.remoteAddress; -}); - -/** - * HTTP version - */ - -exports.token('http-version', function(req){ - return req.httpVersionMajor + '.' + req.httpVersionMinor; -}); - -/** - * UA string - */ - -exports.token('user-agent', function(req){ - return req.headers['user-agent']; -}); - -/** - * request header - */ - -exports.token('req', function(req, res, field){ - return req.headers[field.toLowerCase()]; -}); - -/** - * response header - */ - -exports.token('res', function(req, res, field){ - return (res._headers || {})[field.toLowerCase()]; -}); - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/methodOverride.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/methodOverride.js deleted file mode 100644 index aaf4014f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/methodOverride.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - methodOverride - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Method Override: - * - * Provides faux HTTP method support. - * - * Pass an optional `key` to use when checking for - * a method override, othewise defaults to _\_method_. - * The original method is available via `req.originalMethod`. - * - * @param {String} key - * @return {Function} - * @api public - */ - -module.exports = function methodOverride(key){ - key = key || "_method"; - return function methodOverride(req, res, next) { - req.originalMethod = req.originalMethod || req.method; - - // req.body - if (req.body && key in req.body) { - req.method = req.body[key].toUpperCase(); - delete req.body[key]; - // check X-HTTP-Method-Override - } else if (req.headers['x-http-method-override']) { - req.method = req.headers['x-http-method-override'].toUpperCase(); - } - - next(); - }; -}; - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/multipart.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/multipart.js deleted file mode 100644 index 7b26fae8..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/multipart.js +++ /dev/null @@ -1,133 +0,0 @@ -/*! - * Connect - multipart - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var formidable = require('formidable') - , _limit = require('./limit') - , utils = require('../utils') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Multipart: - * - * Parse multipart/form-data request bodies, - * providing the parsed object as `req.body` - * and `req.files`. - * - * Configuration: - * - * The options passed are merged with [formidable](https://github.com/felixge/node-formidable)'s - * `IncomingForm` object, allowing you to configure the upload directory, - * size limits, etc. For example if you wish to change the upload dir do the following. - * - * app.use(connect.multipart({ uploadDir: path })); - * - * Options: - * - * - `limit` byte limit defaulting to none - * - `defer` defers processing and exposes the Formidable form object as `req.form`. - * `next()` is called without waiting for the form's "end" event. - * This option is useful if you need to bind to the "progress" event, for example. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function multipart(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - req.files = req.files || {}; - - if (!utils.hasBody(req)) return next(); - - // ignore GET - if ('GET' == req.method || 'HEAD' == req.method) return next(); - - // check Content-Type - if ('multipart/form-data' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - - var form = new formidable.IncomingForm - , data = {} - , files = {} - , done; - - Object.keys(options).forEach(function(key){ - form[key] = options[key]; - }); - - function ondata(name, val, data){ - if (Array.isArray(data[name])) { - data[name].push(val); - } else if (data[name]) { - data[name] = [data[name], val]; - } else { - data[name] = val; - } - } - - form.on('field', function(name, val){ - ondata(name, val, data); - }); - - form.on('file', function(name, val){ - ondata(name, val, files); - }); - - form.on('error', function(err){ - if (!options.defer) { - err.status = 400; - next(err); - } - done = true; - }); - - form.on('end', function(){ - if (done) return; - try { - req.body = qs.parse(data); - req.files = qs.parse(files); - if (!options.defer) next(); - } catch (err) { - form.emit('error', err); - } - }); - - form.parse(req); - - if (options.defer) { - req.form = form; - next(); - } - }); - } -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/query.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/query.js deleted file mode 100644 index 93fc5d34..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/query.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Connect - query - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var qs = require('qs') - , parse = require('../utils').parseUrl; - -/** - * Query: - * - * Automatically parse the query-string when available, - * populating the `req.query` object. - * - * Examples: - * - * connect() - * .use(connect.query()) - * .use(function(req, res){ - * res.end(JSON.stringify(req.query)); - * }); - * - * The `options` passed are provided to qs.parse function. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options){ - return function query(req, res, next){ - if (!req.query) { - req.query = ~req.url.indexOf('?') - ? qs.parse(parse(req).query, options) - : {}; - } - - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/responseTime.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/responseTime.js deleted file mode 100644 index 62abc049..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/responseTime.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Connect - responseTime - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Reponse time: - * - * Adds the `X-Response-Time` header displaying the response - * duration in milliseconds. - * - * @return {Function} - * @api public - */ - -module.exports = function responseTime(){ - return function(req, res, next){ - var start = new Date; - - if (res._responseTime) return next(); - res._responseTime = true; - - res.on('header', function(){ - var duration = new Date - start; - res.setHeader('X-Response-Time', duration + 'ms'); - }); - - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session.js deleted file mode 100644 index 9be6c8b6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session.js +++ /dev/null @@ -1,356 +0,0 @@ - -/*! - * Connect - session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Session = require('./session/session') - , debug = require('debug')('connect:session') - , MemoryStore = require('./session/memory') - , signature = require('cookie-signature') - , Cookie = require('./session/cookie') - , Store = require('./session/store') - , utils = require('./../utils') - , parse = utils.parseUrl - , crc32 = require('buffer-crc32'); - -// environment - -var env = process.env.NODE_ENV; - -/** - * Expose the middleware. - */ - -exports = module.exports = session; - -/** - * Expose constructors. - */ - -exports.Store = Store; -exports.Cookie = Cookie; -exports.Session = Session; -exports.MemoryStore = MemoryStore; - -/** - * Warning message for `MemoryStore` usage in production. - */ - -var warning = 'Warning: connection.session() MemoryStore is not\n' - + 'designed for a production environment, as it will leak\n' - + 'memory, and will not scale past a single process.'; - -/** - * Session: - * - * Setup session store with the given `options`. - * - * Session data is _not_ saved in the cookie itself, however - * cookies are used, so we must use the [cookieParser()](cookieParser.html) - * middleware _before_ `session()`. - * - * Examples: - * - * connect() - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }})) - * - * Options: - * - * - `key` cookie name defaulting to `connect.sid` - * - `store` session store instance - * - `secret` session cookie is signed with this secret to prevent tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Cookie option: - * - * By default `cookie.maxAge` is `null`, meaning no "expires" parameter is set - * so the cookie becomes a browser-session cookie. When the user closes the - * browser the cookie (and session) will be removed. - * - * ## req.session - * - * To store or access session data, simply use the request property `req.session`, - * which is (generally) serialized as JSON by the store, so nested objects - * are typically fine. For example below is a user-specific view counter: - * - * connect() - * .use(connect.favicon()) - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - * .use(function(req, res, next){ - * var sess = req.session; - * if (sess.views) { - * res.setHeader('Content-Type', 'text/html'); - * res.write('

    views: ' + sess.views + '

    '); - * res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    '); - * res.end(); - * sess.views++; - * } else { - * sess.views = 1; - * res.end('welcome to the session demo. refresh!'); - * } - * } - * )).listen(3000); - * - * ## Session#regenerate() - * - * To regenerate the session simply invoke the method, once complete - * a new SID and `Session` instance will be initialized at `req.session`. - * - * req.session.regenerate(function(err){ - * // will have a new session here - * }); - * - * ## Session#destroy() - * - * Destroys the session, removing `req.session`, will be re-generated next request. - * - * req.session.destroy(function(err){ - * // cannot access session here - * }); - * - * ## Session#reload() - * - * Reloads the session data. - * - * req.session.reload(function(err){ - * // session updated - * }); - * - * ## Session#save() - * - * Save the session. - * - * req.session.save(function(err){ - * // session saved - * }); - * - * ## Session#touch() - * - * Updates the `.maxAge` property. Typically this is - * not necessary to call, as the session middleware does this for you. - * - * ## Session#cookie - * - * Each session has a unique cookie object accompany it. This allows - * you to alter the session cookie per visitor. For example we can - * set `req.session.cookie.expires` to `false` to enable the cookie - * to remain for only the duration of the user-agent. - * - * ## Session#maxAge - * - * Alternatively `req.session.cookie.maxAge` will return the time - * remaining in milliseconds, which we may also re-assign a new value - * to adjust the `.expires` property appropriately. The following - * are essentially equivalent - * - * var hour = 3600000; - * req.session.cookie.expires = new Date(Date.now() + hour); - * req.session.cookie.maxAge = hour; - * - * For example when `maxAge` is set to `60000` (one minute), and 30 seconds - * has elapsed it will return `30000` until the current request has completed, - * at which time `req.session.touch()` is called to reset `req.session.maxAge` - * to its original value. - * - * req.session.cookie.maxAge; - * // => 30000 - * - * Session Store Implementation: - * - * Every session store _must_ implement the following methods - * - * - `.get(sid, callback)` - * - `.set(sid, session, callback)` - * - `.destroy(sid, callback)` - * - * Recommended methods include, but are not limited to: - * - * - `.length(callback)` - * - `.clear(callback)` - * - * For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -function session(options){ - var options = options || {} - , key = options.key || 'connect.sid' - , store = options.store || new MemoryStore - , cookie = options.cookie || {} - , trustProxy = options.proxy - , storeReady = true; - - // notify user that this store is not - // meant for a production environment - if ('production' == env && store instanceof MemoryStore) { - console.warn(warning); - } - - // generates the new session - store.generate = function(req){ - req.sessionID = utils.uid(24); - req.session = new Session(req); - req.session.cookie = new Cookie(cookie); - }; - - store.on('disconnect', function(){ storeReady = false; }); - store.on('connect', function(){ storeReady = true; }); - - return function session(req, res, next) { - // self-awareness - if (req.session) return next(); - - // Handle connection as if there is no session if - // the store has temporarily disconnected etc - if (!storeReady) return debug('store is disconnected'), next(); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path || '/')) return next(); - - // backwards compatibility for signed cookies - // req.secret is passed from the cookie parser middleware - var secret = options.secret || req.secret; - - // ensure secret is available or bail - if (!secret) throw new Error('`secret` option required for sessions'); - - // parse url - var originalHash - , originalId; - - // expose store - req.sessionStore = store; - - // grab the session cookie value and check the signature - var rawCookie = req.cookies[key]; - - // get signedCookies for backwards compat with signed cookies - var unsignedCookie = req.signedCookies[key]; - - if (!unsignedCookie && rawCookie) { - unsignedCookie = utils.parseSignedCookie(rawCookie, secret); - } - - // set-cookie - res.on('header', function(){ - if (!req.session) return; - var cookie = req.session.cookie - , proto = (req.headers['x-forwarded-proto'] || '').split(',')[0].toLowerCase().trim() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , secured = cookie.secure && tls - , isNew = unsignedCookie != req.sessionID; - - // only send secure cookies via https - if (cookie.secure && !secured) return debug('not secured'); - - // long expires, handle expiry server-side - if (!isNew && cookie.hasLongExpires) return debug('already set cookie'); - - // browser-session length cookie - if (null == cookie.expires) { - if (!isNew) return debug('already set browser-session cookie'); - // compare hashes and ids - } else if (originalHash == hash(req.session) && originalId == req.session.id) { - return debug('unmodified session'); - } - - var val = 's:' + signature.sign(req.sessionID, secret); - val = cookie.serialize(key, val); - debug('set-cookie %s', val); - res.setHeader('Set-Cookie', val); - }); - - // proxy end() to commit the session - var end = res.end; - res.end = function(data, encoding){ - res.end = end; - if (!req.session) return res.end(data, encoding); - debug('saving'); - req.session.resetMaxAge(); - req.session.save(function(err){ - if (err) console.error(err.stack); - debug('saved'); - res.end(data, encoding); - }); - }; - - // generate the session - function generate() { - store.generate(req); - } - - // get the sessionID from the cookie - req.sessionID = unsignedCookie; - - // generate a session if the browser doesn't send a sessionID - if (!req.sessionID) { - debug('no SID sent, generating session'); - generate(); - next(); - return; - } - - // generate the session object - var pause = utils.pause(req); - debug('fetching %s', req.sessionID); - store.get(req.sessionID, function(err, sess){ - // proxy to resume() events - var _next = next; - next = function(err){ - _next(err); - pause.resume(); - }; - - // error handling - if (err) { - debug('error %j', err); - if ('ENOENT' == err.code) { - generate(); - next(); - } else { - next(err); - } - // no session - } else if (!sess) { - debug('no session found'); - generate(); - next(); - // populate req.session - } else { - debug('session found'); - store.createSession(req, sess); - originalId = req.sessionID; - originalHash = hash(sess); - next(); - } - }); - }; -}; - -/** - * Hash the given `sess` object omitting changes - * to `.cookie`. - * - * @param {Object} sess - * @return {String} - * @api private - */ - -function hash(sess) { - return crc32.signed(JSON.stringify(sess, function(key, val){ - if ('cookie' != key) return val; - })); -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/cookie.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/cookie.js deleted file mode 100644 index cdce2a5e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/cookie.js +++ /dev/null @@ -1,140 +0,0 @@ - -/*! - * Connect - session - Cookie - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils') - , cookie = require('cookie'); - -/** - * Initialize a new `Cookie` with the given `options`. - * - * @param {IncomingMessage} req - * @param {Object} options - * @api private - */ - -var Cookie = module.exports = function Cookie(options) { - this.path = '/'; - this.maxAge = null; - this.httpOnly = true; - if (options) utils.merge(this, options); - this.originalMaxAge = undefined == this.originalMaxAge - ? this.maxAge - : this.originalMaxAge; -}; - -/*! - * Prototype. - */ - -Cookie.prototype = { - - /** - * Set expires `date`. - * - * @param {Date} date - * @api public - */ - - set expires(date) { - this._expires = date; - this.originalMaxAge = this.maxAge; - }, - - /** - * Get expires `date`. - * - * @return {Date} - * @api public - */ - - get expires() { - return this._expires; - }, - - /** - * Set expires via max-age in `ms`. - * - * @param {Number} ms - * @api public - */ - - set maxAge(ms) { - this.expires = 'number' == typeof ms - ? new Date(Date.now() + ms) - : ms; - }, - - /** - * Get expires max-age in `ms`. - * - * @return {Number} - * @api public - */ - - get maxAge() { - return this.expires instanceof Date - ? this.expires.valueOf() - Date.now() - : this.expires; - }, - - /** - * Return cookie data object. - * - * @return {Object} - * @api private - */ - - get data() { - return { - originalMaxAge: this.originalMaxAge - , expires: this._expires - , secure: this.secure - , httpOnly: this.httpOnly - , domain: this.domain - , path: this.path - } - }, - - /** - * Check if the cookie has a reasonably large max-age. - * - * @return {Boolean} - * @api private - */ - - get hasLongExpires() { - var week = 604800000; - return this.maxAge > (4 * week); - }, - - /** - * Return a serialized cookie string. - * - * @return {String} - * @api public - */ - - serialize: function(name, val){ - return cookie.serialize(name, val, this.data); - }, - - /** - * Return JSON representation of this cookie. - * - * @return {Object} - * @api private - */ - - toJSON: function(){ - return this.data; - } -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/memory.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/memory.js deleted file mode 100644 index fb939392..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/memory.js +++ /dev/null @@ -1,129 +0,0 @@ - -/*! - * Connect - session - MemoryStore - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Store = require('./store'); - -/** - * Initialize a new `MemoryStore`. - * - * @api public - */ - -var MemoryStore = module.exports = function MemoryStore() { - this.sessions = {}; -}; - -/** - * Inherit from `Store.prototype`. - */ - -MemoryStore.prototype.__proto__ = Store.prototype; - -/** - * Attempt to fetch session by the given `sid`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.get = function(sid, fn){ - var self = this; - process.nextTick(function(){ - var expires - , sess = self.sessions[sid]; - if (sess) { - sess = JSON.parse(sess); - expires = 'string' == typeof sess.cookie.expires - ? new Date(sess.cookie.expires) - : sess.cookie.expires; - if (!expires || new Date < expires) { - fn(null, sess); - } else { - self.destroy(sid, fn); - } - } else { - fn(); - } - }); -}; - -/** - * Commit the given `sess` object associated with the given `sid`. - * - * @param {String} sid - * @param {Session} sess - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.set = function(sid, sess, fn){ - var self = this; - process.nextTick(function(){ - self.sessions[sid] = JSON.stringify(sess); - fn && fn(); - }); -}; - -/** - * Destroy the session associated with the given `sid`. - * - * @param {String} sid - * @api public - */ - -MemoryStore.prototype.destroy = function(sid, fn){ - var self = this; - process.nextTick(function(){ - delete self.sessions[sid]; - fn && fn(); - }); -}; - -/** - * Invoke the given callback `fn` with all active sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.all = function(fn){ - var arr = [] - , keys = Object.keys(this.sessions); - for (var i = 0, len = keys.length; i < len; ++i) { - arr.push(this.sessions[keys[i]]); - } - fn(null, arr); -}; - -/** - * Clear all sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.clear = function(fn){ - this.sessions = {}; - fn && fn(); -}; - -/** - * Fetch number of sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.length = function(fn){ - fn(null, Object.keys(this.sessions).length); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/session.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/session.js deleted file mode 100644 index 0dd4b400..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/session.js +++ /dev/null @@ -1,116 +0,0 @@ - -/*! - * Connect - session - Session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils'); - -/** - * Create a new `Session` with the given request and `data`. - * - * @param {IncomingRequest} req - * @param {Object} data - * @api private - */ - -var Session = module.exports = function Session(req, data) { - Object.defineProperty(this, 'req', { value: req }); - Object.defineProperty(this, 'id', { value: req.sessionID }); - if ('object' == typeof data) utils.merge(this, data); -}; - -/** - * Update reset `.cookie.maxAge` to prevent - * the cookie from expiring when the - * session is still active. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.touch = function(){ - return this.resetMaxAge(); -}; - -/** - * Reset `.maxAge` to `.originalMaxAge`. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.resetMaxAge = function(){ - this.cookie.maxAge = this.cookie.originalMaxAge; - return this; -}; - -/** - * Save the session data with optional callback `fn(err)`. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.save = function(fn){ - this.req.sessionStore.set(this.id, this, fn || function(){}); - return this; -}; - -/** - * Re-loads the session data _without_ altering - * the maxAge properties. Invokes the callback `fn(err)`, - * after which time if no exception has occurred the - * `req.session` property will be a new `Session` object, - * although representing the same session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.reload = function(fn){ - var req = this.req - , store = this.req.sessionStore; - store.get(this.id, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(new Error('failed to load session')); - store.createSession(req, sess); - fn(); - }); - return this; -}; - -/** - * Destroy `this` session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.destroy = function(fn){ - delete this.req.session; - this.req.sessionStore.destroy(this.id, fn); - return this; -}; - -/** - * Regenerate this request's session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.regenerate = function(fn){ - this.req.sessionStore.regenerate(this.req, fn); - return this; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/store.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/store.js deleted file mode 100644 index 54294cbd..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/session/store.js +++ /dev/null @@ -1,84 +0,0 @@ - -/*! - * Connect - session - Store - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , Session = require('./session') - , Cookie = require('./cookie'); - -/** - * Initialize abstract `Store`. - * - * @api private - */ - -var Store = module.exports = function Store(options){}; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Re-generate the given requests's session. - * - * @param {IncomingRequest} req - * @return {Function} fn - * @api public - */ - -Store.prototype.regenerate = function(req, fn){ - var self = this; - this.destroy(req.sessionID, function(err){ - self.generate(req); - fn(err); - }); -}; - -/** - * Load a `Session` instance via the given `sid` - * and invoke the callback `fn(err, sess)`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -Store.prototype.load = function(sid, fn){ - var self = this; - this.get(sid, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(); - var req = { sessionID: sid, sessionStore: self }; - sess = self.createSession(req, sess); - fn(null, sess); - }); -}; - -/** - * Create session from JSON `sess` data. - * - * @param {IncomingRequest} req - * @param {Object} sess - * @return {Session} - * @api private - */ - -Store.prototype.createSession = function(req, sess){ - var expires = sess.cookie.expires - , orig = sess.cookie.originalMaxAge; - sess.cookie = new Cookie(sess.cookie); - if ('string' == typeof expires) sess.cookie.expires = new Date(expires); - sess.cookie.originalMaxAge = orig; - req.session = new Session(req, sess); - return req.session; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/static.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/static.js deleted file mode 100644 index 093e73f9..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/static.js +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * Connect - static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var send = require('send') - , utils = require('../utils') - , parse = utils.parseUrl - , url = require('url'); - -/** - * Static: - * - * Static file server with the given `root` path. - * - * Examples: - * - * var oneDay = 86400000; - * - * connect() - * .use(connect.static(__dirname + '/public')) - * - * connect() - * .use(connect.static(__dirname + '/public', { maxAge: oneDay })) - * - * Options: - * - * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0 - * - `hidden` Allow transfer of hidden files. defaults to false - * - `redirect` Redirect to trailing "/" when the pathname is a dir. defaults to true - * - `index` Default file name, defaults to 'index.html' - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('static() root path required'); - - // default redirect - var redirect = false !== options.redirect; - - return function static(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - var path = parse(req).pathname; - var pause = utils.pause(req); - - function resume() { - next(); - pause.resume(); - } - - function directory() { - if (!redirect) return resume(); - var pathname = url.parse(req.originalUrl).pathname; - res.statusCode = 301; - res.setHeader('Location', pathname + '/'); - res.end('Redirecting to ' + utils.escape(pathname) + '/'); - } - - function error(err) { - if (404 == err.status) return resume(); - next(err); - } - - send(req, path) - .maxage(options.maxAge || 0) - .root(root) - .index(options.index || 'index.html') - .hidden(options.hidden) - .on('error', error) - .on('directory', directory) - .pipe(res); - }; -}; - -/** - * Expose mime module. - * - * If you wish to extend the mime table use this - * reference to the "mime" module in the npm registry. - */ - -exports.mime = send.mime; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/staticCache.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/staticCache.js deleted file mode 100644 index 7354a8ff..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/staticCache.js +++ /dev/null @@ -1,231 +0,0 @@ - -/*! - * Connect - staticCache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , Cache = require('../cache') - , fresh = require('fresh'); - -/** - * Static cache: - * - * Enables a memory cache layer on top of - * the `static()` middleware, serving popular - * static files. - * - * By default a maximum of 128 objects are - * held in cache, with a max of 256k each, - * totalling ~32mb. - * - * A Least-Recently-Used (LRU) cache algo - * is implemented through the `Cache` object, - * simply rotating cache objects as they are - * hit. This means that increasingly popular - * objects maintain their positions while - * others get shoved out of the stack and - * garbage collected. - * - * Benchmarks: - * - * static(): 2700 rps - * node-static: 5300 rps - * static() + staticCache(): 7500 rps - * - * Options: - * - * - `maxObjects` max cache objects [128] - * - `maxLength` max cache object length 256kb - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function staticCache(options){ - var options = options || {} - , cache = new Cache(options.maxObjects || 128) - , maxlen = options.maxLength || 1024 * 256; - - console.warn('connect.staticCache() is deprecated and will be removed in 3.0'); - console.warn('use varnish or similar reverse proxy caches.'); - - return function staticCache(req, res, next){ - var key = cacheKey(req) - , ranges = req.headers.range - , hasCookies = req.headers.cookie - , hit = cache.get(key); - - // cache static - // TODO: change from staticCache() -> cache() - // and make this work for any request - req.on('static', function(stream){ - var headers = res._headers - , cc = utils.parseCacheControl(headers['cache-control'] || '') - , contentLength = headers['content-length'] - , hit; - - // dont cache set-cookie responses - if (headers['set-cookie']) return hasCookies = true; - - // dont cache when cookies are present - if (hasCookies) return; - - // ignore larger files - if (!contentLength || contentLength > maxlen) return; - - // don't cache partial files - if (headers['content-range']) return; - - // dont cache items we shouldn't be - // TODO: real support for must-revalidate / no-cache - if ( cc['no-cache'] - || cc['no-store'] - || cc['private'] - || cc['must-revalidate']) return; - - // if already in cache then validate - if (hit = cache.get(key)){ - if (headers.etag == hit[0].etag) { - hit[0].date = new Date; - return; - } else { - cache.remove(key); - } - } - - // validation notifiactions don't contain a steam - if (null == stream) return; - - // add the cache object - var arr = []; - - // store the chunks - stream.on('data', function(chunk){ - arr.push(chunk); - }); - - // flag it as complete - stream.on('end', function(){ - var cacheEntry = cache.add(key); - delete headers['x-cache']; // Clean up (TODO: others) - cacheEntry.push(200); - cacheEntry.push(headers); - cacheEntry.push.apply(cacheEntry, arr); - }); - }); - - if (req.method == 'GET' || req.method == 'HEAD') { - if (ranges) { - next(); - } else if (!hasCookies && hit && !mustRevalidate(req, hit)) { - res.setHeader('X-Cache', 'HIT'); - respondFromCache(req, res, hit); - } else { - res.setHeader('X-Cache', 'MISS'); - next(); - } - } else { - next(); - } - } -}; - -/** - * Respond with the provided cached value. - * TODO: Assume 200 code, that's iffy. - * - * @param {Object} req - * @param {Object} res - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function respondFromCache(req, res, cacheEntry) { - var status = cacheEntry[0] - , headers = utils.merge({}, cacheEntry[1]) - , content = cacheEntry.slice(2); - - headers.age = (new Date - new Date(headers.date)) / 1000 || 0; - - switch (req.method) { - case 'HEAD': - res.writeHead(status, headers); - res.end(); - break; - case 'GET': - if (utils.conditionalGET(req) && fresh(req.headers, headers)) { - headers['content-length'] = 0; - res.writeHead(304, headers); - res.end(); - } else { - res.writeHead(status, headers); - - function write() { - while (content.length) { - if (false === res.write(content.shift())) { - res.once('drain', write); - return; - } - } - res.end(); - } - - write(); - } - break; - default: - // This should never happen. - res.writeHead(500, ''); - res.end(); - } -} - -/** - * Determine whether or not a cached value must be revalidated. - * - * @param {Object} req - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function mustRevalidate(req, cacheEntry) { - var cacheHeaders = cacheEntry[1] - , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '') - , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '') - , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0; - - if ( cacheCC['no-cache'] - || cacheCC['must-revalidate'] - || cacheCC['proxy-revalidate']) return true; - - if (reqCC['no-cache']) return true; - - if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge; - - if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge; - - return false; -} - -/** - * The key to use in the cache. For now, this is the URL path and query. - * - * 'http://example.com?key=value' -> '/?key=value' - * - * @param {Object} req - * @return {String} - * @api private - */ - -function cacheKey(req) { - return utils.parseUrl(req).path; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/timeout.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/timeout.js deleted file mode 100644 index dba4654d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/timeout.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * Connect - timeout - * Ported from https://github.com/LearnBoost/connect-timeout - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var debug = require('debug')('connect:timeout'); - -/** - * Timeout: - * - * Times out the request in `ms`, defaulting to `5000`. The - * method `req.clearTimeout()` is added to revert this behaviour - * programmatically within your application's middleware, routes, etc. - * - * The timeout error is passed to `next()` so that you may customize - * the response behaviour. This error has the `.timeout` property as - * well as `.status == 408`. - * - * @param {Number} ms - * @return {Function} - * @api public - */ - -module.exports = function timeout(ms) { - ms = ms || 5000; - - return function(req, res, next) { - var id = setTimeout(function(){ - req.emit('timeout', ms); - }, ms); - - req.on('timeout', function(){ - if (res.headerSent) return debug('response started, cannot timeout'); - var err = new Error('Response timeout'); - err.timeout = ms; - err.status = 503; - next(err); - }); - - req.clearTimeout = function(){ - clearTimeout(id); - }; - - res.on('header', function(){ - clearTimeout(id); - }); - - next(); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/urlencoded.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/urlencoded.js deleted file mode 100644 index cceafc0c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/urlencoded.js +++ /dev/null @@ -1,78 +0,0 @@ - -/*! - * Connect - urlencoded - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Urlencoded: - * - * Parse x-ww-form-urlencoded request bodies, - * providing the parsed object as `req.body`. - * - * Options: - * - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function urlencoded(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/x-www-form-urlencoded' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - try { - req.body = buf.length - ? qs.parse(buf, options) - : {}; - next(); - } catch (err){ - err.body = buf; - next(err); - } - }); - }); - } -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/vhost.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/vhost.js deleted file mode 100644 index abbb0500..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/middleware/vhost.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - vhost - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Vhost: - * - * Setup vhost for the given `hostname` and `server`. - * - * connect() - * .use(connect.vhost('foo.com', fooApp)) - * .use(connect.vhost('bar.com', barApp)) - * .use(connect.vhost('*.com', mainApp)) - * - * The `server` may be a Connect server or - * a regular Node `http.Server`. - * - * @param {String} hostname - * @param {Server} server - * @return {Function} - * @api public - */ - -module.exports = function vhost(hostname, server){ - if (!hostname) throw new Error('vhost hostname required'); - if (!server) throw new Error('vhost server required'); - var regexp = new RegExp('^' + hostname.replace(/[^*\w]/g, '\\$&').replace(/[*]/g, '(?:.*?)') + '$', 'i'); - if (server.onvhost) server.onvhost(hostname); - return function vhost(req, res, next){ - if (!req.headers.host) return next(); - var host = req.headers.host.split(':')[0]; - if (!regexp.test(host)) return next(); - if ('function' == typeof server) return server(req, res, next); - server.emit('request', req, res); - }; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/patch.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/patch.js deleted file mode 100644 index 7cf00125..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/patch.js +++ /dev/null @@ -1,79 +0,0 @@ - -/*! - * Connect - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , res = http.ServerResponse.prototype - , setHeader = res.setHeader - , _renderHeaders = res._renderHeaders - , writeHead = res.writeHead; - -// apply only once - -if (!res._hasConnectPatch) { - - /** - * Provide a public "header sent" flag - * until node does. - * - * @return {Boolean} - * @api public - */ - - res.__defineGetter__('headerSent', function(){ - return this._header; - }); - - /** - * Set header `field` to `val`, special-casing - * the `Set-Cookie` field for multiple support. - * - * @param {String} field - * @param {String} val - * @api public - */ - - res.setHeader = function(field, val){ - var key = field.toLowerCase() - , prev; - - // special-case Set-Cookie - if (this._headers && 'set-cookie' == key) { - if (prev = this.getHeader(field)) { - val = Array.isArray(prev) - ? prev.concat(val) - : [prev, val]; - } - // charset - } else if ('content-type' == key && this.charset) { - val += '; charset=' + this.charset; - } - - return setHeader.call(this, field, val); - }; - - /** - * Proxy to emit "header" event. - */ - - res._renderHeaders = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return _renderHeaders.call(this); - }; - - res.writeHead = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return writeHead.apply(this, arguments); - }; - - res._hasConnectPatch = true; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/proto.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/proto.js deleted file mode 100644 index b304cf72..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/proto.js +++ /dev/null @@ -1,230 +0,0 @@ - -/*! - * Connect - HTTPServer - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , debug = require('debug')('connect:dispatcher'); - -// prototype - -var app = module.exports = {}; - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Utilize the given middleware `handle` to the given `route`, - * defaulting to _/_. This "route" is the mount-point for the - * middleware, when given a value other than _/_ the middleware - * is only effective when that segment is present in the request's - * pathname. - * - * For example if we were to mount a function at _/admin_, it would - * be invoked on _/admin_, and _/admin/settings_, however it would - * not be invoked for _/_, or _/posts_. - * - * Examples: - * - * var app = connect(); - * app.use(connect.favicon()); - * app.use(connect.logger()); - * app.use(connect.static(__dirname + '/public')); - * - * If we wanted to prefix static files with _/public_, we could - * "mount" the `static()` middleware: - * - * app.use('/public', connect.static(__dirname + '/public')); - * - * This api is chainable, so the following is valid: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger()) - * .use(connect.static(__dirname + '/public')) - * .listen(3000); - * - * @param {String|Function|Server} route, callback or server - * @param {Function|Server} callback or server - * @return {Server} for chaining - * @api public - */ - -app.use = function(route, fn){ - // default route to '/' - if ('string' != typeof route) { - fn = route; - route = '/'; - } - - // wrap sub-apps - if ('function' == typeof fn.handle) { - var server = fn; - fn.route = route; - fn = function(req, res, next){ - server.handle(req, res, next); - }; - } - - // wrap vanilla http.Servers - if (fn instanceof http.Server) { - fn = fn.listeners('request')[0]; - } - - // strip trailing slash - if ('/' == route[route.length - 1]) { - route = route.slice(0, -1); - } - - // add the middleware - debug('use %s %s', route || '/', fn.name || 'anonymous'); - this.stack.push({ route: route, handle: fn }); - - return this; -}; - -/** - * Handle server requests, punting them down - * the middleware stack. - * - * @api private - */ - -app.handle = function(req, res, out) { - var stack = this.stack - , fqdn = ~req.url.indexOf('://') - , removed = '' - , slashAdded = false - , index = 0; - - function next(err) { - var layer, path, status, c; - - if (slashAdded) { - req.url = req.url.substr(1); - slashAdded = false; - } - - req.url = removed + req.url; - req.originalUrl = req.originalUrl || req.url; - removed = ''; - - // next callback - layer = stack[index++]; - - // all done - if (!layer || res.headerSent) { - // delegate to parent - if (out) return out(err); - - // unhandled error - if (err) { - // default to 500 - if (res.statusCode < 400) res.statusCode = 500; - debug('default %s', res.statusCode); - - // respect err.status - if (err.status) res.statusCode = err.status; - - // production gets a basic error message - var msg = 'production' == env - ? http.STATUS_CODES[res.statusCode] - : err.stack || err.toString(); - - // log to stderr in a non-test env - if ('test' != env) console.error(err.stack || err.toString()); - if (res.headerSent) return req.socket.destroy(); - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', Buffer.byteLength(msg)); - if ('HEAD' == req.method) return res.end(); - res.end(msg); - } else { - debug('default 404'); - res.statusCode = 404; - res.setHeader('Content-Type', 'text/plain'); - if ('HEAD' == req.method) return res.end(); - res.end('Cannot ' + req.method + ' ' + utils.escape(req.originalUrl)); - } - return; - } - - try { - path = utils.parseUrl(req).pathname; - if (undefined == path) path = '/'; - - // skip this layer if the route doesn't match. - if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err); - - c = path[layer.route.length]; - if (c && '/' != c && '.' != c) return next(err); - - // Call the layer handler - // Trim off the part of the url that matches the route - removed = layer.route; - req.url = req.url.substr(removed.length); - - // Ensure leading slash - if (!fqdn && '/' != req.url[0]) { - req.url = '/' + req.url; - slashAdded = true; - } - - debug('%s', layer.handle.name || 'anonymous'); - var arity = layer.handle.length; - if (err) { - if (arity === 4) { - layer.handle(err, req, res, next); - } else { - next(err); - } - } else if (arity < 4) { - layer.handle(req, res, next); - } else { - next(); - } - } catch (e) { - next(e); - } - } - next(); -}; - -/** - * Listen for connections. - * - * This method takes the same arguments - * as node's `http.Server#listen()`. - * - * HTTP and HTTPS: - * - * If you run your application both as HTTP - * and HTTPS you may wrap them individually, - * since your Connect "server" is really just - * a JavaScript `Function`. - * - * var connect = require('connect') - * , http = require('http') - * , https = require('https'); - * - * var app = connect(); - * - * http.createServer(app).listen(80); - * https.createServer(options, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/directory.html b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/directory.html deleted file mode 100644 index 2d637042..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/directory.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - listing directory {directory} - - - - - -
    -

    {linked-path}

    - {files} -
    - - \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/error.html b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/error.html deleted file mode 100644 index a6d3fafd..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/error.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - {error} - - - -
    -

    {title}

    -

    {statusCode} {error}

    -
      {stack}
    -
    - - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/favicon.ico b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/favicon.ico deleted file mode 100644 index 895fc96a..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/favicon.ico and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page.png deleted file mode 100644 index 03ddd799..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_add.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_add.png deleted file mode 100644 index d5bfa071..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_add.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_attach.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_attach.png deleted file mode 100644 index 89ee2da0..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_attach.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_code.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_code.png deleted file mode 100644 index f7ea9041..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_code.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_copy.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_copy.png deleted file mode 100644 index 195dc6d6..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_copy.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_delete.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_delete.png deleted file mode 100644 index 3141467c..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_delete.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_edit.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_edit.png deleted file mode 100644 index 046811ed..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_edit.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_error.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_error.png deleted file mode 100644 index f07f449a..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_error.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_excel.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_excel.png deleted file mode 100644 index eb6158eb..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_excel.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_find.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_find.png deleted file mode 100644 index 2f193889..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_find.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_gear.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_gear.png deleted file mode 100644 index 8e83281c..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_gear.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_go.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_go.png deleted file mode 100644 index 80fe1ed0..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_go.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_green.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_green.png deleted file mode 100644 index de8e003f..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_green.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_key.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_key.png deleted file mode 100644 index d6626cb0..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_key.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_lightning.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_lightning.png deleted file mode 100644 index 7e568703..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_lightning.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_link.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_link.png deleted file mode 100644 index 312eab09..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_link.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paintbrush.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paintbrush.png deleted file mode 100644 index 246a2f0b..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paintbrush.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paste.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paste.png deleted file mode 100644 index 968f073f..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_paste.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_red.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_red.png deleted file mode 100644 index 0b18247d..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_red.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_refresh.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_refresh.png deleted file mode 100644 index cf347c7d..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_refresh.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_save.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_save.png deleted file mode 100644 index caea546a..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_save.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white.png deleted file mode 100644 index 8b8b1ca0..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_acrobat.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_acrobat.png deleted file mode 100644 index 8f8095e4..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_acrobat.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_actionscript.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_actionscript.png deleted file mode 100644 index 159b2407..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_actionscript.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_add.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_add.png deleted file mode 100644 index aa23dde3..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_add.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_c.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_c.png deleted file mode 100644 index 34a05ccc..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_c.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_camera.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_camera.png deleted file mode 100644 index f501a593..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_camera.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cd.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cd.png deleted file mode 100644 index 848bdaf3..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cd.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code.png deleted file mode 100644 index 0c76bd12..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code_red.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code_red.png deleted file mode 100644 index 87a69145..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_code_red.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png deleted file mode 100644 index c66011fb..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_compressed.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_compressed.png deleted file mode 100644 index 2b6b1007..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_compressed.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_copy.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_copy.png deleted file mode 100644 index a9f31a27..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_copy.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png deleted file mode 100644 index a87cf847..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_csharp.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_csharp.png deleted file mode 100644 index ffb8fc93..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_csharp.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cup.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cup.png deleted file mode 100644 index 0a7d6f4a..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_cup.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_database.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_database.png deleted file mode 100644 index bddba1f9..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_database.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_delete.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_delete.png deleted file mode 100644 index af1ecaf2..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_delete.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_dvd.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_dvd.png deleted file mode 100644 index 4cc537af..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_dvd.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_edit.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_edit.png deleted file mode 100644 index b93e7760..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_edit.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_error.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_error.png deleted file mode 100644 index 9fc5a0a1..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_error.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_excel.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_excel.png deleted file mode 100644 index b977d7e5..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_excel.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_find.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_find.png deleted file mode 100644 index 58184363..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_find.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_flash.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_flash.png deleted file mode 100644 index 5769120b..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_flash.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_freehand.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_freehand.png deleted file mode 100644 index 8d719df5..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_freehand.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_gear.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_gear.png deleted file mode 100644 index 106f5aa3..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_gear.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_get.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_get.png deleted file mode 100644 index e4a1ecba..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_get.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_go.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_go.png deleted file mode 100644 index 7e62a924..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_go.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_h.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_h.png deleted file mode 100644 index e902abb0..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_h.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_horizontal.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_horizontal.png deleted file mode 100644 index 1d2d0a49..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_horizontal.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_key.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_key.png deleted file mode 100644 index d6164845..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_key.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_lightning.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_lightning.png deleted file mode 100644 index 7215d1e8..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_lightning.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_link.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_link.png deleted file mode 100644 index bf7bd1c9..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_link.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_magnify.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_magnify.png deleted file mode 100644 index f6b74cc4..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_magnify.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_medal.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_medal.png deleted file mode 100644 index d3fffb6d..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_medal.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_office.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_office.png deleted file mode 100644 index a65bcb3e..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_office.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paint.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paint.png deleted file mode 100644 index 23a37b89..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paint.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png deleted file mode 100644 index f907e44b..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paste.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paste.png deleted file mode 100644 index 5b2cbb3f..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_paste.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_php.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_php.png deleted file mode 100644 index 7868a259..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_php.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_picture.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_picture.png deleted file mode 100644 index 134b6693..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_picture.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png deleted file mode 100644 index c4eff038..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_put.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_put.png deleted file mode 100644 index 884ffd6f..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_put.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_ruby.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_ruby.png deleted file mode 100644 index f59b7c43..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_ruby.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_stack.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_stack.png deleted file mode 100644 index 44084add..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_stack.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_star.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_star.png deleted file mode 100644 index 3a1441c9..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_star.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_swoosh.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_swoosh.png deleted file mode 100644 index e7708292..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_swoosh.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text.png deleted file mode 100644 index 813f712f..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text_width.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text_width.png deleted file mode 100644 index d9cf1325..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_text_width.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_tux.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_tux.png deleted file mode 100644 index 52699bfe..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_tux.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_vector.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_vector.png deleted file mode 100644 index 4a05955b..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_vector.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png deleted file mode 100644 index a0a433df..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_width.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_width.png deleted file mode 100644 index 1eb88094..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_width.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_word.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_word.png deleted file mode 100644 index ae8ecbf4..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_word.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_world.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_world.png deleted file mode 100644 index 6ed2490e..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_world.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_wrench.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_wrench.png deleted file mode 100644 index fecadd08..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_wrench.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_zip.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_zip.png deleted file mode 100644 index fd4bbccd..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_white_zip.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_word.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_word.png deleted file mode 100644 index 834cdfaf..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_word.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_world.png b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_world.png deleted file mode 100644 index b8895dde..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/icons/page_world.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/style.css b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/style.css deleted file mode 100644 index 32b65071..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/public/style.css +++ /dev/null @@ -1,141 +0,0 @@ -body { - margin: 0; - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - margin: 0; - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul { - margin: 0; - padding: 0; -} -ul li { - margin: 5px 0; - padding: 3px 8px; - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 500px; -} -ul#files li { - padding: 0; -} -ul#files li img { - position: absolute; - top: 5px; - left: 5px; -} -ul#files li a { - position: relative; - display: block; - margin: 1px; - width: 30%; - height: 25px; - line-height: 25px; - text-indent: 8px; - float: left; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - text-overflow: ellipsis; -} -ul#files li a.icon { - text-indent: 25px; -} -ul#files li a:focus, -ul#files li a:hover { - outline: none; - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/utils.js b/org.nodeclipse.bundle.express/express/node_modules/connect/lib/utils.js deleted file mode 100644 index 35738b8c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/lib/utils.js +++ /dev/null @@ -1,404 +0,0 @@ - -/*! - * Connect - utils - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , crypto = require('crypto') - , parse = require('url').parse - , signature = require('cookie-signature') - , nodeVersion = process.versions.node.split('.'); - -// pause is broken in node < 0.10 -exports.brokenPause = parseInt(nodeVersion[0], 10) === 0 - && parseInt(nodeVersion[1], 10) < 10; - -/** - * Return `true` if the request has a body, otherwise return `false`. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.hasBody = function(req) { - return 'transfer-encoding' in req.headers || 'content-length' in req.headers; -}; - -/** - * Extract the mime type from the given request's - * _Content-Type_ header. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -exports.mime = function(req) { - var str = req.headers['content-type'] || ''; - return str.split(';')[0]; -}; - -/** - * Generate an `Error` from the given status `code` - * and optional `msg`. - * - * @param {Number} code - * @param {String} msg - * @return {Error} - * @api private - */ - -exports.error = function(code, msg){ - var err = new Error(msg || http.STATUS_CODES[code]); - err.status = code; - return err; -}; - -/** - * Return md5 hash of the given string and optional encoding, - * defaulting to hex. - * - * utils.md5('wahoo'); - * // => "e493298061761236c96b02ea6aa8a2ad" - * - * @param {String} str - * @param {String} encoding - * @return {String} - * @api private - */ - -exports.md5 = function(str, encoding){ - return crypto - .createHash('md5') - .update(str) - .digest(encoding || 'hex'); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - - -/** - * Return a unique identifier with the given `len`. - * - * utils.uid(10); - * // => "FDaS435D2z" - * - * @param {Number} len - * @return {String} - * @api private - */ - -exports.uid = function(len) { - return crypto.randomBytes(Math.ceil(len * 3 / 4)) - .toString('base64') - .slice(0, len) - .replace(/\//g, '-') - .replace(/\+/g, '_'); -}; - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - console.warn('do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature') - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - console.warn('do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature') - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val - ? str - : false; -}; - -/** - * Parse signed cookies, returning an object - * containing the decoded key/value pairs, - * while removing the signed key from `obj`. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseSignedCookies = function(obj, secret){ - var ret = {}; - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - if (0 == val.indexOf('s:')) { - val = signature.unsign(val.slice(2), secret); - if (val) { - ret[key] = val; - delete obj[key]; - } - } - }); - return ret; -}; - -/** - * Parse a signed cookie string, return the decoded value - * - * @param {String} str signed cookie string - * @param {String} secret - * @return {String} decoded value - * @api private - */ - -exports.parseSignedCookie = function(str, secret){ - return 0 == str.indexOf('s:') - ? signature.unsign(str.slice(2), secret) - : str; -}; - -/** - * Parse JSON cookies. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseJSONCookies = function(obj){ - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - var res = exports.parseJSONCookie(val); - if (res) obj[key] = res; - }); - return obj; -}; - -/** - * Parse JSON cookie string - * - * @param {String} str - * @return {Object} Parsed object or null if not json cookie - * @api private - */ - -exports.parseJSONCookie = function(str) { - if (0 == str.indexOf('j:')) { - try { - return JSON.parse(str.slice(2)); - } catch (err) { - // no op - } - } -}; - -/** - * Pause `data` and `end` events on the given `obj`. - * Middleware performing async tasks _should_ utilize - * this utility (or similar), to re-emit data once - * the async operation has completed, otherwise these - * events may be lost. Pause is only required for - * node versions less than 10, and is replaced with - * noop's otherwise. - * - * var pause = utils.pause(req); - * fs.readFile(path, function(){ - * next(); - * pause.resume(); - * }); - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.pause = exports.brokenPause - ? require('pause') - : function () { - return { - end: noop, - resume: noop - } - } - -/** - * Strip `Content-*` headers from `res`. - * - * @param {ServerResponse} res - * @api private - */ - -exports.removeContentHeaders = function(res){ - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Check if `req` is a conditional GET request. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.conditionalGET = function(req) { - return req.headers['if-modified-since'] - || req.headers['if-none-match']; -}; - -/** - * Respond with 401 "Unauthorized". - * - * @param {ServerResponse} res - * @param {String} realm - * @api private - */ - -exports.unauthorized = function(res, realm) { - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"'); - res.end('Unauthorized'); -}; - -/** - * Respond with 304 "Not Modified". - * - * @param {ServerResponse} res - * @param {Object} headers - * @api private - */ - -exports.notModified = function(res) { - exports.removeContentHeaders(res); - res.statusCode = 304; - res.end(); -}; - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * Parse the given Cache-Control `str`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -exports.parseCacheControl = function(str){ - var directives = str.split(',') - , obj = {}; - - for(var i = 0, len = directives.length; i < len; i++) { - var parts = directives[i].split('=') - , key = parts.shift().trim() - , val = parseInt(parts.shift(), 10); - - obj[key] = isNaN(val) ? true : val; - } - - return obj; -}; - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api private - */ - -exports.parseUrl = function(req){ - var parsed = req._parsedUrl; - if (parsed && parsed.href == req.url) { - return parsed; - } else { - return req._parsedUrl = parse(req.url); - } -}; - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api private - */ - -exports.parseBytes = require('bytes'); - -function noop() {} \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/History.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/History.md deleted file mode 100644 index 1332808c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.2.0 / 2012-10-28 -================== - - * bytes(200).should.eql('200b') - -0.1.0 / 2012-07-04 -================== - - * add bytes to string conversion [yields] diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Makefile b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Readme.md deleted file mode 100644 index 9325d5bf..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/Readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# node-bytes - - Byte string parser / formatter. - -## Example: - -```js -bytes('1kb') -// => 1024 - -bytes('2mb') -// => 2097152 - -bytes('1gb') -// => 1073741824 - -bytes(1073741824) -// => 1gb -``` - -## Installation - -``` -$ npm install bytes -$ component install visionmedia/bytes.js -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/component.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/component.json deleted file mode 100644 index 76a6057b..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "bytes", - "description": "byte size string parser / serializer", - "keywords": ["bytes", "utility"], - "version": "0.1.0", - "scripts": ["index.js"] -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/index.js deleted file mode 100644 index 70b2e01a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/index.js +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api public - */ - -module.exports = function(size) { - if ('number' == typeof size) return convert(size); - var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/) - , n = parseFloat(parts[1]) - , type = parts[2]; - - var map = { - kb: 1 << 10 - , mb: 1 << 20 - , gb: 1 << 30 - }; - - return map[type] * n; -}; - -/** - * convert bytes into string. - * - * @param {Number} b - bytes to convert - * @return {String} - * @api public - */ - -function convert (b) { - var gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; - if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; - if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; - if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; - return b + 'b'; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/package.json deleted file mode 100644 index e222afa6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/bytes/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "bytes", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "byte size string parser / serializer", - "version": "0.2.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "bytes@0.2.0", - "dist": { - "shasum": "8e7d1b72fe93a1ad178595b6a4ac6ef19ec971ef" - }, - "_from": "bytes@0.2.0" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.travis.yml deleted file mode 100644 index 320698af..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/README.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/README.md deleted file mode 100644 index 5187ed1c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) # - -cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. - -See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. - -## how? - -``` -npm install cookie -``` - -```javascript -var cookie = require('cookie'); - -var hdr = cookie.serialize('foo', 'bar'); -// hdr = 'foo=bar'; - -var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); -// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; -``` - -## more - -The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. - -### path -> cookie path - -### expires -> absolute expiration date for the cookie (Date object) - -### maxAge -> relative max age of the cookie from when the client receives it (seconds) - -### domain -> domain for the cookie - -### secure -> true or false - -### httpOnly -> true or false - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/index.js deleted file mode 100644 index db04ad3f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/index.js +++ /dev/null @@ -1,61 +0,0 @@ - -/// Serialize the a name value pair into a cookie string suitable for -/// http headers. An optional options object specified cookie parameters -/// -/// serialize('foo', 'bar', { httpOnly: true }) -/// => "foo=bar; httpOnly" -/// -/// @param {String} name -/// @param {String} val -/// @param {Object} options -/// @return {String} -var serialize = function(name, val, opt){ - var pairs = [name + '=' + encode(val)]; - opt = opt || {}; - - if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge); - if (opt.domain) pairs.push('Domain=' + opt.domain); - if (opt.path) pairs.push('Path=' + opt.path); - if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString()); - if (opt.httpOnly) pairs.push('HttpOnly'); - if (opt.secure) pairs.push('Secure'); - - return pairs.join('; '); -}; - -/// Parse the given cookie header string into an object -/// The object has the various cookies as keys(names) => values -/// @param {String} str -/// @return {Object} -var parse = function(str) { - var obj = {} - var pairs = str.split(/[;,] */); - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('=') - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - try { - obj[key] = decode(val); - } catch (e) { - obj[key] = val; - } - } - }); - - return obj; -}; - -var encode = encodeURIComponent; -var decode = decodeURIComponent; - -module.exports.serialize = serialize; -module.exports.parse = parse; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/package.json deleted file mode 100644 index c719ba66..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "cookie", - "description": "cookie parsing and serialization", - "version": "0.0.5", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-cookie.git" - }, - "keywords": [ - "cookie", - "cookies" - ], - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) #\n\ncookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.\n\nSee [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.\n\n## how?\n\n```\nnpm install cookie\n```\n\n```javascript\nvar cookie = require('cookie');\n\nvar hdr = cookie.serialize('foo', 'bar');\n// hdr = 'foo=bar';\n\nvar cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');\n// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };\n```\n\n## more\n\nThe serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.\n\n### path\n> cookie path\n\n### expires\n> absolute expiration date for the cookie (Date object)\n\n### maxAge\n> relative max age of the cookie from when the client receives it (seconds)\n\n### domain\n> domain for the cookie\n\n### secure\n> true or false\n\n### httpOnly\n> true or false\n\n", - "readmeFilename": "README.md", - "_id": "cookie@0.0.5", - "dist": { - "shasum": "45afe11669da9cbf57f8e6d54bac8f0659044ae8" - }, - "_from": "cookie@0.0.5" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/mocha.opts b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/parse.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/parse.js deleted file mode 100644 index d8c03ab7..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/parse.js +++ /dev/null @@ -1,28 +0,0 @@ - -var assert = require('assert'); - -var cookie = require('..'); - -suite('parse'); - -test('basic', function() { - assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar')); - assert.deepEqual({ foo: '123' }, cookie.parse('foo=123')); -}); - -test('ignore spaces', function() { - assert.deepEqual({ FOO: 'bar', baz: 'raz' }, - cookie.parse('FOO = bar; baz = raz')); -}); - -test('escaping', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"')); - - assert.deepEqual({ email: ' ",;/' }, - cookie.parse('email=%20%22%2c%3b%2f')); -}); - -test('ignore escaping error and return original value', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar')); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/serialize.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/serialize.js deleted file mode 100644 index d38768d6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/cookie/test/serialize.js +++ /dev/null @@ -1,59 +0,0 @@ -// builtin -var assert = require('assert'); - -var cookie = require('..'); - -suite('serialize'); - -test('basic', function() { - assert.equal('foo=bar', cookie.serialize('foo', 'bar')); - assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz')); -}); - -test('path', function() { - assert.equal('foo=bar; Path=/', cookie.serialize('foo', 'bar', { - path: '/' - })); -}); - -test('secure', function() { - assert.equal('foo=bar; Secure', cookie.serialize('foo', 'bar', { - secure: true - })); - - assert.equal('foo=bar', cookie.serialize('foo', 'bar', { - secure: false - })); -}); - -test('domain', function() { - assert.equal('foo=bar; Domain=example.com', cookie.serialize('foo', 'bar', { - domain: 'example.com' - })); -}); - -test('httpOnly', function() { - assert.equal('foo=bar; HttpOnly', cookie.serialize('foo', 'bar', { - httpOnly: true - })); -}); - -test('maxAge', function() { - assert.equal('foo=bar; Max-Age=1000', cookie.serialize('foo', 'bar', { - maxAge: 1000 - })); -}); - -test('escaping', function() { - assert.deepEqual('cat=%2B%20', cookie.serialize('cat', '+ ')); -}); - -test('parse->serialize', function() { - - assert.deepEqual({ cat: 'foo=123&name=baz five' }, cookie.parse( - cookie.serialize('cat', 'foo=123&name=baz five'))); - - assert.deepEqual({ cat: ' ";/' }, cookie.parse( - cookie.serialize('cat', ' ";/'))); -}); - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.npmignore deleted file mode 100644 index 4fbabb33..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/test/tmp/ -*.upload -*.un~ -*.http diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.travis.yml deleted file mode 100644 index cb931cb0..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.9 - - "0.10" diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/LICENSE deleted file mode 100644 index 38d3c9cf..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) 2011 Felix Geisendörfer - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/Readme.md deleted file mode 100644 index 08e9eca1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/Readme.md +++ /dev/null @@ -1,419 +0,0 @@ -# Formidable - -[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable) - -## Purpose - -A node.js module for parsing form data, especially file uploads. - -## Current status - -This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading -and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from -a large variety of clients and is considered production-ready. - -## Features - -* Fast (~500mb/sec), non-buffering multipart parser -* Automatically writing file uploads to disk -* Low memory footprint -* Graceful error handling -* Very high test coverage - -## Installation - -Via [npm](http://github.com/isaacs/npm): -``` -npm install formidable@latest -``` -Manually: -``` -git clone git://github.com/felixge/node-formidable.git formidable -vim my.js -# var formidable = require('./formidable'); -``` - -Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library. - -## Example - -Parse an incoming file upload. -```javascript -var formidable = require('formidable'), - http = require('http'), - util = require('util'); - -http.createServer(function(req, res) { - if (req.url == '/upload' && req.method.toLowerCase() == 'post') { - // parse a file upload - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); -}).listen(8080); -``` -## API - -### Formidable.IncomingForm -```javascript -var form = new formidable.IncomingForm() -``` -Creates a new incoming form. - -```javascript -form.encoding = 'utf-8'; -``` -Sets encoding for incoming form fields. - -```javascript -form.uploadDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd(); -``` -The directory for placing file uploads in. You can move them later on using -`fs.rename()`. The default directory is picked at module load time depending on -the first existing directory from those listed above. - -```javascript -form.keepExtensions = false; -``` -If you want the files written to `form.uploadDir` to include the extensions of the original files, set this property to `true`. - -```javascript -form.type -``` -Either 'multipart' or 'urlencoded' depending on the incoming request. - -```javascript -form.maxFieldsSize = 2 * 1024 * 1024; -``` -Limits the amount of memory a field (not file) can allocate in bytes. -If this value is exceeded, an `'error'` event is emitted. The default -size is 2MB. - -```javascript -form.maxFields = 0; -``` -Limits the number of fields that the querystring parser will decode. Defaults -to 0 (unlimited). - -```javascript -form.hash = false; -``` -If you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`. - -```javascript -form.bytesReceived -``` -The amount of bytes received for this form so far. - -```javascript -form.bytesExpected -``` -The expected number of bytes in this form. - -```javascript -form.parse(request, [cb]); -``` -Parses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback: - - -```javascript -form.parse(req, function(err, fields, files) { - // ... -}); - -form.onPart(part); -``` -You may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing. - -```javascript -form.onPart = function(part) { - part.addListener('data', function() { - // ... - }); -} -``` -If you want to use formidable to only handle certain parts for you, you can do so: -```javascript -form.onPart = function(part) { - if (!part.filename) { - // let formidable handle all non-file parts - form.handlePart(part); - } -} -``` -Check the code in this method for further inspiration. - - -### Formidable.File -```javascript -file.size = 0 -``` -The size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet. -```javascript -file.path = null -``` -The path this file is being written to. You can modify this in the `'fileBegin'` event in -case you are unhappy with the way formidable generates a temporary path for your files. -```javascript -file.name = null -``` -The name this file had according to the uploading client. -```javascript -file.type = null -``` -The mime type of this file, according to the uploading client. -```javascript -file.lastModifiedDate = null -``` -A date object (or `null`) containing the time this file was last written to. Mostly -here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/). -```javascript -file.hash = null -``` -If hash calculation was set, you can read the hex digest out of this var. - -#### Formidable.File#toJSON() - - This method returns a JSON-representation of the file, allowing you to - `JSON.stringify()` the file which is useful for logging and responding - to requests. - -### Events - - -#### 'progress' -```javascript -form.on('progress', function(bytesReceived, bytesExpected) { -}); -``` -Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar. - - - -#### 'field' -```javascript -form.on('field', function(name, value) { -}); -``` - -#### 'fileBegin' - -Emitted whenever a field / value pair has been received. -```javascript -form.on('fileBegin', function(name, file) { -}); -``` - -#### 'file' - -Emitted whenever a new file is detected in the upload stream. Use this even if -you want to stream the file to somewhere else while buffering the upload on -the file system. - -Emitted whenever a field / file pair has been received. `file` is an instance of `File`. -```javascript -form.on('file', function(name, file) { -}); -``` - -#### 'error' - -Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events. -```javascript -form.on('error', function(err) { -}); -``` - -#### 'aborted' - - -Emitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core). -```javascript -form.on('aborted', function() { -}); -``` - -##### 'end' -```javascript -form.on('end', function() { -}); -``` -Emitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response. - - - -## Changelog - -### v1.0.14 - -* Add failing hash tests. (Ben Trask) -* Enable hash calculation again (Eugene Girshov) -* Test for immediate data events (Tim Smart) -* Re-arrange IncomingForm#parse (Tim Smart) - -### v1.0.13 - -* Only update hash if update method exists (Sven Lito) -* According to travis v0.10 needs to go quoted (Sven Lito) -* Bumping build node versions (Sven Lito) -* Additional fix for empty requests (Eugene Girshov) -* Change the default to 1000, to match the new Node behaviour. (OrangeDog) -* Add ability to control maxKeys in the querystring parser. (OrangeDog) -* Adjust test case to work with node 0.9.x (Eugene Girshov) -* Update package.json (Sven Lito) -* Path adjustment according to eb4468b (Markus Ast) - -### v1.0.12 - -* Emit error on aborted connections (Eugene Girshov) -* Add support for empty requests (Eugene Girshov) -* Fix name/filename handling in Content-Disposition (jesperp) -* Tolerate malformed closing boundary in multipart (Eugene Girshov) -* Ignore preamble in multipart messages (Eugene Girshov) -* Add support for application/json (Mike Frey, Carlos Rodriguez) -* Add support for Base64 encoding (Elmer Bulthuis) -* Add File#toJSON (TJ Holowaychuk) -* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley) -* Documentation improvements (Sven Lito, Andre Azevedo) -* Add support for application/octet-stream (Ion Lupascu, Chris Scribner) -* Use os.tmpDir() to get tmp directory (Andrew Kelley) -* Improve package.json (Andrew Kelley, Sven Lito) -* Fix benchmark script (Andrew Kelley) -* Fix scope issue in incoming_forms (Sven Lito) -* Fix file handle leak on error (OrangeDog) - -### v1.0.11 - -* Calculate checksums for incoming files (sreuter) -* Add definition parameters to "IncomingForm" as an argument (Math-) - -### v1.0.10 - -* Make parts to be proper Streams (Matt Robenolt) - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) - -## License - -Formidable is licensed under the MIT license. - -## Ports - -* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable - -## Credits - -* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js deleted file mode 100644 index 49abc43e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +++ /dev/null @@ -1,71 +0,0 @@ -var assert = require('assert'); -require('../test/common'); -var multipartParser = require('../lib/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - Buffer = require('buffer').Buffer, - boundary = '-----------------------------168072824752491622650073', - mb = 100, - buffer = createMultipartBuffer(boundary, mb * 1024 * 1024), - callbacks = - { partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, - }; - - -parser.initWithBoundary(boundary); -parser.onHeaderField = function() { - callbacks.headerField++; -}; - -parser.onHeaderValue = function() { - callbacks.headerValue++; -}; - -parser.onPartBegin = function() { - callbacks.partBegin++; -}; - -parser.onPartData = function() { - callbacks.partData++; -}; - -parser.onPartEnd = function() { - callbacks.partEnd++; -}; - -parser.onEnd = function() { - callbacks.end++; -}; - -var start = +new Date(), - nparsed = parser.write(buffer), - duration = +new Date - start, - mbPerSec = (mb / (duration / 1000)).toFixed(2); - -console.log(mbPerSec+' mb/sec'); - -assert.equal(nparsed, buffer.length); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' - + 'content-disposition: form-data; name="field1"\r\n' - + '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/json.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/json.js deleted file mode 100644 index eb8a7245..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/json.js +++ /dev/null @@ -1,67 +0,0 @@ -var common = require('../test/common'), - http = require('http'), - util = require('util'), - formidable = common.formidable, - Buffer = require('buffer').Buffer, - port = common.port, - server; - -server = http.createServer(function(req, res) { - if (req.method !== 'POST') { - res.writeHead(200, {'content-type': 'text/plain'}) - res.end('Please POST a JSON payload to http://localhost:'+port+'/') - return; - } - - var form = new formidable.IncomingForm(), - fields = {}; - - form - .on('error', function(err) { - res.writeHead(500, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - console.error(err); - }) - .on('field', function(field, value) { - console.log(field, value); - fields[field] = value; - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); -}); -server.listen(port); - -console.log('listening on http://localhost:'+port+'/'); - - -var request = http.request({ - host: 'localhost', - path: '/', - port: port, - method: 'POST', - headers: { 'content-type':'application/json', 'content-length':48 } -}, function(response) { - var data = ''; - console.log('\nServer responded with:'); - console.log('Status:', response.statusCode); - response.pipe(process.stdout); - response.on('end', function() { - console.log('\n') - process.exit(); - }); - // response.on('data', function(chunk) { - // data += chunk.toString('utf8'); - // }); - // response.on('end', function() { - // console.log('Response Data:') - // console.log(data); - // process.exit(); - // }); -}) - -request.write('{"numbers":[1,2,3,4,5],"nested":{"key":"value"}}'); -request.end(); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/post.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/post.js deleted file mode 100644 index f6c15a64..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/post.js +++ /dev/null @@ -1,43 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/post') { - var form = new formidable.IncomingForm(), - fields = []; - - form - .on('error', function(err) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - }) - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/upload.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/upload.js deleted file mode 100644 index 050cdd9d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/example/upload.js +++ /dev/null @@ -1,48 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/upload') { - var form = new formidable.IncomingForm(), - files = [], - fields = []; - - form.uploadDir = TEST_TMP; - - form - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('file', function(field, file) { - console.log(field, file); - files.push([field, file]); - }) - .on('end', function() { - console.log('-> upload done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/index.js deleted file mode 100644 index 4cc88b35..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/file.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/file.js deleted file mode 100644 index e34c10e4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/file.js +++ /dev/null @@ -1,72 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var util = require('util'), - WriteStream = require('fs').WriteStream, - EventEmitter = require('events').EventEmitter, - crypto = require('crypto'); - -function File(properties) { - EventEmitter.call(this); - - this.size = 0; - this.path = null; - this.name = null; - this.type = null; - this.hash = null; - this.lastModifiedDate = null; - - this._writeStream = null; - - for (var key in properties) { - this[key] = properties[key]; - } - - if(typeof this.hash === 'string') { - this.hash = crypto.createHash(properties.hash); - } else { - this.hash = null; - } -} -module.exports = File; -util.inherits(File, EventEmitter); - -File.prototype.open = function() { - this._writeStream = new WriteStream(this.path); -}; - -File.prototype.toJSON = function() { - return { - size: this.size, - path: this.path, - name: this.name, - type: this.type, - mtime: this.lastModifiedDate, - length: this.length, - filename: this.filename, - mime: this.mime - }; -}; - -File.prototype.write = function(buffer, cb) { - var self = this; - if (self.hash) { - self.hash.update(buffer); - } - this._writeStream.write(buffer, function() { - self.lastModifiedDate = new Date(); - self.size += buffer.length; - self.emit('progress', self.size); - cb(); - }); -}; - -File.prototype.end = function(cb) { - var self = this; - if (self.hash) { - self.hash = self.hash.digest('hex'); - } - this._writeStream.end(function() { - self.emit('end'); - cb(); - }); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js deleted file mode 100644 index c2eeaf81..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +++ /dev/null @@ -1,535 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var fs = require('fs'); -var util = require('util'), - path = require('path'), - File = require('./file'), - MultipartParser = require('./multipart_parser').MultipartParser, - QuerystringParser = require('./querystring_parser').QuerystringParser, - OctetParser = require('./octet_parser').OctetParser, - JSONParser = require('./json_parser').JSONParser, - StringDecoder = require('string_decoder').StringDecoder, - EventEmitter = require('events').EventEmitter, - Stream = require('stream').Stream, - os = require('os'); - -function IncomingForm(opts) { - if (!(this instanceof IncomingForm)) return new IncomingForm(opts); - EventEmitter.call(this); - - opts=opts||{}; - - this.error = null; - this.ended = false; - - this.maxFields = opts.maxFields || 1000; - this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024; - this.keepExtensions = opts.keepExtensions || false; - this.uploadDir = opts.uploadDir || os.tmpDir(); - this.encoding = opts.encoding || 'utf-8'; - this.headers = null; - this.type = null; - this.hash = false; - - this.bytesReceived = null; - this.bytesExpected = null; - - this._parser = null; - this._flushing = 0; - this._fieldsSize = 0; - this.openedFiles = []; - - return this; -}; -util.inherits(IncomingForm, EventEmitter); -exports.IncomingForm = IncomingForm; - -IncomingForm.prototype.parse = function(req, cb) { - this.pause = function() { - try { - req.pause(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - return true; - }; - - this.resume = function() { - try { - req.resume(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - - return true; - }; - - // Setup callback first, so we don't miss anything from data events emitted - // immediately. - if (cb) { - var fields = {}, files = {}; - this - .on('field', function(name, value) { - fields[name] = value; - }) - .on('file', function(name, file) { - files[name] = file; - }) - .on('error', function(err) { - cb(err, fields, files); - }) - .on('end', function() { - cb(null, fields, files); - }); - } - - // Parse headers and setup the parser, ready to start listening for data. - this.writeHeaders(req.headers); - - // Start listening for data. - var self = this; - req - .on('error', function(err) { - self._error(err); - }) - .on('aborted', function() { - self.emit('aborted'); - self._error(new Error('Request aborted')); - }) - .on('data', function(buffer) { - self.write(buffer); - }) - .on('end', function() { - if (self.error) { - return; - } - - var err = self._parser.end(); - if (err) { - self._error(err); - } - }); - - return this; -}; - -IncomingForm.prototype.writeHeaders = function(headers) { - this.headers = headers; - this._parseContentLength(); - this._parseContentType(); -}; - -IncomingForm.prototype.write = function(buffer) { - if (!this._parser) { - this._error(new Error('unintialized parser')); - return; - } - - this.bytesReceived += buffer.length; - this.emit('progress', this.bytesReceived, this.bytesExpected); - - var bytesParsed = this._parser.write(buffer); - if (bytesParsed !== buffer.length) { - this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed')); - } - - return bytesParsed; -}; - -IncomingForm.prototype.pause = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.resume = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.onPart = function(part) { - // this method can be overwritten by the user - this.handlePart(part); -}; - -IncomingForm.prototype.handlePart = function(part) { - var self = this; - - if (part.filename === undefined) { - var value = '' - , decoder = new StringDecoder(this.encoding); - - part.on('data', function(buffer) { - self._fieldsSize += buffer.length; - if (self._fieldsSize > self.maxFieldsSize) { - self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data')); - return; - } - value += decoder.write(buffer); - }); - - part.on('end', function() { - self.emit('field', part.name, value); - }); - return; - } - - this._flushing++; - - var file = new File({ - path: this._uploadPath(part.filename), - name: part.filename, - type: part.mime, - hash: self.hash - }); - - this.emit('fileBegin', part.name, file); - - file.open(); - this.openedFiles.push(file); - - part.on('data', function(buffer) { - self.pause(); - file.write(buffer, function() { - self.resume(); - }); - }); - - part.on('end', function() { - file.end(function() { - self._flushing--; - self.emit('file', part.name, file); - self._maybeEnd(); - }); - }); -}; - -function dummyParser(self) { - return { - end: function () { - self.ended = true; - self._maybeEnd(); - return null; - } - }; -} - -IncomingForm.prototype._parseContentType = function() { - if (this.bytesExpected === 0) { - this._parser = dummyParser(this); - return; - } - - if (!this.headers['content-type']) { - this._error(new Error('bad content-type header, no content-type')); - return; - } - - if (this.headers['content-type'].match(/octet-stream/i)) { - this._initOctetStream(); - return; - } - - if (this.headers['content-type'].match(/urlencoded/i)) { - this._initUrlencoded(); - return; - } - - if (this.headers['content-type'].match(/multipart/i)) { - var m; - if (m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i)) { - this._initMultipart(m[1] || m[2]); - } else { - this._error(new Error('bad content-type header, no multipart boundary')); - } - return; - } - - if (this.headers['content-type'].match(/json/i)) { - this._initJSONencoded(); - return; - } - - this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type'])); -}; - -IncomingForm.prototype._error = function(err) { - if (this.error || this.ended) { - return; - } - - this.error = err; - this.pause(); - this.emit('error', err); - - if (Array.isArray(this.openedFiles)) { - this.openedFiles.forEach(function(file) { - file._writeStream.destroy(); - setTimeout(fs.unlink, 0, file.path); - }); - } -}; - -IncomingForm.prototype._parseContentLength = function() { - this.bytesReceived = 0; - if (this.headers['content-length']) { - this.bytesExpected = parseInt(this.headers['content-length'], 10); - } else if (this.headers['transfer-encoding'] === undefined) { - this.bytesExpected = 0; - } - - if (this.bytesExpected !== null) { - this.emit('progress', this.bytesReceived, this.bytesExpected); - } -}; - -IncomingForm.prototype._newParser = function() { - return new MultipartParser(); -}; - -IncomingForm.prototype._initMultipart = function(boundary) { - this.type = 'multipart'; - - var parser = new MultipartParser(), - self = this, - headerField, - headerValue, - part; - - parser.initWithBoundary(boundary); - - parser.onPartBegin = function() { - part = new Stream(); - part.readable = true; - part.headers = {}; - part.name = null; - part.filename = null; - part.mime = null; - - part.transferEncoding = 'binary'; - part.transferBuffer = ''; - - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString(self.encoding, start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString(self.encoding, start, end); - }; - - parser.onHeaderEnd = function() { - headerField = headerField.toLowerCase(); - part.headers[headerField] = headerValue; - - var m; - if (headerField == 'content-disposition') { - if (m = headerValue.match(/\bname="([^"]+)"/i)) { - part.name = m[1]; - } - - part.filename = self._fileName(headerValue); - } else if (headerField == 'content-type') { - part.mime = headerValue; - } else if (headerField == 'content-transfer-encoding') { - part.transferEncoding = headerValue.toLowerCase(); - } - - headerField = ''; - headerValue = ''; - }; - - parser.onHeadersEnd = function() { - switch(part.transferEncoding){ - case 'binary': - case '7bit': - case '8bit': - parser.onPartData = function(b, start, end) { - part.emit('data', b.slice(start, end)); - }; - - parser.onPartEnd = function() { - part.emit('end'); - }; - break; - - case 'base64': - parser.onPartData = function(b, start, end) { - part.transferBuffer += b.slice(start, end).toString('ascii'); - - /* - four bytes (chars) in base64 converts to three bytes in binary - encoding. So we should always work with a number of bytes that - can be divided by 4, it will result in a number of buytes that - can be divided vy 3. - */ - var offset = parseInt(part.transferBuffer.length / 4) * 4; - part.emit('data', new Buffer(part.transferBuffer.substring(0, offset), 'base64')) - part.transferBuffer = part.transferBuffer.substring(offset); - }; - - parser.onPartEnd = function() { - part.emit('data', new Buffer(part.transferBuffer, 'base64')) - part.emit('end'); - }; - break; - - default: - return self._error(new Error('unknown transfer-encoding')); - } - - self.onPart(part); - }; - - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._fileName = function(headerValue) { - var m = headerValue.match(/\bfilename="(.*?)"($|; )/i); - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -}; - -IncomingForm.prototype._initUrlencoded = function() { - this.type = 'urlencoded'; - - var parser = new QuerystringParser(this.maxFields) - , self = this; - - parser.onField = function(key, val) { - self.emit('field', key, val); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._initOctetStream = function() { - this.type = 'octet-stream'; - var filename = this.headers['x-file-name']; - var mime = this.headers['content-type']; - - var file = new File({ - path: this._uploadPath(filename), - name: filename, - type: mime - }); - - file.open(); - - this.emit('fileBegin', filename, file); - - this._flushing++; - - var self = this; - - self._parser = new OctetParser(); - - //Keep track of writes that haven't finished so we don't emit the file before it's done being written - var outstandingWrites = 0; - - self._parser.on('data', function(buffer){ - self.pause(); - outstandingWrites++; - - file.write(buffer, function() { - outstandingWrites--; - self.resume(); - - if(self.ended){ - self._parser.emit('doneWritingFile'); - } - }); - }); - - self._parser.on('end', function(){ - self._flushing--; - self.ended = true; - - var done = function(){ - self.emit('file', 'file', file); - self._maybeEnd(); - }; - - if(outstandingWrites === 0){ - done(); - } else { - self._parser.once('doneWritingFile', done); - } - }); -}; - -IncomingForm.prototype._initJSONencoded = function() { - this.type = 'json'; - - var parser = new JSONParser() - , self = this; - - if (this.bytesExpected) { - parser.initWithLength(this.bytesExpected); - } - - parser.onField = function(key, val) { - self.emit('field', key, val); - } - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._uploadPath = function(filename) { - var name = ''; - for (var i = 0; i < 32; i++) { - name += Math.floor(Math.random() * 16).toString(16); - } - - if (this.keepExtensions) { - var ext = path.extname(filename); - ext = ext.replace(/(\.[a-z0-9]+).*/, '$1'); - - name += ext; - } - - return path.join(this.uploadDir, name); -}; - -IncomingForm.prototype._maybeEnd = function() { - if (!this.ended || this._flushing || this.error) { - return; - } - - this.emit('end'); -}; - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/index.js deleted file mode 100644 index 7a6e3e10..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var IncomingForm = require('./incoming_form').IncomingForm; -IncomingForm.IncomingForm = IncomingForm; -module.exports = IncomingForm; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/json_parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/json_parser.js deleted file mode 100644 index 6ce966b4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/json_parser.js +++ /dev/null @@ -1,35 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var Buffer = require('buffer').Buffer - -function JSONParser() { - this.data = new Buffer(''); - this.bytesWritten = 0; -}; -exports.JSONParser = JSONParser; - -JSONParser.prototype.initWithLength = function(length) { - this.data = new Buffer(length); -} - -JSONParser.prototype.write = function(buffer) { - if (this.data.length >= this.bytesWritten + buffer.length) { - buffer.copy(this.data, this.bytesWritten); - } else { - this.data = Buffer.concat([this.data, buffer]); - } - this.bytesWritten += buffer.length; - return buffer.length; -} - -JSONParser.prototype.end = function() { - try { - var fields = JSON.parse(this.data.toString('utf8')) - for (var field in fields) { - this.onField(field, fields[field]); - } - } catch (e) {} - this.data = null; - - this.onEnd(); -} \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js deleted file mode 100644 index 98a68560..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +++ /dev/null @@ -1,324 +0,0 @@ -var Buffer = require('buffer').Buffer, - s = 0, - S = - { PARSER_UNINITIALIZED: s++, - START: s++, - START_BOUNDARY: s++, - HEADER_FIELD_START: s++, - HEADER_FIELD: s++, - HEADER_VALUE_START: s++, - HEADER_VALUE: s++, - HEADER_VALUE_ALMOST_DONE: s++, - HEADERS_ALMOST_DONE: s++, - PART_DATA_START: s++, - PART_DATA: s++, - PART_END: s++, - END: s++ - }, - - f = 1, - F = - { PART_BOUNDARY: f, - LAST_BOUNDARY: f *= 2 - }, - - LF = 10, - CR = 13, - SPACE = 32, - HYPHEN = 45, - COLON = 58, - A = 97, - Z = 122, - - lower = function(c) { - return c | 0x20; - }; - -for (s in S) { - exports[s] = S[s]; -} - -function MultipartParser() { - this.boundary = null; - this.boundaryChars = null; - this.lookbehind = null; - this.state = S.PARSER_UNINITIALIZED; - - this.index = null; - this.flags = 0; -}; -exports.MultipartParser = MultipartParser; - -MultipartParser.stateToString = function(stateNumber) { - for (var state in S) { - var number = S[state]; - if (number === stateNumber) return state; - } -}; - -MultipartParser.prototype.initWithBoundary = function(str) { - this.boundary = new Buffer(str.length+4); - this.boundary.write('\r\n--', 'ascii', 0); - this.boundary.write(str, 'ascii', 4); - this.lookbehind = new Buffer(this.boundary.length+8); - this.state = S.START; - - this.boundaryChars = {}; - for (var i = 0; i < this.boundary.length; i++) { - this.boundaryChars[this.boundary[i]] = true; - } -}; - -MultipartParser.prototype.write = function(buffer) { - var self = this, - i = 0, - len = buffer.length, - prevIndex = this.index, - index = this.index, - state = this.state, - flags = this.flags, - lookbehind = this.lookbehind, - boundary = this.boundary, - boundaryChars = this.boundaryChars, - boundaryLength = this.boundary.length, - boundaryEnd = boundaryLength - 1, - bufferLength = buffer.length, - c, - cl, - - mark = function(name) { - self[name+'Mark'] = i; - }, - clear = function(name) { - delete self[name+'Mark']; - }, - callback = function(name, buffer, start, end) { - if (start !== undefined && start === end) { - return; - } - - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](buffer, start, end); - } - }, - dataCallback = function(name, clear) { - var markSymbol = name+'Mark'; - if (!(markSymbol in self)) { - return; - } - - if (!clear) { - callback(name, buffer, self[markSymbol], buffer.length); - self[markSymbol] = 0; - } else { - callback(name, buffer, self[markSymbol], i); - delete self[markSymbol]; - } - }; - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case S.PARSER_UNINITIALIZED: - return i; - case S.START: - index = 0; - state = S.START_BOUNDARY; - case S.START_BOUNDARY: - if (index == boundary.length - 2) { - if (c != CR) { - return i; - } - index++; - break; - } else if (index - 1 == boundary.length - 2) { - if (c != LF) { - return i; - } - index = 0; - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - - if (c != boundary[index+2]) { - index = -2; - } - if (c == boundary[index+2]) { - index++; - } - break; - case S.HEADER_FIELD_START: - state = S.HEADER_FIELD; - mark('headerField'); - index = 0; - case S.HEADER_FIELD: - if (c == CR) { - clear('headerField'); - state = S.HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c == HYPHEN) { - break; - } - - if (c == COLON) { - if (index == 1) { - // empty header field - return i; - } - dataCallback('headerField', true); - state = S.HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - return i; - } - break; - case S.HEADER_VALUE_START: - if (c == SPACE) { - break; - } - - mark('headerValue'); - state = S.HEADER_VALUE; - case S.HEADER_VALUE: - if (c == CR) { - dataCallback('headerValue', true); - callback('headerEnd'); - state = S.HEADER_VALUE_ALMOST_DONE; - } - break; - case S.HEADER_VALUE_ALMOST_DONE: - if (c != LF) { - return i; - } - state = S.HEADER_FIELD_START; - break; - case S.HEADERS_ALMOST_DONE: - if (c != LF) { - return i; - } - - callback('headersEnd'); - state = S.PART_DATA_START; - break; - case S.PART_DATA_START: - state = S.PART_DATA; - mark('partData'); - case S.PART_DATA: - prevIndex = index; - - if (index == 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundary.length) { - if (boundary[index] == c) { - if (index == 0) { - dataCallback('partData', true); - } - index++; - } else { - index = 0; - } - } else if (index == boundary.length) { - index++; - if (c == CR) { - // CR = part boundary - flags |= F.PART_BOUNDARY; - } else if (c == HYPHEN) { - // HYPHEN = end boundary - flags |= F.LAST_BOUNDARY; - } else { - index = 0; - } - } else if (index - 1 == boundary.length) { - if (flags & F.PART_BOUNDARY) { - index = 0; - if (c == LF) { - // unset the PART_BOUNDARY flag - flags &= ~F.PART_BOUNDARY; - callback('partEnd'); - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - } else if (flags & F.LAST_BOUNDARY) { - if (c == HYPHEN) { - callback('partEnd'); - callback('end'); - state = S.END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - callback('partData', lookbehind, 0, prevIndex); - prevIndex = 0; - mark('partData'); - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case S.END: - break; - default: - return i; - } - } - - dataCallback('headerField'); - dataCallback('headerValue'); - dataCallback('partData'); - - this.index = index; - this.state = state; - this.flags = flags; - - return len; -}; - -MultipartParser.prototype.end = function() { - var callback = function(self, name) { - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](); - } - }; - if ((this.state == S.HEADER_FIELD_START && this.index == 0) || - (this.state == S.PART_DATA && this.index == this.boundary.length)) { - callback(this, 'partEnd'); - callback(this, 'end'); - } else if (this.state != S.END) { - return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain()); - } -}; - -MultipartParser.prototype.explain = function() { - return 'state = ' + MultipartParser.stateToString(this.state); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/octet_parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/octet_parser.js deleted file mode 100644 index 6e8b5515..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/octet_parser.js +++ /dev/null @@ -1,20 +0,0 @@ -var EventEmitter = require('events').EventEmitter - , util = require('util'); - -function OctetParser(options){ - if(!(this instanceof OctetParser)) return new OctetParser(options); - EventEmitter.call(this); -} - -util.inherits(OctetParser, EventEmitter); - -exports.OctetParser = OctetParser; - -OctetParser.prototype.write = function(buffer) { - this.emit('data', buffer); - return buffer.length; -}; - -OctetParser.prototype.end = function() { - this.emit('end'); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js deleted file mode 100644 index 320ce5a1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -// This is a buffering parser, not quite as nice as the multipart one. -// If I find time I'll rewrite this to be fully streaming as well -var querystring = require('querystring'); - -function QuerystringParser(maxKeys) { - this.maxKeys = maxKeys; - this.buffer = ''; -}; -exports.QuerystringParser = QuerystringParser; - -QuerystringParser.prototype.write = function(buffer) { - this.buffer += buffer.toString('ascii'); - return buffer.length; -}; - -QuerystringParser.prototype.end = function() { - var fields = querystring.parse(this.buffer, '&', '=', { maxKeys: this.maxKeys }); - for (var field in fields) { - this.onField(field, fields[field]); - } - this.buffer = ''; - - this.onEnd(); -}; - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/package.json deleted file mode 100644 index 40dc5818..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "formidable", - "description": "A node.js module for parsing form data, especially file uploads.", - "homepage": "https://github.com/felixge/node-formidable", - "version": "1.0.14", - "devDependencies": { - "gently": "0.8.0", - "findit": "0.1.1", - "hashish": "0.0.4", - "urun": "~0.0.6", - "utest": "0.0.3", - "request": "~2.11.4" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "node test/run.js", - "clean": "rm test/tmp/*" - }, - "engines": { - "node": ">=0.8.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-formidable.git" - }, - "bugs": { - "url": "http://github.com/felixge/node-formidable/issues" - }, - "optionalDependencies": {}, - "readme": "# Formidable\n\n[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)\n\n## Purpose\n\nA node.js module for parsing form data, especially file uploads.\n\n## Current status\n\nThis module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading\nand encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from\na large variety of clients and is considered production-ready.\n\n## Features\n\n* Fast (~500mb/sec), non-buffering multipart parser\n* Automatically writing file uploads to disk\n* Low memory footprint\n* Graceful error handling\n* Very high test coverage\n\n## Installation\n\nVia [npm](http://github.com/isaacs/npm):\n```\nnpm install formidable@latest\n```\nManually:\n```\ngit clone git://github.com/felixge/node-formidable.git formidable\nvim my.js\n# var formidable = require('./formidable');\n```\n\nNote: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.\n\n## Example\n\nParse an incoming file upload.\n```javascript\nvar formidable = require('formidable'),\n http = require('http'),\n util = require('util');\n\nhttp.createServer(function(req, res) {\n if (req.url == '/upload' && req.method.toLowerCase() == 'post') {\n // parse a file upload\n var form = new formidable.IncomingForm();\n\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
    '+\n '
    '+\n '
    '+\n ''+\n '
    '\n );\n}).listen(8080);\n```\n## API\n\n### Formidable.IncomingForm\n```javascript\nvar form = new formidable.IncomingForm()\n```\nCreates a new incoming form.\n\n```javascript\nform.encoding = 'utf-8';\n```\nSets encoding for incoming form fields.\n\n```javascript\nform.uploadDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd();\n```\nThe directory for placing file uploads in. You can move them later on using\n`fs.rename()`. The default directory is picked at module load time depending on\nthe first existing directory from those listed above.\n\n```javascript\nform.keepExtensions = false;\n```\nIf you want the files written to `form.uploadDir` to include the extensions of the original files, set this property to `true`.\n\n```javascript\nform.type\n```\nEither 'multipart' or 'urlencoded' depending on the incoming request.\n\n```javascript\nform.maxFieldsSize = 2 * 1024 * 1024;\n```\nLimits the amount of memory a field (not file) can allocate in bytes.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 2MB.\n\n```javascript\nform.maxFields = 0;\n```\nLimits the number of fields that the querystring parser will decode. Defaults\nto 0 (unlimited).\n\n```javascript\nform.hash = false;\n```\nIf you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.\n\n```javascript\nform.bytesReceived\n```\nThe amount of bytes received for this form so far.\n\n```javascript\nform.bytesExpected\n```\nThe expected number of bytes in this form.\n\n```javascript\nform.parse(request, [cb]);\n```\nParses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback:\n\n\n```javascript\nform.parse(req, function(err, fields, files) {\n // ...\n});\n\nform.onPart(part);\n```\nYou may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing.\n\n```javascript\nform.onPart = function(part) {\n part.addListener('data', function() {\n // ...\n });\n}\n```\nIf you want to use formidable to only handle certain parts for you, you can do so:\n```javascript\nform.onPart = function(part) {\n if (!part.filename) {\n // let formidable handle all non-file parts\n form.handlePart(part);\n }\n}\n```\nCheck the code in this method for further inspiration.\n\n\n### Formidable.File\n```javascript\nfile.size = 0\n```\nThe size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet.\n```javascript\nfile.path = null\n```\nThe path this file is being written to. You can modify this in the `'fileBegin'` event in\ncase you are unhappy with the way formidable generates a temporary path for your files.\n```javascript\nfile.name = null\n```\nThe name this file had according to the uploading client.\n```javascript\nfile.type = null\n```\nThe mime type of this file, according to the uploading client.\n```javascript\nfile.lastModifiedDate = null\n```\nA date object (or `null`) containing the time this file was last written to. Mostly\nhere for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).\n```javascript\nfile.hash = null\n```\nIf hash calculation was set, you can read the hex digest out of this var.\n\n#### Formidable.File#toJSON()\n\n This method returns a JSON-representation of the file, allowing you to\n `JSON.stringify()` the file which is useful for logging and responding\n to requests.\n\n### Events\n\n\n#### 'progress'\n```javascript\nform.on('progress', function(bytesReceived, bytesExpected) {\n});\n```\nEmitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.\n\n\n\n#### 'field'\n```javascript\nform.on('field', function(name, value) {\n});\n```\n\n#### 'fileBegin'\n\nEmitted whenever a field / value pair has been received.\n```javascript\nform.on('fileBegin', function(name, file) {\n});\n```\n\n#### 'file'\n\nEmitted whenever a new file is detected in the upload stream. Use this even if\nyou want to stream the file to somewhere else while buffering the upload on\nthe file system.\n\nEmitted whenever a field / file pair has been received. `file` is an instance of `File`.\n```javascript\nform.on('file', function(name, file) {\n});\n```\n\n#### 'error'\n\nEmitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.\n```javascript\nform.on('error', function(err) {\n});\n```\n\n#### 'aborted'\n\n\nEmitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core).\n```javascript\nform.on('aborted', function() {\n});\n```\n\n##### 'end'\n```javascript\nform.on('end', function() {\n});\n```\nEmitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response.\n\n\n\n## Changelog\n\n### v1.0.14\n\n* Add failing hash tests. (Ben Trask)\n* Enable hash calculation again (Eugene Girshov)\n* Test for immediate data events (Tim Smart)\n* Re-arrange IncomingForm#parse (Tim Smart)\n\n### v1.0.13\n\n* Only update hash if update method exists (Sven Lito)\n* According to travis v0.10 needs to go quoted (Sven Lito)\n* Bumping build node versions (Sven Lito)\n* Additional fix for empty requests (Eugene Girshov)\n* Change the default to 1000, to match the new Node behaviour. (OrangeDog)\n* Add ability to control maxKeys in the querystring parser. (OrangeDog)\n* Adjust test case to work with node 0.9.x (Eugene Girshov)\n* Update package.json (Sven Lito)\n* Path adjustment according to eb4468b (Markus Ast)\n\n### v1.0.12\n\n* Emit error on aborted connections (Eugene Girshov)\n* Add support for empty requests (Eugene Girshov)\n* Fix name/filename handling in Content-Disposition (jesperp)\n* Tolerate malformed closing boundary in multipart (Eugene Girshov)\n* Ignore preamble in multipart messages (Eugene Girshov)\n* Add support for application/json (Mike Frey, Carlos Rodriguez)\n* Add support for Base64 encoding (Elmer Bulthuis)\n* Add File#toJSON (TJ Holowaychuk)\n* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley)\n* Documentation improvements (Sven Lito, Andre Azevedo)\n* Add support for application/octet-stream (Ion Lupascu, Chris Scribner)\n* Use os.tmpDir() to get tmp directory (Andrew Kelley)\n* Improve package.json (Andrew Kelley, Sven Lito)\n* Fix benchmark script (Andrew Kelley)\n* Fix scope issue in incoming_forms (Sven Lito)\n* Fix file handle leak on error (OrangeDog)\n\n### v1.0.11\n\n* Calculate checksums for incoming files (sreuter)\n* Add definition parameters to \"IncomingForm\" as an argument (Math-)\n\n### v1.0.10\n\n* Make parts to be proper Streams (Matt Robenolt)\n\n### v1.0.9\n\n* Emit progress when content length header parsed (Tim Koschützki)\n* Fix Readme syntax due to GitHub changes (goob)\n* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara)\n\n### v1.0.8\n\n* Strip potentially unsafe characters when using `keepExtensions: true`.\n* Switch to utest / urun for testing\n* Add travis build\n\n### v1.0.7\n\n* Remove file from package that was causing problems when installing on windows. (#102)\n* Fix typos in Readme (Jason Davies).\n\n### v1.0.6\n\n* Do not default to the default to the field name for file uploads where\n filename=\"\".\n\n### v1.0.5\n\n* Support filename=\"\" in multipart parts\n* Explain unexpected end() errors in parser better\n\n**Note:** Starting with this version, formidable emits 'file' events for empty\nfile input fields. Previously those were incorrectly emitted as regular file\ninput fields with value = \"\".\n\n### v1.0.4\n\n* Detect a good default tmp directory regardless of platform. (#88)\n\n### v1.0.3\n\n* Fix problems with utf8 characters (#84) / semicolons in filenames (#58)\n* Small performance improvements\n* New test suite and fixture system\n\n### v1.0.2\n\n* Exclude node\\_modules folder from git\n* Implement new `'aborted'` event\n* Fix files in example folder to work with recent node versions\n* Make gently a devDependency\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2)\n\n### v1.0.1\n\n* Fix package.json to refer to proper main directory. (#68, Dean Landolt)\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1)\n\n### v1.0.0\n\n* Add support for multipart boundaries that are quoted strings. (Jeff Craig)\n\nThis marks the beginning of development on version 2.0 which will include\nseveral architectural improvements.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0)\n\n### v0.9.11\n\n* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki)\n* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class\n\n**Important:** The old property names of the File class will be removed in a\nfuture release.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11)\n\n### Older releases\n\nThese releases were done before starting to maintain the above Changelog:\n\n* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10)\n* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9)\n* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8)\n* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7)\n* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6)\n* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5)\n* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4)\n* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3)\n* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2)\n* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0)\n\n## License\n\nFormidable is licensed under the MIT license.\n\n## Ports\n\n* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable\n\n## Credits\n\n* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js\n", - "readmeFilename": "Readme.md", - "_id": "formidable@1.0.14", - "dependencies": {}, - "dist": { - "shasum": "7d6644111e00d9686f1038bbd2c53ec98e166f75" - }, - "_from": "formidable@1.0.14" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/common.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/common.js deleted file mode 100644 index 6a942951..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/common.js +++ /dev/null @@ -1,18 +0,0 @@ -var path = require('path'); - -var root = path.join(__dirname, '../'); -exports.dir = { - root : root, - lib : root + '/lib', - fixture : root + '/test/fixture', - tmp : root + '/test/tmp', -}; - -exports.port = 13532; - -exports.formidable = require('..'); -exports.assert = require('assert'); - -exports.require = function(lib) { - return require(exports.dir.lib + '/' + lib); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png deleted file mode 100644 index 20b1a7f1..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz deleted file mode 100644 index 4a85af7a..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif deleted file mode 100755 index 75b945d2..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png deleted file mode 100644 index 1c16a71e..00000000 Binary files a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png and /dev/null differ diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js deleted file mode 100644 index fc220265..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports['menu_seperator.png.http'] = [ - {type: 'file', name: 'image', filename: 'menu_separator.png', fixture: 'menu_separator.png', - sha1: 'c845ca3ea794be298f2a1b79769b71939eaf4e54'} -]; - -module.exports['beta-sticker-1.png.http'] = [ - {type: 'file', name: 'sticker', filename: 'beta-sticker-1.png', fixture: 'beta-sticker-1.png', - sha1: '6abbcffd12b4ada5a6a084fe9e4584f846331bc4'} -]; - -module.exports['blank.gif.http'] = [ - {type: 'file', name: 'file', filename: 'blank.gif', fixture: 'blank.gif', - sha1: 'a1fdee122b95748d81cee426d717c05b5174fe96'} -]; - -module.exports['binaryfile.tar.gz.http'] = [ - {type: 'file', name: 'file', filename: 'binaryfile.tar.gz', fixture: 'binaryfile.tar.gz', - sha1: 'cfabe13b348e5e69287d677860880c52a69d2155'} -]; - -module.exports['plain.txt.http'] = [ - {type: 'file', name: 'file', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'} -]; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js deleted file mode 100644 index 4489176d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - 'empty.http': [], - 'empty-urlencoded.http': [], - 'empty-multipart.http': [], - 'minimal.http': [], -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js deleted file mode 100644 index f03b4f01..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['filename-name.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js deleted file mode 100644 index d2e4cfdb..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['crlf.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['preamble.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index eb76fdc1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,21 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - {type: 'field', name: 'title', value: 'Weird filename'}, - {type: 'file', name: 'upload', filename: filename, fixture: properFilename}, - ]; -}; - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js deleted file mode 100644 index e59c5b26..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports['missing-hyphens1.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; -module.exports['missing-hyphens2.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js deleted file mode 100644 index a4761699..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js deleted file mode 100644 index 8e10ac97..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +++ /dev/null @@ -1,96 +0,0 @@ -var hashish = require('hashish'); -var fs = require('fs'); -var findit = require('findit'); -var path = require('path'); -var http = require('http'); -var net = require('net'); -var assert = require('assert'); - -var common = require('../common'); -var formidable = common.formidable; - -var server = http.createServer(); -server.listen(common.port, findFixtures); - -function findFixtures() { - var fixtures = []; - findit - .sync(common.dir.fixture + '/js') - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - fixtures.push({ - name : group + '/' + name, - fixture : fixture, - }); - }); - }); - - testNext(fixtures); -} - -function testNext(fixtures) { - var fixture = fixtures.shift(); - if (!fixture) return server.close(); - - var name = fixture.name; - var fixture = fixture.fixture; - - uploadFixture(name, function(err, parts) { - if (err) throw err; - - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var file = parsedPart.value; - assert.equal(file.name, expectedPart.filename); - if(expectedPart.sha1) assert.equal(file.hash, expectedPart.sha1); - } - }); - - testNext(fixtures); - }); -}; - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.hash = "sha1"; - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - - var parts = []; - form - .on('error', callback) - .on('fileBegin', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }) - .on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }) - .on('end', function() { - res.end('OK'); - callback(null, parts); - }); - }); - - var socket = net.createConnection(common.port); - var file = fs.createReadStream(common.dir.fixture + '/http/' + name); - - file.pipe(socket, {end: false}); - socket.on('data', function () { - socket.end(); - }); - -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-json.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-json.js deleted file mode 100644 index 28e758e5..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-json.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var formidable = common.formidable; -var http = require('http'); -var assert = require('assert'); - -var testData = { - numbers: [1, 2, 3, 4, 5], - nested: { key: 'value' } -}; - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - assert.deepEqual(fields, testData); - - res.end(); - server.close(); - }); -}); - -var port = common.port; - -server.listen(port, function(err){ - assert.equal(err, null); - - var request = http.request({ - port: port, - method: 'POST', - headers: { - 'Content-Type': 'application/json' - } - }); - - request.write(JSON.stringify(testData)); - request.end(); -}); - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js deleted file mode 100644 index 643d2c6f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var formidable = common.formidable; -var http = require('http'); -var fs = require('fs'); -var path = require('path'); -var hashish = require('hashish'); -var assert = require('assert'); - -var testFilePath = path.join(__dirname, '../fixture/file/binaryfile.tar.gz'); - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - assert.equal(hashish(files).length, 1); - var file = files.file; - - assert.equal(file.size, 301); - - var uploaded = fs.readFileSync(file.path); - var original = fs.readFileSync(testFilePath); - - assert.deepEqual(uploaded, original); - - res.end(); - server.close(); - }); -}); - -var port = common.port; - -server.listen(port, function(err){ - assert.equal(err, null); - - var request = http.request({ - port: port, - method: 'POST', - headers: { - 'Content-Type': 'application/octet-stream' - } - }); - - fs.createReadStream(testFilePath).pipe(request); -}); - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/common.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/common.js deleted file mode 100644 index 2b985981..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/common.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -try { - global.Gently = require('gently'); -} catch (e) { - throw new Error('this test suite requires node-gently'); -} - -exports.lib = path.join(__dirname, '../../lib'); - -global.GENTLY = new Gently(); - -global.assert = require('assert'); -global.TEST_PORT = 13532; -global.TEST_FIXTURES = path.join(__dirname, '../fixture'); -global.TEST_TMP = path.join(__dirname, '../tmp'); - -// Stupid new feature in node that complains about gently attaching too many -// listeners to process 'exit'. This is a workaround until I can think of a -// better way to deal with this. -if (process.setMaxListeners) { - process.setMaxListeners(10000); -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js deleted file mode 100644 index 75232aa4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +++ /dev/null @@ -1,80 +0,0 @@ -var common = require('../common'); -var CHUNK_LENGTH = 10, - multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - fixtures = require(TEST_FIXTURES + '/multipart'), - Buffer = require('buffer').Buffer; - -Object.keys(fixtures).forEach(function(name) { - var fixture = fixtures[name], - buffer = new Buffer(Buffer.byteLength(fixture.raw, 'binary')), - offset = 0, - chunk, - nparsed, - - parts = [], - part = null, - headerField, - headerValue, - endCalled = ''; - - parser.initWithBoundary(fixture.boundary); - parser.onPartBegin = function() { - part = {headers: {}, data: ''}; - parts.push(part); - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString('ascii', start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString('ascii', start, end); - } - - parser.onHeaderEnd = function() { - part.headers[headerField] = headerValue; - headerField = ''; - headerValue = ''; - }; - - parser.onPartData = function(b, start, end) { - var str = b.toString('ascii', start, end); - part.data += b.slice(start, end); - } - - parser.onEnd = function() { - endCalled = true; - } - - buffer.write(fixture.raw, 'binary', 0); - - while (offset < buffer.length) { - if (offset + CHUNK_LENGTH < buffer.length) { - chunk = buffer.slice(offset, offset+CHUNK_LENGTH); - } else { - chunk = buffer.slice(offset, buffer.length); - } - offset = offset + CHUNK_LENGTH; - - nparsed = parser.write(chunk); - if (nparsed != chunk.length) { - if (fixture.expectError) { - return; - } - puts('-- ERROR --'); - p(chunk.toString('ascii')); - throw new Error(chunk.length+' bytes written, but only '+nparsed+' bytes parsed!'); - } - } - - if (fixture.expectError) { - throw new Error('expected parse error did not happen'); - } - - assert.ok(endCalled); - assert.deepEqual(parts, fixture.parts); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js deleted file mode 100644 index 52ceedb4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +++ /dev/null @@ -1,104 +0,0 @@ -var common = require('../common'); -var WriteStreamStub = GENTLY.stub('fs', 'WriteStream'); - -var File = require(common.lib + '/file'), - EventEmitter = require('events').EventEmitter, - file, - gently; - -function test(test) { - gently = new Gently(); - file = new File(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.ok(file instanceof EventEmitter); - assert.strictEqual(file.size, 0); - assert.strictEqual(file.path, null); - assert.strictEqual(file.name, null); - assert.strictEqual(file.type, null); - assert.strictEqual(file.lastModifiedDate, null); - - assert.strictEqual(file._writeStream, null); - - (function testSetProperties() { - var file2 = new File({foo: 'bar'}); - assert.equal(file2.foo, 'bar'); - })(); -}); - -test(function open() { - var WRITE_STREAM; - file.path = '/foo'; - - gently.expect(WriteStreamStub, 'new', function (path) { - WRITE_STREAM = this; - assert.strictEqual(path, file.path); - }); - - file.open(); - assert.strictEqual(file._writeStream, WRITE_STREAM); -}); - -test(function write() { - var BUFFER = {length: 10}, - CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'write', function (buffer, cb) { - assert.strictEqual(buffer, BUFFER); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.ok(file.lastModifiedDate instanceof Date); - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 10); - }); - - cb(); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 20); - }); - - cb(); - }); - - file.write(BUFFER, CB); -}); - -test(function end() { - var CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'end', function (cb) { - gently.expect(file, 'emit', function (event) { - assert.equal(event, 'end'); - }); - - CB_STUB = gently.expect(function endCb() { - }); - - cb(); - }); - - file.end(CB); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js deleted file mode 100644 index 25bd887f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +++ /dev/null @@ -1,756 +0,0 @@ -var common = require('../common'); -var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'), - QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'), - EventEmitterStub = GENTLY.stub('events', 'EventEmitter'), - StreamStub = GENTLY.stub('stream', 'Stream'), - FileStub = GENTLY.stub('./file'); - -var formidable = require(common.lib + '/index'), - IncomingForm = formidable.IncomingForm, - events = require('events'), - fs = require('fs'), - path = require('path'), - Buffer = require('buffer').Buffer, - fixtures = require(TEST_FIXTURES + '/multipart'), - form, - gently; - -function test(test) { - gently = new Gently(); - gently.expect(EventEmitterStub, 'call'); - form = new IncomingForm(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.strictEqual(form.error, null); - assert.strictEqual(form.ended, false); - assert.strictEqual(form.type, null); - assert.strictEqual(form.headers, null); - assert.strictEqual(form.keepExtensions, false); - // Can't assume dir === '/tmp' for portability - // assert.strictEqual(form.uploadDir, '/tmp'); - // Make sure it is a directory instead - assert.doesNotThrow(function () { - assert(fs.statSync(form.uploadDir).isDirectory()); - }); - assert.strictEqual(form.encoding, 'utf-8'); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024); - assert.strictEqual(form._parser, null); - assert.strictEqual(form._flushing, 0); - assert.strictEqual(form._fieldsSize, 0); - assert.ok(form instanceof EventEmitterStub); - assert.equal(form.constructor.name, 'IncomingForm'); - - (function testSimpleConstructor() { - gently.expect(EventEmitterStub, 'call'); - var form = IncomingForm(); - assert.ok(form instanceof IncomingForm); - })(); - - (function testSimpleConstructorShortcut() { - gently.expect(EventEmitterStub, 'call'); - var form = formidable(); - assert.ok(form instanceof IncomingForm); - })(); -}); - -test(function parse() { - var REQ = {headers: {}} - , emit = {}; - - gently.expect(form, 'writeHeaders', function(headers) { - assert.strictEqual(headers, REQ.headers); - }); - - var EVENTS = ['error', 'aborted', 'data', 'end']; - gently.expect(REQ, 'on', EVENTS.length, function(event, fn) { - assert.equal(event, EVENTS.shift()); - emit[event] = fn; - return this; - }); - - form.parse(REQ); - - (function testPause() { - gently.expect(REQ, 'pause'); - assert.strictEqual(form.pause(), true); - })(); - - (function testPauseCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testPauseHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testResume() { - gently.expect(REQ, 'resume'); - assert.strictEqual(form.resume(), true); - })(); - - (function testResumeCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testResumeHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testEmitError() { - var ERR = new Error('something bad happened'); - gently.expect(form, '_error',function(err) { - assert.strictEqual(err, ERR); - }); - emit.error(ERR); - })(); - - (function testEmitAborted() { - gently.expect(form, 'emit',function(event) { - assert.equal(event, 'aborted'); - }); - gently.expect(form, '_error'); - - emit.aborted(); - })(); - - - (function testEmitData() { - var BUFFER = [1, 2, 3]; - gently.expect(form, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - }); - emit.data(BUFFER); - })(); - - (function testEmitEnd() { - form._parser = {}; - - (function testWithError() { - var ERR = new Error('haha'); - gently.expect(form._parser, 'end', function() { - return ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - emit.end(); - })(); - - (function testWithoutError() { - gently.expect(form._parser, 'end'); - emit.end(); - })(); - - (function testAfterError() { - form.error = true; - emit.end(); - })(); - })(); - - (function testWithCallback() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(), - REQ = {headers: {}}, - parseCalled = 0; - - gently.expect(form, 'on', 4, function(event, fn) { - if (event == 'field') { - fn('field1', 'foo'); - fn('field1', 'bar'); - fn('field2', 'nice'); - } - - if (event == 'file') { - fn('file1', '1'); - fn('file1', '2'); - fn('file2', '3'); - } - - if (event == 'end') { - fn(); - } - return this; - }); - - gently.expect(form, 'writeHeaders'); - - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - var parseCbOk = function (err, fields, files) { - assert.deepEqual(fields, {field1: 'bar', field2: 'nice'}); - assert.deepEqual(files, {file1: '2', file2: '3'}); - }; - form.parse(REQ, parseCbOk); - - var ERR = new Error('test'); - gently.expect(form, 'on', 3, function(event, fn) { - if (event == 'field') { - fn('foo', 'bar'); - } - - if (event == 'error') { - fn(ERR); - gently.expect(form, 'on'); - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - } - return this; - }); - - form.parse(REQ, function parseCbErr(err, fields, files) { - assert.strictEqual(err, ERR); - assert.deepEqual(fields, {foo: 'bar'}); - }); - })(); - - (function testWriteOrder() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(); - var REQ = new events.EventEmitter(); - var BUF = {}; - var DATACB = null; - - REQ.on('newListener', function(event, fn) { - if ('data' === event) fn(BUF); - }); - - gently.expect(form, 'writeHeaders'); - gently.expect(form, 'write', function(buf) { - assert.strictEqual(buf, BUF); - }); - - form.parse(REQ); - })(); -}); - -test(function pause() { - assert.strictEqual(form.pause(), false); -}); - -test(function resume() { - assert.strictEqual(form.resume(), false); -}); - - -test(function writeHeaders() { - var HEADERS = {}; - gently.expect(form, '_parseContentLength'); - gently.expect(form, '_parseContentType'); - - form.writeHeaders(HEADERS); - assert.strictEqual(form.headers, HEADERS); -}); - -test(function write() { - var parser = {}, - BUFFER = [1, 2, 3]; - - form._parser = parser; - form.bytesExpected = 523423; - - (function testBasic() { - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, BUFFER.length); - assert.equal(bytesExpected, form.bytesExpected); - }); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length; - }); - - assert.equal(form.write(BUFFER), BUFFER.length); - assert.equal(form.bytesReceived, BUFFER.length); - })(); - - (function testParserError() { - gently.expect(form, 'emit'); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length - 1; - }); - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/parser error/i)); - }); - - assert.equal(form.write(BUFFER), BUFFER.length - 1); - assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length); - })(); - - (function testUninitialized() { - delete form._parser; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unintialized parser/i)); - }); - form.write(BUFFER); - })(); -}); - -test(function parseContentType() { - var HEADERS = {}; - - form.headers = {'content-type': 'application/x-www-form-urlencoded'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - // accept anything that has 'urlencoded' in it - form.headers = {'content-type': 'broken-client/urlencoded-stupid'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - var BOUNDARY = '---------------------------57814261102167618332366269'; - form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - - (function testQuotedBoundary() { - form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - })(); - - (function testNoBoundary() { - form.headers = {'content-type': 'multipart/form-data'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no multipart boundary/i)); - }); - form._parseContentType(); - })(); - - (function testNoContentType() { - form.headers = {}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no content-type/i)); - }); - form._parseContentType(); - })(); - - (function testUnknownContentType() { - form.headers = {'content-type': 'invalid'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unknown content-type/i)); - }); - form._parseContentType(); - })(); -}); - -test(function parseContentLength() { - var HEADERS = {}; - - form.headers = {}; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 0); - }); - form._parseContentLength(); - - form.headers['content-length'] = '8'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, 0); - assert.strictEqual(form.bytesExpected, 8); - - // JS can be evil, lets make sure we are not - form.headers['content-length'] = '08'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesExpected, 8); -}); - -test(function _initMultipart() { - var BOUNDARY = '123', - PARSER; - - gently.expect(MultipartParserStub, 'new', function() { - PARSER = this; - }); - - gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - - form._initMultipart(BOUNDARY); - assert.equal(form.type, 'multipart'); - assert.strictEqual(form._parser, PARSER); - - (function testRegularField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.strictEqual(part, PART); - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field1"' - , 'foo': 'bar' - } - ); - assert.equal(part.name, 'field1'); - - var strings = ['hello', ' world']; - gently.expect(part, 'emit', 2, function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), strings.shift()); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10); - PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('foo'), 0, 3); - PARSER.onHeaderValue(new Buffer('bar'), 0, 3); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('hello world'), 0, 5); - PARSER.onPartData(new Buffer('hello world'), 5, 11); - PARSER.onPartEnd(); - })(); - - (function testFileField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"' - , 'content-type': 'text/plain' - } - ); - assert.equal(part.name, 'field2'); - assert.equal(part.filename, 'Sun"et.jpg'); - assert.equal(part.mime, 'text/plain'); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), '... contents of file1.txt ...'); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12); - PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29); - PARSER.onPartEnd(); - })(); - - (function testEnd() { - gently.expect(form, '_maybeEnd'); - PARSER.onEnd(); - assert.ok(form.ended); - })(); -}); - -test(function _fileName() { - // TODO - return; -}); - -test(function _initUrlencoded() { - var PARSER; - - gently.expect(QuerystringParserStub, 'new', function() { - PARSER = this; - }); - - form._initUrlencoded(); - assert.equal(form.type, 'urlencoded'); - assert.strictEqual(form._parser, PARSER); - - (function testOnField() { - var KEY = 'KEY', VAL = 'VAL'; - gently.expect(form, 'emit', function(field, key, val) { - assert.equal(field, 'field'); - assert.equal(key, KEY); - assert.equal(val, VAL); - }); - - PARSER.onField(KEY, VAL); - })(); - - (function testOnEnd() { - gently.expect(form, '_maybeEnd'); - - PARSER.onEnd(); - assert.equal(form.ended, true); - })(); -}); - -test(function _error() { - var ERR = new Error('bla'); - - gently.expect(form, 'pause'); - gently.expect(form, 'emit', function(event, err) { - assert.equal(event, 'error'); - assert.strictEqual(err, ERR); - }); - - form._error(ERR); - assert.strictEqual(form.error, ERR); - - // make sure _error only does its thing once - form._error(ERR); -}); - -test(function onPart() { - var PART = {}; - gently.expect(form, 'handlePart', function(part) { - assert.strictEqual(part, PART); - }); - - form.onPart(PART); -}); - -test(function handlePart() { - (function testUtf8Field() { - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field'); - assert.equal(value, 'hello world: €'); - }); - - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testBinaryField() { - var PART = new events.EventEmitter(); - PART.name = 'my_field2'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field2'); - assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary')); - }); - - form.encoding = 'binary'; - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testFieldSize() { - form.maxFieldsSize = 8; - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, '_error', function(err) { - assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data'); - }); - - form.handlePart(PART); - form._fieldsSize = 1; - PART.emit('data', new Buffer(7)); - PART.emit('data', new Buffer(1)); - })(); - - (function testFilePart() { - var PART = new events.EventEmitter(), - FILE = new events.EventEmitter(), - PATH = '/foo/bar'; - - PART.name = 'my_file'; - PART.filename = 'sweet.txt'; - PART.mime = 'sweet.txt'; - - gently.expect(form, '_uploadPath', function(filename) { - assert.equal(filename, PART.filename); - return PATH; - }); - - gently.expect(FileStub, 'new', function(properties) { - assert.equal(properties.path, PATH); - assert.equal(properties.name, PART.filename); - assert.equal(properties.type, PART.mime); - FILE = this; - - gently.expect(form, 'emit', function (event, field, file) { - assert.equal(event, 'fileBegin'); - assert.strictEqual(field, PART.name); - assert.strictEqual(file, FILE); - }); - - gently.expect(FILE, 'open'); - }); - - form.handlePart(PART); - assert.equal(form._flushing, 1); - - var BUFFER; - gently.expect(form, 'pause'); - gently.expect(FILE, 'write', function(buffer, cb) { - assert.strictEqual(buffer, BUFFER); - gently.expect(form, 'resume'); - // @todo handle cb(new Err) - cb(); - }); - - PART.emit('data', BUFFER = new Buffer('test')); - - gently.expect(FILE, 'end', function(cb) { - gently.expect(form, 'emit', function(event, field, file) { - assert.equal(event, 'file'); - assert.strictEqual(file, FILE); - }); - - gently.expect(form, '_maybeEnd'); - - cb(); - assert.equal(form._flushing, 0); - }); - - PART.emit('end'); - })(); -}); - -test(function _uploadPath() { - (function testUniqueId() { - var UUID_A, UUID_B; - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - assert.equal(uploadDir, form.uploadDir); - UUID_A = uuid; - }); - form._uploadPath(); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - UUID_B = uuid; - }); - form._uploadPath(); - - assert.notEqual(UUID_A, UUID_B); - })(); - - (function testFileExtension() { - form.keepExtensions = true; - var FILENAME = 'foo.jpg', - EXT = '.bar'; - - gently.expect(GENTLY.hijacked.path, 'extname', function(filename) { - assert.equal(filename, FILENAME); - gently.restore(path, 'extname'); - - return EXT; - }); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) { - assert.equal(path.extname(name), EXT); - }); - form._uploadPath(FILENAME); - })(); -}); - -test(function _maybeEnd() { - gently.expect(form, 'emit', 0); - form._maybeEnd(); - - form.ended = true; - form._flushing = 1; - form._maybeEnd(); - - gently.expect(form, 'emit', function(event) { - assert.equal(event, 'end'); - }); - - form.ended = true; - form._flushing = 0; - form._maybeEnd(); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js deleted file mode 100644 index bf2cd5e1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('../common'); -var multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - events = require('events'), - Buffer = require('buffer').Buffer, - parser; - -function test(test) { - parser = new MultipartParser(); - test(); -} - -test(function constructor() { - assert.equal(parser.boundary, null); - assert.equal(parser.state, 0); - assert.equal(parser.flags, 0); - assert.equal(parser.boundaryChars, null); - assert.equal(parser.index, null); - assert.equal(parser.lookbehind, null); - assert.equal(parser.constructor.name, 'MultipartParser'); -}); - -test(function initWithBoundary() { - var boundary = 'abc'; - parser.initWithBoundary(boundary); - assert.deepEqual(Array.prototype.slice.call(parser.boundary), [13, 10, 45, 45, 97, 98, 99]); - assert.equal(parser.state, multipartParser.START); - - assert.deepEqual(parser.boundaryChars, {10: true, 13: true, 45: true, 97: true, 98: true, 99: true}); -}); - -test(function parserError() { - var boundary = 'abc', - buffer = new Buffer(5); - - parser.initWithBoundary(boundary); - buffer.write('--ad', 'ascii', 0); - assert.equal(parser.write(buffer), 5); -}); - -test(function end() { - (function testError() { - assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain()); - })(); - - (function testRegular() { - parser.state = multipartParser.END; - assert.strictEqual(parser.end(), undefined); - })(); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js deleted file mode 100644 index 54d3e2d5..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var QuerystringParser = require(common.lib + '/querystring_parser').QuerystringParser, - Buffer = require('buffer').Buffer, - gently, - parser; - -function test(test) { - gently = new Gently(); - parser = new QuerystringParser(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.equal(parser.buffer, ''); - assert.equal(parser.constructor.name, 'QuerystringParser'); -}); - -test(function write() { - var a = new Buffer('a=1'); - assert.equal(parser.write(a), a.length); - - var b = new Buffer('&b=2'); - parser.write(b); - assert.equal(parser.buffer, a + b); -}); - -test(function end() { - var FIELDS = {a: ['b', {c: 'd'}], e: 'f'}; - - gently.expect(GENTLY.hijacked.querystring, 'parse', function(str) { - assert.equal(str, parser.buffer); - return FIELDS; - }); - - gently.expect(parser, 'onField', Object.keys(FIELDS).length, function(key, val) { - assert.deepEqual(FIELDS[key], val); - }); - - gently.expect(parser, 'onEnd'); - - parser.buffer = 'my buffer'; - parser.end(); - assert.equal(parser.buffer, ''); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js deleted file mode 100644 index b35ffd68..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +++ /dev/null @@ -1,71 +0,0 @@ -var common = require('../common'); -var BOUNDARY = '---------------------------10102754414578508781458777923', - FIXTURE = TEST_FIXTURES+'/multi_video.upload', - fs = require('fs'), - http = require('http'), - formidable = require(common.lib + '/index'), - server = http.createServer(); - -server.on('request', function(req, res) { - var form = new formidable.IncomingForm(), - uploads = {}; - - form.uploadDir = TEST_TMP; - form.hash = 'sha1'; - form.parse(req); - - form - .on('fileBegin', function(field, file) { - assert.equal(field, 'upload'); - - var tracker = {file: file, progress: [], ended: false}; - uploads[file.name] = tracker; - file - .on('progress', function(bytesReceived) { - tracker.progress.push(bytesReceived); - assert.equal(bytesReceived, file.size); - }) - .on('end', function() { - tracker.ended = true; - }); - }) - .on('field', function(field, value) { - assert.equal(field, 'title'); - assert.equal(value, ''); - }) - .on('file', function(field, file) { - assert.equal(field, 'upload'); - assert.strictEqual(uploads[file.name].file, file); - }) - .on('end', function() { - assert.ok(uploads['shortest_video.flv']); - assert.ok(uploads['shortest_video.flv'].ended); - assert.ok(uploads['shortest_video.flv'].progress.length > 3); - assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a'); - assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.size); - assert.ok(uploads['shortest_video.mp4']); - assert.ok(uploads['shortest_video.mp4'].ended); - assert.ok(uploads['shortest_video.mp4'].progress.length > 3); - assert.equal(uploads['shortest_video.mp4'].file.hash, '937dfd4db263f4887ceae19341dcc8d63bcd557f'); - - server.close(); - res.writeHead(200); - res.end('good'); - }); -}); - -server.listen(TEST_PORT, function() { - var stat, headers, request, fixture; - - stat = fs.statSync(FIXTURE); - request = http.request({ - port: TEST_PORT, - path: '/', - method: 'POST', - headers: { - 'content-type': 'multipart/form-data; boundary='+BOUNDARY, - 'content-length': stat.size, - }, - }); - fs.createReadStream(FIXTURE).pipe(request); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/run.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/run.js deleted file mode 100755 index 02d6d5c1..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/run.js +++ /dev/null @@ -1 +0,0 @@ -require('urun')(__dirname) diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js deleted file mode 100644 index 4ea4431a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js +++ /dev/null @@ -1,27 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var formidable = require('../../lib/index'); - -var server = http.createServer(function (req, res) { - var form = new formidable.IncomingForm(); - var aborted_received = false; - form.on('aborted', function () { - aborted_received = true; - }); - form.on('error', function () { - assert(aborted_received, 'Error event should follow aborted'); - server.close(); - }); - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.parse(req); -}).listen(0, 'localhost', function () { - var client = net.connect(server.address().port); - client.write( - "POST / HTTP/1.1\r\n" + - "Content-Length: 70\r\n" + - "Content-Type: multipart/form-data; boundary=foo\r\n\r\n"); - client.end(); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js deleted file mode 100644 index 165628ab..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js +++ /dev/null @@ -1,48 +0,0 @@ -var assert = require('assert'); -var common = require('../common'); -var formidable = require('../../lib/index'); -var http = require('http'); - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.on('error', function (e) { - res.writeHead(500); - res.end(e.message); - }); - form.parse(req); -}); - -server.listen(0, function() { - var body = - '--foo\r\n' + - 'Content-Disposition: form-data; name="file1"; filename="file1"\r\n' + - 'Content-Type: application/octet-stream\r\n' + - '\r\nThis is the first file\r\n' + - '--foo\r\n' + - 'Content-Type: application/octet-stream\r\n' + - 'Content-Disposition: form-data; name="file2"; filename="file2"\r\n' + - 'Content-Transfer-Encoding: unknown\r\n' + - '\r\nThis is the second file\r\n' + - '--foo--\r\n'; - - var req = http.request({ - method: 'POST', - port: server.address().port, - headers: { - 'Content-Length': body.length, - 'Content-Type': 'multipart/form-data; boundary=foo' - } - }); - req.on('response', function (res) { - assert.equal(res.statusCode, 500); - res.on('data', function () {}); - res.on('end', function () { - server.close(); - }); - }); - req.end(body); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js deleted file mode 100644 index 19393287..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js +++ /dev/null @@ -1,49 +0,0 @@ -var http = require('http'), - formidable = require('../../lib/index'), - request = require('request'), - assert = require('assert'); - -var host = 'localhost'; - -var index = [ - '
    ', - ' ', - ' ', - '
    ' -].join("\n"); - -var server = http.createServer(function(req, res) { - - // Show a form for testing purposes. - if (req.method == 'GET') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end(index); - return; - } - - // Parse form and write results to response. - var form = new formidable.IncomingForm(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write(JSON.stringify({err: err, fields: fields, files: files})); - res.end(); - }); - -}).listen(0, host, function() { - - console.log("Server up and running..."); - - var server = this, - url = 'http://' + host + ':' + server.address().port; - - var parts = [ - {'Content-Disposition': 'form-data; name="foo"', 'body': 'bar'} - ] - - var req = request({method: 'POST', url: url, multipart: parts}, function(e, res, body) { - var obj = JSON.parse(body); - assert.equal("bar", obj.fields.foo); - server.close(); - }); - -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/tools/base64.html b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/tools/base64.html deleted file mode 100644 index 48ad92e0..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/tools/base64.html +++ /dev/null @@ -1,67 +0,0 @@ - - - Convert a file to a base64 request - - - - - - - -
    -
    -
    -
    -
    -
    -

    -Don't forget to save the output with windows (CRLF) line endings! -

    - - - diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-file.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-file.js deleted file mode 100644 index fc8f36e5..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-file.js +++ /dev/null @@ -1,33 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var File = common.require('file'); - -var file; -var now = new Date; -test('IncomingForm', { - before: function() { - file = new File({ - size: 1024, - path: '/tmp/cat.png', - name: 'cat.png', - type: 'image/png', - lastModifiedDate: now, - filename: 'cat.png', - mime: 'image/png' - }) - }, - - '#toJSON()': function() { - var obj = file.toJSON(); - var len = Object.keys(obj).length; - assert.equal(1024, obj.size); - assert.equal('/tmp/cat.png', obj.path); - assert.equal('cat.png', obj.name); - assert.equal('image/png', obj.type); - assert.equal('image/png', obj.mime); - assert.equal('cat.png', obj.filename); - assert.equal(now, obj.mtime); - assert.equal(len, 8); - } -}); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js deleted file mode 100644 index fe2ac1c6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js +++ /dev/null @@ -1,63 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var IncomingForm = common.require('incoming_form').IncomingForm; -var path = require('path'); - -var form; -test('IncomingForm', { - before: function() { - form = new IncomingForm(); - }, - - '#_fileName with regular characters': function() { - var filename = 'foo.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'foo.txt'); - }, - - '#_fileName with unescaped quote': function() { - var filename = 'my".txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with escaped quote': function() { - var filename = 'my%22.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with bad quote and additional sub-header': function() { - var filename = 'my".txt'; - var header = makeHeader(filename) + '; foo="bar"'; - assert.equal(form._fileName(header), filename); - }, - - '#_fileName with semicolon': function() { - var filename = 'my;.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my;.txt'); - }, - - '#_fileName with utf8 character': function() { - var filename = 'my☃.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my☃.txt'); - }, - - '#_uploadPath strips harmful characters from extension when keepExtensions': function() { - form.keepExtensions = true; - - var ext = path.extname(form._uploadPath('fine.jpg?foo=bar')); - assert.equal(ext, '.jpg'); - - var ext = path.extname(form._uploadPath('fine?foo=bar')); - assert.equal(ext, ''); - - var ext = path.extname(form._uploadPath('super.cr2+dsad')); - assert.equal(ext, '.cr2'); - - var ext = path.extname(form._uploadPath('super.bar')); - assert.equal(ext, '.bar'); - }, -}); - -function makeHeader(filename) { - return 'Content-Disposition: form-data; name="upload"; filename="' + filename + '"'; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/tool/record.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/tool/record.js deleted file mode 100644 index 9f1cef86..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/formidable/tool/record.js +++ /dev/null @@ -1,47 +0,0 @@ -var http = require('http'); -var fs = require('fs'); -var connections = 0; - -var server = http.createServer(function(req, res) { - var socket = req.socket; - console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/History.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/History.md deleted file mode 100644 index c8aa68fa..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Makefile b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Readme.md deleted file mode 100644 index 1cdd68a2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/Readme.md +++ /dev/null @@ -1,29 +0,0 @@ - -# pause - - Pause streams... - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/index.js deleted file mode 100644 index 1b7b3794..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -module.exports = function(obj){ - var onData - , onEnd - , events = []; - - // buffer data - obj.on('data', onData = function(data, encoding){ - events.push(['data', data, encoding]); - }); - - // buffer end - obj.on('end', onEnd = function(data, encoding){ - events.push(['end', data, encoding]); - }); - - return { - end: function(){ - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - resume: function(){ - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/package.json deleted file mode 100644 index eb6f340f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/pause/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "pause", - "version": "0.0.1", - "description": "Pause streams...", - "keywords": [], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# pause\n\n Pause streams...\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "pause@0.0.1", - "dist": { - "shasum": "d5c7a94280e1caa48c297fa69e880bc920060194" - }, - "_from": "pause@0.0.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.gitmodules b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/index.js deleted file mode 100644 index 590491e3..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/index.js +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) ret.push(key); - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Create a nullary object if possible - */ - -function createObject() { - return Object.create - ? Object.create(null) - : {}; -} - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = createObject(); - var t = createObject(); - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = createObject(); - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Restore Object.prototype. - * see pull-request #58 - */ - -function restoreProto(obj) { - if (!Object.create) return obj; - if (isArray(obj)) return obj; - if (obj && 'object' != typeof obj) return obj; - - for (var key in obj) { - if (hasOwnProperty.call(obj, key)) { - obj[key] = restoreProto(obj[key]); - } - } - - obj.__proto__ = Object.prototype; - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: createObject() }).base; - - return restoreProto(compact(ret)); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/package.json deleted file mode 100644 index 551b8c9a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/qs/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.5", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "qs@0.6.5", - "dist": { - "shasum": "9c8de89a38e80f683e369145de02ce5887cdb196" - }, - "_from": "qs@0.6.5" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/History.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/History.md deleted file mode 100644 index 20c53190..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/History.md +++ /dev/null @@ -1,25 +0,0 @@ - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Makefile b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Makefile deleted file mode 100644 index a9dcfd50..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Readme.md deleted file mode 100644 index ea7b2341..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/Readme.md +++ /dev/null @@ -1,128 +0,0 @@ -# send - - Send is Connect's `static()` extracted for generalized use, a streaming static file - server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework. - -## Installation - - $ npm install send - -## Examples - - Small: - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - send(req, req.url).pipe(res); -}).listen(3000); -``` - - Serving from a root directory with custom error-handling: - -```js -var http = require('http'); -var send = require('send'); -var url = require('url'); - -var app = http.createServer(function(req, res){ - // your custom error-handling logic: - function error(err) { - res.statusCode = err.status || 500; - res.end(err.message); - } - - // your custom directory handling logic: - function redirect() { - res.statusCode = 301; - res.setHeader('Location', req.url + '/'); - res.end('Redirecting to ' + req.url + '/'); - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, url.parse(req.url).pathname) - .root('/www/example.com/public') - .on('error', error) - .on('directory', redirect) - .pipe(res); -}).listen(3000); -``` - -## API - -### Events - - - `error` an error occurred `(err)` - - `directory` a directory was requested - - `file` a file was requested `(path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -### .root(dir) - - Serve files relative to `path`. Aliased as `.from(dir)`. - -### .index(path) - - By default send supports "index.html" files, to disable this - invoke `.index(false)` or to supply a new index pass a string. - -### .maxage(ms) - - Provide a max-age in milliseconds for http caching, defaults to 0. - -### .hidden(bool) - - Enable or disable transfer of hidden files, defaults to false. - -## Error-handling - - By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc. - -## Caching - - It does _not_ perform internal caching, you should use a reverse proxy cache such - as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;). - -## Debugging - - To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ make test -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/index.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/index.js deleted file mode 100644 index f17158d8..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/send'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/send.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/send.js deleted file mode 100644 index a3d94a69..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/send.js +++ /dev/null @@ -1,474 +0,0 @@ - -/** - * Module dependencies. - */ - -var debug = require('debug')('send') - , parseRange = require('range-parser') - , Stream = require('stream') - , mime = require('mime') - , fresh = require('fresh') - , path = require('path') - , http = require('http') - , fs = require('fs') - , basename = path.basename - , normalize = path.normalize - , join = path.join - , utils = require('./utils'); - -/** - * Expose `send`. - */ - -exports = module.exports = send; - -/** - * Expose mime module. - */ - -exports.mime = mime; - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @return {SendStream} - * @api public - */ - -function send(req, path, options) { - return new SendStream(req, path, options); -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * Events: - * - * - `error` an error occurred - * - `stream` file streaming has started - * - `end` streaming has completed - * - `directory` a directory was requested - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @api private - */ - -function SendStream(req, path, options) { - var self = this; - this.req = req; - this.path = path; - this.options = options || {}; - this.maxage(0); - this.hidden(false); - this.index('index.html'); -} - -/** - * Inherits from `Stream.prototype`. - */ - -SendStream.prototype.__proto__ = Stream.prototype; - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = function(val){ - debug('hidden %s', val); - this._hidden = val; - return this; -}; - -/** - * Set index `path`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = function(path){ - debug('index %s', path); - this._index = path; - return this; -}; - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = -SendStream.prototype.from = function(path){ - this._root = normalize(path); - return this; -}; - -/** - * Set max-age to `ms`. - * - * @param {Number} ms - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = function(ms){ - if (Infinity == ms) ms = 60 * 60 * 24 * 365 * 1000; - debug('max-age %d', ms); - this._maxage = ms; - return this; -}; - -/** - * Emit error with `status`. - * - * @param {Number} status - * @api private - */ - -SendStream.prototype.error = function(status, err){ - var res = this.res; - var msg = http.STATUS_CODES[status]; - err = err || new Error(msg); - err.status = status; - if (this.listeners('error').length) return this.emit('error', err); - res.statusCode = err.status; - res.end(msg); -}; - -/** - * Check if the pathname is potentially malicious. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isMalicious = function(){ - return !this._root && ~this.path.indexOf('..'); -}; - -/** - * Check if the pathname ends with "/". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasTrailingSlash = function(){ - return '/' == this.path[this.path.length - 1]; -}; - -/** - * Check if the basename leads with ".". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasLeadingDot = function(){ - return '.' == basename(this.path)[0]; -}; - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function(){ - return this.req.headers['if-none-match'] - || this.req.headers['if-modified-since']; -}; - -/** - * Strip content-* header fields. - * - * @api private - */ - -SendStream.prototype.removeContentHeaderFields = function(){ - var res = this.res; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function(){ - var res = this.res; - debug('not modified'); - this.removeContentHeaderFields(); - res.statusCode = 304; - res.end(); -}; - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function(){ - var res = this.res; - return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode; -}; - -/** - * Handle stat() error. - * - * @param {Error} err - * @api private - */ - -SendStream.prototype.onStatError = function(err){ - var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR']; - if (~notfound.indexOf(err.code)) return this.error(404, err); - this.error(500, err); -}; - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function(){ - return fresh(this.req.headers, this.res._headers); -}; - -/** - * Redirect to `path`. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.redirect = function(path){ - if (this.listeners('directory').length) return this.emit('directory'); - var res = this.res; - path += '/'; - res.statusCode = 301; - res.setHeader('Location', path); - res.end('Redirecting to ' + utils.escape(path)); -}; - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function(res){ - var self = this - , args = arguments - , path = this.path - , root = this._root; - - // references - this.res = res; - - // invalid request uri - path = utils.decode(path); - if (-1 == path) return this.error(400); - - // null byte(s) - if (~path.indexOf('\0')) return this.error(400); - - // join / normalize from optional root dir - if (root) path = normalize(join(this._root, path)); - - // ".." is malicious without "root" - if (this.isMalicious()) return this.error(403); - - // malicious path - if (root && 0 != path.indexOf(root)) return this.error(403); - - // hidden file support - if (!this._hidden && this.hasLeadingDot()) return this.error(404); - - // index file support - if (this._index && this.hasTrailingSlash()) path += this._index; - - debug('stat "%s"', path); - fs.stat(path, function(err, stat){ - if (err) return self.onStatError(err); - if (stat.isDirectory()) return self.redirect(self.path); - self.emit('file', path, stat); - self.send(path, stat); - }); - - return res; -}; - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function(path, stat){ - var options = this.options; - var len = stat.size; - var res = this.res; - var req = this.req; - var ranges = req.headers.range; - var offset = options.start || 0; - - // set header fields - this.setHeader(stat); - - // set content-type - this.type(path); - - // conditional GET support - if (this.isConditionalGET() - && this.isCachable() - && this.isFresh()) { - return this.notModified(); - } - - // adjust len to start/end options - len = Math.max(0, len - offset); - if (options.end !== undefined) { - var bytes = options.end - offset + 1; - if (len > bytes) len = bytes; - } - - // Range support - if (ranges) { - ranges = parseRange(len, ranges); - - // unsatisfiable - if (-1 == ranges) { - res.setHeader('Content-Range', 'bytes */' + stat.size); - return this.error(416); - } - - // valid (syntactically invalid ranges are treated as a regular response) - if (-2 != ranges) { - options.start = offset + ranges[0].start; - options.end = offset + ranges[0].end; - - // Content-Range - res.statusCode = 206; - res.setHeader('Content-Range', 'bytes ' - + ranges[0].start - + '-' - + ranges[0].end - + '/' - + len); - len = options.end - options.start + 1; - } - } - - // content-length - res.setHeader('Content-Length', len); - - // HEAD support - if ('HEAD' == req.method) return res.end(); - - this.stream(path, options); -}; - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function(path, options){ - // TODO: this is all lame, refactor meeee - var self = this; - var res = this.res; - var req = this.req; - - // pipe - var stream = fs.createReadStream(path, options); - this.emit('stream', stream); - stream.pipe(res); - - // socket closed, done with the fd - req.on('close', stream.destroy.bind(stream)); - - // error handling code-smell - stream.on('error', function(err){ - // no hope in responding - if (res._header) { - console.error(err.stack); - req.destroy(); - return; - } - - // 500 - err.status = 500; - self.emit('error', err); - }); - - // end - stream.on('end', function(){ - self.emit('end'); - }); -}; - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function(path){ - var res = this.res; - if (res.getHeader('Content-Type')) return; - var type = mime.lookup(path); - var charset = mime.charsets.lookup(type); - debug('content-type %s', type); - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')); -}; - -/** - * Set reaponse header fields, most - * fields may be pre-defined. - * - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function(stat){ - var res = this.res; - if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes'); - if (!res.getHeader('ETag')) res.setHeader('ETag', utils.etag(stat)); - if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString()); - if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + (this._maxage / 1000)); - if (!res.getHeader('Last-Modified')) res.setHeader('Last-Modified', stat.mtime.toUTCString()); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/utils.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/utils.js deleted file mode 100644 index 950e5a2c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/lib/utils.js +++ /dev/null @@ -1,47 +0,0 @@ - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -exports.decode = function(path){ - try { - return decodeURIComponent(path); - } catch (err) { - return -1; - } -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/README.md b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/README.md deleted file mode 100644 index b90552a3..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/mime.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/mime.js deleted file mode 100644 index 70a63842..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/mime.js +++ /dev/null @@ -1,113 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - return this.extensions[mimeType]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/package.json deleted file mode 100644 index 7594e69f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.9", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "_id": "mime@1.2.9", - "dist": { - "shasum": "18b0f8a1caefb2d085cc2b051e77f69b19d4d74f" - }, - "_from": "mime@~1.2.9" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/test.js b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/test.js deleted file mode 100644 index cbad034a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/test.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); -eq('text/plain', mime.lookup('.text.txt')); -eq('text/plain', mime.lookup('.txt')); -eq('text/plain', mime.lookup('txt')); -eq('application/octet-stream', mime.lookup('text.nope')); -eq('fallback', mime.lookup('text.fallback', 'fallback')); -eq('application/octet-stream', mime.lookup('constructor')); -eq('text/plain', mime.lookup('TEXT.TXT')); -eq('text/event-stream', mime.lookup('text/event-stream')); -eq('application/x-web-app-manifest+json', mime.lookup('text.webapp')); - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq(undefined, mime.extension('constructor')); - -// -// Test node types -// - -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -console.log('\nOK'); diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/mime.types b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/mime.types deleted file mode 100644 index b90b1658..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/x-font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/node.types b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/node.types deleted file mode 100644 index 970a1bd8..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/node_modules/mime/types/node.types +++ /dev/null @@ -1,60 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifest -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest appcache manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/package.json deleted file mode 100644 index 34d3d4d4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/node_modules/send/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "send", - "version": "0.1.1", - "description": "Better streaming static file server with Range and conditional-GET support", - "keywords": [ - "static", - "file", - "server" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": { - "debug": "*", - "mime": "~1.2.9", - "fresh": "0.1.0", - "range-parser": "0.0.4" - }, - "devDependencies": { - "mocha": "*", - "should": "*", - "supertest": "0.0.1", - "connect": "2.x" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/send.git" - }, - "main": "index", - "readme": "# send\n\n Send is Connect's `static()` extracted for generalized use, a streaming static file\n server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework.\n\n## Installation\n\n $ npm install send\n\n## Examples\n\n Small:\n\n```js\nvar http = require('http');\nvar send = require('send');\n\nvar app = http.createServer(function(req, res){\n send(req, req.url).pipe(res);\n}).listen(3000);\n```\n\n Serving from a root directory with custom error-handling:\n\n```js\nvar http = require('http');\nvar send = require('send');\nvar url = require('url');\n\nvar app = http.createServer(function(req, res){\n // your custom error-handling logic:\n function error(err) {\n res.statusCode = err.status || 500;\n res.end(err.message);\n }\n\n // your custom directory handling logic:\n function redirect() {\n res.statusCode = 301;\n res.setHeader('Location', req.url + '/');\n res.end('Redirecting to ' + req.url + '/');\n }\n\n // transfer arbitrary files from within\n // /www/example.com/public/*\n send(req, url.parse(req.url).pathname)\n .root('/www/example.com/public')\n .on('error', error)\n .on('directory', redirect)\n .pipe(res);\n}).listen(3000);\n```\n\n## API\n\n### Events\n\n - `error` an error occurred `(err)`\n - `directory` a directory was requested\n - `file` a file was requested `(path, stat)`\n - `stream` file streaming has started `(stream)`\n - `end` streaming has completed\n\n### .root(dir)\n\n Serve files relative to `path`. Aliased as `.from(dir)`.\n\n### .index(path)\n\n By default send supports \"index.html\" files, to disable this\n invoke `.index(false)` or to supply a new index pass a string.\n\n### .maxage(ms)\n\n Provide a max-age in milliseconds for http caching, defaults to 0.\n\n### .hidden(bool)\n\n Enable or disable transfer of hidden files, defaults to false.\n\n## Error-handling\n\n By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc.\n\n## Caching\n\n It does _not_ perform internal caching, you should use a reverse proxy cache such\n as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;).\n\n## Debugging\n\n To enable `debug()` instrumentation output export __DEBUG__:\n\n```\n$ DEBUG=send node app\n```\n\n## Running tests\n\n```\n$ npm install\n$ make test\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "send@0.1.1", - "dist": { - "shasum": "45f6334cfa32ed64bf77daeb96b9fc5018c01bd1" - }, - "_from": "send@0.1.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/package.json b/org.nodeclipse.bundle.express/express/node_modules/connect/package.json deleted file mode 100644 index baff2754..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "connect", - "version": "2.7.11", - "description": "High performance middleware framework", - "keywords": [ - "framework", - "web", - "middleware", - "connect", - "rack" - ], - "repository": { - "type": "git", - "url": "git://github.com/senchalabs/connect.git" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "dependencies": { - "qs": "0.6.5", - "formidable": "1.0.14", - "cookie-signature": "1.0.1", - "buffer-crc32": "0.2.1", - "cookie": "0.0.5", - "send": "0.1.1", - "bytes": "0.2.0", - "fresh": "0.1.0", - "pause": "0.0.1", - "debug": "*" - }, - "devDependencies": { - "should": "*", - "mocha": "*", - "jade": "*", - "dox": "*" - }, - "main": "index", - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "make" - }, - "readme": "[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect)\n# Connect\n\n Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance \"plugins\" known as _middleware_.\n\n Connect is bundled with over _20_ commonly used middleware, including\n a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/).\n\n```js\nvar connect = require('connect')\n , http = require('http');\n\nvar app = connect()\n .use(connect.favicon())\n .use(connect.logger('dev'))\n .use(connect.static('public'))\n .use(connect.directory('public'))\n .use(connect.cookieParser())\n .use(connect.session({ secret: 'my secret here' }))\n .use(function(req, res){\n res.end('Hello from Connect!\\n');\n });\n\nhttp.createServer(app).listen(3000);\n```\n\n## Middleware\n\n - [csrf](http://www.senchalabs.org/connect/csrf.html)\n - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html)\n - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html)\n - [json](http://www.senchalabs.org/connect/json.html)\n - [multipart](http://www.senchalabs.org/connect/multipart.html)\n - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html)\n - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html)\n - [directory](http://www.senchalabs.org/connect/directory.html)\n - [compress](http://www.senchalabs.org/connect/compress.html)\n - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html)\n - [favicon](http://www.senchalabs.org/connect/favicon.html)\n - [limit](http://www.senchalabs.org/connect/limit.html)\n - [logger](http://www.senchalabs.org/connect/logger.html)\n - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html)\n - [query](http://www.senchalabs.org/connect/query.html)\n - [responseTime](http://www.senchalabs.org/connect/responseTime.html)\n - [session](http://www.senchalabs.org/connect/session.html)\n - [static](http://www.senchalabs.org/connect/static.html)\n - [staticCache](http://www.senchalabs.org/connect/staticCache.html)\n - [vhost](http://www.senchalabs.org/connect/vhost.html)\n - [subdomains](http://www.senchalabs.org/connect/subdomains.html)\n - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html)\n\n## Running Tests\n\nfirst:\n\n $ npm install -d\n\nthen:\n\n $ make test\n\n## Authors\n\n Below is the output from [git-summary](http://github.com/visionmedia/git-extras).\n\n\n project: connect\n commits: 2033\n active : 301 days\n files : 171\n authors: \n 1414\tTj Holowaychuk 69.6%\n 298\tvisionmedia 14.7%\n 191\tTim Caswell 9.4%\n 51\tTJ Holowaychuk 2.5%\n 10\tRyan Olds 0.5%\n 8\tAstro 0.4%\n 5\tNathan Rajlich 0.2%\n 5\tJakub Nešetřil 0.2%\n 3\tDaniel Dickison 0.1%\n 3\tDavid Rio Deiros 0.1%\n 3\tAlexander Simmerl 0.1%\n 3\tAndreas Lind Petersen 0.1%\n 2\tAaron Heckmann 0.1%\n 2\tJacques Crocker 0.1%\n 2\tFabian Jakobs 0.1%\n 2\tBrian J Brennan 0.1%\n 2\tAdam Malcontenti-Wilson 0.1%\n 2\tGlen Mailer 0.1%\n 2\tJames Campos 0.1%\n 1\tTrent Mick 0.0%\n 1\tTroy Kruthoff 0.0%\n 1\tWei Zhu 0.0%\n 1\tcomerc 0.0%\n 1\tdarobin 0.0%\n 1\tnateps 0.0%\n 1\tMarco Sanson 0.0%\n 1\tArthur Taylor 0.0%\n 1\tAseem Kishore 0.0%\n 1\tBart Teeuwisse 0.0%\n 1\tCameron Howey 0.0%\n 1\tChad Weider 0.0%\n 1\tCraig Barnes 0.0%\n 1\tEran Hammer-Lahav 0.0%\n 1\tGregory McWhirter 0.0%\n 1\tGuillermo Rauch 0.0%\n 1\tJae Kwon 0.0%\n 1\tJakub Nesetril 0.0%\n 1\tJoshua Peek 0.0%\n 1\tJxck 0.0%\n 1\tAJ ONeal 0.0%\n 1\tMichael Hemesath 0.0%\n 1\tMorten Siebuhr 0.0%\n 1\tSamori Gorse 0.0%\n 1\tTom Jensen 0.0%\n\n## Node Compatibility\n\n Connect `< 1.x` is compatible with node 0.2.x\n\n\n Connect `1.x` is compatible with node 0.4.x\n\n\n Connect (_master_) `2.x` is compatible with node 0.6.x\n\n## CLA\n\n [http://sencha.com/cla](http://sencha.com/cla)\n\n## License\n\nView the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).\n", - "readmeFilename": "Readme.md", - "_id": "connect@2.7.11", - "dist": { - "shasum": "a00cd37a1999aa9b4b5ea0eeff811d0962ef4232" - }, - "_from": "connect@2.7.11" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/connect/test.js b/org.nodeclipse.bundle.express/express/node_modules/connect/test.js deleted file mode 100644 index 92b7003d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/connect/test.js +++ /dev/null @@ -1,40 +0,0 @@ - -var connect = require('./'); -var app = connect(); - -app.use(connect.logger('dev')); -app.use(connect.bodyParser()); - -app.use(function(req, res, next){ - if (req.checkContinue) { - res.writeContinue(); - } - res.end('hello'); -}); - -var server = app.listen(3000); - -server.on('checkContinue', function(req, res){ - req.checkContinue = true; - app(req, res); -}); - - -// var http = require('http'); - -// var app = http.createServer(function(req, res){ -// console.log(req.headers); -// }); - -// app.on('checkContinue', function(req, res){ -// if ('application/json' == req.headers['content-type']) { -// res.writeContinue(); -// console.log('ok'); -// res.end('thanks') -// } else { -// res.writeHead(400); -// res.end('bad request, json only'); -// } -// }); - -// app.listen(3000); diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/History.md b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/History.md deleted file mode 100644 index 9e301799..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,11 +0,0 @@ - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Makefile b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 2559e841..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,42 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -(The MIT License) - -Copyright (c) 2012 LearnBoost <tj@learnboost.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/index.js b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/index.js deleted file mode 100644 index ed62814e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,42 +0,0 @@ - -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val ? str : false; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/package.json b/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/package.json deleted file mode 100644 index 2ca8dadc..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "cookie-signature", - "version": "1.0.1", - "description": "Sign and unsign cookies", - "keywords": [ - "cookie", - "sign", - "unsign" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@learnboost.com" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# cookie-signature\n\n Sign and unsign cookies.\n\n## Example\n\n```js\nvar cookie = require('cookie-signature');\n\nvar val = cookie.sign('hello', 'tobiiscool');\nval.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');\n\nvar val = cookie.sign('hello', 'tobiiscool');\ncookie.unsign(val, 'tobiiscool').should.equal('hello');\ncookie.unsign(val, 'luna').should.be.false;\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 LearnBoost <tj@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "cookie-signature@1.0.1", - "dist": { - "shasum": "8d6c4b42f8b211cef50b8e195e148526cc7dff99" - }, - "_from": "cookie-signature@1.0.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/cookie/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/cookie/.travis.yml deleted file mode 100644 index 9400c118..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/cookie/LICENSE deleted file mode 100644 index 249d9def..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -// MIT License - -Copyright (C) Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/README.md b/org.nodeclipse.bundle.express/express/node_modules/cookie/README.md deleted file mode 100644 index 5187ed1c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) # - -cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. - -See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. - -## how? - -``` -npm install cookie -``` - -```javascript -var cookie = require('cookie'); - -var hdr = cookie.serialize('foo', 'bar'); -// hdr = 'foo=bar'; - -var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); -// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; -``` - -## more - -The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. - -### path -> cookie path - -### expires -> absolute expiration date for the cookie (Date object) - -### maxAge -> relative max age of the cookie from when the client receives it (seconds) - -### domain -> domain for the cookie - -### secure -> true or false - -### httpOnly -> true or false - diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/index.js b/org.nodeclipse.bundle.express/express/node_modules/cookie/index.js deleted file mode 100644 index 16bdb65d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/index.js +++ /dev/null @@ -1,70 +0,0 @@ - -/// Serialize the a name value pair into a cookie string suitable for -/// http headers. An optional options object specified cookie parameters -/// -/// serialize('foo', 'bar', { httpOnly: true }) -/// => "foo=bar; httpOnly" -/// -/// @param {String} name -/// @param {String} val -/// @param {Object} options -/// @return {String} -var serialize = function(name, val, opt){ - opt = opt || {}; - var enc = opt.encode || encode; - var pairs = [name + '=' + enc(val)]; - - if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge); - if (opt.domain) pairs.push('Domain=' + opt.domain); - if (opt.path) pairs.push('Path=' + opt.path); - if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString()); - if (opt.httpOnly) pairs.push('HttpOnly'); - if (opt.secure) pairs.push('Secure'); - - return pairs.join('; '); -}; - -/// Parse the given cookie header string into an object -/// The object has the various cookies as keys(names) => values -/// @param {String} str -/// @return {Object} -var parse = function(str, opt) { - opt = opt || {}; - var obj = {} - var pairs = str.split(/[;,] */); - var dec = opt.decode || decode; - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('=') - - // skip things that don't look like key=value - if (eq_idx < 0) { - return; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - try { - obj[key] = dec(val); - } catch (e) { - obj[key] = val; - } - } - }); - - return obj; -}; - -var encode = encodeURIComponent; -var decode = decodeURIComponent; - -module.exports.serialize = serialize; -module.exports.parse = parse; diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/package.json b/org.nodeclipse.bundle.express/express/node_modules/cookie/package.json deleted file mode 100644 index 9eb4cfa0..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "cookie", - "description": "cookie parsing and serialization", - "version": "0.1.0", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-cookie.git" - }, - "keywords": [ - "cookie", - "cookies" - ], - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) #\n\ncookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.\n\nSee [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.\n\n## how?\n\n```\nnpm install cookie\n```\n\n```javascript\nvar cookie = require('cookie');\n\nvar hdr = cookie.serialize('foo', 'bar');\n// hdr = 'foo=bar';\n\nvar cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');\n// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };\n```\n\n## more\n\nThe serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.\n\n### path\n> cookie path\n\n### expires\n> absolute expiration date for the cookie (Date object)\n\n### maxAge\n> relative max age of the cookie from when the client receives it (seconds)\n\n### domain\n> domain for the cookie\n\n### secure\n> true or false\n\n### httpOnly\n> true or false\n\n", - "readmeFilename": "README.md", - "_id": "cookie@0.1.0", - "dist": { - "shasum": "3ca8d0cfddd282cef12517bc08fca14bc48fbee5" - }, - "_from": "cookie@0.1.0" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/mocha.opts b/org.nodeclipse.bundle.express/express/node_modules/cookie/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/parse.js b/org.nodeclipse.bundle.express/express/node_modules/cookie/test/parse.js deleted file mode 100644 index c6c27a20..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/parse.js +++ /dev/null @@ -1,44 +0,0 @@ - -var assert = require('assert'); - -var cookie = require('..'); - -suite('parse'); - -test('basic', function() { - assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar')); - assert.deepEqual({ foo: '123' }, cookie.parse('foo=123')); -}); - -test('ignore spaces', function() { - assert.deepEqual({ FOO: 'bar', baz: 'raz' }, - cookie.parse('FOO = bar; baz = raz')); -}); - -test('escaping', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"')); - - assert.deepEqual({ email: ' ",;/' }, - cookie.parse('email=%20%22%2c%3b%2f')); -}); - -test('ignore escaping error and return original value', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar')); -}); - -test('ignore non values', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar;HttpOnly;Secure')); -}); - -test('unencoded', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"',{ - decode: function(value) { return value; } - })); - - assert.deepEqual({ email: '%20%22%2c%3b%2f' }, - cookie.parse('email=%20%22%2c%3b%2f',{ - decode: function(value) { return value; } - })); -}) diff --git a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/serialize.js b/org.nodeclipse.bundle.express/express/node_modules/cookie/test/serialize.js deleted file mode 100644 index 86bb8c93..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/cookie/test/serialize.js +++ /dev/null @@ -1,64 +0,0 @@ -// builtin -var assert = require('assert'); - -var cookie = require('..'); - -suite('serialize'); - -test('basic', function() { - assert.equal('foo=bar', cookie.serialize('foo', 'bar')); - assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz')); -}); - -test('path', function() { - assert.equal('foo=bar; Path=/', cookie.serialize('foo', 'bar', { - path: '/' - })); -}); - -test('secure', function() { - assert.equal('foo=bar; Secure', cookie.serialize('foo', 'bar', { - secure: true - })); - - assert.equal('foo=bar', cookie.serialize('foo', 'bar', { - secure: false - })); -}); - -test('domain', function() { - assert.equal('foo=bar; Domain=example.com', cookie.serialize('foo', 'bar', { - domain: 'example.com' - })); -}); - -test('httpOnly', function() { - assert.equal('foo=bar; HttpOnly', cookie.serialize('foo', 'bar', { - httpOnly: true - })); -}); - -test('maxAge', function() { - assert.equal('foo=bar; Max-Age=1000', cookie.serialize('foo', 'bar', { - maxAge: 1000 - })); -}); - -test('escaping', function() { - assert.deepEqual('cat=%2B%20', cookie.serialize('cat', '+ ')); -}); - -test('parse->serialize', function() { - - assert.deepEqual({ cat: 'foo=123&name=baz five' }, cookie.parse( - cookie.serialize('cat', 'foo=123&name=baz five'))); - - assert.deepEqual({ cat: ' ";/' }, cookie.parse( - cookie.serialize('cat', ' ";/'))); -}); - -test('unencoded', function() { - assert.deepEqual('cat=+ ', cookie.serialize('cat', '+ ', { - encode: function(value) { return value; } - })); -}) diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/debug/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/History.md b/org.nodeclipse.bundle.express/express/node_modules/debug/History.md deleted file mode 100644 index f023269b..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/History.md +++ /dev/null @@ -1,62 +0,0 @@ - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/debug/Readme.md deleted file mode 100644 index 15ee5019..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/Readme.md +++ /dev/null @@ -1,115 +0,0 @@ - -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -``` -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The "*" character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - a('doing some work'); -}, 1200); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/component.json b/org.nodeclipse.bundle.express/express/node_modules/debug/component.json deleted file mode 100644 index 4ad09718..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/component.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "0.7.2", - "keywords": ["debug", "log", "debugger"], - "scripts": ["index.js", "debug.js"], - "dependencies": {} -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/debug.js b/org.nodeclipse.bundle.express/express/node_modules/debug/debug.js deleted file mode 100644 index e47ba5b0..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/debug.js +++ /dev/null @@ -1,124 +0,0 @@ - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - if (!debug.enabled(name)) return function(){}; - - return function(fmt){ - var curr = new Date; - var ms = curr - (debug[name] || curr); - debug[name] = curr; - - fmt = name - + ' ' - + fmt - + ' +' + debug.humanize(ms); - - // This hackery is required for IE8 - // where `console.log` doesn't have 'apply' - window.console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); - } -} - -/** - * The currently active debug mode names. - */ - -debug.names = []; -debug.skips = []; - -/** - * Enables a debug mode by name. This can include modes - * separated by a colon and wildcards. - * - * @param {String} name - * @api public - */ - -debug.enable = function(name) { - try { - localStorage.debug = name; - } catch(e){} - - var split = (name || '').split(/[\s,]+/) - , len = split.length; - - for (var i = 0; i < len; i++) { - name = split[i].replace('*', '.*?'); - if (name[0] === '-') { - debug.skips.push(new RegExp('^' + name.substr(1) + '$')); - } - else { - debug.names.push(new RegExp('^' + name + '$')); - } - } -}; - -/** - * Disable debug output. - * - * @api public - */ - -debug.disable = function(){ - debug.enable(''); -}; - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -debug.humanize = function(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -}; - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -debug.enabled = function(name) { - for (var i = 0, len = debug.skips.length; i < len; i++) { - if (debug.skips[i].test(name)) { - return false; - } - } - for (var i = 0, len = debug.names.length; i < len; i++) { - if (debug.names[i].test(name)) { - return true; - } - } - return false; -}; - -// persist - -if (window.localStorage) debug.enable(localStorage.debug); diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/example/app.js b/org.nodeclipse.bundle.express/express/node_modules/debug/example/app.js deleted file mode 100644 index 05374d98..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/example/app.js +++ /dev/null @@ -1,19 +0,0 @@ - -var debug = require('../')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/example/browser.html b/org.nodeclipse.bundle.express/express/node_modules/debug/example/browser.html deleted file mode 100644 index 7510eee7..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/example/browser.html +++ /dev/null @@ -1,24 +0,0 @@ - - - debug() - - - - - - - diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/example/wildcards.js b/org.nodeclipse.bundle.express/express/node_modules/debug/example/wildcards.js deleted file mode 100644 index 1fdac20a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/example/wildcards.js +++ /dev/null @@ -1,10 +0,0 @@ - -var debug = { - foo: require('../')('test:foo'), - bar: require('../')('test:bar'), - baz: require('../')('test:baz') -}; - -debug.foo('foo') -debug.bar('bar') -debug.baz('baz') \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/example/worker.js b/org.nodeclipse.bundle.express/express/node_modules/debug/example/worker.js deleted file mode 100644 index 7f6d2886..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/example/worker.js +++ /dev/null @@ -1,22 +0,0 @@ - -// DEBUG=* node example/worker -// DEBUG=worker:* node example/worker -// DEBUG=worker:a node example/worker -// DEBUG=worker:b node example/worker - -var a = require('../')('worker:a') - , b = require('../')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/index.js b/org.nodeclipse.bundle.express/express/node_modules/debug/index.js deleted file mode 100644 index e02c13b7..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if ('undefined' == typeof window) { - module.exports = require('./lib/debug'); -} else { - module.exports = require('./debug'); -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/lib/debug.js b/org.nodeclipse.bundle.express/express/node_modules/debug/lib/debug.js deleted file mode 100644 index 0b07aa1d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/lib/debug.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Enabled debuggers. - */ - -var names = [] - , skips = []; - -(process.env.DEBUG || '') - .split(/[\s,]+/) - .forEach(function(name){ - name = name.replace('*', '.*?'); - if (name[0] === '-') { - skips.push(new RegExp('^' + name.substr(1) + '$')); - } else { - names.push(new RegExp('^' + name + '$')); - } - }); - -/** - * Colors. - */ - -var colors = [6, 2, 3, 4, 5, 1]; - -/** - * Previous debug() call. - */ - -var prev = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Is stdout a TTY? Colored output is disabled when `true`. - */ - -var isatty = tty.isatty(2); - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function color() { - return colors[prevColor++ % colors.length]; -} - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -function humanize(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -} - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - function disabled(){} - disabled.enabled = false; - - var match = skips.some(function(re){ - return re.test(name); - }); - - if (match) return disabled; - - match = names.some(function(re){ - return re.test(name); - }); - - if (!match) return disabled; - var c = color(); - - function colored(fmt) { - var curr = new Date; - var ms = curr - (prev[name] || curr); - prev[name] = curr; - - fmt = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[3' + c + 'm\u001b[90m' - + fmt + '\u001b[3' + c + 'm' - + ' +' + humanize(ms) + '\u001b[0m'; - - console.error.apply(this, arguments); - } - - function plain(fmt) { - fmt = new Date().toUTCString() - + ' ' + name + ' ' + fmt; - console.error.apply(this, arguments); - } - - colored.enabled = plain.enabled = true; - - return isatty || process.env.DEBUG_COLORS - ? colored - : plain; -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/debug/package.json b/org.nodeclipse.bundle.express/express/node_modules/debug/package.json deleted file mode 100644 index 78f81d95..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/debug/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "debug", - "version": "0.7.2", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*" - }, - "main": "lib/debug.js", - "browserify": "debug.js", - "engines": { - "node": "*" - }, - "component": { - "scripts": { - "debug/index.js": "index.js", - "debug/debug.js": "debug.js" - } - }, - "readme": "\n# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n \nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n \n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n\n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". \n\n## Wildcards\n\n The \"*\" character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. \n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n a('doing some work');\n}, 1200);\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "debug@0.7.2", - "dist": { - "shasum": "dfc9da7855ef500460ccf9006480ad343c7b5863" - }, - "_from": "debug@*" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/fresh/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/fresh/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/fresh/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/org.nodeclipse.bundle.express/express/node_modules/fresh/Makefile b/org.nodeclipse.bundle.express/express/node_modules/fresh/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/fresh/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/fresh/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/fresh/Readme.md deleted file mode 100644 index 273130d4..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/fresh/Readme.md +++ /dev/null @@ -1,32 +0,0 @@ - -# node-fresh - - HTTP response freshness testing - -## fresh(req, res) - - Check freshness of `req` and `res` headers. - - When the cache is "fresh" __true__ is returned, - otherwise __false__ is returned to indicate that - the cache is now stale. - -## Example: - -```js -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'luna' }; -fresh(req, res); -// => false - -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'tobi' }; -fresh(req, res); -// => true -``` - -## Installation - -``` -$ npm install fresh -``` \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/fresh/index.js b/org.nodeclipse.bundle.express/express/node_modules/fresh/index.js deleted file mode 100644 index b2f4d413..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/fresh/index.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Expose `fresh()`. - */ - -module.exports = fresh; - -/** - * Check freshness of `req` and `res` headers. - * - * When the cache is "fresh" __true__ is returned, - * otherwise __false__ is returned to indicate that - * the cache is now stale. - * - * @param {Object} req - * @param {Object} res - * @return {Boolean} - * @api public - */ - -function fresh(req, res) { - // defaults - var etagMatches = true; - var notModified = true; - - // fields - var modifiedSince = req['if-modified-since']; - var noneMatch = req['if-none-match']; - var lastModified = res['last-modified']; - var etag = res['etag']; - - // unconditional request - if (!modifiedSince && !noneMatch) return false; - - // parse if-none-match - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // if-none-match - if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; - - // if-modified-since - if (modifiedSince) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - notModified = lastModified <= modifiedSince; - } - - return !! (etagMatches && notModified); -} \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/fresh/package.json b/org.nodeclipse.bundle.express/express/node_modules/fresh/package.json deleted file mode 100644 index f5e583c2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/fresh/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "fresh", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "HTTP response freshness testing", - "version": "0.1.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-fresh\n\n HTTP response freshness testing\n\n## fresh(req, res)\n\n Check freshness of `req` and `res` headers.\n\n When the cache is \"fresh\" __true__ is returned,\n otherwise __false__ is returned to indicate that\n the cache is now stale.\n\n## Example:\n\n```js\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'luna' };\nfresh(req, res);\n// => false\n\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'tobi' };\nfresh(req, res);\n// => true\n```\n\n## Installation\n\n```\n$ npm install fresh\n```", - "readmeFilename": "Readme.md", - "_id": "fresh@0.1.0", - "dist": { - "shasum": "8c68a2ec327d90335bea56a4e4ac112c0cf78da8" - }, - "_from": "fresh@0.1.0" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/methods/index.js b/org.nodeclipse.bundle.express/express/node_modules/methods/index.js deleted file mode 100644 index 297d0223..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/methods/index.js +++ /dev/null @@ -1,26 +0,0 @@ - -module.exports = [ - 'get' - , 'post' - , 'put' - , 'head' - , 'delete' - , 'options' - , 'trace' - , 'copy' - , 'lock' - , 'mkcol' - , 'move' - , 'propfind' - , 'proppatch' - , 'unlock' - , 'report' - , 'mkactivity' - , 'checkout' - , 'merge' - , 'm-search' - , 'notify' - , 'subscribe' - , 'unsubscribe' - , 'patch' -]; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/methods/package.json b/org.nodeclipse.bundle.express/express/node_modules/methods/package.json deleted file mode 100644 index 709f395b..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/methods/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "methods", - "version": "0.0.1", - "description": "HTTP methods that node supports", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "http", - "methods" - ], - "author": { - "name": "TJ Holowaychuk" - }, - "license": "MIT", - "_id": "methods@0.0.1", - "readme": "ERROR: No README.md file found!", - "dist": { - "shasum": "811cd44be7674b3ca486e51b96dccf1cc5f43594" - }, - "_from": "methods@0.0.1" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.travis.yml b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/README.markdown b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/README.markdown deleted file mode 100644 index 40de04f7..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/README.markdown +++ /dev/null @@ -1,61 +0,0 @@ -mkdirp -====== - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -example -======= - -pow.js ------- - var mkdirp = require('mkdirp'); - - mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') - }); - -Output - pow! - -And now /tmp/foo/bar/baz exists, huzzah! - -methods -======= - -var mkdirp = require('mkdirp'); - -mkdirp(dir, mode, cb) ---------------------- - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -mkdirp.sync(dir, mode) ----------------------- - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -install -======= - -With [npm](http://npmjs.org) do: - - npm install mkdirp - -license -======= - -MIT/X11 diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/examples/pow.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/index.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/package.json b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/package.json deleted file mode 100644 index b7a4ac0e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.4", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.2.4" - }, - "license": "MIT/X11", - "engines": { - "node": "*" - }, - "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n", - "readmeFilename": "README.markdown", - "_id": "mkdirp@0.3.4", - "dist": { - "shasum": "063f0f334cc5d7ecea44068729887f55342cfa57" - }, - "_from": "mkdirp@0.3.4" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/chmod.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/clobber.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/mkdirp.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm_sync.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/race.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/rel.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return_sync.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/root.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/sync.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask_sync.js b/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/range-parser/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/History.md b/org.nodeclipse.bundle.express/express/node_modules/range-parser/History.md deleted file mode 100644 index 82df7b1e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -0.0.4 / 2012-06-17 -================== - - * changed: ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * add `.type` diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/Makefile b/org.nodeclipse.bundle.express/express/node_modules/range-parser/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/range-parser/Readme.md deleted file mode 100644 index b2a67fe8..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/Readme.md +++ /dev/null @@ -1,28 +0,0 @@ - -# node-range-parser - - Range header field parser. - -## Example: - -```js -assert(-1 == parse(200, 'bytes=500-20')); -assert(-2 == parse(200, 'bytes=malformed')); -parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }])); -parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }])); -parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }])); -parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }])); -parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }])); -parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }])); -parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }])); -parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }])); -parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }])); -``` - -## Installation - -``` -$ npm install range-parser -``` \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/index.js b/org.nodeclipse.bundle.express/express/node_modules/range-parser/index.js deleted file mode 100644 index 9b0f7a8e..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/index.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @return {Array} - * @api public - */ - -module.exports = function(size, str){ - var valid = true; - var i = str.indexOf('='); - - if (-1 == i) return -2; - - var arr = str.slice(i + 1).split(',').map(function(range){ - var range = range.split('-') - , start = parseInt(range[0], 10) - , end = parseInt(range[1], 10); - - // -nnn - if (isNaN(start)) { - start = size - end; - end = size - 1; - // nnn- - } else if (isNaN(end)) { - end = size - 1; - } - - // limit last-byte-pos to current length - if (end > size - 1) end = size - 1; - - // invalid - if (isNaN(start) - || isNaN(end) - || start > end - || start < 0) valid = false; - - return { - start: start, - end: end - }; - }); - - arr.type = str.slice(0, i); - - return valid ? arr : -1; -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/range-parser/package.json b/org.nodeclipse.bundle.express/express/node_modules/range-parser/package.json deleted file mode 100644 index b053857c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/range-parser/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "range-parser", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "Range header field string parser", - "version": "0.0.4", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-range-parser\n\n Range header field parser.\n\n## Example:\n\n```js\nassert(-1 == parse(200, 'bytes=500-20'));\nassert(-2 == parse(200, 'bytes=malformed'));\nparse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));\nparse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));\nparse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));\nparse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));\nparse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));\nparse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));\nparse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));\nparse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));\nparse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));\n```\n\n## Installation\n\n```\n$ npm install range-parser\n```", - "readmeFilename": "Readme.md", - "_id": "range-parser@0.0.4", - "dist": { - "shasum": "30b1ed64e1ffcc1a72622e5b5d2a9f5b438f81e5" - }, - "_from": "range-parser@0.0.4" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/.npmignore b/org.nodeclipse.bundle.express/express/node_modules/send/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/History.md b/org.nodeclipse.bundle.express/express/node_modules/send/History.md deleted file mode 100644 index 20c53190..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/History.md +++ /dev/null @@ -1,25 +0,0 @@ - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/Makefile b/org.nodeclipse.bundle.express/express/node_modules/send/Makefile deleted file mode 100644 index a9dcfd50..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/Readme.md b/org.nodeclipse.bundle.express/express/node_modules/send/Readme.md deleted file mode 100644 index 85171a91..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/Readme.md +++ /dev/null @@ -1,123 +0,0 @@ - -# send - - Send is Connect's `static()` extracted for generalized use, a streaming static file - server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework. - -## Installation - - $ npm install send - -## Examples - - Small: - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - send(req, req.url).pipe(res); -}); -``` - - Serving from a root directory with custom error-handling: - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - // your custom error-handling logic: - function error(err) { - res.statusCode = err.status || 500; - res.end(err.message); - } - - // your custom directory handling logic: - function redirect() { - res.statusCode = 301; - res.setHeader('Location', req.url + '/'); - res.end('Redirecting to ' + req.url + '/'); - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, url.parse(req.url).pathname) - .root('/www/example.com/public') - .on('error', error) - .on('directory', redirect) - .pipe(res); -}); -``` - -## API - -### Events - - - `error` an error occurred `(err)` - - `directory` a directory was requested - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -### .root(dir) - - Serve files relative to `path`. Aliased as `.from(dir)`. - -### .index(path) - - By default send supports "index.html" files, to disable this - invoke `.index(false)` or to supply a new index pass a string. - -### .maxage(ms) - - Provide a max-age in milliseconds for http caching, defaults to 0. - -## Error-handling - - By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc. - -## Caching - - It does _not_ perform internal caching, you should use a reverse proxy cache such - as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;). - -## Debugging - - To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ make test -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/index.js b/org.nodeclipse.bundle.express/express/node_modules/send/index.js deleted file mode 100644 index f17158d8..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/send'); \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/lib/send.js b/org.nodeclipse.bundle.express/express/node_modules/send/lib/send.js deleted file mode 100644 index de721466..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/lib/send.js +++ /dev/null @@ -1,473 +0,0 @@ - -/** - * Module dependencies. - */ - -var debug = require('debug')('send') - , parseRange = require('range-parser') - , Stream = require('stream') - , mime = require('mime') - , fresh = require('fresh') - , path = require('path') - , http = require('http') - , fs = require('fs') - , basename = path.basename - , normalize = path.normalize - , join = path.join - , utils = require('./utils'); - -/** - * Expose `send`. - */ - -exports = module.exports = send; - -/** - * Expose mime module. - */ - -exports.mime = mime; - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @return {SendStream} - * @api public - */ - -function send(req, path, options) { - return new SendStream(req, path, options); -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * Events: - * - * - `error` an error occurred - * - `stream` file streaming has started - * - `end` streaming has completed - * - `directory` a directory was requested - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @api private - */ - -function SendStream(req, path, options) { - var self = this; - this.req = req; - this.path = path; - this.options = options || {}; - this.maxage(0); - this.hidden(false); - this.index('index.html'); -} - -/** - * Inherits from `Stream.prototype`. - */ - -SendStream.prototype.__proto__ = Stream.prototype; - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = function(val){ - debug('hidden %s', val); - this._hidden = val; - return this; -}; - -/** - * Set index `path`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = function(path){ - debug('index %s', path); - this._index = path; - return this; -}; - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = -SendStream.prototype.from = function(path){ - this._root = normalize(path); - return this; -}; - -/** - * Set max-age to `ms`. - * - * @param {Number} ms - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = function(ms){ - if (Infinity == ms) ms = 60 * 60 * 24 * 365 * 1000; - debug('max-age %d', ms); - this._maxage = ms; - return this; -}; - -/** - * Emit error with `status`. - * - * @param {Number} status - * @api private - */ - -SendStream.prototype.error = function(status, err){ - var res = this.res; - var msg = http.STATUS_CODES[status]; - err = err || new Error(msg); - err.status = status; - if (this.listeners('error').length) return this.emit('error', err); - res.statusCode = err.status; - res.end(msg); -}; - -/** - * Check if the pathname is potentially malicious. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isMalicious = function(){ - return !this._root && ~this.path.indexOf('..'); -}; - -/** - * Check if the pathname ends with "/". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasTrailingSlash = function(){ - return '/' == this.path[this.path.length - 1]; -}; - -/** - * Check if the basename leads with ".". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasLeadingDot = function(){ - return '.' == basename(this.path)[0]; -}; - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function(){ - return this.req.headers['if-none-match'] - || this.req.headers['if-modified-since']; -}; - -/** - * Strip content-* header fields. - * - * @api private - */ - -SendStream.prototype.removeContentHeaderFields = function(){ - var res = this.res; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function(){ - var res = this.res; - debug('not modified'); - this.removeContentHeaderFields(); - res.statusCode = 304; - res.end(); -}; - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function(){ - var res = this.res; - return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode; -}; - -/** - * Handle stat() error. - * - * @param {Error} err - * @api private - */ - -SendStream.prototype.onStatError = function(err){ - var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR']; - if (~notfound.indexOf(err.code)) return this.error(404, err); - this.error(500, err); -}; - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function(){ - return fresh(this.req.headers, this.res._headers); -}; - -/** - * Redirect to `path`. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.redirect = function(path){ - if (this.listeners('directory').length) return this.emit('directory'); - var res = this.res; - path += '/'; - res.statusCode = 301; - res.setHeader('Location', path); - res.end('Redirecting to ' + utils.escape(path)); -}; - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function(res){ - var self = this - , args = arguments - , path = this.path - , root = this._root; - - // references - this.res = res; - - // invalid request uri - path = utils.decode(path); - if (-1 == path) return this.error(400); - - // null byte(s) - if (~path.indexOf('\0')) return this.error(400); - - // join / normalize from optional root dir - if (root) path = normalize(join(this._root, path)); - - // ".." is malicious without "root" - if (this.isMalicious()) return this.error(403); - - // malicious path - if (root && 0 != path.indexOf(root)) return this.error(403); - - // hidden file support - if (!this._hidden && this.hasLeadingDot()) return this.error(404); - - // index file support - if (this._index && this.hasTrailingSlash()) path += this._index; - - debug('stat "%s"', path); - fs.stat(path, function(err, stat){ - if (err) return self.onStatError(err); - if (stat.isDirectory()) return self.redirect(self.path); - self.send(path, stat); - }); - - return res; -}; - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function(path, stat){ - var options = this.options; - var len = stat.size; - var res = this.res; - var req = this.req; - var ranges = req.headers.range; - var offset = options.start || 0; - - // set header fields - this.setHeader(stat); - - // set content-type - this.type(path); - - // conditional GET support - if (this.isConditionalGET() - && this.isCachable() - && this.isFresh()) { - return this.notModified(); - } - - // adjust len to start/end options - len = Math.max(0, len - offset); - if (options.end !== undefined) { - var bytes = options.end - offset + 1; - if (len > bytes) len = bytes; - } - - // Range support - if (ranges) { - ranges = parseRange(len, ranges); - - // unsatisfiable - if (-1 == ranges) { - res.setHeader('Content-Range', 'bytes */' + stat.size); - return this.error(416); - } - - // valid (syntactically invalid ranges are treated as a regular response) - if (-2 != ranges) { - options.start = offset + ranges[0].start; - options.end = offset + ranges[0].end; - - // Content-Range - res.statusCode = 206; - res.setHeader('Content-Range', 'bytes ' - + ranges[0].start - + '-' - + ranges[0].end - + '/' - + len); - len = options.end - options.start + 1; - } - } - - // content-length - res.setHeader('Content-Length', len); - - // HEAD support - if ('HEAD' == req.method) return res.end(); - - this.stream(path, options); -}; - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function(path, options){ - // TODO: this is all lame, refactor meeee - var self = this; - var res = this.res; - var req = this.req; - - // pipe - var stream = fs.createReadStream(path, options); - this.emit('stream', stream); - stream.pipe(res); - - // socket closed, done with the fd - req.on('close', stream.destroy.bind(stream)); - - // error handling code-smell - stream.on('error', function(err){ - // no hope in responding - if (res._header) { - console.error(err.stack); - req.destroy(); - return; - } - - // 500 - err.status = 500; - self.emit('error', err); - }); - - // end - stream.on('end', function(){ - self.emit('end'); - }); -}; - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function(path){ - var res = this.res; - if (res.getHeader('Content-Type')) return; - var type = mime.lookup(path); - var charset = mime.charsets.lookup(type); - debug('content-type %s', type); - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')); -}; - -/** - * Set reaponse header fields, most - * fields may be pre-defined. - * - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function(stat){ - var res = this.res; - if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes'); - if (!res.getHeader('ETag')) res.setHeader('ETag', utils.etag(stat)); - if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString()); - if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + (this._maxage / 1000)); - if (!res.getHeader('Last-Modified')) res.setHeader('Last-Modified', stat.mtime.toUTCString()); -}; diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/lib/utils.js b/org.nodeclipse.bundle.express/express/node_modules/send/lib/utils.js deleted file mode 100644 index 950e5a2c..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/lib/utils.js +++ /dev/null @@ -1,47 +0,0 @@ - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -exports.decode = function(path){ - try { - return decodeURIComponent(path); - } catch (err) { - return -1; - } -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; \ No newline at end of file diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/LICENSE b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/README.md b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/README.md deleted file mode 100644 index d8b66a86..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/bentomas/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/mime.js b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/mime.js deleted file mode 100644 index 1e00585d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/mime.js +++ /dev/null @@ -1,104 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - return this.extensions[mimeType]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -} - -module.exports = mime; diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/package.json b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/package.json deleted file mode 100644 index 75802b9d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.6", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/bentomas/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "_id": "mime@1.2.6", - "dist": { - "shasum": "fd540f432826e93537b07fe5a255d7fff5e9079e" - }, - "_from": "mime@1.2.6" -} diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/test.js b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/test.js deleted file mode 100644 index cbad034a..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/test.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); -eq('text/plain', mime.lookup('.text.txt')); -eq('text/plain', mime.lookup('.txt')); -eq('text/plain', mime.lookup('txt')); -eq('application/octet-stream', mime.lookup('text.nope')); -eq('fallback', mime.lookup('text.fallback', 'fallback')); -eq('application/octet-stream', mime.lookup('constructor')); -eq('text/plain', mime.lookup('TEXT.TXT')); -eq('text/event-stream', mime.lookup('text/event-stream')); -eq('application/x-web-app-manifest+json', mime.lookup('text.webapp')); - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq(undefined, mime.extension('constructor')); - -// -// Test node types -// - -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -console.log('\nOK'); diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/mime.types b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/mime.types deleted file mode 100644 index b3cae2ed..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1510 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -application/vnd.hzn-3d-crossword x3d -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.packageitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.route66.link66+xml link66 -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cdlink vcd -application/x-chat chat -application/x-chess-pgn pgn -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/x-font-woff woff -# application/x-font-vfont -application/x-futuresplash spl -application/x-gnumeric gnumeric -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-stuffit sit -application/x-stuffitx sitx -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xpinstall xpi -# application/x400-bp -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -audio/ogg oga ogg spx -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file dvb -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -audio/x-wav wav -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-pascal p pas -text/x-java-source java -text/x-setext etx -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-ms-asf asf asx -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/node.types b/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/node.types deleted file mode 100644 index b7fe8c0d..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/node_modules/mime/types/node.types +++ /dev/null @@ -1,65 +0,0 @@ -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: OTF Message Silencer -# Why: To silence the "Resource interpreted as font but transferred with MIME -# type font/otf" message that occurs in Google Chrome -# Added by: niftylettuce -font/opentype otf - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifest -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest appcache manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Music playlist format (http://en.wikipedia.org/wiki/M3U) -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -application/x-mpegURL m3u8 - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: The FLAC lossless codec format -# Why: Streaming and serving FLAC audio -# Added by: jacobrask -audio/flac flac - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Matroska Mime Types -# Why: http://en.wikipedia.org/wiki/Matroska -# Added by: aduncan88 -video/x-matroska mkv -audio/x-matroska mka diff --git a/org.nodeclipse.bundle.express/express/node_modules/send/package.json b/org.nodeclipse.bundle.express/express/node_modules/send/package.json deleted file mode 100644 index d2b59914..00000000 --- a/org.nodeclipse.bundle.express/express/node_modules/send/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "send", - "version": "0.1.0", - "description": "Better streaming static file server with Range and conditional-GET support", - "keywords": [ - "static", - "file", - "server" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": { - "debug": "*", - "mime": "1.2.6", - "fresh": "0.1.0", - "range-parser": "0.0.4" - }, - "devDependencies": { - "mocha": "*", - "should": "*", - "supertest": "0.0.1", - "connect": "2.x" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "readme": "\n# send\n\n Send is Connect's `static()` extracted for generalized use, a streaming static file\n server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework.\n\n## Installation\n\n $ npm install send\n\n## Examples\n\n Small:\n\n```js\nvar http = require('http');\nvar send = require('send');\n\nvar app = http.createServer(function(req, res){\n send(req, req.url).pipe(res);\n});\n```\n\n Serving from a root directory with custom error-handling:\n\n```js\nvar http = require('http');\nvar send = require('send');\n\nvar app = http.createServer(function(req, res){\n // your custom error-handling logic:\n function error(err) {\n res.statusCode = err.status || 500;\n res.end(err.message);\n }\n\n // your custom directory handling logic:\n function redirect() {\n res.statusCode = 301;\n res.setHeader('Location', req.url + '/');\n res.end('Redirecting to ' + req.url + '/');\n }\n\n // transfer arbitrary files from within\n // /www/example.com/public/*\n send(req, url.parse(req.url).pathname)\n .root('/www/example.com/public')\n .on('error', error)\n .on('directory', redirect)\n .pipe(res);\n});\n```\n\n## API\n\n### Events\n\n - `error` an error occurred `(err)`\n - `directory` a directory was requested\n - `stream` file streaming has started `(stream)`\n - `end` streaming has completed\n\n### .root(dir)\n\n Serve files relative to `path`. Aliased as `.from(dir)`.\n\n### .index(path)\n\n By default send supports \"index.html\" files, to disable this\n invoke `.index(false)` or to supply a new index pass a string.\n\n### .maxage(ms)\n\n Provide a max-age in milliseconds for http caching, defaults to 0.\n\n## Error-handling\n\n By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc.\n\n## Caching\n\n It does _not_ perform internal caching, you should use a reverse proxy cache such\n as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;).\n\n## Debugging\n\n To enable `debug()` instrumentation output export __DEBUG__:\n\n```\n$ DEBUG=send node app\n```\n\n## Running tests\n\n```\n$ npm install\n$ make test\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "send@0.1.0", - "dist": { - "shasum": "a9aebed0901b68af0a153e93b3237321d31d4659" - }, - "_from": "send@0.1.0" -} diff --git a/org.nodeclipse.bundle.express/express/package.json b/org.nodeclipse.bundle.express/express/package.json deleted file mode 100644 index 45c3f994..00000000 --- a/org.nodeclipse.bundle.express/express/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "express", - "description": "Sinatra inspired web development framework", - "version": "3.2.6", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "Aaron Heckmann", - "email": "aaron.heckmann+github@gmail.com" - }, - { - "name": "Ciaran Jessup", - "email": "ciaranj@gmail.com" - }, - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - } - ], - "dependencies": { - "connect": "2.7.11", - "commander": "0.6.1", - "range-parser": "0.0.4", - "mkdirp": "0.3.4", - "cookie": "0.1.0", - "buffer-crc32": "0.2.1", - "fresh": "0.1.0", - "methods": "0.0.1", - "send": "0.1.0", - "cookie-signature": "1.0.1", - "debug": "*" - }, - "devDependencies": { - "ejs": "*", - "mocha": "*", - "jade": "*", - "hjs": "*", - "stylus": "*", - "should": "*", - "connect-redis": "*", - "marked": "*", - "supertest": "0.6.0" - }, - "keywords": [ - "express", - "framework", - "sinatra", - "web", - "rest", - "restful", - "router", - "app", - "api" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/express" - }, - "main": "index", - "bin": { - "express": "./bin/express" - }, - "scripts": { - "prepublish": "npm prune", - "test": "make test" - }, - "engines": { - "node": "*" - }, - "readme": "![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png)\n\n Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) [![Dependency Status](https://gemnasium.com/visionmedia/express.png)](https://gemnasium.com/visionmedia/express)\n\n```js\nvar express = require('express');\nvar app = express();\n\napp.get('/', function(req, res){\n res.send('Hello World');\n});\n\napp.listen(3000);\n```\n\n## Installation\n\n $ npm install -g express\n\n## Quick Start\n\n The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:\n\n Create the app:\n\n $ npm install -g express\n $ express /tmp/foo && cd /tmp/foo\n\n Install dependencies:\n\n $ npm install\n\n Start the server:\n\n $ node app\n\n## Features\n\n * Built on [Connect](http://github.com/senchalabs/connect)\n * Robust routing\n * HTTP helpers (redirection, caching, etc)\n * View system supporting 14+ template engines\n * Content negotiation\n * Focus on high performance\n * Environment based configuration\n * Executable for generating applications quickly\n * High test coverage\n\n## Philosophy\n\n The Express philosophy is to provide small, robust tooling for HTTP servers. Making\n it a great solution for single page applications, web sites, hybrids, or public\n HTTP APIs.\n\n Built on Connect you can use _only_ what you need, and nothing more, applications\n can be as big or as small as you like, even a single file. Express does\n not force you to use any specific ORM or template engine. With support for over\n 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js)\n you can quickly craft your perfect framework.\n\n## More Information\n\n * Join #express on freenode\n * [Google Group](http://groups.google.com/group/express-js) for discussion\n * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates\n * Visit the [Wiki](http://github.com/visionmedia/express/wiki)\n * [Русскоязычная документация](http://jsman.ru/express/)\n * Run express examples [online](https://runnable.com/express)\n\n## Viewing Examples\n\nClone the Express repo, then install the dev dependencies to install all the example / test suite deps:\n\n $ git clone git://github.com/visionmedia/express.git --depth 1\n $ cd express\n $ npm install\n\nthen run whichever tests you want:\n\n $ node examples/content-negotiation\n\n## Running Tests\n\nTo run the test suite first invoke the following command within the repo, installing the development dependencies:\n\n $ npm install\n\nthen run the tests:\n\n $ make test\n\n## Contributors\n\n```\nproject: express\ncommits: 3559\nactive : 468 days\nfiles : 237\nauthors:\n 1891\tTj Holowaychuk 53.1%\n 1285\tvisionmedia 36.1%\n 182\tTJ Holowaychuk 5.1%\n 54\tAaron Heckmann 1.5%\n 34\tcsausdev 1.0%\n 26\tciaranj 0.7%\n 21\tRobert Sköld 0.6%\n 6\tGuillermo Rauch 0.2%\n 3\tDav Glass 0.1%\n 3\tNick Poulden 0.1%\n 2\tRandy Merrill 0.1%\n 2\tBenny Wong 0.1%\n 2\tHunter Loftis 0.1%\n 2\tJake Gordon 0.1%\n 2\tBrian McKinney 0.1%\n 2\tRoman Shtylman 0.1%\n 2\tBen Weaver 0.1%\n 2\tDave Hoover 0.1%\n 2\tEivind Fjeldstad 0.1%\n 2\tDaniel Shaw 0.1%\n 1\tMatt Colyer 0.0%\n 1\tPau Ramon 0.0%\n 1\tPero Pejovic 0.0%\n 1\tPeter Rekdal Sunde 0.0%\n 1\tRaynos 0.0%\n 1\tTeng Siong Ong 0.0%\n 1\tViktor Kelemen 0.0%\n 1\tctide 0.0%\n 1\t8bitDesigner 0.0%\n 1\tisaacs 0.0%\n 1\tmgutz 0.0%\n 1\tpikeas 0.0%\n 1\tshuwatto 0.0%\n 1\ttstrimple 0.0%\n 1\tewoudj 0.0%\n 1\tAdam Sanderson 0.0%\n 1\tAndrii Kostenko 0.0%\n 1\tAndy Hiew 0.0%\n 1\tArpad Borsos 0.0%\n 1\tAshwin Purohit 0.0%\n 1\tBenjen 0.0%\n 1\tDarren Torpey 0.0%\n 1\tGreg Ritter 0.0%\n 1\tGregory Ritter 0.0%\n 1\tJames Herdman 0.0%\n 1\tJim Snodgrass 0.0%\n 1\tJoe McCann 0.0%\n 1\tJonathan Dumaine 0.0%\n 1\tJonathan Palardy 0.0%\n 1\tJonathan Zacsh 0.0%\n 1\tJustin Lilly 0.0%\n 1\tKen Sato 0.0%\n 1\tMaciej Małecki 0.0%\n 1\tMasahiro Hayashi 0.0%\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2009-2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "express@3.2.6", - "_from": "express" -} diff --git a/org.nodeclipse.bundle.express/express/test.js b/org.nodeclipse.bundle.express/express/test.js deleted file mode 100644 index 2b4b3577..00000000 --- a/org.nodeclipse.bundle.express/express/test.js +++ /dev/null @@ -1,17 +0,0 @@ -var express = require('./'); -var app = express(); - -express.request.toJSON = function(){ - return { - method: this.method, - url: this.url, - header: this.headers - } -}; - -app.get('*', function(req, res){ - console.log(JSON.stringify(req)); - res.send(200); -}); - -app.listen(4000) diff --git a/org.nodeclipse.bundle.express/pom.xml b/org.nodeclipse.bundle.express/pom.xml deleted file mode 100644 index 9bda2548..00000000 --- a/org.nodeclipse.bundle.express/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.bundle.express - 3.2.5 - eclipse-plugin - - org.nodeclipse.bundle.express - org.nodeclipse.bundle.express - - diff --git a/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/Activator.java b/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/Activator.java deleted file mode 100644 index 13ebbea0..00000000 --- a/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nodeclipse.bundle.express; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.bundle.express"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/BundlePath.java b/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/BundlePath.java deleted file mode 100644 index 374a83e0..00000000 --- a/org.nodeclipse.bundle.express/src/org/nodeclipse/bundle/express/BundlePath.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.nodeclipse.bundle.express; - -import java.io.File; -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.osgi.framework.Bundle; - -public class BundlePath { - public static String getPath() { - return getBundledPath("express/bin/express"); - } - - private static String getBundledPath(String path) { - Bundle bundle = Activator.getDefault().getBundle(); - if (bundle == null) { - //LogUtil.info("getBundlePath(" + path + " bundle is null"); - return ""; - } - try { - URL location = FileLocator.toFileURL(bundle.getEntry("/")); - File file = new File(location.getPath(), path); - //LogUtil.info("BundledPath: " + file.getAbsolutePath()); - - return file.getAbsolutePath(); - } catch(Exception ex) { - //LogUtil.error(ex); - return ""; - } - } -} diff --git a/org.nodeclipse.common/.classpath b/org.nodeclipse.common/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.common/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.common/.project b/org.nodeclipse.common/.project deleted file mode 100644 index e1e73984..00000000 --- a/org.nodeclipse.common/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.common - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.common/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.common/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.common/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.common/META-INF/MANIFEST.MF b/org.nodeclipse.common/META-INF/MANIFEST.MF deleted file mode 100644 index 31d6d2fd..00000000 --- a/org.nodeclipse.common/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse Common -Bundle-SymbolicName: org.nodeclipse.common; singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.common.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.ui.console -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy -Export-Package: org.nodeclipse.common.preferences, - org.nodeclipse.common.ui diff --git a/org.nodeclipse.common/README.md b/org.nodeclipse.common/README.md deleted file mode 100644 index 5d94d68b..00000000 --- a/org.nodeclipse.common/README.md +++ /dev/null @@ -1,2 +0,0 @@ - -Wow: Ctrl+V with some code in clipboard on java package will create new class and add that code into main() method \ No newline at end of file diff --git a/org.nodeclipse.common/build.properties b/org.nodeclipse.common/build.properties deleted file mode 100644 index 2b0d95b6..00000000 --- a/org.nodeclipse.common/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - . diff --git a/org.nodeclipse.common/plugin.xml b/org.nodeclipse.common/plugin.xml deleted file mode 100644 index 5535690d..00000000 --- a/org.nodeclipse.common/plugin.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/org.nodeclipse.common/pom.xml b/org.nodeclipse.common/pom.xml deleted file mode 100644 index f78d4714..00000000 --- a/org.nodeclipse.common/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.common - eclipse-plugin - - org.nodeclipse.common - org.nodeclipse.common - - diff --git a/org.nodeclipse.common/src/org/nodeclipse/common/Activator.java b/org.nodeclipse.common/src/org/nodeclipse/common/Activator.java deleted file mode 100644 index 2a93ca0f..00000000 --- a/org.nodeclipse.common/src/org/nodeclipse/common/Activator.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.nodeclipse.common; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.nodeclipse.common.preferences.CommonConstants; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = CommonConstants.PLUGIN_ID; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonConstants.java b/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonConstants.java deleted file mode 100644 index 57bc836b..00000000 --- a/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonConstants.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.nodeclipse.common.preferences; - -public class CommonConstants { - - public static final String PLUGIN_ID = "org.nodeclipse.common"; //$NON-NLS-1$ - -} diff --git a/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonDialogs.java b/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonDialogs.java deleted file mode 100644 index 7c8793c9..00000000 --- a/org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonDialogs.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.nodeclipse.common.preferences; - -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.PreferenceDialog; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.PreferencesUtil; - -/** - * Dialogs used in .enide.maven, .enide.gradle - * @author Paul Verest, Pushkar Gupte - */ -public class CommonDialogs { - - - public static void showPreferencesDialog(final String preferencesPage, final String message) { - Display.getDefault().syncExec(new Runnable() { - public void run() { - Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - - MessageDialog dialog = new MessageDialog(shell, "Nodeclipse", null, message, - MessageDialog.ERROR, new String[] { "Open Prefrences ...", "Cancel" }, 0); - int result = dialog.open(); - if (result == 0) { - PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(shell, - preferencesPage, null, null); //+ - if (pref != null) - pref.open(); - } - } - }); - } - - -} diff --git a/org.nodeclipse.common/src/org/nodeclipse/common/ui/CommonConsole.java b/org.nodeclipse.common/src/org/nodeclipse/common/ui/CommonConsole.java deleted file mode 100644 index 16c788ce..00000000 --- a/org.nodeclipse.common/src/org/nodeclipse/common/ui/CommonConsole.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.nodeclipse.common.ui; - -import java.io.IOException; - -import org.eclipse.ui.console.ConsolePlugin; -import org.eclipse.ui.console.IConsole; -import org.eclipse.ui.console.IOConsoleOutputStream; -import org.eclipse.ui.console.MessageConsole; - -/** - * Console showing executable's options and launch parameters - * and also runtime errors - * - * @author pverest - */ -public class CommonConsole { - - private static CommonConsole instance = null; - private static IOConsoleOutputStream stream = null; - - public CommonConsole() { - MessageConsole console = new MessageConsole("Common Console", null); - console.activate(); - ConsolePlugin.getDefault().getConsoleManager() - .addConsoles(new IConsole[] { console }); - stream = console.newOutputStream(); - } - - static { - getInstance(); - //write(VersionUtil.getLongString()); - write("visit http://www.nodeclipse.org/\n\n"); - } - - private static CommonConsole getInstance() { - if (instance == null) - instance = new CommonConsole(); - return instance; - } - - public static void write(String s) { -// IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); -// boolean nodeclipseConsoleEnabled = preferenceStore.getBoolean(PreferenceConstants.NODECLIPSE_CONSOLE_ENABLED);//@since 0.7 -// if (!nodeclipseConsoleEnabled) -// return; - - instance = getInstance(); - try { - stream.write(s); - } catch (IOException e) { - //TODO how to show? - //e.printStackTrace(); - } - } - - @Override - public void finalize() { - try { - stream.close(); - } catch (IOException e) { - //TODO how to show? - //e.printStackTrace(); - } - } - -} diff --git a/org.nodeclipse.debug/.classpath b/org.nodeclipse.debug/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.debug/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.debug/.project b/org.nodeclipse.debug/.project deleted file mode 100644 index 8295384d..00000000 --- a/org.nodeclipse.debug/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.debug - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.debug/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.debug/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.debug/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.debug/META-INF/MANIFEST.MF b/org.nodeclipse.debug/META-INF/MANIFEST.MF deleted file mode 100644 index 061ee2c3..00000000 --- a/org.nodeclipse.debug/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse -Bundle-SymbolicName: org.nodeclipse.debug; singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.debug.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.debug.ui, - org.nodeclipse.ui, - org.chromium.debug.core;bundle-version="0.3.9", - org.chromium.debug.ui;bundle-version="0.3.9", - org.chromium.sdk;bundle-version="0.3.9", - org.eclipse.ui.editors, - org.eclipse.jface.text, - org.eclipse.core.variables -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-Vendor: Nodeclipse organization -Export-Package: org.nodeclipse.debug.launch, - org.nodeclipse.debug.util diff --git a/org.nodeclipse.debug/README.md b/org.nodeclipse.debug/README.md deleted file mode 100644 index 17c73317..00000000 --- a/org.nodeclipse.debug/README.md +++ /dev/null @@ -1,66 +0,0 @@ - -## org.nodeclipse.debug - -Running and debugging Node applications - -### Developing - -Open `plugin.xml`, in "Testing" section click "Launch an Eclipse application" - -#### New Run/debug definition - -1. in `plugin.xml` add `LaunchShortcut` - - - -2. create new `public class LaunchShortcutName implements ILaunchShortcut` -for example see `org.nodeclipse.debug.launch.LaunchShortcutCoffeeCompile.java` - -3. Check `org.nodeclipse.debug.launch.LaunchConfigurationDelegate.java` - - -## notes - -debug port 5858 was hard-coded - -in 2 classes: [LaunchConfigurationDelegate.java](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java) - & NodeDebugUtil - -org.nodeclipse.debug\src\org\nodeclipse\debug\launch\LaunchConfigurationDelegate.java - -Nodeclipee Console is in .ui package, -no need for - - Import-Package: org.eclipse.ui.console - - -## TODO - -http://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_from_a_plug-in%3F - -#### How to write a hyperlink to an eclipse console from a plugin - -This may be used to show coffee compilation errors as links. - -http://stackoverflow.com/questions/591018/how-to-write-a-hyperlink-to-an-eclipse-console-from-a-plugin - - console = new MessageConsole("myconsole", null); - console.activate(); - ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{ console }); - - IPath path = Path.fromOSString(filePath); - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path); - FileLink fileLink = new FileLink(file, null, -1, -1, -1); - console.addHyperlink(fileLink, 10, 5); - -### Many node instances running - -- [ ] currecntly `private static RuntimeProcess nodeProcess`, that is only one Node process may be running. - -- [ ] --debug-brk=5858 - -http://stackoverflow.com/questions/11947409/nodejs-eclipse-v8-deb - -Port should be set per file basis, e.g. in Run Configuration - diff --git a/org.nodeclipse.debug/build.properties b/org.nodeclipse.debug/build.properties deleted file mode 100644 index 0d3d3a74..00000000 --- a/org.nodeclipse.debug/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/ diff --git a/org.nodeclipse.debug/icons/coffee.png b/org.nodeclipse.debug/icons/coffee.png deleted file mode 100644 index 3fc18ade..00000000 Binary files a/org.nodeclipse.debug/icons/coffee.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/coffee_bottom_right_corner_run_half_size.png b/org.nodeclipse.debug/icons/coffee_bottom_right_corner_run_half_size.png deleted file mode 100644 index efb742e7..00000000 Binary files a/org.nodeclipse.debug/icons/coffee_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/coffee_compile.png b/org.nodeclipse.debug/icons/coffee_compile.png deleted file mode 100644 index ab4c6e2f..00000000 Binary files a/org.nodeclipse.debug/icons/coffee_compile.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/node.png b/org.nodeclipse.debug/icons/node.png deleted file mode 100644 index 8e9e64a2..00000000 Binary files a/org.nodeclipse.debug/icons/node.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/node_bottom_right_corner_run_half_size.png b/org.nodeclipse.debug/icons/node_bottom_right_corner_run_half_size.png deleted file mode 100644 index 0e52c68e..00000000 Binary files a/org.nodeclipse.debug/icons/node_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/node_debug.png b/org.nodeclipse.debug/icons/node_debug.png deleted file mode 100644 index 1bf06190..00000000 Binary files a/org.nodeclipse.debug/icons/node_debug.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/node_unit.png b/org.nodeclipse.debug/icons/node_unit.png deleted file mode 100644 index 29c3e2db..00000000 Binary files a/org.nodeclipse.debug/icons/node_unit.png and /dev/null differ diff --git a/org.nodeclipse.debug/icons/node_with_monitor.png b/org.nodeclipse.debug/icons/node_with_monitor.png deleted file mode 100644 index 5b0f3a75..00000000 Binary files a/org.nodeclipse.debug/icons/node_with_monitor.png and /dev/null differ diff --git a/org.nodeclipse.debug/plugin.xml b/org.nodeclipse.debug/plugin.xml deleted file mode 100644 index 6fb60f46..00000000 --- a/org.nodeclipse.debug/plugin.xml +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.debug/pom.xml b/org.nodeclipse.debug/pom.xml deleted file mode 100644 index c494be2d..00000000 --- a/org.nodeclipse.debug/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.debug - eclipse-plugin - - org.nodeclipse.debug - org.nodeclipse.debug - - diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/Activator.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/Activator.java deleted file mode 100644 index f31b7b15..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/Activator.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.nodeclipse.debug; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.nodeclipse.debug.util.NodeDebugUtil; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.debug"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - NodeDebugUtil.deleteConfig(); - NodeDebugUtil.deleteProject(); - - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.java deleted file mode 100755 index d65a7723..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.java +++ /dev/null @@ -1,101 +0,0 @@ -/********************************************************************** - * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved. This - * program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - * dakshinamurthy.karra@gmail.com - bug 165371 - **********************************************************************/ -package org.nodeclipse.debug.launch; - - -import org.eclipse.osgi.util.NLS; - -public class ExternalToolsLaunchConfigurationMessages extends NLS { - private static final String BUNDLE_NAME = "org.nodeclipse.debug.launch.ExternalToolsLaunchConfigurationMessages";//$NON-NLS-1$ - - public static String ExternalToolsMainTab__Location___2; - public static String ExternalToolsMainTab__Browse_Workspace____3; - public static String ExternalToolsMainTab_Brows_e_File_System____4; - public static String ExternalToolsMainTab_Working__Directory__5; - public static String ExternalToolsMainTab_Browse_Wor_kspace____6; - public static String ExternalToolsMainTab_Browse_F_ile_System____7; - public static String ExternalToolsMainTab_Error_reading_configuration_10; - public static String ExternalToolsMainTab__Main_17; - public static String ExternalToolsMainTab_External_tool_location_cannot_be_empty_18; - public static String ExternalToolsMainTab_External_tool_location_does_not_exist_19; - public static String ExternalToolsMainTab_External_tool_location_specified_is_not_a_file_20; - public static String ExternalToolsMainTab_External_tool_working_directory_does_not_exist_or_is_invalid_21; - public static String ExternalToolsMainTab_Select_a_resource_22; - public static String ExternalToolsMainTab_23; - public static String ExternalToolsMainTab__Arguments___1; - public static String ExternalToolsMainTab_Varia_bles____2; - public static String ExternalToolsMainTab_3; - public static String ExternalToolsMainTab_Error_reading_configuration_7; - public static String ExternalToolsMainTab_Not_a_directory; - public static String ExternalToolsMainTab_30; - public static String ExternalToolsMainTab_31; - public static String ExternalToolsMainTab_32; - - public static String ExternalToolsBuildTab_1; - public static String ExternalToolsBuildTab_2; - public static String ExternalToolsBuildTab_3; - public static String ExternalToolsBuildTab_4; - public static String ExternalToolsBuildTab_5; - public static String ExternalToolsBuildTab_6; - public static String ExternalToolsBuildTab_7; - public static String ExternalToolsBuildTab_8; - public static String ExternalToolsBuildTab_9; - - // these messages are present for compatibility with 3.4 - see bug 301183 - public static String ExternalToolsUtil_Location_not_specified_by__0__1; - public static String ExternalToolsUtil_invalidLocation__0_; - public static String ExternalToolsUtil_invalidDirectory__0_; - // end - - public static String ExternalToolsBuilderTab_Run_this_builder_for__1; - public static String ExternalToolsBuilderTab__Full_builds_2; - public static String ExternalToolsBuilderTab_Full; - public static String ExternalToolsBuilderTab__Incremental_builds_4; - public static String ExternalToolsBuilderTab_Inc; - public static String ExternalToolsBuilderTab__Auto_builds__Not_recommended__6; - public static String ExternalToolsBuilderTab_Auto; - public static String ExternalToolsBuilderTab_Build_Options_9; - public static String ExternalToolsBuilderTab_workingSet_label; - public static String ExternalToolsBuilderTab_workingSet_tooltip; - public static String ExternalToolsBuilderTab_buildKindError; - public static String ExternalToolsBuilderTab_14; - public static String ExternalToolsBuilderTab_13; - public static String ExternalToolsBuilderTab_16; - public static String ExternalToolsBuilderTab_15; - public static String ExternalToolsBuilderTab_0; - public static String ExternalToolsBuilderTab_1; - public static String ExternalToolsBuilderTab_2; - - static { - // load message values from bundle file - NLS.initializeMessages(BUNDLE_NAME, ExternalToolsLaunchConfigurationMessages.class); - } - - public static String ExternalToolsBuilderTab_17; - - public static String ExternalToolsBuilderTab_18; - - public static String ExternalToolsBuilderTab_19; - - public static String ExternalToolsBuilderTab_20; - - public static String ExternalToolsBuilderTab_21; - - public static String ExternalToolsBuilderTab_22; - - public static String ExternalToolsBuilderTab_23; - - public static String ExternalToolsBuilderTab_24; - - public static String ExternalToolsBuilderTab_25; - - public static String ExternalToolsBuilderTab_26; -} \ No newline at end of file diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.properties b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.properties deleted file mode 100755 index 19a1b82b..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/ExternalToolsLaunchConfigurationMessages.properties +++ /dev/null @@ -1,79 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2010 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -# dakshinamurthy.karra@gmail.com - bug 165371 -############################################################################### - -ExternalToolsMainTab__Location___2=&Location: -ExternalToolsMainTab__Browse_Workspace____3=Browse Works&pace... -ExternalToolsMainTab_Brows_e_File_System____4=Brows&e File System... -ExternalToolsMainTab_Working__Directory__5=Working &Directory: -ExternalToolsMainTab_Browse_Wor_kspace____6=Browse Wor&kspace... -ExternalToolsMainTab_Browse_F_ile_System____7=Browse File Syste&m... -ExternalToolsMainTab_Error_reading_configuration_10=Error reading configuration -ExternalToolsMainTab__Main_17=Main -ExternalToolsMainTab_External_tool_location_cannot_be_empty_18=Nodeclipse location cannot be empty -ExternalToolsMainTab_External_tool_location_does_not_exist_19=Nodeclipse location does not exist -ExternalToolsMainTab_External_tool_location_specified_is_not_a_file_20=Nodeclipse location specified is not a file -ExternalToolsMainTab_External_tool_working_directory_does_not_exist_or_is_invalid_21=Nodeclipse working directory does not exist or is invalid -ExternalToolsMainTab_Select_a_resource_22=Select a resource: -ExternalToolsMainTab_23=Select a working directory: -ExternalToolsMainTab__Arguments___1=&Arguments: -ExternalToolsMainTab_Varia_bles____2=Variable&s... -ExternalToolsMainTab_3=Note: Enclose an argument containing spaces using double-quotes (\"). -ExternalToolsMainTab_Error_reading_configuration_7=Error reading configuration -ExternalToolsMainTab_Not_a_directory=The specified location is not a directory -ExternalToolsMainTab_30=Please specify the location of the Nodeclipse you would like to configure. -ExternalToolsMainTab_31=Var&iables... -ExternalToolsMainTab_32=Varia&bles... - -ExternalToolsBuildTab_1=&Build before launch -ExternalToolsBuildTab_2=The &entire workspace -ExternalToolsBuildTab_3=The &project containing the selected resource -ExternalToolsBuildTab_4=&Specific projects -ExternalToolsBuildTab_5=P&rojects... -ExternalToolsBuildTab_6=Include referenced pro&jects -ExternalToolsBuildTab_7=Select &Projects: -ExternalToolsBuildTab_8=Build -ExternalToolsBuildTab_9=No projects specified - -# these messages are present for compatibility with 3.4 - see bug 301183 -ExternalToolsUtil_Location_not_specified_by__0__1=Location not specified by {0} -ExternalToolsUtil_invalidLocation__0_ = The file does not exist for the Nodeclipse named {0}. -ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the Nodeclipse named {1}. -# end - -ExternalToolsBuilderTab_Run_this_builder_for__1=Run the builder: -ExternalToolsBuilderTab__Full_builds_2=A&fter a \"Clean\" -ExternalToolsBuilderTab_Full=Runs on the first build that occurs after a clean. -ExternalToolsBuilderTab__Incremental_builds_4=&During manual builds -ExternalToolsBuilderTab_Inc=Runs whenever the user invokes a build (but not for auto-build). -ExternalToolsBuilderTab__Auto_builds__Not_recommended__6=During a&uto builds -ExternalToolsBuilderTab_Auto=Runs whenever a resource in the workspace is modified if autobuilding is enabled. Enabling this option should be paired with a specifying a resource working set. -ExternalToolsBuilderTab_Build_Options_9=&Build Options -ExternalToolsBuilderTab_workingSet_label=Specify working set of &relevant resources -ExternalToolsBuilderTab_workingSet_tooltip=The working set of resources that if changed from a manual or auto build will trigger the Nodeclipse builder -ExternalToolsBuilderTab_buildKindError=At least one type of build kind must be selected -ExternalToolsBuilderTab_14=Launch in bac&kground -ExternalToolsBuilderTab_13=&Specify Resources... -ExternalToolsBuilderTab_16=Must select resources in working set. -ExternalToolsBuilderTab_15=workingSet -ExternalToolsBuilderTab_17=Standard Input and Output -ExternalToolsBuilderTab_18=Allocate &Console (necessary for input) -ExternalToolsBuilderTab_19=Fi&le -ExternalToolsBuilderTab_0=During a "&Clean" -ExternalToolsBuilderTab_1=Runs when a "clean" has been initiated -ExternalToolsBuilderTab_2=Note: Not applied for the builds during or after a \"Clean\" -ExternalToolsBuilderTab_20=Browse Worksp&ace... -ExternalToolsBuilderTab_21=Browse File Syste&m... -ExternalToolsBuilderTab_22=Varia&bles... -ExternalToolsBuilderTab_23=A&ppend -ExternalToolsBuilderTab_24=Select a Resource -ExternalToolsBuilderTab_25=Select a resource to redirect output to: -ExternalToolsBuilderTab_26=No file specified for process output diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index d7d6b614..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,323 +0,0 @@ -package org.nodeclipse.debug.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.NodeDebugUtil; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.Dialogs; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * launch() implements starting Node and passing all parameters. - * Node is launched as node, coffee, coffee -c, tsc or node-dev(or other monitors) - * - * @author Lamb, Tomoyuki, Pushkar, Paul Verest - */ -public class LaunchConfigurationDelegate implements - ILaunchConfigurationDelegate { - private static RuntimeProcess nodeProcess = null; //since 0.7 it should be debuggable instance - //@since 0.7. contain all running Node thread, including under debug. Non Thread-safe, as it should be only in GUI thread - //private static List nodeRunningProcesses = new LinkedList(); - - private boolean warned = false; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org. - * eclipse.debug.core.ILaunchConfiguration, java.lang.String, - * org.eclipse.debug.core.ILaunch, - * org.eclipse.core.runtime.IProgressMonitor) - */ - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean allowedMany = preferenceStore.getBoolean(PreferenceConstants.NODE_ALLOW_MANY);//@since 0.7 - boolean isDebugMode = mode.equals(ILaunchManager.DEBUG_MODE); - - if (allowedMany){//@since 0.7 - if ( isDebugMode - && (nodeProcess != null && !nodeProcess.isTerminated()) ) { - showErrorDialog("Only 1 node process can be debugged in 1 Eclipse instance!\n\n"+ - "Open other Eclipse/Enide Studio with different node debug port configurred. "); - return; - } - - }else{ - if(nodeProcess != null && !nodeProcess.isTerminated()) { - //throw new CoreException(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGIN_ID, null, null)); - showErrorDialog("Other node process is running!"); - return; - //TODO suggest to terminate and start new - } - } - - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - if (preferenceStore.getBoolean(PreferenceConstants.NODE_JUST_NODE)){ - cmdLine.add("node"); - }else{ - // old way: Application path should be stored in preference. - String nodePath= preferenceStore.getString(PreferenceConstants.NODE_PATH); - // Check if the node location is correctly configured - File nodeFile = new File(nodePath); - if(!nodeFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - Dialogs.showPreferencesDialog("Node.js runtime is not correctly configured.\n\n" - + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location"); - return; - } - cmdLine.add(nodePath); - } - - if (isDebugMode) { - // -brk says to Node runtime wait until Chromium Debugger starts and connects - // that is causing "stop on first line" behavior, - // otherwise small apps or first line can be undebuggable. - String brk = "-brk" ; //default "-brk" - if (preferenceStore.getBoolean(PreferenceConstants.NODE_DEBUG_NO_BREAK)) //default false - brk = ""; - // done: flexible debugging port, instead of hard-coded 5858 - // #61 https://github.com/Nodeclipse/nodeclipse-1/issues/61 - int nodeDebugPort = preferenceStore.getInt(PreferenceConstants.NODE_DEBUG_PORT); - if (nodeDebugPort==0) { nodeDebugPort=5858;}; - cmdLine.add("--debug"+brk+"="+nodeDebugPort); //--debug-brk=5858 - } - - //@since 0.9 from Preferences - String nodeOptions= preferenceStore.getString(PreferenceConstants.NODE_OPTIONS); - if(!nodeOptions.equals("")) { - String[] sa = nodeOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String nodeArgs = configuration.getAttribute(Constants.ATTR_NODE_ARGUMENTS, ""); - if(!nodeArgs.equals("")) { - String[] sa = nodeArgs.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String file = configuration.getAttribute(Constants.KEY_FILE_PATH, Constants.BLANK_STRING); - String extension = null; - int i = file.lastIndexOf('.'); - if(i > 0) { - extension = file.substring(i+1); - } else { - // throw new CoreException(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGIN_ID, - // "Target file does not have extension: " + file, null)); - // by default assume - extension = "js"; - } - - // #57 running app.js with node-dev, forever, supervisor, nodemon etc - // https://github.com/Nodeclipse/nodeclipse-1/issues/57 - String nodeMonitor = configuration.getAttribute(Constants.ATTR_NODE_MONITOR, ""); - if(!nodeMonitor.equals("")) { // any value - //TODO support selection, now only one - - String nodeMonitorPath= preferenceStore.getString(PreferenceConstants.NODE_MONITOR_PATH); - - // Check if the node monitor location is correctly configured - File nodeMonitorFile = new File(nodeMonitorPath); - if(!nodeMonitorFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - Dialogs.showPreferencesDialog("Node.js monitor is not correctly configured.\n" - + "Select path to installed util: forever, node-dev, nodemon or superviser.\n\n" - + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location"); - return; - } - cmdLine.add(nodeMonitorPath); - } else if ( ("coffee".equals(extension))||("litcoffee".equals(extension))||("md".equals(extension)) ) { - //if (preferenceStore.getBoolean(PreferenceConstants.COFFEE_JUST_COFFEE)){ - // cmdLine.add("coffee"); //TODO should be instead of node above - //}else{ - cmdLine.add(preferenceStore.getString(PreferenceConstants.COFFEE_PATH)); - //} - // coffee -c - String coffeeCompile = configuration.getAttribute(Constants.ATTR_COFFEE_COMPILE, ""); - if(!coffeeCompile.equals("")) { // any value - cmdLine.add("-c"); - String coffeeCompileOptions = preferenceStore.getString(PreferenceConstants.COFFEE_COMPILE_OPTIONS); - if(!coffeeCompileOptions.equals("")) { - cmdLine.add(coffeeCompileOptions); - } - } - } else if ("ts".equals(extension)) { - // the only thing we can do now with .ts is to compile, so no need to check if it was launched as tsc - //String typescriptCompiler = configuration.getAttribute(Constants.ATTR_TYPESCRIPT_COMPILER, ""); - cmdLine.add(preferenceStore.getString(PreferenceConstants.TYPESCRIPT_COMPILER_PATH)); - } - - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so can not found it. - cmdLine.add(filePath); - - //@since 0.9 from Preferences - String nodeApplicationArguments = preferenceStore.getString(PreferenceConstants.NODE_APPLICATION_ARGUMENTS); - if(!nodeApplicationArguments.equals("")) { - String[] sa = nodeApplicationArguments.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String programArgs = configuration.getAttribute(Constants.ATTR_PROGRAM_ARGUMENTS, ""); - if(!programArgs.equals("")) { - String[] sa = programArgs.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - //TODO rename workingPath to workingDirectory, workingDirectory to workingDirectoryConfig - //DONE propagate changes to .phantom,.mongo ... - File workingPath = null; - String workingDirectory = configuration.getAttribute(Constants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - workingPath = (new File(filePath)).getParentFile(); - } - - //env - String[] envp = getEnvironmentVariables(configuration); - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to run/debug. See also #71 (output is less or no output) - Process p = DebugPlugin.exec(cmds, workingPath, envp); - // no way to get private p.handle from java.lang.ProcessImpl - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, Constants.PROCESS_MESSAGE); - if (isDebugMode) { - if(!process.isTerminated()) { - int nodeDebugPort = preferenceStore.getInt(PreferenceConstants.NODE_DEBUG_PORT); - NodeDebugUtil.launch(mode, launch, monitor, nodeDebugPort); - } - } - - if (allowedMany){ //@since 0.7 - if (isDebugMode){ - nodeProcess = process; - } - //nodeRunningProcesses.add(process); - }else{ - nodeProcess = process; - } - } - - public static String[] NODE_ENV_VAR_SET = new String[]{"APPDATA","PATH","TEMP","TMP","SystemDrive"}; // #81, #197 - - private String[] getEnvironmentVariables(ILaunchConfiguration configuration) throws CoreException { - Map envm = new HashMap(); - envm = configuration.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, envm); - - int envmSizeDelta = NODE_ENV_VAR_SET.length; - Map all = null; - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean passAllEnvVars = preferenceStore.getBoolean(PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES);//@since 0.12 - if (passAllEnvVars){ - all = System.getenv(); - envmSizeDelta = all.size(); - } - - String[] envp = new String[envm.size()+envmSizeDelta]; // see below - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - if (passAllEnvVars){ - for (Map.Entry entry : all.entrySet()) - { - //System.out.println(entry.getKey() + "/" + entry.getValue()); - envp[idx++] = entry.getKey() + "=" + entry.getValue(); - } - }else{ - for (String envVarName : NODE_ENV_VAR_SET){ - envp[idx++] = getEnvVariableEqualsString(envVarName); - } - } - if (!warned ){ - NodeclipseConsole.write(" These environment variables will be applied automatically to every `node` launch.\n"); - StringBuilder sb = new StringBuilder(100); - for(int i=0; i - * Clients may call {@link #setHelpContextId(String)} on this tab prior to control - * creation to alter the default context help associated with this tab. - *

    - *

    - * This class may be instantiated. - *

    - * @since 3.0 - * @noextend This class is not intended to be subclassed by clients. - */ -@SuppressWarnings("restriction") -public class LaunchConfigurationEnvironmentTab extends AbstractLaunchConfigurationTab { - - protected TableViewer environmentTable; - protected String[] envTableColumnHeaders = { - LaunchConfigurationsMessages.EnvironmentTab_Variable_1, - LaunchConfigurationsMessages.EnvironmentTab_Value_2, - }; - private static final String NAME_LABEL= LaunchConfigurationsMessages.EnvironmentTab_8; - private static final String VALUE_LABEL= LaunchConfigurationsMessages.EnvironmentTab_9; - protected static final String P_VARIABLE = "variable"; //$NON-NLS-1$ - protected static final String P_VALUE = "value"; //$NON-NLS-1$ - protected Button envAddButton; - protected Button envEditButton; - protected Button envRemoveButton; - protected Button appendEnvironment; - protected Button replaceEnvironment; - protected Button envSelectButton; - - /** - * Content provider for the environment table - */ - protected class EnvironmentVariableContentProvider implements IStructuredContentProvider { - public Object[] getElements(Object inputElement) { - EnvironmentVariable[] elements = new EnvironmentVariable[0]; - ILaunchConfiguration config = (ILaunchConfiguration) inputElement; - Map m; - try { - m = config.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, (Map) null); - } catch (CoreException e) { - DebugUIPlugin.log(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, "Error reading configuration", e)); //$NON-NLS-1$ - return elements; - } - if (m != null && !m.isEmpty()) { - elements = new EnvironmentVariable[m.size()]; - String[] varNames = new String[m.size()]; - m.keySet().toArray(varNames); - for (int i = 0; i < m.size(); i++) { - elements[i] = new EnvironmentVariable(varNames[i], (String) m.get(varNames[i])); - } - } - return elements; - } - public void dispose() { - } - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - if (newInput == null){ - return; - } - if (viewer instanceof TableViewer){ - TableViewer tableViewer= (TableViewer) viewer; - if (tableViewer.getTable().isDisposed()) { - return; - } - tableViewer.setComparator(new ViewerComparator() { - public int compare(Viewer iviewer, Object e1, Object e2) { - if (e1 == null) { - return -1; - } else if (e2 == null) { - return 1; - } else { - return ((EnvironmentVariable)e1).getName().compareToIgnoreCase(((EnvironmentVariable)e2).getName()); - } - } - }); - } - } - } - - /** - * Label provider for the environment table - */ - public class EnvironmentVariableLabelProvider extends LabelProvider implements ITableLabelProvider { - public String getColumnText(Object element, int columnIndex) { - String result = null; - if (element != null) { - EnvironmentVariable var = (EnvironmentVariable) element; - switch (columnIndex) { - case 0: // variable - result = var.getName(); - break; - case 1: // value - result = var.getValue(); - break; - } - } - return result; - } - public Image getColumnImage(Object element, int columnIndex) { - if (columnIndex == 0) { - return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_ENV_VAR); - } - return null; - } - } - - /** - * Constructs a new tab with default context help. - */ - public LaunchConfigurationEnvironmentTab() { - setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - // Create main composite - Composite mainComposite = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL); - setControl(mainComposite); - PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); - - createEnvironmentTable(mainComposite); - createTableButtons(mainComposite); - createAppendReplace(mainComposite); - - Dialog.applyDialogFont(mainComposite); - } - - /** - * Creates and configures the widgets which allow the user to - * choose whether the specified environment should be appended - * to the native environment or if it should completely replace it. - * @param parent the composite in which the widgets should be created - */ - protected void createAppendReplace(Composite parent) { - Composite comp = SWTFactory.createComposite(parent, 1, 2, GridData.FILL_HORIZONTAL); - appendEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_16); - appendEnvironment.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - updateLaunchConfigurationDialog(); - } - }); - replaceEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_17); - //+ #122 "Append to environment" is not working properly { by Paul - appendEnvironment.setEnabled(false); - replaceEnvironment.setEnabled(false); - replaceEnvironment.setSelection(true); - // currently only specified environment variables are passed - // making it replace like . - // } - } - - /** - * Updates the enablement of the append/replace widgets. The - * widgets should disable when there are no environment variables specified. - */ - protected void updateAppendReplace() { - boolean enable= environmentTable.getTable().getItemCount() > 0; - appendEnvironment.setEnabled(enable); - replaceEnvironment.setEnabled(enable); - } - - /** - * Creates and configures the table that displayed the key/value - * pairs that comprise the environment. - * @param parent the composite in which the table should be created - */ - protected void createEnvironmentTable(Composite parent) { - Font font = parent.getFont(); - // Create label, add it to the parent to align the right side buttons with the top of the table - SWTFactory.createLabel(parent, LaunchConfigurationsMessages.EnvironmentTab_Environment_variables_to_set__3, 2); - // Create table composite - Composite tableComposite = SWTFactory.createComposite(parent, font, 1, 1, GridData.FILL_BOTH, 0, 0); - // Create table - environmentTable = new TableViewer(tableComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); - Table table = environmentTable.getTable(); - table.setLayout(new GridLayout()); - table.setLayoutData(new GridData(GridData.FILL_BOTH)); - table.setHeaderVisible(true); - table.setLinesVisible(true); - table.setFont(font); - environmentTable.setContentProvider(new EnvironmentVariableContentProvider()); - environmentTable.setLabelProvider(new EnvironmentVariableLabelProvider()); - environmentTable.setColumnProperties(new String[] {P_VARIABLE, P_VALUE}); - environmentTable.addSelectionChangedListener(new ISelectionChangedListener() { - public void selectionChanged(SelectionChangedEvent event) { - handleTableSelectionChanged(event); - } - }); - environmentTable.addDoubleClickListener(new IDoubleClickListener() { - public void doubleClick(DoubleClickEvent event) { - if (!environmentTable.getSelection().isEmpty()) { - handleEnvEditButtonSelected(); - } - } - }); - // Create columns - final TableColumn tc1 = new TableColumn(table, SWT.NONE, 0); - tc1.setText(envTableColumnHeaders[0]); - final TableColumn tc2 = new TableColumn(table, SWT.NONE, 1); - tc2.setText(envTableColumnHeaders[1]); - final Table tref = table; - final Composite comp = tableComposite; - tableComposite.addControlListener(new ControlAdapter() { - public void controlResized(ControlEvent e) { - Rectangle area = comp.getClientArea(); - Point size = tref.computeSize(SWT.DEFAULT, SWT.DEFAULT); - ScrollBar vBar = tref.getVerticalBar(); - int width = area.width - tref.computeTrim(0,0,0,0).width - 2; - if (size.y > area.height + tref.getHeaderHeight()) { - Point vBarSize = vBar.getSize(); - width -= vBarSize.x; - } - Point oldSize = tref.getSize(); - if (oldSize.x > area.width) { - tc1.setWidth(width/2-1); - tc2.setWidth(width - tc1.getWidth()); - tref.setSize(area.width, area.height); - } else { - tref.setSize(area.width, area.height); - tc1.setWidth(width/2-1); - tc2.setWidth(width - tc1.getWidth()); - } - } - }); - } - - /** - * Responds to a selection changed event in the environment table - * @param event the selection change event - */ - protected void handleTableSelectionChanged(SelectionChangedEvent event) { - int size = ((IStructuredSelection)event.getSelection()).size(); - envEditButton.setEnabled(size == 1); - envRemoveButton.setEnabled(size > 0); - } - - /** - * Creates the add/edit/remove buttons for the environment table - * @param parent the composite in which the buttons should be created - */ - protected void createTableButtons(Composite parent) { - // Create button composite - Composite buttonComposite = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_END, 0, 0); - - // Create buttons - envAddButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_New_4, null); - envAddButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - handleEnvAddButtonSelected(); - } - }); - envSelectButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_18, null); - envSelectButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - handleEnvSelectButtonSelected(); - } - }); - envEditButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Edit_5, null); - envEditButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - handleEnvEditButtonSelected(); - } - }); - envEditButton.setEnabled(false); - envRemoveButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Remove_6, null); - envRemoveButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - handleEnvRemoveButtonSelected(); - } - }); - envRemoveButton.setEnabled(false); - } - - /** - * Adds a new environment variable to the table. - */ - protected void handleEnvAddButtonSelected() { - MultipleInputDialog dialog = new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_22); - dialog.addTextField(NAME_LABEL, null, false); - dialog.addVariablesField(VALUE_LABEL, null, true); - - if (dialog.open() != Window.OK) { - return; - } - - String name = dialog.getStringValue(NAME_LABEL); - String value = dialog.getStringValue(VALUE_LABEL); - - if (name != null && value != null && name.length() > 0 && value.length() >0) { - addVariable(new EnvironmentVariable(name.trim(), value.trim())); - updateAppendReplace(); - } - } - - /** - * Attempts to add the given variable. Returns whether the variable - * was added or not (as when the user answers not to overwrite an - * existing variable). - * @param variable the variable to add - * @return whether the variable was added - */ - protected boolean addVariable(EnvironmentVariable variable) { - String name= variable.getName(); - TableItem[] items = environmentTable.getTable().getItems(); - for (int i = 0; i < items.length; i++) { - EnvironmentVariable existingVariable = (EnvironmentVariable) items[i].getData(); - if (existingVariable.getName().equals(name)) { - boolean overWrite= MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.EnvironmentTab_12, MessageFormat.format(LaunchConfigurationsMessages.EnvironmentTab_13, new String[] {name})); // - if (!overWrite) { - return false; - } - environmentTable.remove(existingVariable); - break; - } - } - environmentTable.add(variable); - updateLaunchConfigurationDialog(); - return true; - } - - /** - * Displays a dialog that allows user to select native environment variables - * to add to the table. - */ - private void handleEnvSelectButtonSelected() { - //get Environment Variables from the OS - Map envVariables = getNativeEnvironment(); - - //get Environment Variables from the table - TableItem[] items = environmentTable.getTable().getItems(); - for (int i = 0; i < items.length; i++) { - EnvironmentVariable var = (EnvironmentVariable) items[i].getData(); - envVariables.remove(var.getName()); - } - - NativeEnvironmentSelectionDialog dialog = new NativeEnvironmentSelectionDialog(getShell(), envVariables); - dialog.setTitle(LaunchConfigurationsMessages.EnvironmentTab_20); - - int button = dialog.open(); - if (button == Window.OK) { - Object[] selected = dialog.getResult(); - for (int i = 0; i < selected.length; i++) { - environmentTable.add(selected[i]); - } - } - - updateAppendReplace(); - updateLaunchConfigurationDialog(); - } - - /** - * Gets native environment variable from the LaunchManager. Creates EnvironmentVariable objects. - * @return Map of name - EnvironmentVariable pairs based on native environment. - */ - private Map getNativeEnvironment() { - Map stringVars = DebugPlugin.getDefault().getLaunchManager().getNativeEnvironmentCasePreserved(); - HashMap vars = new HashMap(); - for (Iterator i = stringVars.keySet().iterator(); i.hasNext(); ) { - String key = (String) i.next(); - String value = (String) stringVars.get(key); - vars.put(key, new EnvironmentVariable(key, value)); - } - return vars; - } - - /** - * Creates an editor for the value of the selected environment variable. - */ - private void handleEnvEditButtonSelected() { - IStructuredSelection sel= (IStructuredSelection) environmentTable.getSelection(); - EnvironmentVariable var= (EnvironmentVariable) sel.getFirstElement(); - if (var == null) { - return; - } - String originalName= var.getName(); - String value= var.getValue(); - MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_11); - dialog.addTextField(NAME_LABEL, originalName, false); - dialog.addVariablesField(VALUE_LABEL, value, true); - - if (dialog.open() != Window.OK) { - return; - } - String name= dialog.getStringValue(NAME_LABEL); - value= dialog.getStringValue(VALUE_LABEL); - if (!originalName.equals(name)) { - if (addVariable(new EnvironmentVariable(name, value))) { - environmentTable.remove(var); - } - } else { - var.setValue(value); - environmentTable.update(var, null); - updateLaunchConfigurationDialog(); - } - } - - /** - * Removes the selected environment variable from the table. - */ - private void handleEnvRemoveButtonSelected() { - IStructuredSelection sel = (IStructuredSelection) environmentTable.getSelection(); - environmentTable.getControl().setRedraw(false); - for (Iterator i = sel.iterator(); i.hasNext(); ) { - EnvironmentVariable var = (EnvironmentVariable) i.next(); - environmentTable.remove(var); - } - environmentTable.getControl().setRedraw(true); - updateAppendReplace(); - updateLaunchConfigurationDialog(); - } - - /** - * Updates the environment table for the given launch configuration - * @param configuration - */ - protected void updateEnvironment(ILaunchConfiguration configuration) { - environmentTable.setInput(configuration); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - configuration.removeAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) - */ - public void initializeFrom(ILaunchConfiguration configuration) { - boolean append= true; - try { - append = configuration.getAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES, true); - } catch (CoreException e) { - DebugUIPlugin.log(e.getStatus()); - } - if (append) { - appendEnvironment.setSelection(true); - replaceEnvironment.setSelection(false); - } else { - replaceEnvironment.setSelection(true); - appendEnvironment.setSelection(false); - } - updateEnvironment(configuration); - updateAppendReplace(); - } - - /** - * Stores the environment in the given configuration - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - // Convert the table's items into a Map so that this can be saved in the - // configuration's attributes. - TableItem[] items = environmentTable.getTable().getItems(); - Map map = new HashMap(items.length); - for (int i = 0; i < items.length; i++) - { - EnvironmentVariable var = (EnvironmentVariable) items[i].getData(); - map.put(var.getName(), var.getValue()); - } - if (map.size() == 0) { - configuration.setAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, (Map) null); - } else { - configuration.setAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, map); - } - - if(appendEnvironment.getSelection()) { - ILaunchConfiguration orig = configuration.getOriginal(); - boolean hasTrueValue = false; - if(orig != null) { - try { - hasTrueValue = orig.hasAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES) && - orig.getAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES, true); - } catch (CoreException e) { - DebugUIPlugin.log(e.getStatus()); - } - } - if (hasTrueValue) { - configuration.setAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES, true); - } else { - configuration.removeAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES); - } - } else { - configuration.setAttribute(Constants.ATTR_APPEND_ENVIRONMENT_VARIABLES, false); - } - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() - */ - public String getName() { - return LaunchConfigurationsMessages.EnvironmentTab_Environment_7; - } - - /** - * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId() - * - * @since 3.3 - */ - public String getId() { - return "org.eclipse.debug.ui.environmentTab"; //$NON-NLS-1$ - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() - */ - public Image getImage() { - return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_ENVIRONMENT); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void activated(ILaunchConfigurationWorkingCopy workingCopy) { - // do nothing when activated - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) - */ - public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) { - // do nothing when de-activated - } - - /** - * This dialog allows users to select one or more known native environment variables from a list. - */ - private class NativeEnvironmentSelectionDialog extends AbstractDebugCheckboxSelectionDialog { - - private Object fInput; - - public NativeEnvironmentSelectionDialog(Shell parentShell, Object input) { - super(parentShell); - fInput = input; - setShellStyle(getShellStyle() | SWT.RESIZE); - setShowSelectAllButtons(true); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() - */ - protected String getDialogSettingsId() { - return IDebugUIConstants.PLUGIN_ID + ".ENVIRONMENT_TAB.NATIVE_ENVIROMENT_DIALOG"; //$NON-NLS-1$ - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId() - */ - protected String getHelpContextId() { - return IDebugHelpContextIds.SELECT_NATIVE_ENVIRONMENT_DIALOG; - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput() - */ - protected Object getViewerInput() { - return fInput; - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() - */ - protected String getViewerLabel() { - return LaunchConfigurationsMessages.EnvironmentTab_19; - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider() - */ - protected IBaseLabelProvider getLabelProvider() { - return new ILabelProvider() { - public Image getImage(Object element) { - return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_ENVIRONMENT); - } - public String getText(Object element) { - EnvironmentVariable var = (EnvironmentVariable) element; - return MessageFormat.format(LaunchConfigurationsMessages.EnvironmentTab_7, new String[] {var.getName(), var.getValue()}); - } - public void addListener(ILabelProviderListener listener) { - } - public void dispose() { - } - public boolean isLabelProperty(Object element, String property) { - return false; - } - public void removeListener(ILabelProviderListener listener) { - } - }; - } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider() - */ - protected IContentProvider getContentProvider() { - return new IStructuredContentProvider() { - public Object[] getElements(Object inputElement) { - EnvironmentVariable[] elements = null; - if (inputElement instanceof HashMap) { - Comparator comparator = new Comparator() { - public int compare(Object o1, Object o2) { - String s1 = (String)o1; - String s2 = (String)o2; - return s1.compareTo(s2); - } - }; - TreeMap envVars = new TreeMap(comparator); - envVars.putAll((Map)inputElement); - elements = new EnvironmentVariable[envVars.size()]; - int index = 0; - for (Iterator iterator = envVars.keySet().iterator(); iterator.hasNext(); index++) { - Object key = iterator.next(); - elements[index] = (EnvironmentVariable) envVars.get(key); - } - } - return elements; - } - public void dispose() { - } - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - }; - } - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationMainTab.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationMainTab.java deleted file mode 100644 index d9a9584f..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationMainTab.java +++ /dev/null @@ -1,190 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ResourceListSelectionDialog; -import org.nodeclipse.debug.Activator; -import org.nodeclipse.debug.util.Constants; - -public class LaunchConfigurationMainTab extends AbstractLaunchConfigurationTab { - - public static final String MAIN_TAB_NAME = "Main"; - private Text fileText; - private Button fileButton; - - /** - * @wbp.parser.entryPoint (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse - * .swt.widgets.Composite) - **/ - public void createControl(Composite parent) { - Font font = parent.getFont(); - Composite comp = createComposite(parent, font, 1, 1, GridData.FILL_BOTH); - createFileGroup(comp); - setControl(comp); - - } - - private void createFileGroup(Composite parent) { - Group fileGroup = new Group(parent, SWT.NONE); - fileGroup.setText(Constants.FILE_LABEL); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - fileGroup.setLayoutData(gd); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - fileGroup.setLayout(layout); - fileGroup.setFont(parent.getFont()); - - fileText = new Text(fileGroup, SWT.SINGLE | SWT.BORDER); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.setFont(parent.getFont()); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - updateLaunchConfigurationDialog(); - } - }); - - fileButton = createPushButton(fileGroup, Constants.SEARCH_LABEL, null); //$NON-NLS-1$ - gd = new GridData(GridData.FILL_HORIZONTAL); - fileButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - browseFiles(); - } - }); - } - - /*** - * Open a resource chooser to select a file - **/ - protected void browseFiles() { - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), root, IResource.FILE); - dialog.setTitle(Constants.SEARCH_TITLE); - if (dialog.open() == Window.OK) { - Object[] files = dialog.getResult(); - IFile file = (IFile) files[0]; - fileText.setText(file.getFullPath().toString()); - } - - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse. - * debug.core.ILaunchConfigurationWorkingCopy) - **/ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse - * .debug.core.ILaunchConfiguration) - **/ - public void initializeFrom(ILaunchConfiguration configuration) { - - try { - String path = null; - path = configuration.getAttribute(Constants.KEY_FILE_PATH, Constants.BLANK_STRING); - if (path != null) { - fileText.setText(path); - } - } catch (CoreException e) { - setErrorMessage(e.getMessage()); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse - * .debug.core.ILaunchConfigurationWorkingCopy) - **/ - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - String file = fileText.getText().trim(); - if (file.length() == 0) { - file = null; - } - configuration.setAttribute(Constants.KEY_FILE_PATH, file); - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug - * .core.ILaunchConfiguration) - **/ - public boolean isValid(ILaunchConfiguration launchConfig) { - setErrorMessage(null); - setMessage(null); - String text = fileText.getText(); - - if (text.length() > 0) { - IPath path = new Path(text); - if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) { - setErrorMessage("Specified file does not exist"); - return false; - } - } else { - setMessage("Specify an file"); - } - return true; - } - - public Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) { - Composite g = new Composite(parent, SWT.NONE); - g.setLayout(new GridLayout(columns, false)); - g.setFont(font); - GridData gd = new GridData(fill); - gd.horizontalSpan = hspan; - g.setLayoutData(gd); - return g; - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() - **/ - public Image getImage() { - return Activator.getImageDescriptor(Constants.NODE_ICON).createImage(); - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() - **/ - public String getName() { - return MAIN_TAB_NAME; - } - -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationTabGroup.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationTabGroup.java deleted file mode 100644 index 6c6e3d6c..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { - new LaunchConfigurationMainTab(), - new NodeArgumentsTab(), - new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcut.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcut.java deleted file mode 100644 index e3e48772..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcut.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "Node Application" or "Run As" --> "coffee" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - private void showDialogNotImplemented(String what) { - //TODO CommonDialog "Not Implemented" - MessageDialog.openWarning(null, "Warning", - "Launching of type "+what+" is not implemeneted yet!\n"+ - "Search/raise an issue if you care at https://github.com/nodeclipse/nodeclipse-1/issues/"); - } - - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - //MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - showDialogNotImplemented(selection.getClass().getName()); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - //MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - showDialogNotImplemented(editor.getClass().getName()); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(Constants.LAUNCH_CONFIGURATION_TYPE_ID); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - IContainer container = null; - //TODO save LaunchConfiguration in project's .settings folder by default -// if(true){ -// container = -// } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(container, configname); - workingCopy.setAttribute(Constants.KEY_FILE_PATH, path); - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutCoffeeCompile.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutCoffeeCompile.java deleted file mode 100644 index a55bd0a4..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutCoffeeCompile.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "coffee -c" will lead here - * - * @author Paul Verest - * @since 0.6 - **/ -public class LaunchShortcutCoffeeCompile extends LaunchShortcut{ - - @Override - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - workingCopy.setAttribute(Constants.ATTR_COFFEE_COMPILE, "-c"); // any value - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutTypescriptCompiler.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutTypescriptCompiler.java deleted file mode 100644 index 6a8853e9..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutTypescriptCompiler.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "tsc" will lead here - * - * @author Paul Verest - * @since 0.6 - **/ -public class LaunchShortcutTypescriptCompiler extends LaunchShortcut{ - - @Override - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - workingCopy.setAttribute(Constants.ATTR_TYPESCRIPT_COMPILER, "tsc"); // any value - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutWithMonitor.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutWithMonitor.java deleted file mode 100644 index 39c23ed4..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchShortcutWithMonitor.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "Node with monitor" will lead here - * - * @author Paul Verest - * @since 0.6 - **/ -public class LaunchShortcutWithMonitor extends LaunchShortcut{ - - @Override - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - workingCopy.setAttribute(Constants.ATTR_NODE_MONITOR, "e.g. node_dev"); // any value - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/NodeArgumentsTab.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/NodeArgumentsTab.java deleted file mode 100644 index f7b96c88..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/NodeArgumentsTab.java +++ /dev/null @@ -1,483 +0,0 @@ -package org.nodeclipse.debug.launch; - - -import java.io.File; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.variables.IStringVariableManager; -import org.eclipse.core.variables.VariablesPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; -import org.eclipse.debug.ui.StringVariableSelectionDialog; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.swt.SWT; -import org.eclipse.swt.accessibility.AccessibleAdapter; -import org.eclipse.swt.accessibility.AccessibleEvent; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.TraverseEvent; -import org.eclipse.swt.events.TraverseListener; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DirectoryDialog; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ContainerSelectionDialog; -import org.eclipse.ui.dialogs.ResourceSelectionDialog; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * These sources definitely came from some example like - * https://eclipse.googlesource.com/pdt/org.eclipse.pdt/+/508aebe616434cff2b7ba10178d818e9db7d3399/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/launching/PHPExecutableLaunchTab.java - * @author ? - * - */ -public class NodeArgumentsTab extends AbstractLaunchConfigurationTab { - protected Label fPrgmArgumentsLabel; - protected Text fPrgmArgumentsText; - - // Node arguments widgets - protected Label fNodeArgumentsLabel; - protected Text fNodeArgumentsText; - - protected Text locationField; - protected Text workDirectoryField; - //protected Button fileLocationButton; - protected Button workspaceLocationButton; - protected Button fileWorkingDirectoryButton; - protected Button workspaceWorkingDirectoryButton; - protected Button variablesWorkingDirectoryButton; - - protected boolean fInitializing= false; - private boolean userEdited= false; - - protected WidgetListener fListener= new WidgetListener(); - - /** - * A listener to update for text modification and widget selection. - */ - protected class WidgetListener extends SelectionAdapter implements ModifyListener { - public void modifyText(ModifyEvent e) { - if (!fInitializing) { - setDirty(true); - userEdited= true; - updateLaunchConfigurationDialog(); - } - } - public void widgetSelected(SelectionEvent e) { - setDirty(true); - Object source= e.getSource(); - if (source == workspaceLocationButton) { - handleWorkspaceLocationButtonSelected(); -// } else if (source == fileLocationButton) { -// handleFileLocationButtonSelected(); - } else if (source == workspaceWorkingDirectoryButton) { - handleWorkspaceWorkingDirectoryButtonSelected(); - } else if (source == fileWorkingDirectoryButton) { - handleFileWorkingDirectoryButtonSelected(); -// } else if (source == argumentVariablesButton) { -// handleVariablesButtonSelected(argumentField); -// } else if (source == variablesLocationButton) { -// handleVariablesButtonSelected(locationField); - } else if (source == variablesWorkingDirectoryButton) { - handleVariablesButtonSelected(workDirectoryField); - } - } - - } - - /** - * Prompts the user to choose a location from the filesystem and - * sets the location as the full path of the selected file. - */ -// protected void handleFileLocationButtonSelected() { -// FileDialog fileDialog = new FileDialog(getShell(), SWT.NONE); -// fileDialog.setFileName(locationField.getText()); -// String text= fileDialog.open(); -// if (text != null) { -// locationField.setText(text); -// } -// } - - /** - * Prompts the user for a workspace location within the workspace and sets - * the location as a String containing the workspace_loc variable or - * null if no location was obtained from the user. - */ - protected void handleWorkspaceLocationButtonSelected() { - ResourceSelectionDialog dialog; - dialog = new ResourceSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Select_a_resource_22); - dialog.open(); - Object[] results = dialog.getResult(); - if (results == null || results.length < 1) { - return; - } - IResource resource = (IResource)results[0]; - locationField.setText(newVariableExpression("workspace_loc", resource.getFullPath().toString())); //$NON-NLS-1$ - } - - /** - * Prompts the user for a working directory location within the workspace - * and sets the working directory as a String containing the workspace_loc - * variable or null if no location was obtained from the user. - */ - protected void handleWorkspaceWorkingDirectoryButtonSelected() { - ContainerSelectionDialog containerDialog; - containerDialog = new ContainerSelectionDialog( - getShell(), - ResourcesPlugin.getWorkspace().getRoot(), - false, - ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_23); - containerDialog.open(); - Object[] resource = containerDialog.getResult(); - String text= null; - if (resource != null && resource.length > 0) { - text= newVariableExpression("workspace_loc", ((IPath)resource[0]).toString()); //$NON-NLS-1$ - } - if (text != null) { - workDirectoryField.setText(text); - } - } - - /** - * Returns a new variable expression with the given variable and the given argument. - * @see IStringVariableManager#generateVariableExpression(String, String) - */ - protected String newVariableExpression(String varName, String arg) { - return VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression(varName, arg); - } - - /** - * Prompts the user to choose a working directory from the filesystem. - */ - protected void handleFileWorkingDirectoryButtonSelected() { - DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SAVE); - dialog.setMessage(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_23); - dialog.setFilterPath(workDirectoryField.getText()); - String text= dialog.open(); - if (text != null) { - workDirectoryField.setText(text); - } - } - - /** - * A variable entry button has been pressed for the given text - * field. Prompt the user for a variable and enter the result - * in the given field. - */ - private void handleVariablesButtonSelected(Text textField) { - String variable = getVariable(); - if (variable != null) { - textField.insert(variable); - } - } - - /** - * Prompts the user to choose and configure a variable and returns - * the resulting string, suitable to be used as an attribute. - */ - private String getVariable() { - StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); - dialog.open(); - return dialog.getVariableExpression(); - } - - @Override - public void createControl(Composite parent) { - Font font = parent.getFont(); - Composite comp = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(1, true); - comp.setLayout(layout); - comp.setFont(font); - - GridData gd = new GridData(GridData.FILL_BOTH); - comp.setLayoutData(gd); - setControl(comp); - //setHelpContextId(); - - Group group = new Group(comp, SWT.NONE); - group.setFont(font); - layout = new GridLayout(); - group.setLayout(layout); - group.setLayoutData(new GridData(GridData.FILL_BOTH)); - - group.setText("Program Arguments"); - - fPrgmArgumentsText = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL); - fPrgmArgumentsText.addTraverseListener(new TraverseListener() { - public void keyTraversed(TraverseEvent e) { - switch (e.detail) { - case SWT.TRAVERSE_ESCAPE: - case SWT.TRAVERSE_PAGE_NEXT: - case SWT.TRAVERSE_PAGE_PREVIOUS: - e.doit = true; - break; - case SWT.TRAVERSE_RETURN: - case SWT.TRAVERSE_TAB_NEXT: - case SWT.TRAVERSE_TAB_PREVIOUS: - if ((fPrgmArgumentsText.getStyle() & SWT.SINGLE) != 0) { - e.doit = true; - } else { - if (!fPrgmArgumentsText.isEnabled() || (e.stateMask & SWT.MODIFIER_MASK) != 0) { - e.doit = true; - } - } - break; - } - } - }); - gd = new GridData(GridData.FILL_BOTH); - gd.heightHint = 40; - gd.widthHint = 100; - fPrgmArgumentsText.setLayoutData(gd); - fPrgmArgumentsText.setFont(font); - fPrgmArgumentsText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent evt) { - scheduleUpdateJob(); - } - }); - //ControlAccessibleListener.addListener(fPrgmArgumentsText, group.getText()); - - String buttonLabel = "Variables..."; - Button pgrmArgVariableButton = createPushButton(group, buttonLabel, null); - pgrmArgVariableButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); - pgrmArgVariableButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); - dialog.open(); - String variable = dialog.getVariableExpression(); - if (variable != null) { - fPrgmArgumentsText.insert(variable); - } - } - }); - - Group groupNode = new Group(comp, SWT.NONE); - groupNode.setFont(font); - groupNode.setLayout(new GridLayout()); - groupNode.setLayoutData(new GridData(GridData.FILL_BOTH)); - - groupNode.setText("Node Arguments"); - - fNodeArgumentsText = new Text(groupNode, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL); - fNodeArgumentsText.addTraverseListener(new TraverseListener() { - public void keyTraversed(TraverseEvent e) { - switch (e.detail) { - case SWT.TRAVERSE_ESCAPE: - case SWT.TRAVERSE_PAGE_NEXT: - case SWT.TRAVERSE_PAGE_PREVIOUS: - e.doit = true; - break; - case SWT.TRAVERSE_RETURN: - case SWT.TRAVERSE_TAB_NEXT: - case SWT.TRAVERSE_TAB_PREVIOUS: - if ((fPrgmArgumentsText.getStyle() & SWT.SINGLE) != 0) { - e.doit = true; - } else { - if (!fPrgmArgumentsText.isEnabled() || (e.stateMask & SWT.MODIFIER_MASK) != 0) { - e.doit = true; - } - } - break; - } - } - }); - GridData gd2 = new GridData(GridData.FILL_BOTH); - gd2.heightHint = 40; - gd2.widthHint = 100; - fNodeArgumentsText.setLayoutData(gd2); - fNodeArgumentsText.setFont(font); - fNodeArgumentsText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent evt) { - scheduleUpdateJob(); - } - }); - //ControlAccessibleListener.addListener(fPrgmArgumentsText, group.getText()); - - String buttonLabel2 = "Variables..."; - Button pgrmArgVariableButton2 = createPushButton(groupNode, buttonLabel2, null); - pgrmArgVariableButton2.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); - pgrmArgVariableButton2.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell()); - dialog.open(); - String variable = dialog.getVariableExpression(); - if (variable != null) { - fNodeArgumentsText.insert(variable); - } - } - }); - - createWorkDirectoryComponent(comp); - } - - /** - * Creates the controls needed to edit the working directory - * attribute of an external tool - * - * @param parent the composite to create the controls in - */ - protected void createWorkDirectoryComponent(Composite parent) { - Group group = new Group(parent, SWT.NONE); - String groupName = getWorkingDirectoryLabel(); - group.setText(groupName); - GridLayout layout = new GridLayout(); - layout.numColumns = 1; - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - group.setLayout(layout); - group.setLayoutData(gridData); - - workDirectoryField = new Text(group, SWT.BORDER); - GridData data = new GridData(GridData.FILL_HORIZONTAL); - data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; - workDirectoryField.setLayoutData(data); - workDirectoryField.addModifyListener(fListener); - addControlAccessibleListener(workDirectoryField,group.getText()); - - Composite buttonComposite = new Composite(group, SWT.NONE); - layout = new GridLayout(); - layout.marginWidth = 0; - layout.marginHeight = 0; - layout.numColumns = 3; - gridData = new GridData(GridData.HORIZONTAL_ALIGN_END); - buttonComposite.setLayout(layout); - buttonComposite.setLayoutData(gridData); - buttonComposite.setFont(parent.getFont()); - - workspaceWorkingDirectoryButton= createPushButton(buttonComposite, ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Browse_Wor_kspace____6, null); - workspaceWorkingDirectoryButton.addSelectionListener(fListener); - addControlAccessibleListener(workspaceWorkingDirectoryButton, group.getText() + " " + workspaceWorkingDirectoryButton.getText()); //$NON-NLS-1$ - - fileWorkingDirectoryButton= createPushButton(buttonComposite, ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Browse_F_ile_System____7, null); - fileWorkingDirectoryButton.addSelectionListener(fListener); - //addControlAccessibleListener(fileWorkingDirectoryButton, group.getText() + " " + fileLocationButton.getText()); //$NON-NLS-1$ - - variablesWorkingDirectoryButton = createPushButton(buttonComposite, ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_32, null); - variablesWorkingDirectoryButton.addSelectionListener(fListener); - addControlAccessibleListener(variablesWorkingDirectoryButton, group.getText() + " " + variablesWorkingDirectoryButton.getText()); //$NON-NLS-1$ - } - - /** - * Return the String to use as the label for the working directory field. - * Subclasses may wish to override. - */ - protected String getWorkingDirectoryLabel() { - return ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Working__Directory__5; - } - - /* - * Fix for Bug 60163 Accessibility: New Builder Dialog missing object info for textInput controls - */ - public void addControlAccessibleListener(Control control, String controlName) { - //strip mnemonic (&) - String[] strs = controlName.split("&"); //$NON-NLS-1$ - StringBuffer stripped = new StringBuffer(); - for (int i = 0; i < strs.length; i++) { - stripped.append(strs[i]); - } - control.getAccessible().addAccessibleListener(new ControlAccessibleListener(stripped.toString())); - } - - private class ControlAccessibleListener extends AccessibleAdapter { - private String controlName; - ControlAccessibleListener(String name) { - controlName = name; - } - public void getName(AccessibleEvent e) { - e.result = controlName; - } - - } - - public boolean isValid(ILaunchConfiguration launchConfig) { - setErrorMessage(null); - setMessage(null); - return validateWorkDirectory(); - } - - /** - * Validates the content of the working directory field. - */ - protected boolean validateWorkDirectory() { - String dir = workDirectoryField.getText().trim(); - if (dir.length() <= 0) { - return true; - } - - String expandedDir= null; - try { - expandedDir= VariablesUtil.resolveValue(dir); - if (expandedDir == null) { //a variable that needs to be resolved at runtime - return true; - } - } catch (CoreException e) { - setErrorMessage(e.getStatus().getMessage()); - return false; - } - - File file = new File(expandedDir); - if (!file.exists()) { // The directory does not exist. - setErrorMessage(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_External_tool_working_directory_does_not_exist_or_is_invalid_21); - return false; - } - if (!file.isDirectory()) { - setErrorMessage(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Not_a_directory); - return false; - } - return true; - } - - @Override - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - } - - @Override - public void initializeFrom(ILaunchConfiguration configuration) { - try { - fPrgmArgumentsText.setText((String)configuration.getAttribute(Constants.ATTR_PROGRAM_ARGUMENTS, "")); - fNodeArgumentsText.setText((String)configuration.getAttribute(Constants.ATTR_NODE_ARGUMENTS, "")); - workDirectoryField.setText((String)configuration.getAttribute(Constants.ATTR_WORKING_DIRECTORY, "")); - } catch (CoreException e) { - //e.printStackTrace(); - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - @Override - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - configuration.setAttribute(Constants.ATTR_PROGRAM_ARGUMENTS, getAttributeValueFrom(fPrgmArgumentsText)); - configuration.setAttribute(Constants.ATTR_NODE_ARGUMENTS, getAttributeValueFrom(fNodeArgumentsText)); - configuration.setAttribute(Constants.ATTR_WORKING_DIRECTORY, getAttributeValueFrom(workDirectoryField)); - } - - @Override - public String getName() { - return "Arguments"; - } - - /** - * Returns the string in the text widget, or null if empty. - * - * @return text or null - */ - protected String getAttributeValueFrom(Text text) { - String content = text.getText().trim(); - if (content.length() > 0) { - return content; - } - return null; - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/StandaloneV8LaunchTypeWrapper.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/StandaloneV8LaunchTypeWrapper.java deleted file mode 100644 index 59461a6c..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/StandaloneV8LaunchTypeWrapper.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.nodeclipse.debug.launch; - -import org.chromium.debug.core.model.DebugTargetImpl; -import org.chromium.debug.core.model.JavascriptVmEmbedder; -import org.chromium.debug.core.model.LaunchParams; -import org.chromium.debug.core.model.SourceWrapSupport; -import org.chromium.debug.core.model.WorkspaceBridge; -import org.chromium.debug.ui.launcher.PluginVariablesUtil; -import org.chromium.debug.ui.launcher.StandaloneV8LaunchType; -import org.chromium.sdk.util.Destructable; -import org.chromium.sdk.util.DestructingGuard; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.nodeclipse.debug.model.VProjectWorkspaceBridge; - -public class StandaloneV8LaunchTypeWrapper extends StandaloneV8LaunchType { - public void launch(ILaunchConfiguration config, String mode, - final ILaunch launch, IProgressMonitor monitor) - throws CoreException { - if (!mode.equals(ILaunchManager.DEBUG_MODE)) { - // Chromium JavaScript launch is only supported for debugging. - return; - } - - String host = config.getAttribute(LaunchParams.CHROMIUM_DEBUG_HOST, - PluginVariablesUtil.getValue(PluginVariablesUtil.DEFAULT_HOST)); - - int port = config.getAttribute(LaunchParams.CHROMIUM_DEBUG_PORT, - PluginVariablesUtil - .getValueAsInt(PluginVariablesUtil.DEFAULT_PORT)); - - if (host == null && port == -1) { - throw new RuntimeException("Missing parameters in launch config"); - } - - boolean addNetworkConsole = config.getAttribute( - LaunchParams.ADD_NETWORK_CONSOLE, false); - - SourceWrapSupport sourceWrapSupport = createSourceWrapSupportFromConfig(config); - - JavascriptVmEmbedder.ConnectionToRemote remoteServer = createConnectionToRemote( - host, port, launch, addNetworkConsole); - try { - - final String projectNameBase = config.getName(); - final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectNameBase); - if (project.exists()) { - project.delete(true, null); - } - - DestructingGuard destructingGuard = new DestructingGuard(); - try { - Destructable lauchDestructor = new Destructable() { - public void destruct() { - if (!launch.hasChildren()) { - DebugPlugin.getDefault().getLaunchManager() - .removeLaunch(launch); - } - } - }; - - destructingGuard.addValue(lauchDestructor); - - WorkspaceBridge.Factory bridgeFactory = new VProjectWorkspaceBridge.FactoryImpl( - projectNameBase); - - final DebugTargetImpl target = new DebugTargetImpl(launch, - bridgeFactory, sourceWrapSupport, - getPresetSyncDirection()); - - Destructable targetDestructor = new Destructable() { - public void destruct() { - terminateTarget(target); - } - }; - destructingGuard.addValue(targetDestructor); - - launch.addDebugTarget(target); - - boolean attached = DebugTargetImpl - .attach(target, remoteServer, destructingGuard, - OPENING_VIEW_ATTACH_CALLBACK, monitor); - if (!attached) { - // Cancel pressed. - return; - } - - launch.addDebugTarget(target); - monitor.done(); - - // All OK - destructingGuard.discharge(); - } finally { - destructingGuard.doFinally(); - } - - } finally { - remoteServer.disposeConnection(); - } - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/BreakpointAdapterFactory.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/BreakpointAdapterFactory.java deleted file mode 100755 index a6887c7b..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/BreakpointAdapterFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.nodeclipse.debug.model; - -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget; -import org.eclipse.ui.texteditor.ITextEditor; - -/** - * Factory of LineBreakpointAdapters for browser scripts. - */ -public class BreakpointAdapterFactory implements IAdapterFactory { - - @SuppressWarnings("unchecked") - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adaptableObject instanceof ITextEditor) { - ITextEditor editorPart = (ITextEditor) adaptableObject; - IResource resource = - (IResource) editorPart.getEditorInput().getAdapter(IResource.class); - if (resource != null) { - String extension = resource.getFileExtension(); - if (extension != null && ChromiumDebugPluginUtil.SUPPORTED_EXTENSIONS.contains(extension)) { - return new NodeBreakpointAdapter(); - } - } - } - return null; - } - - @SuppressWarnings("unchecked") - public Class[] getAdapterList() { - return new Class[] { IToggleBreakpointsTarget.class }; - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/DebugTarget.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/DebugTarget.java deleted file mode 100644 index c07a67db..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/DebugTarget.java +++ /dev/null @@ -1,184 +0,0 @@ -package org.nodeclipse.debug.model; - -import java.io.IOException; -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IMemoryBlock; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.debug.core.model.IThread; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.LogUtil; - -public class DebugTarget extends NodeDebugElement implements IDebugTarget { - - private ILaunch launch; - private IProcess process; - private Process p; - private IThread[] threads; - private Thread thread; - private boolean suspended; - - public DebugTarget(ILaunch launch, IProcess process, Process p) { - super(null); - this.launch = launch; - this.process = process; - this.p = p; - this.thread = new Thread(this); - threads = new Thread[] { this.thread }; - } - - @Override - public boolean canTerminate() { - return !isTerminated(); - } - - @Override - public boolean isTerminated() { - return getProcess().isTerminated(); - } - - @Override - public void terminate() throws DebugException { - IStreamsProxy streamsProxy = process.getStreamsProxy(); - try { - if (!isTerminated()) { - streamsProxy.write(Constants.QUIT + Constants.EOL); - // wait for subprocess exit - p.waitFor(); - } - } catch (IOException e) { - LogUtil.error(e); - } catch (InterruptedException e) { - LogUtil.error(e); - } - } - - @Override - public boolean canResume() { - return !isTerminated() && isSuspended(); - } - - @Override - public boolean canSuspend() { - return !isTerminated() && !isSuspended(); - } - - @Override - public boolean isSuspended() { - return suspended; - } - - public void sendCommand(String command) { - IStreamsProxy streamsProxy = process.getStreamsProxy(); - try { - if (!isTerminated()) { - streamsProxy.write(command + Constants.EOL); - } - } catch (IOException e) { - LogUtil.error(e); - } - } - - @Override - public void resume() throws DebugException { - sendCommand(Constants.CONT); - } - - @Override - public void suspend() throws DebugException { - // TODO Auto-generated method stub - - } - - @Override - public void breakpointAdded(IBreakpoint breakpoint) { - // TODO Auto-generated method stub - - } - - @Override - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { - // TODO Auto-generated method stub - - } - - @Override - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { - // TODO Auto-generated method stub - - } - - @Override - public boolean canDisconnect() { - return false; - } - - @Override - public void disconnect() throws DebugException { - // TODO Auto-generated method stub - - } - - @Override - public boolean isDisconnected() { - return false; - } - - @Override - public boolean supportsStorageRetrieval() { - // TODO Auto-generated method stub - return false; - } - - @Override - public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException { - // TODO Auto-generated method stub - return null; - } - - @Override - public IDebugTarget getDebugTarget() { - return this; - } - - @Override - public ILaunch getLaunch() { - return launch; - } - - @Override - public IProcess getProcess() { - return process; - } - - @Override - public IThread[] getThreads() throws DebugException { - if (threads == null) { - return new IThread[0]; - } else { - return threads; - } - } - - @Override - public boolean hasThreads() throws DebugException { - return true; - } - - @Override - public String getName() throws DebugException { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean supportsBreakpoint(IBreakpoint breakpoint) { - // TODO Auto-generated method stub - return true; - } - -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/LaunchInitializationProcedure.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/LaunchInitializationProcedure.java deleted file mode 100644 index 4e50d27e..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/LaunchInitializationProcedure.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.nodeclipse.debug.model; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.model.BreakpointSynchronizer; -import org.chromium.debug.core.model.ConnectedTargetData; -import org.chromium.debug.core.model.DebugTargetImpl; -import org.chromium.debug.core.model.LaunchParams; -import org.chromium.debug.core.model.Messages; -import org.chromium.debug.core.util.ProgressUtil; -import org.chromium.debug.core.util.ProgressUtil.MonitorWrapper; -import org.chromium.debug.core.util.ProgressUtil.Stage; -import org.chromium.sdk.CallbackSemaphore; -import org.chromium.sdk.RelayOk; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.osgi.util.NLS; - -/** - * Does several things we need on debug session start. This procedure works asynchronously while - * user may already start his debug activity. - */ -class LaunchInitializationProcedure { - static void startAsync(VProjectWorkspaceBridge workspaceBridge, - BreakpointSynchronizer.Direction presetDirection) { - final LaunchInitializationProcedure procedure = - new LaunchInitializationProcedure(workspaceBridge, presetDirection); - - ILaunch launch = workspaceBridge.getConnectedTargetData().getDebugTarget().getLaunch(); - final String jobName = NLS.bind(Messages.LaunchInitializationProcedure_JOB_NAME, - launch.getLaunchConfiguration().getName()); - Job job = new Job(jobName) { - @Override - protected IStatus run(IProgressMonitor monitor) { - return procedure.execute(monitor); - } - }; - job.schedule(); - } - - private final VProjectWorkspaceBridge workspaceBridge; - private final BreakpointSynchronizer.Direction presetDirection; - - private LaunchInitializationProcedure(VProjectWorkspaceBridge workspaceBridge, - BreakpointSynchronizer.Direction presetDirection) { - this.workspaceBridge = workspaceBridge; - this.presetDirection = presetDirection; - } - - /** - * A list of tasks for progress monitor. - */ - private interface WorkPlan { - Stage PREINIT = new Stage(Messages.LaunchInitializationProcedure_UPDATE_DEBUGGER_STATE, 0.1f); - Stage SET_OPTIONS = new Stage(Messages.LaunchInitializationProcedure_SET_OPTIONS, 1f); - Stage LOAD_SCRIPTS = new Stage(Messages.LaunchInitializationProcedure_LOAD_SCRIPTS, 1f); - Stage SYNCHRONIZE_BREAKPOINTS = - new Stage(Messages.LaunchInitializationProcedure_SYNCHRONIZE_BREAKPOINTS, 1f); - - boolean IS_INITIZALIZED = ProgressUtil.layoutProgressPlan(PREINIT, SET_OPTIONS, LOAD_SCRIPTS, - SYNCHRONIZE_BREAKPOINTS); - } - - private IStatus execute(IProgressMonitor monitor) { - ConnectedTargetData connectedTargetData = workspaceBridge.getConnectedTargetData(); - - MonitorWrapper monitorWrapper = new MonitorWrapper(monitor, ""); //$NON-NLS-1$ - - monitorWrapper.beginTask(); - try { - WorkPlan.PREINIT.start(monitorWrapper); - // Nothing here right now. - WorkPlan.PREINIT.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - WorkPlan.SET_OPTIONS.start(monitorWrapper); - // Not implemented yet - WorkPlan.SET_OPTIONS.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - WorkPlan.LOAD_SCRIPTS.start(monitorWrapper); - workspaceBridge.reloadScriptsAtStart(); - WorkPlan.LOAD_SCRIPTS.finish(monitorWrapper); - checkIsCanceled(monitorWrapper); - synchronizeBreakpoints( - WorkPlan.SYNCHRONIZE_BREAKPOINTS.createSubMonitorWrapper(monitorWrapper)); - - } finally { - monitorWrapper.done(); - } - return Status.OK_STATUS; - } - - /** - * A list of tasks for breakpoint synchronization subprocess. - */ - private interface BreakpointsWorkPlan { - Stage ANALYZE = new Stage(null, 1f); - Stage REMOTE_CHANGES = new Stage(null, 1f); - - boolean IS_LAYOUTED = ProgressUtil.layoutProgressPlan(ANALYZE, REMOTE_CHANGES); - } - - private void synchronizeBreakpoints(MonitorWrapper monitor) { - monitor.beginTask(); - try { - BreakpointsWorkPlan.ANALYZE.start(monitor); - - DebugTargetImpl debugTarget = workspaceBridge.getConnectedTargetData().getDebugTarget(); - ILaunchConfiguration launchConfiguration = debugTarget.getLaunch().getLaunchConfiguration(); - - BreakpointSynchronizer.Direction direction; - if (presetDirection == null) { - try { - direction = LaunchParams.readBreakpointSyncDirection(launchConfiguration); - } catch (CoreException e) { - ChromiumDebugPlugin.log( - new Exception("Failed to read breakpoint synchronization direction " + //$NON-NLS-1$ - "from launch configuration " + launchConfiguration.getName(), e)); //$NON-NLS-1$ - direction = null; - } - } else { - direction = presetDirection; - } - - if (direction == null) { - return; - } - final CallbackSemaphore callbackSemaphore = new CallbackSemaphore(); - BreakpointSynchronizer.Callback callback = new BreakpointSynchronizer.Callback() { - public void onDone(IStatus status) { - callbackSemaphore.callbackDone(null); - } - }; - workspaceBridge.getBreakpointSynchronizer().syncBreakpoints(direction, callback); - RelayOk relayOk = SYNCHRONIZER_MUST_RELAY_OK; - checkIsCanceled(monitor); - - BreakpointsWorkPlan.ANALYZE.finish(monitor); - - BreakpointsWorkPlan.REMOTE_CHANGES.start(monitor); - callbackSemaphore.tryAcquireDefault(relayOk); - BreakpointsWorkPlan.REMOTE_CHANGES.finish(monitor); - - } finally { - monitor.done(); - } - } - - private static void checkIsCanceled(MonitorWrapper monitor) { - if (monitor.isCanceled()) { - throw new OperationCanceledException(); - } - } - - private static final RelayOk SYNCHRONIZER_MUST_RELAY_OK = new RelayOk() {}; -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeBreakpointAdapter.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeBreakpointAdapter.java deleted file mode 100644 index 6b76a0fd..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeBreakpointAdapter.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.nodeclipse.debug.model; - -import org.chromium.debug.core.model.ChromiumLineBreakpoint; -import org.chromium.debug.core.model.LineBreakpointAdapter; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.ILineBreakpoint; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.texteditor.ITextEditor; -import org.nodeclipse.debug.util.NodeResourceUtil; - -public class NodeBreakpointAdapter extends - LineBreakpointAdapter.ForVirtualProject { - public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) - throws CoreException { - ITextEditor textEditor = getEditor(part); - if (textEditor != null) { - IResource resource = (IResource) textEditor.getEditorInput() - .getAdapter(IResource.class); - IResource res2 = NodeResourceUtil.get(resource); - - ITextSelection textSelection = (ITextSelection) selection; - int lineNumber = textSelection.getStartLine(); - IBreakpoint[] breakpoints = DebugPlugin.getDefault() - .getBreakpointManager().getBreakpoints(getDebugModelId()); - IBreakpoint breakpoint = findBreakpoint(breakpoints, resource, lineNumber); - if(breakpoint != null) { - breakpoint.delete(); - breakpoint = findBreakpoint(breakpoints, res2, lineNumber); - if(breakpoint != null) { - breakpoint.delete(); - } - return; - } - - addBreakpoint(resource, lineNumber); - if(res2 != null && res2.exists()) { - addBreakpoint(res2, lineNumber); - } - } - } - - private IBreakpoint findBreakpoint(IBreakpoint[] breakpoints, IResource resource, int lineNumber) throws CoreException { - if(resource == null) { - return null; - } - - for (int i = 0; i < breakpoints.length; i++) { - IBreakpoint breakpoint = breakpoints[i]; - if (resource.equals(breakpoint.getMarker().getResource())) { - if (((ILineBreakpoint) breakpoint).getLineNumber() == lineNumber + 1) { - return breakpoint; - } - } - } - return null; - } - - private void addBreakpoint(IResource resource, int lineNumber) throws CoreException { - if(resource == null) { - return; - } - - // Line numbers start with 0 in V8, with 1 in Eclipse. - ChromiumLineBreakpoint lineBreakpoint = new ChromiumLineBreakpoint( - resource, lineNumber + 1, getDebugModelId()); - DebugPlugin.getDefault().getBreakpointManager() - .addBreakpoint(lineBreakpoint); - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeDebugElement.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeDebugElement.java deleted file mode 100644 index b4aea3ba..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/NodeDebugElement.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.nodeclipse.debug.model; - -import org.eclipse.debug.core.model.DebugElement; -import org.eclipse.debug.core.model.IDebugTarget; -import org.nodeclipse.debug.Activator; - -public class NodeDebugElement extends DebugElement { - - public NodeDebugElement(IDebugTarget target) { - super(target); - } - - @Override - public String getModelIdentifier() { - return Activator.PLUGIN_ID; - } - -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/ResourceManager.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/ResourceManager.java deleted file mode 100644 index 4f9ccdaf..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/ResourceManager.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.nodeclipse.debug.model; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.chromium.debug.core.model.ChromiumLineBreakpoint; -import org.chromium.debug.core.model.VmResourceId; -import org.chromium.sdk.Script; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.ILineBreakpoint; -import org.nodeclipse.debug.util.NodeResourceUtil; -import org.nodeclipse.ui.Activator; -import org.osgi.framework.Bundle; - -public class ResourceManager extends - org.chromium.debug.core.model.ResourceManager { - private IProject debugProject = null; - - public ResourceManager(IProject debugProject) { - super(debugProject); - this.debugProject = debugProject; - } - - public synchronized void addScript(Script newScript) { - VmResourceId id = VmResourceId.forScript(newScript); - try { - VmResourceInfo info = resourceIdToInfo.get(id); - ScriptSet scriptSet; - if (info == null) { - scriptSet = new ScriptSet(); - info = createAndRegisterResourceFile(id, scriptSet); - } else { - // TODO(peter.rybin): support adding scripts to one resource at - // once not to rewrite file - // every time. - scriptSet = (ScriptSet) info.getMetadata(); - ; - } - scriptSet.add(newScript); - writeScriptSource(scriptSet.asCollection(), info.getFile()); - addCromiumBreakpointFromJs(id.getName(), info.getFile()); - } catch (RuntimeException e) { - throw new RuntimeException("Failed to add script " + id, e); - } - } - - private void addCromiumBreakpointFromJs(String jsFilename, - IResource cromiumFile) { - NodeResourceUtil.register(jsFilename, cromiumFile); - IBreakpoint[] breakpoins = DebugPlugin.getDefault() - .getBreakpointManager() - .getBreakpoints(VProjectWorkspaceBridge.DEBUG_MODEL_ID); - for (IBreakpoint b : breakpoins) { - try { - if (machFile(jsFilename, b.getMarker().getResource())) { - addChromiumBreakpoint(cromiumFile.getName(), ((ILineBreakpoint)b).getLineNumber()); - } - } catch(Exception ex) { - new RuntimeException("Failed to add script " + jsFilename, ex); - } - } - } - - private boolean machFile(String jsFilename, IResource breakpointResource) throws CoreException { - if (jsFilename == null || breakpointResource == null) { - return false; - } - if (jsFilename.equals(breakpointResource.getName())) { - return true; - } - String path = breakpointResource.getFullPath().toOSString(); - if (jsFilename.equals(path)) { - return true; - } - path = breakpointResource.getLocationURI().getPath(); - if(jsFilename.equals(path)) { - return true; - } - path = path.replace('/', '\\'); - if(path.startsWith("\\")) { - path = path.substring(1); - } - if(jsFilename.equals(path)) { - return true; - } - - return false; - } - - private void addChromiumBreakpoint(String filename, int lineNumber) throws CoreException { - IResource resource = debugProject.getFile(filename); - ChromiumLineBreakpoint lineBreakpoint = - new ChromiumLineBreakpoint(resource, lineNumber, VProjectWorkspaceBridge.DEBUG_MODEL_ID); - DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint); - } -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/StackFrame.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/StackFrame.java deleted file mode 100644 index 4ce9f133..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/StackFrame.java +++ /dev/null @@ -1,152 +0,0 @@ -package org.nodeclipse.debug.model; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IRegisterGroup; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IThread; -import org.eclipse.debug.core.model.IVariable; - -public class StackFrame extends NodeDebugElement implements IStackFrame { - - private Thread thread; - private IVariable[] variables; - - public StackFrame(IDebugTarget target, Thread thread) { - super(target); - // TODO Auto-generated constructor stub - this.thread = thread; - } - - @Override - public boolean canStepInto() { - return thread.canStepInto(); - } - - @Override - public boolean canStepOver() { - return thread.canStepOver(); - } - - @Override - public boolean canStepReturn() { - return thread.canStepReturn(); - } - - @Override - public boolean isStepping() { - return thread.isStepping(); - } - - @Override - public void stepInto() throws DebugException { - thread.stepInto(); - } - - @Override - public void stepOver() throws DebugException { - thread.stepOver(); - } - - @Override - public void stepReturn() throws DebugException { - thread.stepReturn(); - } - - @Override - public boolean canResume() { - return getDebugTarget().canResume(); - } - - @Override - public boolean canSuspend() { - return getDebugTarget().canSuspend(); - } - - @Override - public boolean isSuspended() { - return getDebugTarget().isSuspended(); - } - - @Override - public void resume() throws DebugException { - getDebugTarget().resume(); - } - - @Override - public void suspend() throws DebugException { - getDebugTarget().suspend(); - } - - @Override - public boolean canTerminate() { - return getDebugTarget().canTerminate(); - } - - @Override - public boolean isTerminated() { - return getDebugTarget().isTerminated(); - } - - @Override - public void terminate() throws DebugException { - getDebugTarget().terminate(); - } - - @Override - public IThread getThread() { - return thread; - } - - @Override - public IVariable[] getVariables() throws DebugException { - // TODO Auto-generated method stub - if (variables == null) { - // variables = getVariablesImpl(); - } - - return variables; - } - - @Override - public boolean hasVariables() throws DebugException { - return true; - } - - @Override - public int getLineNumber() throws DebugException { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int getCharStart() throws DebugException { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int getCharEnd() throws DebugException { - // TODO Auto-generated method stub - return 0; - } - - @Override - public String getName() throws DebugException { - // TODO Auto-generated method stub - return null; - } - - @Override - public IRegisterGroup[] getRegisterGroups() throws DebugException { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean hasRegisterGroups() throws DebugException { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/Thread.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/Thread.java deleted file mode 100644 index 5bd86009..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/Thread.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.nodeclipse.debug.model; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.debug.core.model.IThread; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.LogUtil; - -public class Thread extends NodeDebugElement implements IThread { - IStreamsProxy streamsProxy; - private List frames; - - public Thread(IDebugTarget target) { - super(target); - streamsProxy = target.getProcess().getStreamsProxy(); - } - - @Override - public boolean canResume() { - return getDebugTarget().canResume(); - } - - @Override - public boolean canSuspend() { - return getDebugTarget().canSuspend(); - } - - @Override - public boolean isSuspended() { - return getDebugTarget().isSuspended(); - } - - @Override - public void resume() throws DebugException { - getDebugTarget().resume(); - } - - @Override - public void suspend() throws DebugException { - getDebugTarget().suspend(); - } - - @Override - public boolean canStepInto() { - return true; - } - - @Override - public boolean canStepOver() { - return true; - } - - @Override - public boolean canStepReturn() { - return true; - } - - @Override - public boolean isStepping() { - return false; - } - - public void sendCommand(String command) { - try { - if (!isTerminated()) { - streamsProxy.write(command + Constants.EOL); - } - } catch (IOException e) { - LogUtil.error(e); - } - } - - @Override - public void stepInto() throws DebugException { - sendCommand(Constants.STEP); - } - - @Override - public void stepOver() throws DebugException { - sendCommand(Constants.NEXT); - } - - @Override - public void stepReturn() throws DebugException { - sendCommand(Constants.OUT); - } - - @Override - public boolean canTerminate() { - return getDebugTarget().canTerminate(); - } - - @Override - public boolean isTerminated() { - return getDebugTarget().isTerminated(); - } - - @Override - public void terminate() throws DebugException { - getDebugTarget().terminate(); - } - - @Override - public IStackFrame[] getStackFrames() throws DebugException { - // TODO - if (frames == null) { - frames = new ArrayList(); - - // for (StackFrame frame : frames) { - StackFrame frame = new StackFrame(getDebugTarget(), this); - - frames.add(frame); - // } - } - - return frames.toArray(new IStackFrame[frames.size()]); - } - - @Override - public boolean hasStackFrames() throws DebugException { - return getStackFrames().length > 0; - } - - @Override - public int getPriority() throws DebugException { - return 0; - } - - @Override - public IStackFrame getTopStackFrame() throws DebugException { - IStackFrame[] frames = getStackFrames(); - return frames.length > 0 ? frames[0] : null; - } - - @Override - public String getName() throws DebugException { - return "nodethread-" + this.toString(); - } - - @Override - public IBreakpoint[] getBreakpoints() { - return new IBreakpoint[0]; - } - -} diff --git a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/VProjectWorkspaceBridge.java b/org.nodeclipse.debug/src/org/nodeclipse/debug/model/VProjectWorkspaceBridge.java deleted file mode 100644 index 78e70e82..00000000 --- a/org.nodeclipse.debug/src/org/nodeclipse/debug/model/VProjectWorkspaceBridge.java +++ /dev/null @@ -1,830 +0,0 @@ -package org.nodeclipse.debug.model; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.regex.Pattern; - -import org.chromium.debug.core.ChromiumDebugPlugin; -import org.chromium.debug.core.ChromiumSourceDirector; -import org.chromium.debug.core.ScriptNameManipulator.ScriptNamePattern; -import org.chromium.debug.core.model.BreakpointInTargetMap; -import org.chromium.debug.core.model.BreakpointSynchronizer; -import org.chromium.debug.core.model.BreakpointSynchronizer.Callback; -import org.chromium.debug.core.model.ChromiumBreakpointAdapter; -import org.chromium.debug.core.model.ChromiumExceptionBreakpoint; -import org.chromium.debug.core.model.ChromiumLineBreakpoint; -import org.chromium.debug.core.model.ChromiumLineBreakpoint.MutableProperty; -import org.chromium.debug.core.model.ConnectedTargetData; -import org.chromium.debug.core.model.DebugTargetImpl; -import org.chromium.debug.core.model.JavascriptThread; -import org.chromium.debug.core.model.Messages; -import org.chromium.debug.core.model.StackFrame; -import org.chromium.debug.core.model.VmResource; -import org.chromium.debug.core.model.VmResource.Metadata; -import org.chromium.debug.core.model.VmResourceId; -import org.chromium.debug.core.model.VmResourceRef; -import org.chromium.debug.core.model.WorkspaceBridge; -import org.chromium.debug.core.util.ChromiumDebugPluginUtil; -import org.chromium.debug.core.util.JavaScriptRegExpSupport; -import org.chromium.sdk.Breakpoint; -import org.chromium.sdk.CallFrame; -import org.chromium.sdk.ExceptionData; -import org.chromium.sdk.JavascriptVm; -import org.chromium.sdk.JavascriptVm.ScriptsCallback; -import org.chromium.sdk.RelayOk; -import org.chromium.sdk.Script; -import org.chromium.sdk.SyncCallback; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.IDebugEventSetListener; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.osgi.util.NLS; -import org.nodeclipse.debug.launch.LaunchConfigurationDelegate; -import org.nodeclipse.debug.util.NodeDebugUtil; - -public class VProjectWorkspaceBridge implements WorkspaceBridge { - /** The debug model ID. */ - public static final String DEBUG_MODEL_ID = "org.chromium.debug"; //$NON-NLS-1$ - - public static class FactoryImpl implements Factory { - private final String projectNameBase; - - public FactoryImpl(String projectNameBase) { - this.projectNameBase = projectNameBase; - } - - public WorkspaceBridge attachedToVm( - ConnectedTargetData connectedTargetData, - JavascriptVm javascriptVm) { - // We might want to add URL or something to project name. - return new VProjectWorkspaceBridge(projectNameBase, - connectedTargetData, javascriptVm); - } - - public String getDebugModelIdentifier() { - return DEBUG_MODEL_ID; - } - - public JsLabelProvider getLabelProvider() { - return LABEL_PROVIDER; - } - } - - private IDebugEventSetListener debugListener = new IDebugEventSetListener() { - @Override - public void handleDebugEvents(DebugEvent[] events) { - for (DebugEvent e : events) { - switch (e.getKind()) { - case DebugEvent.TERMINATE: - // final IProject project = ResourcesPlugin - // .getWorkspace().getRoot() - // .getProject("STANDALONE_V8"); - if (debugProject != null && debugProject.exists()) { - NodeDebugUtil.deleteConfig(); - ChromiumDebugPluginUtil - .deleteVirtualProjectAsync(debugProject); - DebugPlugin.getDefault().removeDebugEventListener(debugListener); - } - LaunchConfigurationDelegate.terminateNodeProcess(); - break; - } - } - } - }; - private final IProject debugProject; - private final JavascriptVm javascriptVm; - private final ResourceManager resourceManager; - private final ConnectedTargetData connectedTargetData; - private final ChromiumSourceDirector sourceDirector; - - public VProjectWorkspaceBridge(String projectName, - ConnectedTargetData connectedTargetData, JavascriptVm javascriptVm) { - this.connectedTargetData = connectedTargetData; - this.javascriptVm = javascriptVm; - this.debugProject = ChromiumDebugPluginUtil - .createEmptyProject(projectName); - this.resourceManager = new ResourceManager(debugProject); - - ILaunch launch = connectedTargetData.getDebugTarget().getLaunch(); - - sourceDirector = (ChromiumSourceDirector) launch.getSourceLocator(); - sourceDirector.initializeVProjectContainers(debugProject, - resourceManager, connectedTargetData.getJavascriptEmbedder()); - DebugPlugin.getDefault().addDebugEventListener(debugListener); - } - - public BreakpointSynchronizer getBreakpointSynchronizer() { - return new BreakpointSynchronizer(javascriptVm, sourceDirector, - breakpointHandler, DEBUG_MODEL_ID); - } - - public void synchronizeBreakpoints( - BreakpointSynchronizer.Direction direction, Callback callback) { - getBreakpointSynchronizer().syncBreakpoints(direction, callback); - } - - public void startInitialization() { - LaunchInitializationProcedure.startAsync(this, connectedTargetData - .getDebugTarget().getPresetSyncDirection()); - } - - public void launchRemoved() { - } - - public void beforeDetach() { - } - - public void handleVmResetEvent() { - resourceManager.clear(); - } - - public void scriptLoaded(Script newScript) { - resourceManager.addScript(newScript); - } - - public void scriptCollected(Script script) { - resourceManager.scriptCollected(script); - } - - public void reloadScriptsAtStart() { - javascriptVm.getScripts(new ScriptsCallback() { - public void failure(String errorMessage) { - ChromiumDebugPlugin.logError(errorMessage); - } - - public void success(Collection - - - - -

    Gradle for Eclipse (by Nodeclipse/Enide)

    -

    GitHub:

    - -

    Marketplace: http://marketplace.eclipse.org/content/gradle

    -

    Support: https://github.com/Nodeclipse/nodeclipse-1/issues

    - -

    Start & Preferences

    -

    You don't have to configure Preferences to start using,
    however looking to learn a bit will help.

    -

    -

    Creating Gradle project

    -

    Finally after comparing all solution, I think starting from build.gradle file can be convenient.

    -

    Gradle distribution has samples folder with a lot of examples, and there is gradle init --type basic comand see Chapter 47. Build Init Plugin. But they all needs some editing.

    -

    You can use template below as well, then run gradle initSourceFolders eclipse

    -
    /*
    -* Nodeclipse/Enide build.gradle template for basic Java project
    -*   https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.enide.editors.gradle/docs/java/basic/build.gradle
    -* Initially asked on
    -*   http://stackoverflow.com/questions/14017364/how-to-create-java-gradle-project
    -* Usage
    -*   1. create folder (or general Eclipse project) and put this file inside
    -*   2. run `gradle initSourceFolders eclipse` or `gradle initSourceFolders idea`
    -* @author Paul Verest; 
    -* based on `gradle init --type basic`, that does not create source folders 
    -*/
    -
    -apply plugin: 'java'
    -apply plugin: 'eclipse'
    -apply plugin: 'idea'
    -
    -task initSourceFolders << {
    -   sourceSets*.java.srcDirs*.each { it.mkdirs() }
    -   sourceSets*.resources.srcDirs*.each { it.mkdirs() }
    -}
    -
    -task wrapper(type: Wrapper) {
    -    gradleVersion = '1.11'
    -}
    -
    -// In this section you declare where to find the dependencies of your project
    -repositories {
    -    // Use Maven Central for resolving your dependencies.
    -    // You can declare any Maven/Ivy/file repository here.
    -    mavenCentral()
    -}
    -
    -// In this section you declare the dependencies for your production and test code
    -dependencies {
    -    //compile fileTree(dir: 'libs', include: '*.jar')
    -    // The production code uses the SLF4J logging API at compile time
    -    //compile 'org.slf4j:slf4j-api:1.7.5'
    -
    -    // Declare the dependency for your favourite test framework you want to use in your tests.
    -    // TestNG is also supported by the Gradle Test task. Just change the
    -    // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
    -    // 'test.useTestNG()' to your build script.
    -    testCompile "junit:junit:4.11"
    -}
    -
    -

    The result is like below.

    -

    overview

    -

    That can be used without any Gradle plugin for Eclipse,
    or with (Enide) Gradle for Eclipse, Jetty, Android alternative to Gradle Integration for Eclipse

    -

    editbox

    -

    Jetty

    -

    As with Maven, your build.gradle should have jetty configuration to enable gradle jetty:run Gradle start.

    -

    See #4 Running from Eclipse plugin for gradle-jetty-eclipse-plugin that has support for jetty 7+

    -

    Android with Gradle for Eclipse

    -

    Naturally Android Development Tools for Eclipse are required for Android Development. For the latest build.gradle template for classic Android project check gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.

    -

    This lets create new Android project in Eclipse with ADT and use ADT tools for most of things, but additionally have newer build with gradle

    -

    -

    and execute defined gradle tasks

    -

    -

    org.nodeclipse.enide.gradle project

    -

    build.gradle Run As Gradle GUI

    -

    Description:
    Right-click any .gradle file, and select Run As -> Gradle GUI

    -

    To run/execute with gradle add this to build.gradle

    -
    task execute(type:JavaExec) {
    -   main = mainClass
    -   classpath = sourceSets.main.runtimeClasspath
    -}
    -
    -

    then execution is via

    -
    gradle execute -PmainClass=runclass.RunClass 
    -
    -

    see Gradle to execute Java class (without modifying build.gradle)

    -

    Daemon

    -

    see Chapter 19. The Gradle Daemon, Appendix D. Gradle Command Line

    -

    Use Gradle daemon to speed up sequential gradle execution.

    -

    It is enable by default since 0.15, however you can disable and do manually:

    -

    launch gradle --foreground -i in a shell or configure Eclipse external tool:

    -


    -

    Developing

    -
      -
    1. git clone;
    2. -
    3. import this org.nodeclipse.enide.gradle project and org.nodeclipse.common (only 2 is enough) in Eclipse with PDE (e.g. Eclipse Standard or Enide Studio) as "Existing Projects into Workspace".
    4. -
    -

    maven build is optional for full build with other plugins.

    -

    Some links

    - -
    -

    Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

    -
    -
    "C:\Program Files\Java\jdk1.7.0_25/bin/java.exe"    "-Dorg.gradle.appname=gradle" -classpath "D:\Progs\gradle-1.10\lib\gradle-launcher-1.10.jar" org.gradle.launcher.GradleMain
    -
    -

    Java without IDE http://www.cs.swarthmore.edu/~newhall/unixhelp/debuggingtips_Java.html

    -

    http://stackoverflow.com/questions/502494/execute-a-java-program-from-our-java-program

    - - diff --git a/org.nodeclipse.enide.gradle/.classpath b/org.nodeclipse.enide.gradle/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.enide.gradle/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.enide.gradle/.project b/org.nodeclipse.enide.gradle/.project deleted file mode 100644 index e137af4a..00000000 --- a/org.nodeclipse.enide.gradle/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.enide.gradle - `build.gradle` Run As Gradle GUI - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.enide.gradle/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.enide.gradle/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.enide.gradle/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.enide.gradle/HelpToc.xml b/org.nodeclipse.enide.gradle/HelpToc.xml deleted file mode 100644 index 7b1afdac..00000000 --- a/org.nodeclipse.enide.gradle/HelpToc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/org.nodeclipse.enide.gradle/META-INF/MANIFEST.MF b/org.nodeclipse.enide.gradle/META-INF/MANIFEST.MF deleted file mode 100644 index 3be7d021..00000000 --- a/org.nodeclipse.enide.gradle/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: `build.gradle` Run As Gradle GUI or gradle build -Bundle-SymbolicName: org.nodeclipse.enide.gradle;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.enide.gradle.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.debug.ui, - org.eclipse.core.variables, - org.nodeclipse.common -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy diff --git a/org.nodeclipse.enide.gradle/README.md b/org.nodeclipse.enide.gradle/README.md deleted file mode 100644 index 6ab3ffe8..00000000 --- a/org.nodeclipse.enide.gradle/README.md +++ /dev/null @@ -1,215 +0,0 @@ - - - - - -# Gradle for Eclipse (by Nodeclipse/Enide) - -GitHub: -- main: https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.enide.gradle -- editor: https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.editors.gradle/ - -Marketplace: http://marketplace.eclipse.org/content/gradle - -Support: https://github.com/Nodeclipse/nodeclipse-1/issues - -- Minisite -( GitHub README has more information ) - -## Start & Preferences - -You don't have to configure Preferences to start using, -however looking to learn a bit will help. - -![](https://raw.githubusercontent.com/Nodeclipse/nodeclipse-1/master/org.nodeclipse.enide.gradle/docs/Preferences.png) - - -## Creating Gradle project - -Finally after comparing all solution, I think starting from `build.gradle` file can be convenient. - -Gradle distribution has `samples` folder with a lot of examples, and there is `gradle init --type basic` comand see [Chapter 47. Build Init Plugin](http://www.gradle.org/docs/1.11/userguide/userguide_single.html#build_init_plugin). But they all needs some editing. - -You can use [template](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.enide.editors.gradle/docs/java/basic/build.gradle) below as well, then run `gradle initSourceFolders eclipse` - - /* - * Nodeclipse/Enide build.gradle template for basic Java project - * https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.enide.editors.gradle/docs/java/basic/build.gradle - * Initially asked on - * http://stackoverflow.com/questions/14017364/how-to-create-java-gradle-project - * Usage - * 1. create folder (or general Eclipse project) and put this file inside - * 2. run `gradle initSourceFolders eclipse` or `gradle initSourceFolders idea` - * @author Paul Verest; - * based on `gradle init --type basic`, that does not create source folders - */ - - apply plugin: 'java' - apply plugin: 'eclipse' - apply plugin: 'idea' - - task initSourceFolders << { - sourceSets*.java.srcDirs*.each { it.mkdirs() } - sourceSets*.resources.srcDirs*.each { it.mkdirs() } - } - - task wrapper(type: Wrapper) { - gradleVersion = '1.11' - } - - // In this section you declare where to find the dependencies of your project - repositories { - // Use Maven Central for resolving your dependencies. - // You can declare any Maven/Ivy/file repository here. - mavenCentral() - } - - // In this section you declare the dependencies for your production and test code - dependencies { - //compile fileTree(dir: 'libs', include: '*.jar') - // The production code uses the SLF4J logging API at compile time - //compile 'org.slf4j:slf4j-api:1.7.5' - - // Declare the dependency for your favourite test framework you want to use in your tests. - // TestNG is also supported by the Gradle Test task. Just change the - // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add - // 'test.useTestNG()' to your build script. - testCompile "junit:junit:4.11" - } - -The result is like below. - -![overview][1] - -That can be used without any Gradle plugin for Eclipse, -or with [(Enide) Gradle for Eclipse, Jetty, Android](http://marketplace.eclipse.org/content/gradle) alternative to [Gradle Integration for Eclipse](http://marketplace.eclipse.org/content/gradle-integration-eclipse) - -![editbox][2] - - - [1]: http://i.stack.imgur.com/q9RHN.png - [2]: http://i.stack.imgur.com/ZGOah.png - -## Notes about tasks and Build Lifecycle - -from Chapter 55. The Build Lifecycle http://www.gradle.org/docs/current/userguide/build_lifecycle.html - - // in `settings.gradle` - // println 'This is executed during the initialization phase.' - - println 'This is executed during the configuration phase.' - - task configure { - println 'This is also executed during the configuration phase.' - } - - task execute << { - println 'This is executed during the execution phase.' - } - -run with `gradle help` - -output: - - This is executed during the initialization phase. - This is executed during the configuration phase. - This is also executed during the configuration phase. - :help - - Welcome to Gradle 1.10. - - To run a build, run gradle ... - - To see a list of available tasks, run gradle tasks - - To see a list of command-line options, run gradle --help - - BUILD SUCCESSFUL - - Total time: 1.882 secs - - -## Jetty - -As with Maven, your `build.gradle` should have jetty configuration -to enable `gradle jetty:run` Gradle start. - -See [#4 Running from Eclipse plugin](https://github.com/Khoulaiz/gradle-jetty-eclipse-plugin/issues/4) -for [gradle-jetty-eclipse-plugin](https://github.com/Khoulaiz/gradle-jetty-eclipse-plugin) -that has support for jetty 7+ - -## Android with Gradle for Eclipse - -Naturally Android Development Tools for Eclipse - are required for Android Development. For the latest build.gradle template for classic Android project check - gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle. - -This lets create new Android project in Eclipse with ADT and use ADT tools for most of things, -but additionally have newer build with gradle - -![](http://marketplace.eclipse.org/sites/default/files/styles/ds_solution_screenshot/public/EditBox-plugin-gradle-example.PNG?itok=Fe_8TGFM) - -and execute defined gradle tasks - -![](http://marketplace.eclipse.org/sites/default/files/styles/ds_solution_screenshot/public/Gradle-GUI.png) - -## org.nodeclipse.enide.gradle project - -`build.gradle` Run As Gradle GUI - -*Description*: -Right-click any `.gradle` file, and select `Run As -> Gradle GUI` - -To run/execute with gradle add this to `build.gradle` - - task execute(type:JavaExec) { - main = mainClass - classpath = sourceSets.main.runtimeClasspath - } - -then execution is via - - gradle execute -PmainClass=runclass.RunClass - -see [Gradle to execute Java class (without modifying build.gradle)](http://stackoverflow.com/questions/21358466/gradle-to-execute-java-class-without-modifying-build-gradle) - -### Daemon - -see [Chapter 19. The Gradle Daemon](?), [Appendix D. Gradle Command Line](?) - -Use Gradle daemon to speed up sequential gradle execution. - -It is enable by default since 0.15, however you can disable and do manually: - -launch `gradle --foreground -i` in a shell or configure Eclipse external tool: - -![](docs/add-gradle-daemon-as-external-tool-1.PNG) -![](docs/add-gradle-daemon-as-external-tool-2.PNG) - - -### Developing - -1. `git clone`; -2. import this `org.nodeclipse.enide.gradle` project and `org.nodeclipse.common` (only 2 is enough) in Eclipse with PDE -(e.g. Eclipse Standard or Enide Studio) as "Existing Projects into Workspace". - -maven build is optional for full build with other plugins. - -#### Some links - -- [When Runtime.exec() won't](http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html) - -> Because some native platforms only provide limited buffer size for standard input and output streams, -failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock. - - "C:\Program Files\Java\jdk1.7.0_25/bin/java.exe" "-Dorg.gradle.appname=gradle" -classpath "D:\Progs\gradle-1.10\lib\gradle-launcher-1.10.jar" org.gradle.launcher.GradleMain - -Java without IDE - - - - - - diff --git a/org.nodeclipse.enide.gradle/build.properties b/org.nodeclipse.enide.gradle/build.properties deleted file mode 100644 index 683c4297..00000000 --- a/org.nodeclipse.enide.gradle/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - HelpToc.xml,\ - .README.md.html,\ - gradle-help.txt diff --git a/org.nodeclipse.enide.gradle/docs/Preferences.png b/org.nodeclipse.enide.gradle/docs/Preferences.png deleted file mode 100644 index e2148f37..00000000 Binary files a/org.nodeclipse.enide.gradle/docs/Preferences.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-1.PNG b/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-1.PNG deleted file mode 100644 index 2bbdbe73..00000000 Binary files a/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-1.PNG and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-2.PNG b/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-2.PNG deleted file mode 100644 index 20dbd98f..00000000 Binary files a/org.nodeclipse.enide.gradle/docs/add-gradle-daemon-as-external-tool-2.PNG and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/docs/from-getting-started.PNG b/org.nodeclipse.enide.gradle/docs/from-getting-started.PNG deleted file mode 100644 index e56bedeb..00000000 Binary files a/org.nodeclipse.enide.gradle/docs/from-getting-started.PNG and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/gradle-help.txt b/org.nodeclipse.enide.gradle/gradle-help.txt deleted file mode 100644 index 5754e0d5..00000000 --- a/org.nodeclipse.enide.gradle/gradle-help.txt +++ /dev/null @@ -1,41 +0,0 @@ - -USAGE: gradle [option...] [task...] - --?, -h, --help Shows this help message. --a, --no-rebuild Do not rebuild project dependencies. --b, --build-file Specifies the build file. --C, --cache Specifies how compiled build scripts should be cached. Possible values are: 'rebuild' and 'on'. Default value is 'on' [deprecated - Use '--rerun-tasks' or '--recompile-scripts' instead] --c, --settings-file Specifies the settings file. ---configure-on-demand Only relevant projects are configured in this build run. This means faster build for large multi-project builds. [incubating] ---continue Continues task execution after a task failure. --D, --system-prop Set system property of the JVM (e.g. -Dmyprop=myvalue). --d, --debug Log in debug mode (includes normal stacktrace). ---daemon Uses the Gradle daemon to run the build. Starts the daemon if not running. ---foreground Starts the Gradle daemon in the foreground. [incubating] --g, --gradle-user-home Specifies the gradle user home directory. ---gui Launches the Gradle GUI. --I, --init-script Specifies an initialization script. --i, --info Set log level to info. --m, --dry-run Runs the builds with all task actions disabled. ---no-color Do not use color in the console output. ---no-daemon Do not use the Gradle daemon to run the build. ---no-opt Ignore any task optimization. [deprecated - Use '--rerun-tasks' instead] ---offline The build should operate without accessing network resources. --P, --project-prop Set project property for the build script (e.g. -Pmyprop=myvalue). --p, --project-dir Specifies the start directory for Gradle. Defaults to current directory. ---parallel Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. [incubating] ---parallel-threads Build projects in parallel, using the specified number of executor threads. [incubating] ---profile Profiles build execution time and generates a report in the /reports/profile directory. ---project-cache-dir Specifies the project-specific cache directory. Defaults to .gradle in the root project directory. --q, --quiet Log errors only. ---recompile-scripts Force build script recompiling. ---refresh Refresh the state of resources of the type(s) specified. Currently only 'dependencies' is supported. [deprecated - Use '--refresh-dependencies' instead.] ---refresh-dependencies Refresh the state of dependencies. ---rerun-tasks Ignore previously cached task results. --S, --full-stacktrace Print out the full (very verbose) stacktrace for all exceptions. --s, --stacktrace Print out the stacktrace for all exceptions. ---stop Stops the Gradle daemon if it is running. --u, --no-search-upward Don't search in parent folders for a settings.gradle file. --v, --version Print version info. --x, --exclude-task Specify a task to be excluded from execution. - diff --git a/org.nodeclipse.enide.gradle/iconbank/gradle-icon-16x16_bottom_right_corner_java_8x8.png b/org.nodeclipse.enide.gradle/iconbank/gradle-icon-16x16_bottom_right_corner_java_8x8.png deleted file mode 100644 index 4ffa932a..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/gradle-icon-16x16_bottom_right_corner_java_8x8.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/iconbank/java_16x16.png b/org.nodeclipse.enide.gradle/iconbank/java_16x16.png deleted file mode 100644 index 1611a164..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/java_16x16.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/iconbank/java_16x16_0.75_size.png b/org.nodeclipse.enide.gradle/iconbank/java_16x16_0.75_size.png deleted file mode 100644 index 584824d7..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/java_16x16_0.75_size.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white.png b/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white.png deleted file mode 100644 index 2e4dca8a..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white_0.75_size.png b/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white_0.75_size.png deleted file mode 100644 index 135c009d..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/java_16x16_on_white_0.75_size.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/iconbank/java_8x8.png b/org.nodeclipse.enide.gradle/iconbank/java_8x8.png deleted file mode 100644 index c2ce3bd0..00000000 Binary files a/org.nodeclipse.enide.gradle/iconbank/java_8x8.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16-gradle-gui-launch.png b/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16-gradle-gui-launch.png deleted file mode 100644 index bada27bc..00000000 Binary files a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16-gradle-gui-launch.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16.png b/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16.png deleted file mode 100644 index 91c09916..00000000 Binary files a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16_bottom_right_corner_run_half_size.png b/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16_bottom_right_corner_run_half_size.png deleted file mode 100644 index 37693a24..00000000 Binary files a/org.nodeclipse.enide.gradle/icons/gradle-icon-16x16_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.enide.gradle/plugin.xml b/org.nodeclipse.enide.gradle/plugin.xml deleted file mode 100644 index ac5603e4..00000000 --- a/org.nodeclipse.enide.gradle/plugin.xml +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.enide.gradle/pom.xml b/org.nodeclipse.enide.gradle/pom.xml deleted file mode 100644 index d5b5e90d..00000000 --- a/org.nodeclipse.enide.gradle/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.enide.gradle - eclipse-plugin - - org.nodeclipse.enide.gradle - `build.gradle` Run As Gradle GUI - - diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/Activator.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/Activator.java deleted file mode 100644 index b6cdb3e3..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/Activator.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.nodeclipse.enide.gradle; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = GradleConstants.PLUGIN_ID; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index 68ea913b..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,256 +0,0 @@ -package org.nodeclipse.enide.gradle.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Platform; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.common.preferences.CommonDialogs; -import org.nodeclipse.enide.gradle.Activator; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -import org.nodeclipse.enide.gradle.util.NodeclipseLogger; -import org.nodeclipse.enide.gradle.util.VariablesUtil; - -/** - * `build.gradle` Run As gradle build
    - * see LaunchConfigurationDelegate in .debug and .phantomjs, .jjs, .enide.maven module for comparison. - * - * @since 0.10 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean isWindows = Platform.getOS().startsWith("win"); - private boolean warned = false; - - //specific - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("build"); - } - - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); //NPE! - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - String gradlePath = null; - boolean useWrapper = preferenceStore.getBoolean(GradleConstants.GRADLE_USE_WRAPPER); - if (useWrapper){ - String file1 = configuration.getAttribute(GradleConstants.KEY_FILE_PATH, ""); - IPath ipath = ResourcesPlugin.getWorkspace().getRoot().findMember(file1).getLocation(); - String filePath1 = ipath.removeLastSegments(1).toOSString(); - gradlePath = filePath1 + (isWindows?"\\gradlew.bat":"/gradlew"); - File gradlewFile = (new File(gradlePath)); - useWrapper = gradlewFile.exists(); - } - if (!useWrapper){ - // Gradle installation path should be stored in preference. - String gradleHomeToUse = preferenceStore.getString(GradleConstants.GRADLE_HOME_TO_USE); //NPE! - gradlePath = gradleHomeToUse + (isWindows?"\\bin\\gradle.bat":"/bin/gradle"); - // Check if the gradle location is correctly configured - File gradleFile = new File(gradlePath); - if( ("".equals(gradleHomeToUse)) || (!gradleFile.exists()) ){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - CommonDialogs.showPreferencesDialog(GradleConstants.PREFERENCES_PAGE, - "Gradle installation is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+GradleConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - } - cmdLine.add(gradlePath); - - //{ TODO should be special as --gui mode is likely doesn't care - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_DEBUG)) - cmdLine.add("-d"); - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_INFO)) - cmdLine.add("-i"); - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_QUIET)) - cmdLine.add("-q"); - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_OFFLINE)) - cmdLine.add("--offline"); - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_TEST_SKIP)){ - cmdLine.add("--exclude-task"); - cmdLine.add("test"); - } - if (preferenceStore.getBoolean(GradleConstants.GRADLE_OPTION_DAEMON)) - cmdLine.add("--daemon"); - - - String nodeOptions= preferenceStore.getString(GradleConstants.GRADLE_OPTIONS); - if(!nodeOptions.equals("")) { - String[] sa = nodeOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - //{ - - String file = configuration.getAttribute(GradleConstants.KEY_FILE_PATH, ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add("-b"); // -b, --build-file Specifies the build file. - cmdLine.add(filePath); - - //cmdLine.add("build"); - specialOptions(configuration, preferenceStore, cmdLine); - - - File workingPath = null; - String workingDirectory = configuration.getAttribute(GradleConstants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - workingPath = (new File(filePath)).getParentFile(); - } - - //env - String[] envp = getEnvironmentVariables(configuration); - - StringBuilder sb = new StringBuilder(100); - for(String s : cmdLine) sb.append(s).append(' '); - NodeclipseLogger.log(sb.append('\n').toString()); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to debug.eg, - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, GradleConstants.PROCESS_MESSAGE); - - } - - /** Get EnvironmentVariables from ILaunchConfiguration - * and adds JAVA_HOME, GRADLE_HOME, PATH, TEMP, SystemDrive, HOME - * @param configuration ILaunchConfiguration - * @return String[] - * @throws CoreException - */ - protected String[] getEnvironmentVariables(ILaunchConfiguration configuration) throws CoreException { - Map envm = new HashMap(); - envm = configuration.getAttribute(GradleConstants.ATTR_ENVIRONMENT_VARIABLES, envm); - - int envmSizeDelta = (2+2+1) + 4 + 2; - Map all = null; - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean passAndroidSigningEnvVars = preferenceStore.getBoolean(GradleConstants.PASS_ANDROID_SIGNING_ENVIRONMENT_VARIABLES);//@since 0.12 - boolean passAllEnvVars = preferenceStore.getBoolean(GradleConstants.PASS_ALL_ENVIRONMENT_VARIABLES);//@since 0.12 - if (passAndroidSigningEnvVars){ - passAllEnvVars = false; // make passAllEnvVars incompatible with passAndroidSigningEnvVars to simplify things //TODO logic - envmSizeDelta+=4; - } else { - if (passAllEnvVars){ - all = System.getenv(); - envmSizeDelta = all.size(); - } - } - - String[] envp = new String[envm.size() + envmSizeDelta]; - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - // #137 - String javaHomeToUse = preferenceStore.getString(GradleConstants.GRADLE_JAVA_HOME_TO_USE);//@since 0.15 - if(!javaHomeToUse.equals("")) { - envp[idx++] = "JAVA_HOME=" + javaHomeToUse; - }else{ - envp[idx++] = "JAVA_HOME=" + System.getProperty("java.home"); //System.getenv("JAVA_HOME"); - } - //FAILURE: Build failed with an exception. - // - //* What went wrong: - //java.lang.ExceptionInInitializerError (no error message) - // - //* Try: - //Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. - envp[idx++] = "GRADLE_HOME=" + preferenceStore.getString(GradleConstants.GRADLE_HOME_TO_USE); - envp[idx++] = "GRADLE_OPTS=" + preferenceStore.getString(GradleConstants.GRADLE_OPTS); - envp[idx++] = getEnvVariableEqualsString("JAVA_OPTS"); - //+ #125 -// String alternativeAndroidHome = preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_HOME); -// if (""!=alternativeAndroidHome){ -// envp[idx++] = "ANDROID_HOME=" + alternativeAndroidHome; -// } else { -// envp[idx++] = getEnvVariableEqualsString("ANDROID_HOME"); -// } - envp[idx++] = getEnvVariableEqualsStringIfNoAlternativeSpecified("ANDROID_HOME", - preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_HOME)); - - //+ #129 - if (passAndroidSigningEnvVars){ - envp[idx++] = getEnvVariableEqualsStringIfNoAlternativeSpecified("KEYSTORE", - preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_FILE)); - envp[idx++] = getEnvVariableEqualsStringIfNoAlternativeSpecified("KEYSTORE_PASSWORD", - preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_PASSWORD)); - envp[idx++] = getEnvVariableEqualsStringIfNoAlternativeSpecified("KEY_ALIAS", - preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_ALIAS)); - envp[idx++] = getEnvVariableEqualsStringIfNoAlternativeSpecified("KEY_PASSWORD", - preferenceStore.getString(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_PASSWORD)); - } - - if (passAllEnvVars){ - for (Map.Entry entry : all.entrySet()) - { - //System.out.println(entry.getKey() + "/" + entry.getValue()); - envp[idx++] = entry.getKey() + "=" + entry.getValue(); - } - }else{ - //+ #81 - envp[idx++] = getEnvVariableEqualsString("PATH"); - envp[idx++] = getEnvVariableEqualsString("TEMP"); - envp[idx++] = getEnvVariableEqualsString("TMP"); - envp[idx++] = getEnvVariableEqualsString("SystemDrive"); - //+ - envp[idx++] = getEnvVariableEqualsString("HOME"); - envp[idx++] = getEnvVariableEqualsString("USERPROFILE"); - } - - if (!warned ){ - NodeclipseLogger.log(" Warning: JAVA_HOME, GRADLE_HOME and others environment variables will be applied automatically to every `gradle` launch.\n"); - StringBuilder sb = new StringBuilder(100); - for(int i=0; i"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationType.java deleted file mode 100644 index 3653ff32..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchShortcut.java deleted file mode 100644 index 945f71f2..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/LaunchShortcut.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.nodeclipse.enide.gradle.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -import org.nodeclipse.enide.gradle.util.NodeclipseLogger; -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "gradle build" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_CONFIGURATION_TYPE_ID; - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(getLaunchConfigurationTypeConstant()); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute(GradleConstants.KEY_FILE_PATH, path); - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - //NodeclipseConsole.write(this.getClass().getName()+"\n"); - NodeclipseLogger.log(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationDelegate.java deleted file mode 100644 index 5364dbed..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.android; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * `build.gradle` Run As gradle installDebug Gradle Android start
    - * see #130 - * - * @since 0.12 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("installDebug"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationTabGroup.java deleted file mode 100644 index 19c38c4d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.android; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationType.java deleted file mode 100644 index 1a77615d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.android; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchShortcut.java deleted file mode 100644 index cd856a71..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/android/LaunchShortcut.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.android; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> gradle installDebug Gradle Android start - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_ANDROID_INSTALLDEBUG_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationDelegate.java deleted file mode 100644 index 4d25f30d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.daemon; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * `build.gradle` Run As gradle installDebug Gradle Android start
    - * see #130 - * - * @since 0.12 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("--foreground"); //[incubating] - //TODO configurable - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationTabGroup.java deleted file mode 100644 index 73bb49f1..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.daemon; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationType.java deleted file mode 100644 index 04404675..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.daemon; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchShortcut.java deleted file mode 100644 index 6991b97f..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/daemon/LaunchShortcut.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.daemon; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> gradle installDebug Gradle Android start - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_DAEMON_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationDelegate.java deleted file mode 100644 index e2098ab0..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jetty; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * `build.gradle` Run As Gradle GUI
    - * http://www.gradle.org/docs/current/userguide/web_project_tutorial.html - * - * @since 0.11 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("jettyRun"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationTabGroup.java deleted file mode 100644 index 9e5b88c5..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jetty; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationType.java deleted file mode 100644 index 2aa5a330..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jetty; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchShortcut.java deleted file mode 100644 index fe9ccd7d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jetty/LaunchShortcut.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jetty; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "gradle jettyRun" will lead here - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_JETTY_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationDelegate.java deleted file mode 100644 index aa1e4c18..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jettyeclipse; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * `build.gradle` Run As Gradle GUI
    - * http://www.gradle.org/docs/current/userguide/web_project_tutorial.html - * - * @since 0.11 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("jettyEclipseRun"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationTabGroup.java deleted file mode 100644 index bf6da6de..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jettyeclipse; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationType.java deleted file mode 100644 index 5e8f412d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jettyeclipse; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchShortcut.java deleted file mode 100644 index 88d23bd3..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/jettyeclipse/LaunchShortcut.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.jettyeclipse; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "gradle jettyRun" will lead here - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_JETTYECLIPSE_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationDelegate.java deleted file mode 100644 index 24398c34..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.run; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -/** - * `build.gradle` Run As gradle run - * - * @since 0.15 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("run"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationTabGroup.java deleted file mode 100644 index fd357f1c..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.run; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationType.java deleted file mode 100644 index 89e5767d..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.run; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchShortcut.java deleted file mode 100644 index f3d28fff..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/run/LaunchShortcut.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.run; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> gradle run - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_RUN_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationDelegate.java deleted file mode 100644 index 96f5dc50..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task1; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -/** - * `build.gradle` Run As gradle task1 - * - * @since 0.15 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - String gradleTask = preferenceStore.getString(GradleConstants.GRADLE_TASK1); - if(gradleTask!=""){ - cmdLine.add(gradleTask); - } - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationTabGroup.java deleted file mode 100644 index 6c509f9a..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task1; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationType.java deleted file mode 100644 index 7e580b7c..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task1; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchShortcut.java deleted file mode 100644 index 308bf084..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task1/LaunchShortcut.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task1; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> gradle task1 - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_TASK1_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationDelegate.java deleted file mode 100644 index b8e3f0f2..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task2; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -/** - * `build.gradle` Run As gradle task2 - * - * @since 0.15 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - String gradleTask = preferenceStore.getString(GradleConstants.GRADLE_TASK2); - if(gradleTask!=""){ - cmdLine.add(gradleTask); - } - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationTabGroup.java deleted file mode 100644 index 67481be7..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task2; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationType.java deleted file mode 100644 index 0d0471b3..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task2; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchShortcut.java deleted file mode 100644 index 3bfec1b1..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launch/task2/LaunchShortcut.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.nodeclipse.enide.gradle.launch.task2; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; - -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> gradle task2 - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCH_TASK2_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationDelegate.java deleted file mode 100644 index d3b05c1a..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.nodeclipse.enide.gradle.launchgui; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * `build.gradle` Run As Gradle GUI
    - * - * @since 0.10 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.gradle.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - cmdLine.add("--gui"); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationTabGroup.java deleted file mode 100644 index 203b7f9a..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.gradle.launchgui; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationType.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationType.java deleted file mode 100644 index 526fee95..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.gradle.launchgui; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchShortcut.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchShortcut.java deleted file mode 100644 index a2177860..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/launchgui/LaunchShortcut.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.nodeclipse.enide.gradle.launchgui; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.gradle.preferences.GradleConstants; -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "Gradle GUI" will lead here - **/ -public class LaunchShortcut - extends org.nodeclipse.enide.gradle.launch.LaunchShortcut - implements ILaunchShortcut -{ - - @Override - protected String getLaunchConfigurationTypeConstant() { - return GradleConstants.LAUNCHGUI_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradleConstants.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradleConstants.java deleted file mode 100644 index f8dc9a40..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradleConstants.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.nodeclipse.enide.gradle.preferences; - -public class GradleConstants { - - public static final String PLUGIN_ID = "org.nodeclipse.enide.gradle"; - public static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.LaunchConfigurationType"; - public static final String LAUNCH_ANDROID_INSTALLDEBUG_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.android.LaunchConfigurationType"; - public static final String LAUNCH_DAEMON_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.daemon.LaunchConfigurationType"; - public static final String LAUNCH_JETTY_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.jetty.LaunchConfigurationType"; - public static final String LAUNCH_JETTYECLIPSE_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.jettyeclipse.LaunchConfigurationType"; - public static final String LAUNCH_RUN_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.run.LaunchConfigurationType"; - public static final String LAUNCH_TASK1_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.task1.LaunchConfigurationType"; - public static final String LAUNCH_TASK2_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launch.task2.LaunchConfigurationType"; - public static final String LAUNCHGUI_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.gradle.launchgui.LaunchConfigurationType"; - - public static final String PROCESS_MESSAGE = "Gradle Process"; - - public static final String KEY_FILE_PATH = "KEY_FILE_PATH"; - - //+ - public static final String ATTR_PROGRAM_ARGUMENTS = "attr_program_arguments"; - public static final String ATTR_MAVEN_ARGUMENTS = "attr_maven_arguments"; - public static final String ATTR_WORKING_DIRECTORY = "attr_working_directory"; - - public static final String ATTR_ENVIRONMENT_VARIABLES = "attr_environment_variables"; - public static final String ATTR_APPEND_ENVIRONMENT_VARIABLES = "attr_append_environment_variables"; - - public static final String GRADLE_HOME = "gradle_home"; - public static final String GRADLE_HOME_TO_USE = "gradle_home_to_use"; - public static final String GRADLE_USE_WRAPPER = "gradle_use_wrapper"; - public static final String GRADLE_JAVA_HOME_TO_USE = "java_home_to_use"; - public static final String GRADLE_OPTS = "gradle_opts"; - public static final String GRADLE_PATH = "gradle_path"; - public static final String GRADLE_OPTIONS = "gradle_options"; - public static final String GRADLE_TASK1 = "gradle_task1"; - public static final String GRADLE_TASK2 = "gradle_task2"; - public static final String GRADLE_OPTION_DEBUG = "gradle_option_debug"; - public static final String GRADLE_OPTION_INFO = "gradle_option_info"; - public static final String GRADLE_OPTION_QUIET = "gradle_option_quiet"; - public static final String GRADLE_OPTION_OFFLINE = "gradle_option_offline"; - public static final String GRADLE_OPTION_TEST_SKIP = "gradle_option_test_skip"; - public static final String GRADLE_OPTION_DAEMON = "gradle_option_daemon"; - public static final String GRADLE_ENVVAR_ALTERNATIVE_ANDROID_HOME = "gradle_envvar_alternative_android_home"; - /* http://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle - android{ - signingConfigs { - release { - storeFile file(System.getenv("KEYSTORE")) - storePassword System.getenv("KEYSTORE_PASSWORD") - keyAlias System.getenv("KEY_ALIAS") - keyPassword System.getenv("KEY_PASSWORD") - } - } - } - */ - public static final String PASS_ANDROID_SIGNING_ENVIRONMENT_VARIABLES = "pass_android_signing_environment_variables"; - public static final String GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_FILE = "gradle_envvar_alternative_android_keystore_file"; - public static final String GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_PASSWORD = "gradle_envvar_alternative_android_keystore_password"; - public static final String GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_ALIAS = "gradle_envvar_alternative_android_key_alias"; - public static final String GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_PASSWORD = "gradle_envvar_alternative_android_key_password"; - - public static final String PASS_ALL_ENVIRONMENT_VARIABLES = "pass_all_environment_variables"; - - public static final String PREFERENCES_PAGE = "org.nodeclipse.enide.gradle.preferences.GradlePreferencePage"; - public static final String PREFERENCE_PAGE_NAME ="Gradle(Enide)"; // the same as in plugin.xml -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferenceInitializer.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferenceInitializer.java deleted file mode 100644 index ba1640d5..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferenceInitializer.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.nodeclipse.enide.gradle.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.gradle.Activator; - -public class GradlePreferenceInitializer extends AbstractPreferenceInitializer { - - @Override - public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - String envGradleHome = System.getenv("GRADLE_HOME"); - if (envGradleHome!=null){ - store.setDefault(GradleConstants.GRADLE_HOME, envGradleHome ); - store.setDefault(GradleConstants.GRADLE_HOME_TO_USE, envGradleHome ); - } - - //store.setDefault(GradleConstants.GRADLE_USE_WRAPPER, true ); - - String envGradleOpts = System.getenv("GRADLE_OPTS"); - if (envGradleOpts!=null) - store.setDefault(GradleConstants.GRADLE_OPTS, envGradleOpts ); - //store.setDefault(MavenConstants.MAVEN_OPTION_JETTY_PORT, "8080" ); - - store.setDefault(GradleConstants.GRADLE_OPTION_DAEMON, true ); - - store.setDefault(GradleConstants.GRADLE_TASK1, "assemble" ); - store.setDefault(GradleConstants.GRADLE_TASK2, "run" ); - } - -} - diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferencePage.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferencePage.java deleted file mode 100644 index 87a6d0f9..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/GradlePreferencePage.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.nodeclipse.enide.gradle.preferences; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.nodeclipse.enide.gradle.Activator; -import org.eclipse.swt.SWT; -//+ -import org.eclipse.swt.widgets.Link; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionAdapter; - -/** - * @author Paul Verest - */ -public class GradlePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - private DirectoryFieldEditor gradleHome; - private DirectoryFieldEditor gradleHomeToUse; - private BooleanFieldEditor gradleUseWrapper; - private DirectoryFieldEditor javaHomeToUse; - private StringFieldEditor gradleJvmOpts; - - private StringFieldEditor gradleOptions; - private StringFieldEditor gradleTask1; - private StringFieldEditor gradleTask2; - private BooleanFieldEditor gradleOptionDebug; - private BooleanFieldEditor gradleOptionInfo; - private BooleanFieldEditor gradleOptionQuiet; - private BooleanFieldEditor gradleOptionOffline; - private BooleanFieldEditor gradleOptionSkipTest; - private BooleanFieldEditor gradleOptionDaemon; - private DirectoryFieldEditor gradleEnvVarAlternativeAndroidHome; - private BooleanFieldEditor passAndroidSigningEnvVars; - private FileFieldEditor gradleEnvVarAlternativeKeystoreFile; - private StringFieldEditor gradleEnvVarAlternativeKeystorePassword; - private StringFieldEditor gradleEnvVarAlternativeKeyAlias; - private StringFieldEditor gradleEnvVarAlternativeKeyPassword; - private BooleanFieldEditor passAllEnvVars; - - public GradlePreferencePage() { - super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setImageDescriptor(Activator.getImageDescriptor("icons/gradle-icon-16x16_bottom_right_corner_run_half_size.png")); - setDescription( -// VersionUtil.getLongString()+ //TODO make plugin to collect Eclipse utils -// "\n"+ - "From getting-started.html:\n" - +"For running Gradle, create GRADLE_HOME environment variable pointing to folder with unpacked Gradle distribution" - + "and add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle.\n" - +"Gradle uses whichever JDK it finds in your path (to check, use java -version)." - +" Alternatively, you can set the JAVA_HOME environment variable to point to the install directory of the desired JDK.\n" - +"\nFor this plugin specifying Gradle home to use will be enough." - +" (This lets you easily experiment with different versions.)"); - } - @Override - public void init(IWorkbench workbench) { - } - - private void addLinkWidget(String text, final String urlString){ - // http://stackoverflow.com/questions/22424993/eclipse-plugin-dev-how-to-add-hyperlink-on-fieldeditorpreferencepage - Link link = new Link(getFieldEditorParent(), SWT.NONE); - link.setText(text); - link.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(final SelectionEvent event) { - try { - URL url = new URL(urlString); - try { - PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(url ); - } catch (PartInitException e) { - } - } catch (MalformedURLException e) { - } - } - }); - } - - @Override - protected void createFieldEditors() { - addLinkWidget("Visit Nodeclipse gradle project page", "http://www.nodeclipse.org/projects/gradle/"); - addLinkWidget(" and www.gradle.org for news and docs.", "http://www.gradle.org/"); - addLinkWidget("GitHub", "https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.gradle"); - - gradleHome = new DirectoryFieldEditor(GradleConstants.GRADLE_HOME, "Gradle home directory:", getFieldEditorParent()); - gradleHome.setEnabled(false, getFieldEditorParent()); - addField(gradleHome); - //TODO show version in this Preference Page - gradleHomeToUse = new DirectoryFieldEditor(GradleConstants.GRADLE_HOME_TO_USE, "Gradle home to use:", getFieldEditorParent()); - addField(gradleHomeToUse); - gradleUseWrapper = new BooleanFieldEditor(GradleConstants.GRADLE_USE_WRAPPER, - "use wrapper if `gradlew[.bat]` is present (appears after `gradle wrapper`)", getFieldEditorParent()); - addField(gradleUseWrapper); - javaHomeToUse = new DirectoryFieldEditor(GradleConstants.GRADLE_JAVA_HOME_TO_USE, "alternative JAVA_HOME to use:", getFieldEditorParent()); - addField(javaHomeToUse); - gradleJvmOpts = new StringFieldEditor(GradleConstants.GRADLE_OPTS, "JVM options GRADLE_OPTS:", getFieldEditorParent()); - addField(gradleJvmOpts); - - gradleOptions = new StringFieldEditor(GradleConstants.GRADLE_OPTIONS, "Gradle options (gradle -h):", getFieldEditorParent()); - addField(gradleOptions); - /* - gradleTask1 = new StringFieldEditor(GradleConstants.GRADLE_TASK1, "Gradle task1:", getFieldEditorParent()); - addField(gradleTask1); - gradleTask2 = new StringFieldEditor(GradleConstants.GRADLE_TASK2, "Gradle task2:", getFieldEditorParent()); - addField(gradleTask2); - */ - gradleOptionDebug = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_DEBUG,"-d, --debug Log in debug mode (includes normal stacktrace).", getFieldEditorParent()); - addField(gradleOptionDebug); - gradleOptionInfo = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_INFO,"-i, --info Set log level to info.", getFieldEditorParent()); - addField(gradleOptionInfo); - gradleOptionQuiet = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_QUIET,"-q, --quiet Log errors only.", getFieldEditorParent()); - addField(gradleOptionQuiet); - gradleOptionOffline = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_OFFLINE, - "--offline The build should operate without accessing network resources.", getFieldEditorParent()); - addField(gradleOptionOffline); - gradleOptionSkipTest = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_TEST_SKIP, - "-x test (--exclude-task test) or use `gradle assemble`", getFieldEditorParent()); - addField(gradleOptionSkipTest); - gradleOptionDaemon = new BooleanFieldEditor(GradleConstants.GRADLE_OPTION_DAEMON, - "--daemon Uses the Gradle daemon to run the build. Starts the daemon if not running.", getFieldEditorParent()); - addField(gradleOptionDaemon); - - - gradleEnvVarAlternativeAndroidHome = new DirectoryFieldEditor(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_HOME, "alternative ANDROID_HOME:", getFieldEditorParent()); - addField(gradleEnvVarAlternativeAndroidHome); - - passAllEnvVars = new BooleanFieldEditor(GradleConstants.PASS_ALL_ENVIRONMENT_VARIABLES, - "pass all environment variables of Eclipse to launched app // incompatible with #129", getFieldEditorParent()); - addField(passAllEnvVars); - - passAndroidSigningEnvVars = new BooleanFieldEditor(GradleConstants.PASS_ANDROID_SIGNING_ENVIRONMENT_VARIABLES, - "pass Android signing environment variables (4) // experimental, see #129", getFieldEditorParent()); - addField(passAndroidSigningEnvVars); - gradleEnvVarAlternativeKeystoreFile = new FileFieldEditor(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_FILE, "alternative KEYSTORE file:", getFieldEditorParent()); - addField(gradleEnvVarAlternativeKeystoreFile); - gradleEnvVarAlternativeKeystorePassword = new StringFieldEditor(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEYSTORE_PASSWORD, "alternative KEYSTORE_PASSWORD:", getFieldEditorParent()); - addField(gradleEnvVarAlternativeKeystorePassword); - gradleEnvVarAlternativeKeyAlias = new StringFieldEditor(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_ALIAS, "alternative KEY_ALIAS:", getFieldEditorParent()); - addField(gradleEnvVarAlternativeKeyAlias); - gradleEnvVarAlternativeKeyPassword = new StringFieldEditor(GradleConstants.GRADLE_ENVVAR_ALTERNATIVE_ANDROID_KEY_PASSWORD, "alternative KEY_PASSWORD:", getFieldEditorParent()); - addField(gradleEnvVarAlternativeKeyPassword); - - } - - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/NodeclipseLogger.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/NodeclipseLogger.java deleted file mode 100644 index c3af24e2..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/NodeclipseLogger.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.gradle.util; - -import org.nodeclipse.common.ui.CommonConsole; - -/** - * Allow to use any logger - * @author pverest - * @since 0.10 - */ -public class NodeclipseLogger { - - public static void log(String message){ - System.out.print(message); - CommonConsole.write(message); - } - -} diff --git a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/VariablesUtil.java b/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/VariablesUtil.java deleted file mode 100644 index 53cd05e1..00000000 --- a/org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/util/VariablesUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.nodeclipse.enide.gradle.util; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.variables.IStringVariableManager; -import org.eclipse.core.variables.VariablesPlugin; - -/** - * copied from org.nodeclipse.debug.util.VariablesUtil - */ -public class VariablesUtil { - public static String resolveValue(String expression) throws CoreException { - String expanded= null; - try { - expanded= getValue(expression); - } catch (CoreException e) { //possibly just a variable that needs to be resolved at runtime - validateVaribles(expression); - return null; - } - return expanded; - } - - /** - * Validates the value of the given string to determine if any/all variables are valid - * - * @param expression expression with variables - * @return whether the expression contained any variable values - * @exception CoreException if variable resolution fails - */ - private static String getValue(String expression) throws CoreException { - IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); - return manager.performStringSubstitution(expression); - } - - /** - * Validates the variables of the given string to determine if all variables are valid - * - * @param expression expression with variables - * @exception CoreException if a variable is specified that does not exist - */ - private static void validateVaribles(String expression) throws CoreException { - IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); - manager.validateStringVariables(expression); - } -} diff --git a/org.nodeclipse.enide.maven/.README.md.html b/org.nodeclipse.enide.maven/.README.md.html deleted file mode 100644 index 04429388..00000000 --- a/org.nodeclipse.enide.maven/.README.md.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.enide.maven\.README.md.html - - - - - - - - - - -

    Enide Maven

    -

    This is alternative and completion to m2e (Maven Eclipse Integration).

    -

    Launch build or execute Java class. Project does not need to be Maven project. Just pom.xml would be enough. (The project may be General, old classic Java, broken Maven or Gradle project.)

    -

    No miracles, this plugins just launches mvn with options, as you can do from command line. Full path to maven mvn.bat or mvn is used, so you can try different versions. Specify options to mvn that will be Workspace-wide. Executed string is shown is Console, so you can check and learn.

    -

    Hint increase Console buffer size in Preferences -> Run\Debug -> Console. and check other preferences there as well.

    -

    About 2G in .m2/repository/.cache/m2e

    -

    org.nodeclipse.enide.maven

    -
      -
    • pom.xml Run As mvn package Maven build
    • -
    • *.java Run As mvn compile exec:java -Dexec.mainClass=package.Class
    • -
    -

    Minisite http://www.nodeclipse.org/enide/maven/ GitHub https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.maven

    -

    #117 Run Maven, Gradle or other batch-based script from Java (and then Eclipse)

    -

    Depends on JDT (see link 1).

    -

    -

    -

    -

    Tomcat start

    -

    @since 0.11

    -

    Check Apache Tomcat Maven Plugin page.

    -

    Version 2.2 is release in Nov 2013. http://tomcat.apache.org/maven-plugin-2.2/index.html

    -
    <pluginManagement>
    -  <plugins>
    -    <plugin>
    -      <groupId>org.apache.tomcat.maven</groupId>
    -      <artifactId>tomcat6-maven-plugin</artifactId>
    -      <version>2.2</version>
    -    </plugin>
    -    <plugin>
    -      <groupId>org.apache.tomcat.maven</groupId>
    -      <artifactId>tomcat7-maven-plugin</artifactId>
    -      <version>2.2</version>
    -    </plugin>
    -  </plugins>
    -</pluginManagement>
    -
    -

    Only for Tomcat6 there is goal :start

    -
    mvn tomcat6:start
    -
    -

    Tomcat version differences

    -

    Status

    -
    [INFO] --- tomcat6-maven-plugin:2.2:start (default-cli) @ mavenwar ---
    -[INFO] Starting application at http://localhost:8080/mavenwar
    -SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    -SLF4J: Defaulting to no-operation (NOP) logger implementation
    -SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    -[INFO] ------------------------------------------------------------------------
    -[INFO] BUILD FAILURE
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Total time: 34.560s
    -[INFO] Finished at: Fri Feb 14 22:46:16 CST 2014
    -[INFO] Final Memory: 8M/21M
    -[INFO] ------------------------------------------------------------------------
    -[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.2:start (default-cli) on project mavenwar: Cannot invoke Tomcat manager: Connection refused: connect -> [Help 1]
    -
    -

    Jetty start

    -

    @since 0.11

    -

    For Jetty 7-8 https://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin For Jetty 9 onward http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html You need to use Maven 3 and Java 1.7 for this plugin. mvn -Djetty.port=9999 jetty:run

    -

    First, add jetty-maven-plugin to your pom.xml definition:

    -
    <plugin>
    -  <groupId>org.eclipse.jetty</groupId>
    -  <artifactId>jetty-maven-plugin</artifactId>
    -  <version>${jetty-maven-plugin.version}</version>
    -</plugin>
    -
    -

    Then, from the same directory as your root pom.xml, type:

    -
    mvn jetty:run
    -
    -

    This starts Jetty and serves up your project on http://localhost:8080/.

    -

    Jetty continues to run until you stop it. While it runs, it periodically scans for changes to your project files, so if you save changes and recompile your class files, Jetty redeploys your webapp, and you can instantly test the changes you just made.

    -

    Developing with PDE

    -

    git clone, import this project and org.nodeclipse.coomon (only 2 is enough) in Eclipse with PDE (e.g. Eclipse SDK/Classic) as "Existing Projects into Workspace".

    -

    From plugin.xml form click Run as Eclipse application.

    -

    If memory is not enough (getting java.lang.OutOfMemoryError: PermGen space error when when running or debugging), change in launch configuration for Eclipse Application -> Arguments -> VM Arguments

    -
    -Dosgi.requiredJavaVersion=1.6 -Xms128m -Xmx784m -XX:MaxPermSize=128m -Xss2m
    -
    -

    Maven build is optional for full build with other plugins.

    -

    Links

    -
      -
    1. http://stackoverflow.com/questions/775709/eclipse-pde-navigator-view-treeselection-obtaining-the-file-type-and-name
    2. -
    -

    Idea

    -

    java-run-javac&java -> bad idea

    -

    DONE

    -

    1)

    -

    What is gradle analog for maven compile and run mvn compile exec:java -Dexec.mainClass=example.Example

    -

    2)

    -

    When executing Java class using maven from within Java (Eclipse plugin actualy) -Dexec.mainClass=maven.MainClass becomes maven.MainClass

    -
    package maven;
    -
    -public class MainClass {
    -    public static void main(String[] args) {
    -        System.out.println("app is running!");
    -    }
    -}
    -
    -

    from Eclipse using

    -
        Process p = DebugPlugin.exec(cmds, workingPath, envp);
    -    RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, MavenConstants.PROCESS_MESSAGE);
    -
    -

    for process

    -

    D:\Code\springsource\3.0\apache-maven-3.0.3\bin\mvn.bat compile exec:java -Dexec.mainClass=maven.MainClass

    -
    [INFO] Scanning for projects...
    -[INFO]                                                                         
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Building org.example.maven 0.0.1-SNAPSHOT
    -[INFO] ------------------------------------------------------------------------
    -[INFO] ------------------------------------------------------------------------
    -[INFO] BUILD FAILURE
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Total time: 0.672s
    -[INFO] Finished at: Fri Jan 24 23:59:50 CST 2014
    -[INFO] Final Memory: 4M/15M
    -[INFO] ------------------------------------------------------------------------
    -[ERROR] Unknown lifecycle phase "maven.MainClass". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
    -[ERROR] 
    -[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    -[ERROR] Re-run Maven using the -X switch to enable full debug logging.
    -[ERROR] 
    -[ERROR] For more information about the errors and possible solutions, please read the following articles:
    -[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
    -
    -

    but from cmd shell using mvn or full filename is OK

    -
    D:\Progs\Enide-Monster-08-kepler-win32\runtime-EclipseApplication\org.example.maven>mvn compile exec:java -Dexec.mainClass=maven.MainClass
    -[INFO] Scanning for projects...
    -[INFO]
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Building org.example.maven 0.0.1-SNAPSHOT
    -[INFO] ------------------------------------------------------------------------
    -[INFO]
    -[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.example.maven ---
    -[WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, i.e. build is platform dependent!
    -[INFO] Copying 0 resource
    -[INFO]
    -[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ org.example.maven ---
    -[INFO] Nothing to compile - all classes are up to date
    -[INFO]
    -[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven >>>
    -[INFO]
    -[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven <<<
    -[INFO]
    -[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven ---
    -app is running!
    -[INFO] ------------------------------------------------------------------------
    -[INFO] BUILD SUCCESS
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Total time: 1.342s
    -[INFO] Finished at: Fri Jan 24 23:56:41 CST 2014
    -[INFO] Final Memory: 5M/15M
    -[INFO] ------------------------------------------------------------------------
    -
    -
    -D:\Progs\Enide-Monster-08-kepler-win32\runtime-EclipseApplication\org.example.maven>D:\Code\springsource\3.0\apache-maven-3.0.3\bin\mvn.bat compile exec:java -Dexec.mainClass=maven
    -.MainClass
    -[INFO] Scanning for projects...
    -[INFO]
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Building org.example.maven 0.0.1-SNAPSHOT
    -[INFO] ------------------------------------------------------------------------
    -[INFO]
    -[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.example.maven ---
    -[WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, i.e. build is platform dependent!
    -[INFO] Copying 0 resource
    -[INFO]
    -[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ org.example.maven ---
    -[INFO] Nothing to compile - all classes are up to date
    -[INFO]
    -[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven >>>
    -[INFO]
    -[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven <<<
    -[INFO]
    -[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven ---
    -app is running!
    -[INFO] ------------------------------------------------------------------------
    -[INFO] BUILD SUCCESS
    -[INFO] ------------------------------------------------------------------------
    -[INFO] Total time: 1.435s
    -[INFO] Finished at: Fri Jan 24 23:57:46 CST 2014
    -[INFO] Final Memory: 5M/15M
    -[INFO] ------------------------------------------------------------------------
    -
    - - diff --git a/org.nodeclipse.enide.maven/.classpath b/org.nodeclipse.enide.maven/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.enide.maven/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.enide.maven/.project b/org.nodeclipse.enide.maven/.project deleted file mode 100644 index 80073496..00000000 --- a/org.nodeclipse.enide.maven/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.enide.maven - pom.xml Run As Maven build - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.enide.maven/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.enide.maven/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.enide.maven/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.enide.maven/HelpToc.xml b/org.nodeclipse.enide.maven/HelpToc.xml deleted file mode 100644 index f036a0c1..00000000 --- a/org.nodeclipse.enide.maven/HelpToc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/org.nodeclipse.enide.maven/META-INF/MANIFEST.MF b/org.nodeclipse.enide.maven/META-INF/MANIFEST.MF deleted file mode 100644 index d1f556e8..00000000 --- a/org.nodeclipse.enide.maven/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: pom.xml Run As Maven build; *.java Run as compile exec:java -Bundle-SymbolicName: org.nodeclipse.enide.maven;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.enide.maven.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.debug.ui, - org.eclipse.core.variables, - org.nodeclipse.common, - org.eclipse.jdt.core -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy diff --git a/org.nodeclipse.enide.maven/README.md b/org.nodeclipse.enide.maven/README.md deleted file mode 100644 index d763577b..00000000 --- a/org.nodeclipse.enide.maven/README.md +++ /dev/null @@ -1,248 +0,0 @@ - - - - - -# Enide Maven - -This is alternative and completion to m2e (Maven Eclipse Integration). - -Launch build or execute Java class. -Project does not need to be Maven project. Just `pom.xml` would be enough. -(The project may be General, old classic Java, broken Maven or Gradle project.) - -No miracles, this plugins just launches `mvn` with options, as you can do from command line. -Full path to maven `mvn.bat` or `mvn` is used, so you can try different versions. -Specify options to `mvn` that will be Workspace-wide. -Executed string is shown is Console, so you can check and learn. - -Hint increase Console buffer size in Preferences -> Run\Debug -> Console. - and check other preferences there as well. - -[About 2G in `.m2/repository/.cache/m2e`](http://stackoverflow.com/questions/16442292/cleaning-maven-m2e-cache-directory) - -## org.nodeclipse.enide.maven - -- pom.xml Run As `mvn package` Maven build -- *.java Run As `mvn compile exec:java -Dexec.mainClass=package.Class` - -Minisite -GitHub - -[#117 Run Maven, Gradle or other batch-based script from Java (and then Eclipse)](https://github.com/Nodeclipse/nodeclipse-1/issues/117) - -Depends on JDT (see link 1). - -![](docs/enide-maven-run-as-mvn-package.png) - -![](docs/enide-maven-run-as-mvn-package-results-in-console.png) - -![](run-maven-build.png) - -### Tomcat start - -@since 0.11 - -Check [Apache Tomcat Maven Plugin](http://tomcat.apache.org/maven-plugin) page. - -Version 2.2 is release in Nov 2013. http://tomcat.apache.org/maven-plugin-2.2/index.html - - - - - org.apache.tomcat.maven - tomcat6-maven-plugin - 2.2 - - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 - - - - -[Only for Tomcat6 there is goal `:start`](http://tomcat.apache.org/maven-plugin-2.2/context-goals.html) - - mvn tomcat6:start - -[Tomcat version differences](http://tomcat.apache.org/whichversion.html) - -#### Status - - [INFO] --- tomcat6-maven-plugin:2.2:start (default-cli) @ mavenwar --- - [INFO] Starting application at http://localhost:8080/mavenwar - SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". - SLF4J: Defaulting to no-operation (NOP) logger implementation - SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. - [INFO] ------------------------------------------------------------------------ - [INFO] BUILD FAILURE - [INFO] ------------------------------------------------------------------------ - [INFO] Total time: 34.560s - [INFO] Finished at: Fri Feb 14 22:46:16 CST 2014 - [INFO] Final Memory: 8M/21M - [INFO] ------------------------------------------------------------------------ - [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.2:start (default-cli) on project mavenwar: Cannot invoke Tomcat manager: Connection refused: connect -> [Help 1] - - -### Jetty start - -@since 0.11 - -For Jetty 7-8 -For Jetty 9 onward - **You need to use Maven 3 and Java 1.7 for this plugin.** - mvn -Djetty.port=9999 jetty:run - -First, add jetty-maven-plugin to your pom.xml definition: - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty-maven-plugin.version} - - -Then, from the same directory as your root pom.xml, type: - - mvn jetty:run - -This starts Jetty and serves up your project on http://localhost:8080/. - -Jetty continues to run until you stop it. While it runs, it periodically scans for changes to your project files, - so if you save changes and recompile your class files, Jetty redeploys your webapp, - and you can instantly test the changes you just made. - -### Developing with PDE - -`git clone`, import this project and `org.nodeclipse.coomon` (only 2 is enough) in Eclipse with PDE (e.g. Eclipse SDK/Classic) - as "Existing Projects into Workspace". - -From plugin.xml form click Run as Eclipse application. - -If memory is not enough (getting `java.lang.OutOfMemoryError: PermGen space` error when when running or debugging), - change in launch configuration for Eclipse Application -> Arguments -> VM Arguments - - -Dosgi.requiredJavaVersion=1.6 -Xms128m -Xmx784m -XX:MaxPermSize=128m -Xss2m - -Maven build is optional for full build with other plugins. - -#### Links - -1. - -### Idea - -java-run-javac&java -> bad idea - -### DONE - -1) - -What is gradle analog for maven compile and run -`mvn compile exec:java -Dexec.mainClass=example.Example` - -2) - -When executing Java class using maven from within Java ([Eclipse plugin actualy](https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.maven)) -`-Dexec.mainClass=maven.MainClass` becomes `maven.MainClass` - - package maven; - - public class MainClass { - public static void main(String[] args) { - System.out.println("app is running!"); - } - } - -from Eclipse using - - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, MavenConstants.PROCESS_MESSAGE); - -for process - -D:\Code\springsource\3.0\apache-maven-3.0.3\bin\mvn.bat compile exec:java -Dexec.mainClass=maven.MainClass - - [INFO] Scanning for projects... - [INFO] - [INFO] ------------------------------------------------------------------------ - [INFO] Building org.example.maven 0.0.1-SNAPSHOT - [INFO] ------------------------------------------------------------------------ - [INFO] ------------------------------------------------------------------------ - [INFO] BUILD FAILURE - [INFO] ------------------------------------------------------------------------ - [INFO] Total time: 0.672s - [INFO] Finished at: Fri Jan 24 23:59:50 CST 2014 - [INFO] Final Memory: 4M/15M - [INFO] ------------------------------------------------------------------------ - [ERROR] Unknown lifecycle phase "maven.MainClass". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1] - [ERROR] - [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. - [ERROR] Re-run Maven using the -X switch to enable full debug logging. - [ERROR] - [ERROR] For more information about the errors and possible solutions, please read the following articles: - [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException - -but from cmd shell using `mvn` or full filename is OK - - D:\Progs\Enide-Monster-08-kepler-win32\runtime-EclipseApplication\org.example.maven>mvn compile exec:java -Dexec.mainClass=maven.MainClass - [INFO] Scanning for projects... - [INFO] - [INFO] ------------------------------------------------------------------------ - [INFO] Building org.example.maven 0.0.1-SNAPSHOT - [INFO] ------------------------------------------------------------------------ - [INFO] - [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.example.maven --- - [WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, i.e. build is platform dependent! - [INFO] Copying 0 resource - [INFO] - [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ org.example.maven --- - [INFO] Nothing to compile - all classes are up to date - [INFO] - [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven >>> - [INFO] - [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven <<< - [INFO] - [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven --- - app is running! - [INFO] ------------------------------------------------------------------------ - [INFO] BUILD SUCCESS - [INFO] ------------------------------------------------------------------------ - [INFO] Total time: 1.342s - [INFO] Finished at: Fri Jan 24 23:56:41 CST 2014 - [INFO] Final Memory: 5M/15M - [INFO] ------------------------------------------------------------------------ - - - D:\Progs\Enide-Monster-08-kepler-win32\runtime-EclipseApplication\org.example.maven>D:\Code\springsource\3.0\apache-maven-3.0.3\bin\mvn.bat compile exec:java -Dexec.mainClass=maven - .MainClass - [INFO] Scanning for projects... - [INFO] - [INFO] ------------------------------------------------------------------------ - [INFO] Building org.example.maven 0.0.1-SNAPSHOT - [INFO] ------------------------------------------------------------------------ - [INFO] - [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.example.maven --- - [WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, i.e. build is platform dependent! - [INFO] Copying 0 resource - [INFO] - [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ org.example.maven --- - [INFO] Nothing to compile - all classes are up to date - [INFO] - [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven >>> - [INFO] - [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven <<< - [INFO] - [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ org.example.maven --- - app is running! - [INFO] ------------------------------------------------------------------------ - [INFO] BUILD SUCCESS - [INFO] ------------------------------------------------------------------------ - [INFO] Total time: 1.435s - [INFO] Finished at: Fri Jan 24 23:57:46 CST 2014 - [INFO] Final Memory: 5M/15M - [INFO] ------------------------------------------------------------------------ - - \ No newline at end of file diff --git a/org.nodeclipse.enide.maven/build.properties b/org.nodeclipse.enide.maven/build.properties deleted file mode 100644 index 5cfbd6de..00000000 --- a/org.nodeclipse.enide.maven/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - HelpToc.xml,\ - .README.md.html,\ - maven-help.txt diff --git a/org.nodeclipse.enide.maven/docs/MediocreExecMaven.java b/org.nodeclipse.enide.maven/docs/MediocreExecMaven.java deleted file mode 100644 index 8b255a87..00000000 --- a/org.nodeclipse.enide.maven/docs/MediocreExecMaven.java +++ /dev/null @@ -1,66 +0,0 @@ -package runitself; -import java.util.*; -import java.io.*; - -// http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html -public class MediocreExecMaven { - private static void log(String message) { - System.out.println(message); - } - public static void main(String args[]) { - try { - - String mavenPath = "D:\\Progs\\springsource\\apache-maven-3.0.4\\bin\\mvn.bat"; - String mavenOptions = "-X compile exec:java -Dexec.mainClass=runclass.Runme"; - - String[] cmdLine = new String[2]; - cmdLine[0] = mavenPath; //cmdLine.add(mavenPath); - cmdLine[1] = mavenOptions; //cmdLine.add(mavenOptions+" compile exec:java -Dexec.mainClass="+packageClass); - - String[] envp = new String[2]; - //Map envm = new HashMap(); - envp[0] = "JAVA_HOME=" + System.getProperty("java.home"); //System.getenv("JAVA_HOME"); - envp[1] = "M2_HOME=" + System.getenv("MAVEN_HOME"); - - File workingDirectory = null; - String currentDir = new File(".").getAbsolutePath(); - log(currentDir); - String userDir = System.getProperty("user.dir"); //User working directory ; "user.home" User home directory - workingDirectory = new File(userDir); - log(workingDirectory.toString()); - - // - Runtime rt = Runtime.getRuntime(); - Process proc = rt.exec(cmdLine, envp, workingDirectory); - InputStream stdout = proc.getInputStream(); - InputStream stderr = proc.getErrorStream(); - InputStreamReader isr = new InputStreamReader(stdout); - InputStreamReader isr2 = new InputStreamReader(stderr); - BufferedReader br = new BufferedReader(isr); - BufferedReader br2 = new BufferedReader(isr2); - - String line = null; - System.out.println(""); - while ((line = br.readLine()) != null) - System.out.println(line); - System.out.println(""); - - System.out.println(""); - while ((line = br2.readLine()) != null) - System.out.println(line); - System.out.println(""); - - int exitVal = proc.waitFor(); - System.out.println("Process exitValue: " + exitVal); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} -// [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException -// -// -// 'cmd' �����ڲ����ⲿ���Ҳ���ǿ����еij��� -// �������ļ��� -// -// Process exitValue: 1 diff --git a/org.nodeclipse.enide.maven/docs/create-my-webapp-2.PNG b/org.nodeclipse.enide.maven/docs/create-my-webapp-2.PNG deleted file mode 100644 index 5f3e5a4c..00000000 Binary files a/org.nodeclipse.enide.maven/docs/create-my-webapp-2.PNG and /dev/null differ diff --git a/org.nodeclipse.enide.maven/docs/create.md b/org.nodeclipse.enide.maven/docs/create.md deleted file mode 100644 index b9eac25a..00000000 --- a/org.nodeclipse.enide.maven/docs/create.md +++ /dev/null @@ -1,75 +0,0 @@ - -### Create - -From [Guide to Webapps](http://maven.apache.org/guides/mini/guide-webapp.html) (-1) - - mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp - -enters interactive mode - -From (-1) - - mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-webapp-mkyong -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false - -Prepare for Eclipse - - mvn eclipse:eclipse - -![](create-my-webapp-2.PNG) - - - 4.0.0 - com.mycompany.app - my-webapp - war - 1.0-SNAPSHOT - my-webapp Maven Webapp - http://maven.apache.org - - - junit - junit - 3.8.1 - test - - - - my-webapp - - - -.project - - - - my-webapp - NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. - - - - org.eclipse.jdt.core.javabuilder - - - - org.eclipse.jdt.core.javanature - - - -.classpath - - - - - - - - - -So as you see it is static project with only `javanature`, dependencies are hard-coded in `.classpath`. -eclipse:eclipse (maven-eclipse-plugin) - - mvn tomcat:run - -there is **Hello World!** at http://localhost:8080/my-webapp/ -check `my-webapp` in `pom.xml` diff --git a/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package-results-in-console.png b/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package-results-in-console.png deleted file mode 100644 index e416e215..00000000 Binary files a/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package-results-in-console.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package.png b/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package.png deleted file mode 100644 index 763f96ca..00000000 Binary files a/org.nodeclipse.enide.maven/docs/enide-maven-run-as-mvn-package.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/docs/javascript-m2e.PNG b/org.nodeclipse.enide.maven/docs/javascript-m2e.PNG deleted file mode 100644 index f267c4fb..00000000 Binary files a/org.nodeclipse.enide.maven/docs/javascript-m2e.PNG and /dev/null differ diff --git a/org.nodeclipse.enide.maven/docs/javascript.md b/org.nodeclipse.enide.maven/docs/javascript.md deleted file mode 100644 index 2696be48..00000000 --- a/org.nodeclipse.enide.maven/docs/javascript.md +++ /dev/null @@ -1,44 +0,0 @@ - -## de.akquinet.javascript.archetypes are not updated for 2 years - -mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-maven-js -DarchetypeArtifactId=javascript-quickstart - -mvn archetype:generate -DarchetypeGroupId=de.akquinet.javascript.archetypes -DarchetypeArtifactId=javascript-quickstart -DgroupId=com.mycompany.app -DartifactId=my-maven-js - -mvn archetype:generate -DarchetypeGroupId=de.akquinet.javascript.archetypes -DarchetypeArtifactId=javascript-quickstart -Dversion=0.1.0-SNAPSHOT -DgroupId=com.mycompany.app -DartifactId=my-maven-js-m2e -DinteractiveMode=false -TODO -maven new de.akquinet.javascript.archetypes:javascript-quickstart my-maven-js-m2e - -mvn archetype:generate -DarchetypeGroupId=de.akquinet.javascript.archetypes -DarchetypeArtifactId=javascript-jqueryplugin -Dversion=0.1.0-SNAPSHOT -DgroupId=com.mycompany.app -DartifactId=my-maven-jquery-m2e -DinteractiveMode=false - -## jasmine-maven-plugin path - -Archetype is old. jasmine-maven-plugin version should be 1.3.1.4 -See - - - - com.github.searls - jasmine-maven-plugin - 1.3.1.4 - - - - generateManualRunner - resources - testResources - test - preparePackage - - - - - src/main/javascript - src/test/javascript - - - -mvn archetype:generate -DarchetypeGroupId=com.github.searls -DarchetypeArtifactId=jasmine-archetype -DarchetypeVersion=RELEASE -DgroupId=com.acme -DartifactId=my-jasmine-project -Dversion=0.0.1-SNAPSHOT - -Other links -- http://blog.inflinx.com/2010/04/16/creating-maven-archetypes-spring-mvc-example/ \ No newline at end of file diff --git a/org.nodeclipse.enide.maven/docs/run-maven-build.png b/org.nodeclipse.enide.maven/docs/run-maven-build.png deleted file mode 100644 index 28615730..00000000 Binary files a/org.nodeclipse.enide.maven/docs/run-maven-build.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/iconbank/apache.ico b/org.nodeclipse.enide.maven/iconbank/apache.ico deleted file mode 100644 index f0c22ad9..00000000 Binary files a/org.nodeclipse.enide.maven/iconbank/apache.ico and /dev/null differ diff --git a/org.nodeclipse.enide.maven/iconbank/maven-mini-logo.png b/org.nodeclipse.enide.maven/iconbank/maven-mini-logo.png deleted file mode 100644 index 5fcad1d4..00000000 Binary files a/org.nodeclipse.enide.maven/iconbank/maven-mini-logo.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/icons/feather-ma.png b/org.nodeclipse.enide.maven/icons/feather-ma.png deleted file mode 100644 index e5fceeb2..00000000 Binary files a/org.nodeclipse.enide.maven/icons/feather-ma.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/icons/feather-ma16.png b/org.nodeclipse.enide.maven/icons/feather-ma16.png deleted file mode 100644 index e2ea5daf..00000000 Binary files a/org.nodeclipse.enide.maven/icons/feather-ma16.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/icons/feather-ma16_bottom_right_corner_run_half_size.png b/org.nodeclipse.enide.maven/icons/feather-ma16_bottom_right_corner_run_half_size.png deleted file mode 100644 index 31c97e06..00000000 Binary files a/org.nodeclipse.enide.maven/icons/feather-ma16_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/icons/feather-ma32.png b/org.nodeclipse.enide.maven/icons/feather-ma32.png deleted file mode 100644 index ad481e88..00000000 Binary files a/org.nodeclipse.enide.maven/icons/feather-ma32.png and /dev/null differ diff --git a/org.nodeclipse.enide.maven/maven-help.txt b/org.nodeclipse.enide.maven/maven-help.txt deleted file mode 100644 index 25f471e5..00000000 --- a/org.nodeclipse.enide.maven/maven-help.txt +++ /dev/null @@ -1,67 +0,0 @@ - -usage: mvn [options] [] [] - -Options: - -am,--also-make If project list is specified, also - build projects required by the - list - -amd,--also-make-dependents If project list is specified, also - build projects that depend on - projects on the list - -B,--batch-mode Run in non-interactive (batch) - mode - -C,--strict-checksums Fail the build if checksums don't - match - -c,--lax-checksums Warn if checksums don't match - -cpu,--check-plugin-updates Ineffective, only kept for - backward compatibility - -D,--define Define a system property - -e,--errors Produce execution error messages - -emp,--encrypt-master-password Encrypt master security password - -ep,--encrypt-password Encrypt server password - -f,--file Force the use of an alternate POM - file. - -fae,--fail-at-end Only fail the build afterwards; - allow all non-impacted builds to - continue - -ff,--fail-fast Stop at first failure in - reactorized builds - -fn,--fail-never NEVER fail the build, regardless - of project result - -gs,--global-settings Alternate path for the global - settings file - -h,--help Display help information - -l,--log-file Log file to where all build output - will go. - -N,--non-recursive Do not recurse into sub-projects - -npr,--no-plugin-registry Ineffective, only kept for - backward compatibility - -npu,--no-plugin-updates Ineffective, only kept for - backward compatibility - -nsu,--no-snapshot-updates Suppress SNAPSHOT updates - -o,--offline Work offline - -P,--activate-profiles Comma-delimited list of profiles - to activate - -pl,--projects Comma-delimited list of specified - reactor projects to build instead - of all projects. A project can be - specified by [groupId]:artifactId - or by its relative path. - -q,--quiet Quiet output - only show errors - -rf,--resume-from Resume reactor from specified - project - -s,--settings Alternate path for the user - settings file - -T,--threads Thread count, for instance 2.0C - where C is core multiplied - -t,--toolchains Alternate path for the user - toolchains file - -U,--update-snapshots Forces a check for updated - releases and snapshots on remote - repositories - -up,--update-plugins Ineffective, only kept for - backward compatibility - -V,--show-version Display version information - WITHOUT stopping build - -v,--version Display version information - -X,--debug Produce execution debug output diff --git a/org.nodeclipse.enide.maven/plugin.xml b/org.nodeclipse.enide.maven/plugin.xml deleted file mode 100644 index b96af176..00000000 --- a/org.nodeclipse.enide.maven/plugin.xml +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.enide.maven/pom.xml b/org.nodeclipse.enide.maven/pom.xml deleted file mode 100644 index 9927fd4b..00000000 --- a/org.nodeclipse.enide.maven/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.enide.maven - eclipse-plugin - - org.nodeclipse.enide.maven - pom.xml Run As Maven build - - diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/jdt/CompilationUnitToFileAdapter.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/jdt/CompilationUnitToFileAdapter.java deleted file mode 100644 index e9779c9c..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/jdt/CompilationUnitToFileAdapter.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.nodeclipse.enide.jdt; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.jdt.core.ICompilationUnit; - - -/** The adapter factory class -http://stackoverflow.com/questions/775709/eclipse-pde-navigator-view-treeselection-obtaining-the-file-type-and-name - */ -public class CompilationUnitToFileAdapter implements IAdapterFactory { - @Override - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adaptableObject instanceof ICompilationUnit) - // note: "adapting" it here just means returning the ref'd IFile - return (IFile) ((ICompilationUnit)adaptableObject).getResource(); - return null; - } - @Override - public Class[] getAdapterList() { - return new Class[] {IFile.class}; - } -} \ No newline at end of file diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/Activator.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/Activator.java deleted file mode 100644 index e5022425..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/Activator.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.nodeclipse.enide.maven; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.nodeclipse.enide.maven.preferences.MavenConstants; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = MavenConstants.PLUGIN_ID; //"org.nodeclipse.enide.maven"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index a420bc24..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,258 +0,0 @@ -package org.nodeclipse.enide.maven.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Platform; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.common.preferences.CommonDialogs; -import org.nodeclipse.enide.maven.Activator; -import org.nodeclipse.enide.maven.preferences.MavenConstants; -import org.nodeclipse.enide.maven.util.NodeclipseLogger; -import org.nodeclipse.enide.maven.util.VariablesUtil; - -/** - * pom.xml Run As Maven build
    - * see LaunchConfigurationDelegate in .debug and .phantomjs, .jjs module for comparison. - * - * @since 0.10 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - boolean isWindows = Platform.getOS().startsWith("win"); - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - protected File workingDirectoryDefault = null; //is different for different launch types - private boolean warned = false; - - //DONE shared processing function for 2 launch types. - - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - //{ copy-paste part - //IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - // Maven home to use is stored in preference. - //String mavenPath = preferenceStore.getString(MavenConstants.MAVEN_PATH); - String mavenHomeToUse = preferenceStore.getString(MavenConstants.MAVEN_HOME_TO_USE); - String mavenPath = mavenHomeToUse+ (isWindows?"\\bin\\mvn.bat":"/bin/mvn"); - // Check if the maven location is correctly configured - File mavenFile = new File(mavenPath); - if( ("".equals(mavenHomeToUse)) || (!mavenFile.exists()) ){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - CommonDialogs.showPreferencesDialog(MavenConstants.PREFERENCES_PAGE, - "Maven home to use is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+MavenConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - cmdLine.add(mavenPath); - - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_SHOW_VERSION)) - cmdLine.add("-V"); //-V, --show-version - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_DEBUG)) - cmdLine.add("-X"); - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_QUIET)) - cmdLine.add("-q"); - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_FORCED_DEPENDENCIES_UPDATE)) - cmdLine.add("-U"); - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_OFFLINE)) - cmdLine.add("-o"); - if (preferenceStore.getBoolean(MavenConstants.MAVEN_OPTION_TEST_SKIP)) - cmdLine.add("-Dmaven.test.skip=true"); - // TODO won't be so simple on Windows! - - - String mavenOptionAlternativeSettings = preferenceStore.getString(MavenConstants.MAVEN_OPTION_ALTERNATIVE_SETTINGS); - if( !"".equals(mavenOptionAlternativeSettings) ){ - // Check if the settings.xml location is correctly configured - File mavenOptionAlternativeSettingsFile = new File(mavenOptionAlternativeSettings); - if(!mavenOptionAlternativeSettingsFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - CommonDialogs.showPreferencesDialog(MavenConstants.PREFERENCES_PAGE, - "Alternative settings.xml location is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+MavenConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - cmdLine.add("-s "+mavenOptionAlternativeSettings); - } - - //} copy-paste part - - specialOptions(configuration, preferenceStore, cmdLine); - - launchTail(cmdLine,configuration,launch); - } - - // -f pom.xml package - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - // special for `mvn package` - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); - if(!mavenOptions.equals("")) { - String[] sa = mavenOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add("-f"); // -f,--file Force the use of an alternate POM - cmdLine.add(filePath); - cmdLine.add("package"); - - //workingPath = (new File(filePath)).getParentFile(); - //setWorkingDirectoryDefault(filePath); - workingDirectoryDefault = (new File(filePath)).getParentFile(); - -} - -// protected File getWorkingDirectoryDefault(String filePath){ -// return (new File(filePath)).getParentFile(); -//} -// protected void setWorkingDirectoryDefault(String filePath){ -// workingDirectoryDefault = (new File(filePath)).getParentFile(); -// } -// protected File getWorkingDirectoryDefault(){ -// return workingDirectoryDefault; -// } - - - - protected void launchTail( - List cmdLine, ILaunchConfiguration configuration, //String mode, - ILaunch launch //, IProgressMonitor monitor - ) throws CoreException { - //{ copy-paste tail part - //TODO rename workingPath to workingDirectory, workingDirectory to workingDirectoryConfig - - //workingDirectory is pom.xml location - differs : filePath - File workingPath = null; - String workingDirectory = configuration.getAttribute(MavenConstants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - //workingPath = (new File(filePath)).getParentFile(); - //File workingPath = getWorkingPath(configuration); - //workingPath = getWorkingDirectoryDefault(); - workingPath = workingDirectoryDefault; - } - - //env - String[] envp = getEnvironmentVariables(configuration); - - StringBuilder sb = new StringBuilder(100); - for(String s : cmdLine) sb.append(s).append(' '); - NodeclipseLogger.log(sb.append('\n').toString()); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to debug.eg, - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, MavenConstants.PROCESS_MESSAGE); - //} copy-paste tail part - } - -// protected String[] getEnvironmentVariables(ILaunchConfiguration configuration) throws CoreException { -// return getEnvironmentVariables(configuration, null); -// } - /** Get EnvironmentVariables from ILaunchConfiguration - * and adds JAVA_HOME, M2_HOME, PATH, TEMP, SystemDrive, HOME
    - * Used in .launch and .launchexec - * @param configuration ILaunchConfiguration - * @return String[] - * @throws CoreException - */ - protected String[] getEnvironmentVariables(ILaunchConfiguration configuration) throws CoreException { - //, IPreferenceStore preferenceStore - Map envm = new HashMap(); - envm = configuration.getAttribute(MavenConstants.ATTR_ENVIRONMENT_VARIABLES, envm); - - int envmSizeDelta = 4 + 2; - Map all = null; - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean passAllEnvVars = preferenceStore.getBoolean(MavenConstants.PASS_ALL_ENVIRONMENT_VARIABLES);//@since 0.12 - if (passAllEnvVars){ - all = System.getenv(); - envmSizeDelta = all.size(); - } - - String[] envp = new String[envm.size() + (2+2) + envmSizeDelta]; - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - // #137 - String javaHomeToUse = preferenceStore.getString(MavenConstants.MAVEN_JAVA_HOME_TO_USE);//@since 0.15 - if(!javaHomeToUse.equals("")) { - envp[idx++] = "JAVA_HOME=" + javaHomeToUse; - }else{ - envp[idx++] = "JAVA_HOME=" + System.getProperty("java.home"); //System.getenv("JAVA_HOME"); - } - //ERROR: M2_HOME not found in your environment. - //Please set the M2_HOME variable in your environment to match the - //location of the Maven installation - // note: MAVEN_HOME does not substitute M2_HOME when called from Java - envp[idx++] = "M2_HOME=" + preferenceStore.getString(MavenConstants.MAVEN_HOME_TO_USE); - envp[idx++] = "MAVEN_OPTS=" + preferenceStore.getString(MavenConstants.MAVEN_OPTS); - envp[idx++] = getEnvVariableEqualsString("JAVA_OPTS"); - - if (passAllEnvVars){ - for (Map.Entry entry : all.entrySet()) - { - //System.out.println(entry.getKey() + "/" + entry.getValue()); - envp[idx++] = entry.getKey() + "=" + entry.getValue(); - } - }else{ - //+ #81 - envp[idx++] = getEnvVariableEqualsString("PATH"); - envp[idx++] = getEnvVariableEqualsString("TEMP"); - envp[idx++] = getEnvVariableEqualsString("TMP"); - envp[idx++] = getEnvVariableEqualsString("SystemDrive"); - //+ - envp[idx++] = getEnvVariableEqualsString("HOME"); - envp[idx++] = getEnvVariableEqualsString("USERPROFILE"); - } - if (!warned ){ - NodeclipseLogger.log(" Warning: JAVA_HOME, M2_HOME and others environment variables will be applied automatically to every `mvn` launch.\n"); - StringBuilder sb = new StringBuilder(100); - for(int i=0; i"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationType.java deleted file mode 100644 index 23448d11..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchShortcut.java deleted file mode 100644 index 2c958a4f..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/LaunchShortcut.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.nodeclipse.enide.maven.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.enide.maven.preferences.MavenConstants; -import org.nodeclipse.enide.maven.util.NodeclipseLogger; - -/** - * Using "Run As" --> "mvn package Maven build" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_CONFIGURATION_TYPE_ID; - } - - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(getLaunchConfigurationTypeConstant()); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - //NodeclipseConsole.write(this.getClass().getName()+"\n"); - NodeclipseLogger.log(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationDelegate.java deleted file mode 100644 index 129cebc0..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal1; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * mvn goal1
    - * - * @since 0.15 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.maven.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); - if(!mavenOptions.equals("")) { - String[] sa = mavenOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String file = configuration.getAttribute(MavenConstants.KEY_FILE_PATH, ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add("-f"); // -f,--file Force the use of an alternate POM - cmdLine.add(filePath); - - String mavenGoal1= preferenceStore.getString(MavenConstants.MAVEN_GOAL1); - cmdLine.add(mavenGoal1); //TODO only this changed - - //workingPath = (new File(filePath)).getParentFile(); - //setWorkingDirectoryDefault(filePath); - workingDirectoryDefault = (new File(filePath)).getParentFile(); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationTabGroup.java deleted file mode 100644 index fd16ec84..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal1; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationType.java deleted file mode 100644 index e68eb501..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal1; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchShortcut.java deleted file mode 100644 index 196615d6..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal1/LaunchShortcut.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal1; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * Using "Run As" --> "mvn tomcat6:start Maven start" will lead here
    - * http://tomcat.apache.org/maven-plugin-2.2/context-goals.html - **/ -public class LaunchShortcut extends org.nodeclipse.enide.maven.launchexec.LaunchShortcut implements ILaunchShortcut { - - @Override - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_GOAL1_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationDelegate.java deleted file mode 100644 index 175ca2e1..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal2; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * mvn goal2
    - * - * @since 0.15 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.maven.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); - if(!mavenOptions.equals("")) { - String[] sa = mavenOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String file = configuration.getAttribute(MavenConstants.KEY_FILE_PATH, ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add("-f"); // -f,--file Force the use of an alternate POM - cmdLine.add(filePath); - - String mavenGoal1= preferenceStore.getString(MavenConstants.MAVEN_GOAL2); - cmdLine.add(mavenGoal1); //TODO only this changed - - //workingPath = (new File(filePath)).getParentFile(); - //setWorkingDirectoryDefault(filePath); - workingDirectoryDefault = (new File(filePath)).getParentFile(); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationTabGroup.java deleted file mode 100644 index c6c0d7bf..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal2; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationType.java deleted file mode 100644 index a95bca7d..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal2; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchShortcut.java deleted file mode 100644 index c7e256e5..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/goal2/LaunchShortcut.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.maven.launch.goal2; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * Using "Run As" --> "mvn tomcat6:start Maven start" will lead here
    - * http://tomcat.apache.org/maven-plugin-2.2/context-goals.html - **/ -public class LaunchShortcut extends org.nodeclipse.enide.maven.launchexec.LaunchShortcut implements ILaunchShortcut { - - @Override - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_GOAL2_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationDelegate.java deleted file mode 100644 index cec86a19..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.nodeclipse.enide.maven.launch.jetty; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * mvn -Djetty.port=9999 jetty:run
    - * - * @since 0.11 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.maven.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - - StringBuilder cmdLineSb = new StringBuilder(200); - - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); -// if(!mavenOptions.equals("")) { -// String[] sa = mavenOptions.split(" "); -// for(String s : sa) { -// cmdLine.add(s); -// } -// } - cmdLineSb.append(mavenOptions); - - String file = configuration.getAttribute(MavenConstants.KEY_FILE_PATH, ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path -// cmdLine.add("-f"); // -f,--file Force the use of an alternate POM -// cmdLine.add(filePath); - cmdLineSb.append(" -f ").append(filePath); - - int jettyPort = preferenceStore.getInt(MavenConstants.MAVEN_OPTION_JETTY_PORT); - if (jettyPort!=0){ - //cmdLine.add("-Djetty.port="+jettyPort); - cmdLineSb.append(" -Djetty.port=").append(filePath); - } - - //cmdLine.add("jetty:run"); - cmdLineSb.append(" jetty:run"); - - cmdLine.add(cmdLineSb.toString()); - - //workingPath = (new File(filePath)).getParentFile(); - //setWorkingDirectoryDefault(filePath); - workingDirectoryDefault = (new File(filePath)).getParentFile(); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationTabGroup.java deleted file mode 100644 index 33930dd2..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.launch.jetty; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationType.java deleted file mode 100644 index 0084674a..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launch.jetty; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchShortcut.java deleted file mode 100644 index 86074eaa..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/LaunchShortcut.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.maven.launch.jetty; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * Using "Run As" --> "mvn tomcat6:start Maven start" will lead here
    - * http://tomcat.apache.org/maven-plugin-2.2/context-goals.html - **/ -public class LaunchShortcut extends org.nodeclipse.enide.maven.launchexec.LaunchShortcut implements ILaunchShortcut { - - @Override - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_JETTY_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/package-info.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/package-info.java deleted file mode 100644 index 358de7f0..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/jetty/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** -http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html - * @author pverest - * - */ -package org.nodeclipse.enide.maven.launch.jetty; \ No newline at end of file diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationDelegate.java deleted file mode 100644 index 0e7b5602..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.nodeclipse.enide.maven.launch.tomcat; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * mvn tomcat6:start
    - * - * @since 0.11 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.maven.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); - if(!mavenOptions.equals("")) { - String[] sa = mavenOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - String file = configuration.getAttribute(MavenConstants.KEY_FILE_PATH, ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add("-f"); // -f,--file Force the use of an alternate POM - cmdLine.add(filePath); - cmdLine.add("tomcat6:start"); //TODO only this changed - - //workingPath = (new File(filePath)).getParentFile(); - //setWorkingDirectoryDefault(filePath); - workingDirectoryDefault = (new File(filePath)).getParentFile(); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationTabGroup.java deleted file mode 100644 index 76185f5c..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.launch.tomcat; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationType.java deleted file mode 100644 index fe6f1bc9..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launch.tomcat; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchShortcut.java deleted file mode 100644 index c0eabce5..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/LaunchShortcut.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.maven.launch.tomcat; - -import org.eclipse.debug.ui.ILaunchShortcut; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * Using "Run As" --> "mvn tomcat6:start Maven start" will lead here
    - * http://tomcat.apache.org/maven-plugin-2.2/context-goals.html - **/ -public class LaunchShortcut extends org.nodeclipse.enide.maven.launchexec.LaunchShortcut implements ILaunchShortcut { - - @Override - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_TOMCAT_CONFIGURATION_TYPE_ID; - } - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/package-info.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/package-info.java deleted file mode 100644 index dd19fbbb..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launch/tomcat/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** -http://tomcat.apache.org/maven-plugin.html - * @author pverest - * - */ -package org.nodeclipse.enide.maven.launch.tomcat; \ No newline at end of file diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationDelegate.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationDelegate.java deleted file mode 100644 index 742a4d71..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.nodeclipse.enide.maven.launchexec; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.preferences.MavenConstants; - -/** - * mvn compile exec:java -Dexec.mainClass=example.Example - * *.java mvn exec
    - * see LaunchConfigurationDelegate in .debug and .phantomjs, .jjs module for comparison. - * - * @since 0.10 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - extends org.nodeclipse.enide.maven.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - @Override // compile exec:java -Dexec.mainClass=package.Class - protected void specialOptions(ILaunchConfiguration configuration, - IPreferenceStore preferenceStore, List cmdLine) throws CoreException { - - String mavenOptions= preferenceStore.getString(MavenConstants.MAVEN_OPTIONS); - - //mvn compile exec:java -Dexec.mainClass=example.Example - // WARNING passing all parameters one-by-one fails on Windows - // for what I saw in JDK source Windows magic =variables - // i.e. can't pass '=' this way - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(file); - IProject project = res.getProject(); - IPath relPath = res.getProjectRelativePath(); // =src/main/java/maven/MainClass.java - String packageClass = ""+relPath; - // remove maven source folder - if (packageClass.startsWith("src/main/java/")){ - packageClass = packageClass.substring("src/main/java/".length()); - } else if (packageClass.startsWith("src/")){ - packageClass = packageClass.substring("src/".length()); - } - // cut .java - packageClass = packageClass.substring(0, packageClass.lastIndexOf('.')); - packageClass = packageClass.replace('/', '.'); -// cmdLine.add("-Dexec.mainClass="+packageClass ); - - // as one string - //cmdLine.add(mavenPath+" "+mavenOptions+" compile exec:java -Dexec.mainClass="+packageClass); - - cmdLine.add(mavenOptions+" compile exec:java -Dexec.mainClass="+packageClass); - - //workingPath = new File(project.getLocation().toOSString()); - //setWorkingDirectoryDefault(project.getLocation().toOSString()); - workingDirectoryDefault = new File(project.getLocation().toOSString()); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationTabGroup.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationTabGroup.java deleted file mode 100644 index f4ebedb6..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.launchexec; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -//import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), -// new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationType.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationType.java deleted file mode 100644 index c3e7f676..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.enide.maven.launchexec; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchShortcut.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchShortcut.java deleted file mode 100644 index 66d70742..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/launchexec/LaunchShortcut.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.nodeclipse.enide.maven.launchexec; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.enide.maven.preferences.MavenConstants; -import org.nodeclipse.enide.maven.util.NodeclipseLogger; -//import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "mvn compile exec:java Maven execution" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - protected String getLaunchConfigurationTypeConstant() { - return MavenConstants.LAUNCH_EXEC_CONFIGURATION_TYPE_ID; - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - }else if (selection instanceof TreeSelection) { // selectObj instanceof org.eclipse.jface.viewers.TreeSelection - // see http://stackoverflow.com/questions/775709/eclipse-pde-navigator-view-treeselection-obtaining-the-file-type-and-name - TreeSelection treeSelection = (TreeSelection) selection; - IAdaptable firstElement = (IAdaptable) treeSelection.getFirstElement(); - - IFile file = (IFile) firstElement.getAdapter(IFile.class); - if (file != null && file.isAccessible()) { - launchFile(file, mode); - }else{ - NodeclipseLogger.log("Impossible to get File for selection: "+selection+"\n"); - } - } else { - showDialogNotImplemented(selection.getClass().getName()); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - private void showDialogNotImplemented(String what) { - //TODO CommonDialog "Not Implemented" - MessageDialog.openWarning(null, "Warning", - "Launching of type "+what+" is not implemeneted yet!\n"+ - "Search/raise an issue if you care at https://github.com/nodeclipse/nodeclipse-1/issues/"); - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - showDialogNotImplemented(editor.getClass().getName()+" from Editor"); - } - } catch (CoreException e) { - //NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - NodeclipseLogger.log(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(getLaunchConfigurationTypeConstant()); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - //NodeclipseConsole.write(this.getClass().getName()+"\n"); - NodeclipseLogger.log(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenConstants.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenConstants.java deleted file mode 100644 index f091b9cd..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenConstants.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.nodeclipse.enide.maven.preferences; - -public class MavenConstants { - - public static final String PLUGIN_ID = "org.nodeclipse.enide.maven"; - public static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launch.LaunchConfigurationType"; - public static final String LAUNCH_GOAL1_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launch.goal1.LaunchConfigurationType"; - public static final String LAUNCH_GOAL2_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launch.goal2.LaunchConfigurationType"; - public static final String LAUNCH_EXEC_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launchexec.LaunchConfigurationType"; - public static final String LAUNCH_JETTY_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launch.jetty.LaunchConfigurationType"; - public static final String LAUNCH_TOMCAT_CONFIGURATION_TYPE_ID = "org.nodeclipse.enide.maven.launch.tomcat.LaunchConfigurationType"; - - public static final String PROCESS_MESSAGE = "Maven Process"; - - //+ - public static final String ATTR_PROGRAM_ARGUMENTS = "attr_program_arguments"; - public static final String ATTR_MAVEN_ARGUMENTS = "attr_maven_arguments"; - public static final String ATTR_WORKING_DIRECTORY = "attr_working_directory"; - - public static final String ATTR_ENVIRONMENT_VARIABLES = "attr_environment_variables"; - public static final String ATTR_APPEND_ENVIRONMENT_VARIABLES = "attr_append_environment_variables"; - - public static final String MAVEN_HOME = "maven_home"; - public static final String MAVEN_HOME_TO_USE = "maven_home_to_use"; - public static final String MAVEN_JAVA_HOME_TO_USE = "java_home_to_use"; - public static final String MAVEN_PATH = "maven_path"; //@deprecated - public static final String MAVEN_OPTS = "maven_opts"; - public static final String MAVEN_OPTIONS = "maven_options"; - public static final String MAVEN_GOAL1 = "maven_goal1"; - public static final String MAVEN_GOAL2 = "maven_goal2"; - public static final String MAVEN_OPTION_SHOW_VERSION = "maven_option_show_version"; - public static final String MAVEN_OPTION_DEBUG = "maven_option_debug"; - public static final String MAVEN_OPTION_QUIET = "maven_option_quite"; - public static final String MAVEN_OPTION_FORCED_DEPENDENCIES_UPDATE = "maven_option_forced_dependencies_update"; - public static final String MAVEN_OPTION_OFFLINE = "maven_option_offline"; - public static final String MAVEN_OPTION_TEST_SKIP = "maven_option_test_skip"; - public static final String MAVEN_OPTION_ALTERNATIVE_SETTINGS = "maven_option_alternative_settings"; - public static final String MAVEN_OPTION_JETTY_PORT = "maven_option_jetty_port"; - public static final String PASS_ALL_ENVIRONMENT_VARIABLES = "pass_all_environment_variables"; - - public static final String PREFERENCES_PAGE = "org.nodeclipse.enide.maven.preferences.MavenPreferencePage"; - public static final String PREFERENCE_PAGE_NAME ="Maven(Enide)"; // the same as in plugin.xml - public static final String KEY_FILE_PATH = "KEY_FILE_PATH"; -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferenceInitializer.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferenceInitializer.java deleted file mode 100644 index 664bb93c..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferenceInitializer.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.enide.maven.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.enide.maven.Activator; - -public class MavenPreferenceInitializer extends AbstractPreferenceInitializer { - - @Override - public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - String envMavenHome = System.getenv("MAVEN_HOME"); - if (envMavenHome!=null){ - store.setDefault(MavenConstants.MAVEN_HOME, envMavenHome ); - store.setDefault(MavenConstants.MAVEN_HOME_TO_USE, envMavenHome ); - } - String envMavenOpts = System.getenv("MAVEN_OPTS"); - if (envMavenOpts!=null) - store.setDefault(MavenConstants.MAVEN_OPTS, envMavenOpts ); - //store.setDefault(MavenConstants.MAVEN_OPTION_JETTY_PORT, "8080" ); - - store.setDefault(MavenConstants.MAVEN_GOAL1, "verify" ); - store.setDefault(MavenConstants.MAVEN_GOAL2, "install" ); - } - -} - diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferencePage.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferencePage.java deleted file mode 100644 index 222d103b..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/preferences/MavenPreferencePage.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.nodeclipse.enide.maven.preferences; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.widgets.Link; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.nodeclipse.enide.maven.Activator; - -/** - * @author Paul Verest - */ -public class MavenPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - boolean isWindows = Platform.getOS().startsWith("win"); - - private DirectoryFieldEditor mavenHome; - private DirectoryFieldEditor mavenHomeToUse; - private DirectoryFieldEditor javaHomeToUse; - private StringFieldEditor mavenJvmOpts; - //private FileFieldEditor mavenPath; - - private StringFieldEditor mavenOptions; - private StringFieldEditor mavenGoal1; - private StringFieldEditor mavenGoal2; - private BooleanFieldEditor mavenOptionShowVersion; - private BooleanFieldEditor mavenOptionDebug; - private BooleanFieldEditor mavenOptionQuiet; - private BooleanFieldEditor mavenOptionOffline; - private BooleanFieldEditor mavenOptionForcedDependenciesUpdate; - private BooleanFieldEditor mavenOptionTestSkip; - private FileFieldEditor mavenOptionAlternativeSettings; - private StringFieldEditor mavenOptionJettyPort; - private BooleanFieldEditor passAllEnvVars; - - public MavenPreferencePage() { - super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setImageDescriptor(Activator.getImageDescriptor("icons/feather-ma16.png")); - setDescription( -// VersionUtil.getLongString()+ //TODO make plugin to collect Eclipse utils -// "\n"+ - "Maven requires to set JAVA_HOME (that Eclipse does not use) and MAVEN_HOME environment variable to use from shell.\n" - +"MAVEN_HOME is to be folder where you extracted downloaded Maven distribution," - +" e.g. D:\\Progs\\Maven\\apache-maven-3.2.1\n" - +"Then it is easy to add mvn to Path like following string \"%JAVA_HOME%\\bin;%MAVEN_HOME%\\bin;\"." - ); - } - @Override - public void init(IWorkbench workbench) { - } - - private void addLinkWidget(String text, final String urlString){ - // http://stackoverflow.com/questions/22424993/eclipse-plugin-dev-how-to-add-hyperlink-on-fieldeditorpreferencepage - Link link = new Link(getFieldEditorParent(), SWT.NONE); - link.setText(text); - link.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(final SelectionEvent event) { - try { - URL url = new URL(urlString); - try { - PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(url ); - } catch (PartInitException e) { - } - } catch (MalformedURLException e) { - } - } - }); - } - - @Override - protected void createFieldEditors() { - addLinkWidget("Visit Nodeclipse maven project page", "http://www.nodeclipse.org/projects/maven/"); - addLinkWidget(" and maven.apache.org for news and docs.", "http://maven.apache.org/"); - addLinkWidget("GitHub", "https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.maven"); - - mavenHome = new DirectoryFieldEditor(MavenConstants.MAVEN_HOME, "Maven home directory:", getFieldEditorParent()); - mavenHome.setEnabled(false, getFieldEditorParent()); - addField(mavenHome); - //TODO show maven version in this Preference Page - mavenHomeToUse = new DirectoryFieldEditor(MavenConstants.MAVEN_HOME_TO_USE, "Maven home to use:", getFieldEditorParent()); - addField(mavenHomeToUse); - javaHomeToUse = new DirectoryFieldEditor(MavenConstants.MAVEN_JAVA_HOME_TO_USE, "alternative JAVA_HOME to use:", getFieldEditorParent()); - addField(javaHomeToUse); - mavenJvmOpts = new StringFieldEditor(MavenConstants.MAVEN_OPTS, "JVM options MAVEN_OPTS:", getFieldEditorParent()); - addField(mavenJvmOpts); - - mavenOptions = new StringFieldEditor(MavenConstants.MAVEN_OPTIONS, "Maven options (mvn -h):", getFieldEditorParent()); - addField(mavenOptions); - /* - mavenGoal1 = new StringFieldEditor(MavenConstants.MAVEN_GOAL1, "Maven goal1:", getFieldEditorParent()); - addField(mavenGoal1); - mavenGoal2 = new StringFieldEditor(MavenConstants.MAVEN_GOAL2, "Maven goal2:", getFieldEditorParent()); - addField(mavenGoal2); - */ - mavenOptionShowVersion = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_SHOW_VERSION,"-V, --show-version Display version information without stopping build", getFieldEditorParent()); - addField(mavenOptionShowVersion); - mavenOptionDebug = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_DEBUG,"-X Debug (Produce execution debug output)", getFieldEditorParent()); - addField(mavenOptionDebug); - mavenOptionQuiet = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_QUIET,"-q Quiet (Quiet output - only show errors)", getFieldEditorParent()); - addField(mavenOptionQuiet); - mavenOptionForcedDependenciesUpdate = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_FORCED_DEPENDENCIES_UPDATE, "-U Forces a check for updated releases and snapshots on remote repositories", getFieldEditorParent()); - addField(mavenOptionForcedDependenciesUpdate); - mavenOptionOffline = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_OFFLINE, "-o Offline (Work offline)", getFieldEditorParent()); - addField(mavenOptionOffline); - mavenOptionTestSkip = new BooleanFieldEditor(MavenConstants.MAVEN_OPTION_TEST_SKIP,"-Dmaven.test.skip=true (skip unit testing)", getFieldEditorParent()); - if (isWindows) mavenOptionTestSkip.setEnabled(false, getFieldEditorParent()); - addField(mavenOptionTestSkip); - - mavenOptionAlternativeSettings = new FileFieldEditor(MavenConstants.MAVEN_OPTION_ALTERNATIVE_SETTINGS, "-s Alternative settings.xml:", getFieldEditorParent()); - addField(mavenOptionAlternativeSettings); - - mavenOptionJettyPort = new StringFieldEditor(MavenConstants.MAVEN_OPTION_JETTY_PORT, "-Djetty.port=", getFieldEditorParent()); - addField(mavenOptionJettyPort); - - passAllEnvVars = new BooleanFieldEditor(MavenConstants.PASS_ALL_ENVIRONMENT_VARIABLES, - "pass all environment variables of Eclipse to launched app", getFieldEditorParent()); - addField(passAllEnvVars); - } - - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/NodeclipseLogger.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/NodeclipseLogger.java deleted file mode 100644 index fdd96120..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/NodeclipseLogger.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.nodeclipse.enide.maven.util; - -import org.nodeclipse.common.ui.CommonConsole; - -/** - * Allow to use any logger - * @author pverest - * @since 0.10 - */ -public class NodeclipseLogger { - - public static void log(String message){ - System.out.print(message); - CommonConsole.write(message); - } - -} diff --git a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/VariablesUtil.java b/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/VariablesUtil.java deleted file mode 100644 index 834e31fc..00000000 --- a/org.nodeclipse.enide.maven/src/org/nodeclipse/enide/maven/util/VariablesUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.nodeclipse.enide.maven.util; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.variables.IStringVariableManager; -import org.eclipse.core.variables.VariablesPlugin; - -/** - * copied from org.nodeclipse.debug.util.VariablesUtil - */ -public class VariablesUtil { - public static String resolveValue(String expression) throws CoreException { - String expanded= null; - try { - expanded= getValue(expression); - } catch (CoreException e) { //possibly just a variable that needs to be resolved at runtime - validateVaribles(expression); - return null; - } - return expanded; - } - - /** - * Validates the value of the given string to determine if any/all variables are valid - * - * @param expression expression with variables - * @return whether the expression contained any variable values - * @exception CoreException if variable resolution fails - */ - private static String getValue(String expression) throws CoreException { - IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); - return manager.performStringSubstitution(expression); - } - - /** - * Validates the variables of the given string to determine if all variables are valid - * - * @param expression expression with variables - * @exception CoreException if a variable is specified that does not exist - */ - private static void validateVaribles(String expression) throws CoreException { - IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); - manager.validateStringVariables(expression); - } -} diff --git a/org.nodeclipse.help/.classpath b/org.nodeclipse.help/.classpath deleted file mode 100644 index ad32c83a..00000000 --- a/org.nodeclipse.help/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.help/.gitignore b/org.nodeclipse.help/.gitignore deleted file mode 100644 index 610d7ed3..00000000 --- a/org.nodeclipse.help/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin -/.*.md.html -/.settings diff --git a/org.nodeclipse.help/.project b/org.nodeclipse.help/.project deleted file mode 100644 index 3272e508..00000000 --- a/org.nodeclipse.help/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.nodeclipse.help - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - no.javatime.inplace.JavaTimeBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - no.javatime.inplace.builder.javatimenature - - diff --git a/org.nodeclipse.help/HelpToc.xml b/org.nodeclipse.help/HelpToc.xml deleted file mode 100644 index dfa8e0cf..00000000 --- a/org.nodeclipse.help/HelpToc.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.help/LinkedToc.xml b/org.nodeclipse.help/LinkedToc.xml deleted file mode 100644 index 1f661a6c..00000000 --- a/org.nodeclipse.help/LinkedToc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.nodeclipse.help/META-INF/MANIFEST.MF b/org.nodeclipse.help/META-INF/MANIFEST.MF deleted file mode 100644 index 40c035b9..00000000 --- a/org.nodeclipse.help/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse Help -Bundle-SymbolicName: org.nodeclipse.help;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.help.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/org.nodeclipse.help/README.md b/org.nodeclipse.help/README.md deleted file mode 100644 index 999a08a1..00000000 --- a/org.nodeclipse.help/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Nodeclipse Help plugin - -This is Eclipse plugin created by wizard. - -Online help is set of .md files at - -Content is to be authored in Markdown, then converted to HTML. - -Online help URL - -- [v] TODO convert to Tycho build. - -## Developing - -get Nodeclipse NTS or SDK, or get all [plugins](http://www.nodeclipse.org/updates/list) - -http://javatime.no/blog/inplace-activator-overview/ -Works great in first time, then cann't refresh -> Use 'Launch Eclipse application' link from plugin.xml Overview tab. - -using Markdown ->HTML conversion - -Ideas for tool: -- marked - quick but command line util is dumb -- https://github.com/aponxi/grunt-readme-generator - -Finally using GFM View - -### Problems - -Adding links to real site sometime/ after a while causes Eclipse to crash silently. - - - - - -### Q - -Can Eclipse Help show .js file? - diff --git a/org.nodeclipse.help/build.properties b/org.nodeclipse.help/build.properties deleted file mode 100644 index 5bc99690..00000000 --- a/org.nodeclipse.help/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - html/,\ - *.xml,\ - contents/ diff --git a/org.nodeclipse.help/contents/.FAQ.md.html b/org.nodeclipse.help/contents/.FAQ.md.html deleted file mode 100644 index 10170a6b..00000000 --- a/org.nodeclipse.help/contents/.FAQ.md.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.FAQ.md.html - - - - - - - - - - -
    -

    layout: community

    -

    title: Nodeclipse - Community - Q & A

    -

    FAQ

    -
    -

    Q: How to install nodeclipse in myeclipse2013? I have no eclipse.

    -
    -

    If you don't have Eclipse and you use Windows, you can download Nodeclipse NTS or Enide Studio. (quick link https://sourceforge.net/projects/nodeclipse/files/)

    -

    Otherwise follow instructions on http://www.nodeclipse.org/updates/

    -

    Check also https://github.com/Nodeclipse/eclipse-node-ide/blob/master/Hints.md#hints

    -
    -

    Q: Is there a way to create a nodeclipse project from an existing project (e.g. clone a github nodejs project, and get all the nodeclipse functionality when I work on it).

    -
    -
      -
    1. Select [File]-[New]-[Node Project] to open New Node Project Wizard.
    2. -
    3. Enter [Project name] and uncheck [Use default location] checkbox.
    4. -
    5. Select location of existing project into [Location].
    6. -
    7. Press [Finish] button.
    8. -
    -

    Then the existing project will appear in Project Explorer.

    -
    -

    Q: How to add a new dependency while working with Nodeclipse

    -
    -
      -
    1. Double-click package.json on the Package Explorer to open it.
    2. -
    3. Add into dependencies section what you want to install, and save it.
    4. -
    -
    -
      "dependencies": {
    -    "beloved-module": "1.1.0",
    -    "awesome-module": "*"
    -  }
    -
    -
    -
      -
    1. Select package.json on the Package Explorer, open context menu by right-clicking, and select [Run As]-[npm install] menu.
    2. -
    -

    or from Terminal npm install beloved-module --save

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.coffeescript.md.html b/org.nodeclipse.help/contents/.coffeescript.md.html deleted file mode 100644 index ac2046c9..00000000 --- a/org.nodeclipse.help/contents/.coffeescript.md.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.coffeescript.md.html - - - - - - - - - - -

    Hello world server in CoffeeScript

    -
    -
    http = require 'http'
    -
    -http.createServer (req, res) ->
    -  res.writeHead 200, {'Content-Type': 'text/plain'}
    -  res.end 'Hello World\n'
    -.listen 1337, '127.0.0.1'
    -
    -console.log 'Server running at http://127.0.0.1:1337/'
    -
    -
    -

    Running/debugging

    -

    Nodeclipse since version 0.6 allows to run and debug .coffee file directly. Node.js command line tool 'coffee' is used. Note that when debugging, source map are not implemeted, and execution start from this coffee tool that compiles your module. Stay in Node perspective until compilation to see your modules appear in V8 virtual project. Then open those files and set breakpoints.

    -

    coffee Util

    -
    $coffee --help
    -
    -Usage: coffee [options] path/to/script.coffee -- [args]
    -
    -If called without options, `coffee` will run your script.
    -
    -  -b, --bare         compile without a top-level function wrapper
    -  -c, --compile      compile to JavaScript and save as .js files
    -  -e, --eval         pass a string from the command line as input
    -  -h, --help         display this help message
    -  -i, --interactive  run an interactive CoffeeScript REPL
    -  -j, --join         concatenate the source CoffeeScript before compiling
    -  -m, --map          generate source map and save as .map files
    -  -n, --nodes        print out the parse tree that the parser produces
    -      --nodejs       pass options directly to the "node" binary
    -  -o, --output       set the output directory for compiled JavaScript
    -  -p, --print        print out the compiled JavaScript
    -  -s, --stdio        listen for and compile scripts over stdio
    -  -l, --literate     treat stdio as literate style coffee-script
    -  -t, --tokens       print out the tokens that the lexer/rewriter produce
    -  -v, --version      display the version number
    -  -w, --watch        watch scripts for changes and rerun commands 
    -
    -

    Run coffee -c -w . from project root to compile every time you save .coffee file.

    -

    It is very convenient to have this command running in Eclipse integrated Terminal.

    -

    CoffeeSctipt Editor

    -

    CoffeeSctipt Editor 0.3.0 (as version show) is in early stage, and looking for contributors familiar with XTend or just brave enough to dive into code.

    -

    Included in Enide since 0.4.20

    -

    It has XText dependency, that can usually be automatically resolved by Eclipse (that was downloaded from eclipse.org)

    -

    for other Eclipse distributions use CoffeeScript Editor quick installer or install prior from http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.configuration.md.html b/org.nodeclipse.help/contents/.configuration.md.html deleted file mode 100644 index e38b475d..00000000 --- a/org.nodeclipse.help/contents/.configuration.md.html +++ /dev/null @@ -1,492 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.configuration.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - Configuration

    -

    Configuration

    -

    Some recommended configuration (These steps are needed for every new workspace):

    -

    Goto Window->Preferences

    -

    General select Show heap status
    General->Workspace -> Text file encoding select other UTF-8
    (if Eclipse 4.x Chrome Theme installed (Optional, recommended) )
    General->Appearance ->Theme select Jeeeyul's themes - Chrome Theme, restart Eclipse
    Team -> Git -> History : Check "Follow renames"

    -

    Switch to Node perspective (e.g. Window -> Open Perspective -> Other ... -> Node)

    -

    In Project Explorer press small triangle to open View Menu and select Customize View... Then on Filter tab deselect .* resources

    -

    REST Client Tool is also nice to use in Debug perspective.

    -

    Window -> Show View -> Other... -> REST Client -> REST Client Tool
    or Ctrl+3 type rest

    -

    Optional general Eclipse configuration

    -

    General -> Workspace -> Refresh on access General -> Workspace -> Refresh using native hooks or polling (so that you don't need to press F5 after npm install or other changes on file system) General -> Workspace -> Text file encoding - select UTF-8

    -

    General -> Editors -> Text Editors -> Show print margin, 120

    -

    General -> Editors -> Text Editors -> Show whitespace characters (just remeber where is this setting)

    -

    Take a time to explore other Eclipse setting, you may be rewarded with findings.

    -

    Nodeclipse Preferences

    -

    Check preferences ( Window -> Preferences ) for Node.js, PhantomJS, MongoDB and Nashorn related settings.

    -

    In previous versions

    -

    Before 0.6

    -

    Window -> Show View -> Other... -> GFM Support -> GFM View
    (Very useful when exploring node_modules folders)

    -

    File associations

    -

    Window -> Preferences -> General -> Editors -> File Associations Add...

    -
      -
    • *.jade - associate with Scrapbook (from JDT)
    • -
    • *.ejs - associate with HTML Editor (from WebTools, Aptana, etc) or better with Amateras HTML Editor (check on Nodeclipse Plugin List)
    • -
    -

    NTS Only

    -

    Window -> Show View -> Other... -> MiniMap -> MiniMap

    -

    Before 0.4

    -

    Window -> Show View -> Other... -> Markdown -> Markdown HTML Preview
    (Very useful when exploring node_modules folders)

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.debug.md.html b/org.nodeclipse.help/contents/.debug.md.html deleted file mode 100644 index a0159075..00000000 --- a/org.nodeclipse.help/contents/.debug.md.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.debug.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - Debug

    -

    Debugging

    -

    Right-click .js file with Node.js app and select "Debug As -> Node Application" (similar to Java applications).

    -

    Notice that Nodeclipse by default enters step-by-step debugging mode from very first line. Press F8 to continue until breakpoint is reached.

    -

    Press F11 to launch debug [again].

    -

    Debugging issues

    -

    see also Run page.

    -

    debug-brk option

    -

    By default Nodeclipse stops on the first line when debugging. The cause is that V8 remote debugger needs some time (~100ms) to connect to Node.js and get actual modules loaded in V8.

    -

    Since Nodeclipse 0.6 there is option "Node debug no -break:" in Preferences to disable interruption at first line. It is good when your application is web server and you don't need to debug initialization lines, but mostly request handlers.

    -

    From Node wiki

    -
    -

    There are 2 debug related node options:

    -

    node --debug[=port] NodeApp.js

    -

    node --debug-brk[=port] NodeApp.js

    -

    The --debug option will just enable remote debugger connection on given port and then start the application normally. Even when debugger is connected to the running node instance later on, the script execution will not be stopped until “Suspend” command is issued by Eclipse debugger. Another way to stop the execution is to browse the source code of the JavaScript modules comprising the application and double click on the line number at the desired position in script to break at (most likely a callback). Once execution stops you can set/clear more breakpoints, but also inspect call stack and view content of all program variables.

    -

    The --debug-brk option is needed when your script is short lived (no time to attach debugger) and/or you want to observe the NodeApp.js execution from the very start. This option will force execution to break at the first line of the main script and wait for debugger to connect. The behavior upon connection is now different – the script is suspended and no breakpoints are set. Note that V8 engine debugger is not behaving very good when it steps over or steps into require() method (it will crash), so try to set up first breakpoint past the initial module loading. This will also enable you to set breakpoints in any of those modules as well.

    -
    -

    That is, when --debug is used, than small apps and the beginning of an application are unable to debug. You will get "Failed to connect to Standalone V8 VM" error, when the app has already finished.

    -

    Connection-to-V8-timed-out.png

    -

    "Failed to connect to Standalone V8 VM"

    -

    There were other reasons reported, when getting "Failed to connect to Standalone V8 VM" error. Check http://www.nodeclipse.org/#support

    -

    Sources

    -

    Check LaunchConfigurationDelegate.java for launching Node.js logic.

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.express.md.html b/org.nodeclipse.help/contents/.express.md.html deleted file mode 100644 index 30556aa8..00000000 --- a/org.nodeclipse.help/contents/.express.md.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.express.md.html - - - - - - - - - - -
    
    -    $ express -h
    -
    -  Usage: express [options]
    -
    -  Options:
    -
    -    -h, --help          output usage information
    -    -V, --version       output the version number
    -    -s, --sessions      add session support
    -    -e, --ejs           add ejs engine support (defaults to jade)
    -    -J, --jshtml        add jshtml engine support (defaults to jade)
    -    -H, --hogan         add hogan.js engine support
    -    -c, --css   add stylesheet  support (less|stylus) (defaults to plain css)
    -    -f, --force         force on non-empty directory
    -
    - - diff --git a/org.nodeclipse.help/contents/.external-tools.md.html b/org.nodeclipse.help/contents/.external-tools.md.html deleted file mode 100644 index 00e51381..00000000 --- a/org.nodeclipse.help/contents/.external-tools.md.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.external-tools.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - External Tools

    -

    External Tools

    -

    add External Tool Configuration

    -

    -

    via Run menu or External Tools icon

    -

    -

    Launched programs are visible in Debug View.

    -

    -

    Hints.

    -
      -
    1. On Windows your cmd path likely is C:\WINDOWS\system32\cmd.exe
    2. -
    3. Git for Windows comes with great bash shell. On Windows by default path is like C:\Program Files (x86)\Git\bin\sh.exe, add --login -i to Arguments.
    4. -
    -

    -
    
    ->"C:\Program Files (x86)\Git\bin\sh.exe" --help
    -GNU bash, version 3.1.0(1)-release-(i686-pc-msys)
    -Usage:  "C:/Program Files (x86)/Git/bin/sh.exe" [GNU long option] [option] ...
    -        "C:/Program Files (x86)/Git/bin/sh.exe" [GNU long option] [option] script-file ...
    -GNU long options:
    -        --debug
    -        --debugger
    -        --dump-po-strings
    -        --dump-strings
    -        --help
    -        --init-file
    -        --login
    -        --noediting
    -        --noprofile
    -        --norc
    -        --posix
    -        --protected
    -        --rcfile
    -        --restricted
    -        --verbose
    -        --version
    -        --wordexp
    -Shell options:
    -        -irsD or -c command or -O shopt_option          (invocation only)
    -        -abefhkmnptuvxBCHP or -o option
    -Type `"C:/Program Files (x86)/Git/bin/sh.exe" -c "help set"' for more information about shell options.
    -Type `"C:/Program Files (x86)/Git/bin/sh.exe" -c help' for more information about shell builtin commands.
    -Use the `bashbug' command to report bugs.
    -
    - - diff --git a/org.nodeclipse.help/contents/.github-flavored-markdown.md.html b/org.nodeclipse.help/contents/.github-flavored-markdown.md.html deleted file mode 100644 index fda15c30..00000000 --- a/org.nodeclipse.help/contents/.github-flavored-markdown.md.html +++ /dev/null @@ -1,466 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.github-flavored-markdown.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - GFM

    -

    Github Flavored Markdown (GFM)

    -

    Github Flavored Markdown (GFM) is extension of Markdown by GitHub.

    -
    -

    GitHub uses what we're calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality.

    -

    If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent Markdown Syntax Guide at Daring Fireball. Note that markup that's not covered by GFM can't be supplanted with HTML.

    -
    -

    Continue at https://help.github.com/articles/github-flavored-markdown .

    -

    GFM Viewer plugin

    -

    For GFM Viewer check https://github.com/satyagraha/gfm_viewer. It also has its own Help.

    -

    You can open it any time from Windows -> Show View -> GFM View

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.import.md.html b/org.nodeclipse.help/contents/.import.md.html deleted file mode 100644 index 8042b91f..00000000 --- a/org.nodeclipse.help/contents/.import.md.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.import.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - Import

    -

    Import

    -

    _1. Add .project file (3 option a,b,c,d)

    -

    a. (via shell) run nodeclipse -p from project root. It will add .project file and some configuration files.

    -

    b. (GUI) You can just select File -> New -> Node.js Project. It will add only new .project file. And you have your project opened in Eclipse / Enide Studio.

    -

    c. create new project and learn what files there are.

    -

    d. (manualy, minimal) add file .project into your project root with following content (change name):

    -
    -
    <?xml version="1.0" encoding="UTF-8"?>
    -<projectDescription>
    -    <name>MyNodeProject1</name>
    -    <comment></comment>
    -    <projects>
    -    </projects>
    -    <buildSpec>
    -        <buildCommand>
    -            <name>com.eclipsesource.jshint.ui.builder</name>
    -            <arguments>
    -            </arguments>
    -        </buildCommand>
    -    </buildSpec>
    -    <natures>
    -        <nature>org.nodeclipse.ui.NodeNature</nature>
    -        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    -    </natures>
    -</projectDescription>
    -
    -
    -

    Now your project is Eclipse project :)

    -

    _2. Import via standard File -> Import -> General -> Existing Projects into Workspace and select folder where the project is located.

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.index.md.html b/org.nodeclipse.help/contents/.index.md.html deleted file mode 100644 index 7928f9db..00000000 --- a/org.nodeclipse.help/contents/.index.md.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.index.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help

    -

    Nodeclipse Help

    -

    logo

    -

    Online version is at (do open in new browser window) https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.help/contents#intro .

    -

    Nodeclipse at GitHub (Eclipse Marketplace, site)

    -

    Nodeclipse is free open-source project that grows with your contributions.

    -

    Table of Contents

    - -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.javascript.md.html b/org.nodeclipse.help/contents/.javascript.md.html deleted file mode 100644 index 73fd1aea..00000000 --- a/org.nodeclipse.help/contents/.javascript.md.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.javascript.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - JavaScript

    -

    JavaScript

    -
    -

    JavaScript (JS) is an interpreted computer programming language. It was originally implemented as part of web browsers so that client-side scripts could interact with the user, control the browser, communicate asynchronously, and alter the document content that was displayed.[5] More recently, however, it has become common in server-side programming, game development and the creation of desktop applications.

    -
    -

    Links:

    - -

    Nodeclipse JavaScript Editor

    -

    Nodeclipse JavaScript Editor is based on standard Eclipse JSDT (JavaScript Development Tools). Check JavaScript Development Guide in Help.

    -

    Hints

    - -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.markdown.md.html b/org.nodeclipse.help/contents/.markdown.md.html deleted file mode 100644 index feff6392..00000000 --- a/org.nodeclipse.help/contents/.markdown.md.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.markdown.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - Markdown

    -

    Markdown

    -

    npm Node.js Package Manager assumes that every project has file README.md. It is good practice to have this file, with minimal description of your project.

    -

    .md or .markdown are file with text in markdown format. Markdown is markup language, a superset of HTML, with focus on content authoring (not design).

    -

    Home page is http://daringfireball.net/projects/markdown/

    -

    Markdown is default on and ( see Github Flavored Markdown (GFM))

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.monitor.md.html b/org.nodeclipse.help/contents/.monitor.md.html deleted file mode 100644 index be88647f..00000000 --- a/org.nodeclipse.help/contents/.monitor.md.html +++ /dev/null @@ -1,477 +0,0 @@ - - - - -D:\workspaces\Nodeclispe-DEV\nodeclipse-1\org.nodeclipse.help\contents\.monitor.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - Run/Debug with Monitor

    -

    Run/Debug with Monitor

    -

    https://github.com/Nodeclipse/nodeclipse-1/issues/57 running app.js with node-dev, forever, supervisor, nodemon etc

    -

    Select monitor

    - -

    They all have similar command line

    -

    forever [action] [options] SCRIPT [script-options]
    nodemon [your node app]
    node-dev foo.js
    supervisor [options]

    -

    Below are some remarks about GitHub stars:

    - -

    After installing with npm install * -g, browse for CLI file

    -

    e.g. C:\Users\weibl\AppData\Roaming\npm\node_modules\forever\bin\forever

    -

    Configure path to your source file monitor in Preferences -> Nodeclipse -> Node monitor path

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.nashorn.md.html b/org.nodeclipse.help/contents/.nashorn.md.html deleted file mode 100644 index 7f19dce6..00000000 --- a/org.nodeclipse.help/contents/.nashorn.md.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.nashorn.md.html - - - - - - - - - - -

    Nashorn

    -

    Links

    -

    Main blog https://blogs.oracle.com/nashorn/ by Jim Laskey

    -

    Sources: http://hg.openjdk.java.net/nashorn/jdk8/nashorn

    - -

    Old and excited blog post: http://kaeff.net/posts/why-ruby-and-nodejs-folks-should-care-about-project-nashorn.html

    -

    If you use JavaFX inside JavaScript, you should use SDK, not just JRE.

    -

    Java 8 script utils

    -

    Java 8 goes with 2 utils: jjs for running JavaScript on Nashorn engine and jrunscript for running any script engine

    -

    jjs command line util

    -
    
    -C:\Program Files\Java\jdk1.8.0\bin>jjs.exe -v
    -
    -nashorn 1.8.0
    -
    -
    -C:\Program Files\Java\jdk1.8.0\bin>jjs.exe -h
    -
    -jjs []  [-- ]
    -        -D (-Dname=value. Set a system property. This option can be repeated.)
    -
    -        -cp, -classpath (-cp path. Specify where to find user class files.)
    -
    -        -doe, -dump-on-error (Dump a stack trace on errors.)
    -                param: [true|false]   default: false
    -
    -        -fv, -fullversion (Print full version info of Nashorn.)
    -                param: [true|false]   default: false
    -
    -        -fx (Launch script as an fx application.)
    -                param: [true|false]   default: false
    -
    -        -h, -help (Print help for command line flags.)
    -                param: [true|false]   default: false
    -
    -        -scripting (Enable scripting features.)
    -                param: [true|false]   default: false
    -
    -        -strict (Run scripts in strict mode.)
    -                param: [true|false]   default: false
    -
    -        -t, -timezone (Set timezone for script execution.)
    -                param:    default: Asia/Shanghai
    -
    -        -v, -version (Print version info of Nashorn.)
    -                param: [true|false]   default: false
    -
    -

    jrunscript command line util

    -
    
    -C:\Program Files\Java\jdk1.8.0\bin>jrunscript.exe  -h
    -Usage: jrunscript [options] [arguments...]
    -
    -where [options] include:
    -  -classpath     Specify where to find user class files
    -  -cp            Specify where to find user class files
    -  -D=     Set a system property
    -  -J             Pass  directly to the runtime system
    -  -l         Use specified scripting language
    -  -e 
    - - diff --git a/org.nodeclipse.help/contents/.node_redis.md.html b/org.nodeclipse.help/contents/.node_redis.md.html deleted file mode 100644 index 09cac399..00000000 --- a/org.nodeclipse.help/contents/.node_redis.md.html +++ /dev/null @@ -1,525 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.node_redis.md.html - - - - - - - - - - -

    Redis

    -

    Redis is an open-source, networked, in-memory, key-value data store with optional durability.

    -

    Redis as Node.js also runs single-threaded.

    -

    Some helpful commands:

    -
      -
    • SET key and GET key
    • -
    • KEYS * list all keys. Not for production environment.
    • -
    • EXISTS key
    • -
    -

    redis-cli

    -

    redis-cli doesn't allow to execte scripts only commands.

    -
    -
        C:\Program Files\Redis>redis-cli.exe -h
    -    redis-cli 2.4.6 (git:26cdd13a)
    -
    -    Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]
    -      -h <hostname>    Server hostname (default: 127.0.0.1)
    -      -p <port>        Server port (default: 6379)
    -      -s <socket>      Server socket (overrides hostname and port)
    -      -a <password>    Password to use when connecting to the server
    -      -r <repeat>      Execute specified command N times
    -      -i <interval>    When -r is used, waits <interval> seconds per command.
    -                       It is possible to specify sub-second times like -i 0.1.
    -      -n <db>          Database number
    -      -x               Read last argument from STDIN
    -      -d <delimiter>   Multi-bulk delimiter in for raw formatting (default: \n)
    -      --raw            Use raw formatting for replies (default when STDOUT is not a tty)
    -      --latency        Enter a special mode continuously sampling latency.
    -      --help           Output this help and exit
    -      --version        Output version and exit
    -
    -    Examples:
    -      cat /etc/passwd | redis-cli -x set mypasswd
    -      redis-cli get mypasswd
    -      redis-cli -r 100 lpush mylist x
    -      redis-cli -r 100 -i 1 info | grep used_memory_human:
    -
    -    When no command is given, redis-cli starts in interactive mode.
    -    Type "help" in interactive mode for information on available commands.
    -
    -
    -

    node_redis

    -

    node_redis is a node.js redis client.

    -

    Create new Node.js project, then run npm install redis --save in Terminal.

    -

    -

    Hint: drap&drop redis-cli executable into Eclipse project to create comfortable link (see above).

    -

    Example

    -
    -
        var redis = require("redis"),
    -        client = redis.createClient();
    -
    -    // if you'd like to select database 3, instead of 0 (default), call
    -    // client.select(3, function() { /* ... */ });
    -
    -    client.on("error", function (err) {
    -        console.log("Error " + err);
    -    });
    -
    -    client.set("string key", "string val", redis.print);
    -    client.hset("hash key", "hashtest 1", "some value", redis.print);
    -    client.hset(["hash key", "hashtest 2", "some other value"], redis.print);
    -    client.hkeys("hash key", function (err, replies) {
    -        console.log(replies.length + " replies:");
    -        replies.forEach(function (reply, i) {
    -            console.log("    " + i + ": " + reply);
    -        });
    -        client.quit();
    -    });
    -
    -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.nodejs.md.html b/org.nodeclipse.help/contents/.nodejs.md.html deleted file mode 100644 index aa6a9f6f..00000000 --- a/org.nodeclipse.help/contents/.nodejs.md.html +++ /dev/null @@ -1,539 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.nodejs.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - Node.js

    -

    Node.js

    -

    Of course http://nodejs.org/ .

    -

    Sources at GitHub https://github.com/joyent/node/ .

    -

    Node.js

    -
    
    -$ node -h
    -Usage: node [options] [ -e script | script.js ] [arguments]
    -       node debug script.js [arguments]
    -
    -Options:
    -  -v, --version        print node's version
    -  -e, --eval script    evaluate script
    -  -p, --print          evaluate script and print result
    -  -i, --interactive    always enter the REPL even if stdin
    -                       does not appear to be a terminal
    -  --no-deprecation     silence deprecation warnings
    -  --trace-deprecation  show stack traces on deprecations
    -  --v8-options         print v8 command line options
    -  --max-stack-size=val set max v8 stack size (bytes)
    -
    -Environment variables:
    -NODE_PATH              ';'-separated list of directories
    -                       prefixed to the module search path.
    -NODE_MODULE_CONTEXTS   Set to 1 to load modules in their own
    -                       global contexts.
    -NODE_DISABLE_COLORS    Set to 1 to disable colors in the REPL
    -
    -Documentation can be found at http://nodejs.org/
    -
    -
    
    -$ node -p "process.versions"
    -{ http_parser: '1.0',
    -  node: '0.10.0',
    -  v8: '3.14.5.8',
    -  ares: '1.9.0-DEV',
    -  uv: '0.9',
    -  zlib: '1.2.3',
    -  openssl: '1.0.1e' }
    -
    -

    Node.js instances

    -

    Nodeclipse lets you define exact location of Node.js installations, or with checkbox "just node" let OS to find node on current PATH.

    -

    Hint: if you have 2 or more Node.js instances, let the newest be on PATH and select older in "Node path:". Then by checking/unchecking "just node" you can switch to and from the newest Node.js.

    -

    Node.js sources

    -

    If you got Node.js via pre-built installer, visit http://www.nodejs.org/download/ again to get Node.js sources and extract archive to a folder. Now you also have local copy of API documentations.

    -

    Node.js sources have "Node.js Core Modules" in lib folder, that may be useful.

    -

    Add following snippet to project .project file to reference Node.js sources.

    -
    -
        <linkedResources>
    -        <link>
    -            <name>nodejs-sources-lib</name>
    -            <type>2</type>
    -            <location>E:/Enide/node-sources/node-v0.10.19/lib/</location>
    -        </link>
    -    </linkedResources>
    -
    -
    -

    (This is done automatically if Node.js sources are selected since Nodeclipse 0.9)

    -

    -

    Node.js modules

    -

    Node.js modules (in node_modules) usually have README.md file. To see README.md as it looks like on GitHub, right-click it and select Show in GFM view. Check also "Markdown" and "Github Flavored Markdown (GFM)" help pages.

    -

    Example

    -
    -
        var http = require('http');
    -    var server = http.createServer();
    -    var handleReq = function(req,res){
    -      res.writeHead(200, {});
    -      res.end('hello world');
    -    };
    -    server.on('request', handleReq);
    -    server.listen(8080);
    -
    -
    -
    -
        var fs = require('fs');
    -    fs.writeFile("/tmp/test", "Hey there!", function(err) {
    -        if(err) {
    -            console.log(err);
    -        } else {
    -            console.log("The file was saved!");
    -        }
    -    }); 
    -
    -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.phantomjs.md.html b/org.nodeclipse.help/contents/.phantomjs.md.html deleted file mode 100644 index 7fd8cc32..00000000 --- a/org.nodeclipse.help/contents/.phantomjs.md.html +++ /dev/null @@ -1,600 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.phantomjs.md.html - - - - - - - - - - -

    Title: Nodeclipse Help - Phanthom.js

    -

    PhantomJS

    -

    PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

    -

    Web page http://phantomjs.org

    -

    Sources https://github.com/ariya/phantomjs
    Examples https://github.com/ariya/phantomjs/wiki/Examples are also included into distribution.

    -

    APIs https://github.com/ariya/phantomjs/wiki/API-Reference#module-api

    -

    PhantomJS in Nodeclipse

    -

    As of v0.7 there is no special project type. (e.g. you can create Node.js project to use JSHint validation and npm to get some ComonJS moduules) Use right-click Run As -> PhantomJS Script .

    -

    -

    Module API

    -

    The Module API is modeled after CommonJS Modules is available. Up through PhantomJS 1.6, the only supported modules that were built in:

    - -

    As of PhantomJS 1.7, however, users can reference their own modules from the file system using require as well.

    -

    -

    Function: require

    -

    To support the Module API, a require function modeled after CommonJS Modules' Require is globally available. General usage:

    -
    -
    var server = require('webserver').create();
    -var Awesome = require('MyAwesomeModule');
    -Awesome.do();
    -
    -
    -

    Render Multiple URLs to file

    -
    -
    // Render Multiple URLs to file
    -
    -var RenderUrlsToFile, arrayOfUrls, system;
    -
    -system = require("system");
    -
    -/*
    -Render given urls
    -@param array of URLs to render
    -@param callbackPerUrl Function called after finishing each URL, including the last URL
    -@param callbackFinal Function called after finishing everything
    -*/
    -RenderUrlsToFile = function(urls, callbackPerUrl, callbackFinal) {
    -    var getFilename, next, page, retrieve, urlIndex, webpage;
    -    urlIndex = 0;
    -    webpage = require("webpage");
    -    page = null;
    -    getFilename = function() {
    -        return "rendermulti-" + urlIndex + ".png";
    -    };
    -    next = function(status, url, file) {
    -        page.close();
    -        callbackPerUrl(status, url, file);
    -        return retrieve();
    -    };
    -    retrieve = function() {
    -        var url;
    -        if (urls.length > 0) {
    -            url = urls.shift();
    -            urlIndex++;
    -            page = webpage.create();
    -            page.viewportSize = {
    -                width: 800,
    -                height: 600
    -            };
    -            page.settings.userAgent = "Phantom.js bot";
    -            return page.open("http://" + url, function(status) {
    -                var file;
    -                file = getFilename();
    -                if (status === "success") {
    -                    return window.setTimeout((function() {
    -                        page.render(file);
    -                        return next(status, url, file);
    -                    }), 200);
    -                } else {
    -                    return next(status, url, file);
    -                }
    -            });
    -        } else {
    -            return callbackFinal();
    -        }
    -    };
    -    return retrieve();
    -};
    -
    -arrayOfUrls = null;
    -
    -if (system.args.length > 1) {
    -    arrayOfUrls = Array.prototype.slice.call(system.args, 1);
    -} else {
    -    console.log("Usage: phantomjs render_multi_url.js [domain.name1, domain.name2, ...]");
    -    arrayOfUrls = ["www.google.com", "www.bbc.co.uk", "www.phantomjs.org"];
    -}
    -
    -RenderUrlsToFile(arrayOfUrls, (function(status, url, file) {
    -    if (status !== "success") {
    -        return console.log("Unable to render '" + url + "'");
    -    } else {
    -        return console.log("Rendered '" + url + "' at '" + file + "'");
    -    }
    -}), function() {
    -    return phantom.exit();
    -});
    -
    -
    -

    Command line options

    -
        D:\Progs\phantomjs-1.9.2-windows>phantomjs -h
    -    Usage:
    -       phantomjs [switchs] [options] [script] [argument [argument [...]]]
    -
    -    Options:
    -      --cookies-file=<val>                 Sets the file name to store the persistent cookies
    -      --config=<val>                       Specifies JSON-formatted configuration file
    -      --debug=<val>                        Prints additional warning and debug message: 'true' or 'false' (default)
    -      --disk-cache=<val>                   Enables disk cache: 'true' or 'false' (default)
    -      --ignore-ssl-errors=<val>            Ignores SSL errors (expired/self-signed certificate errors): 'true' or 'false' (default)
    -      --load-images=<val>                  Loads all inlined images: 'true' (default) or 'false'
    -      --local-storage-path=<val>           Specifies the location for offline local storage
    -      --local-storage-quota=<val>          Sets the maximum size of the offline local storage (in KB)
    -      --local-to-remote-url-access=<val>   Allows local content to access remote URL: 'true' or 'false' (default)
    -      --max-disk-cache-size=<val>          Limits the size of the disk cache (in KB)
    -      --output-encoding=<val>              Sets the encoding for the terminal output, default is 'utf8'
    -      --remote-debugger-port=<val>         Starts the script in a debug harness and listens on the specified port
    -      --remote-debugger-autorun=<val>      Runs the script in the debugger immediately: 'true' or 'false' (default)
    -      --proxy=<val>                        Sets the proxy server, e.g. '--proxy=http://proxy.company.com:8080'
    -      --proxy-auth=<val>                   Provides authentication information for the proxy, e.g. ''-proxy-auth=username:password'
    -      --proxy-type=<val>                   Specifies the proxy type, 'http' (default), 'none' (disable completely), or 'socks5'
    -      --script-encoding=<val>              Sets the encoding used for the starting script, default is 'utf8'
    -      --web-security=<val>                 Enables web security, 'true' (default) or 'false'
    -      --ssl-protocol=<val>                 Sets the SSL protocol (supported protocols: 'SSLv3' (default), 'SSLv2', 'TLSv1', 'any')
    -      --ssl-certificates-path=<val>        Sets the location for custom CA certificates (if none set, uses system default)
    -      --webdriver=<val>                    Starts in 'Remote WebDriver mode' (embedded GhostDriver): '[[<IP>:]<PORT>]' (default '127.0.0.1:8910')
    -      --webdriver-logfile=<val>            File where to write the WebDriver's Log (default 'none') (NOTE: needs '--webdriver')
    -      --webdriver-loglevel=<val>           WebDriver Logging Level: (supported: 'ERROR', 'WARN', 'INFO', 'DEBUG') (default 'INFO') (NOTE: needs '--webdriver')
    -      --webdriver-selenium-grid-hub=<val>  URL to the Selenium Grid HUB: 'URL_TO_HUB' (default 'none') (NOTE: needs '--webdriver')
    -      -w,--wd                              Equivalent to '--webdriver' option above
    -      -h,--help                            Shows this message and quits
    -      -v,--version                         Prints out PhantomJS version
    -
    -    Any of the options that accept boolean values ('true'/'false') can also accept 'yes'/'no'.
    -
    -    Without any argument, PhantomJS will launch in interactive mode (REPL).
    -
    -    Documentation can be found at the web site, http://phantomjs.org.
    -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.plugins.md.html b/org.nodeclipse.help/contents/.plugins.md.html deleted file mode 100644 index c8e00853..00000000 --- a/org.nodeclipse.help/contents/.plugins.md.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.plugins.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - Plugins

    -

    Install more

    -

    To get more plugins Help -> Nodeclipse Plugins List

    -

    alternatively:

    -
      -
    1. click link below, or open your browser or Internal Web Browser (Window -> Show View -> Other... General \ Internal Web Browser)
    2. -
    3. navigate to http://www.nodeclipse.org/updates/list
    4. -
    5. Drag and drop like icons on Eclipse menu panel.
    6. -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.run.md.html b/org.nodeclipse.help/contents/.run.md.html deleted file mode 100644 index 9fe58741..00000000 --- a/org.nodeclipse.help/contents/.run.md.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - -D:\workspaces\Nodeclispe-DEV\nodeclipse-1\org.nodeclipse.help\contents\.run.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - Run

    -

    Running

    -

    Right-click .js file with Node.js app and select "Run As -> Node Application" (similar to Java applications).

    -

    Press Ctrl+F11 to run [again].

    -

    Running issues

    -
      -
    • #72 All nodejs apps fail to run (JDK 6 only?) is related to Eclipse and Java version that you use, so updating them would solve. Quote bjm88:

      Ok working now for me. It does seem you have to uninstall nodeclipse then do Java 7 update ( i tried jre 64 bit and jdk 32 bit, both ok), and set that new java 7 in your eclipse.ini file (format is important). Then reinstall nodeclipse and it will work. Example eclipse.ini entry: -vm C:/dev/java7/bin/javaw.exe -vmargs -Xms128m -Xmx1024m

    • -
    • #107 Failed to connect to Standalone V8 VM even on JDK 1.6.0_30 was solved by running node --debug-brk app.js first. Quote haroldjiang:

      yes,the solution is to run node --debug-brk app.js first.

    • -
    -

    see also Debug page.

    -

    Run Configuration

    -

    You can configure node and apps parameters workspace wide in Preferences -> Nodeclipse or per file:

    -

    Right-click .js file with Node.js app and select "Run As -> Run Configuration..." (Hint: the easiest way to create LaunchConfiguration is actually run the file once.)

    -

    You can configure to pass

    -
      -
    • program arguments
    • -
    • Node arguments
    • -
    • set working directory
    • -
    -

    To have LaunchConfiguration saved within Project folder, select path in Shared File field on Common Tab of LaunchConfiguration. (Yes, dialog string is confusing)

    -

    Since Nodeclipse 0.5 it is possible to set environment variables in a launch configuration. The "Environment" tab is not there in the Node launcher.

    -

    As an alternative way you can also add another JS file that sets the variables before it calls the node app and run that instead.

    -

    e.g.

    -
    -
    setTimeout(function(){
    -  process.env.NODE_ENV="development";
    -  require("./app.js");
    -},100);
    -
    -
    -

    Warning multiple launch configurations

    -

    In Nodeclipse version 0.6 add possibility to run Node.js app with monitor (see Monitor page) or launch coffee util to compile *.coffee files. However these have ran into problem http://stackoverflow.com/questions/19157302/eclipse-plugin-development-saved-launchconfiguration-overrides-launchtype

    -

    Restart

    -
    Option 1. Right-click on launched application in Debug View and select Terminate and Relaunch.
    -

    (In Node perspective Debug View is visible by default)

    -
    Option 2 by igor:
    -
      -
    1. Right-click on your project in Project Explorer > Properties > Builders
    2. -
    3. New... > Program > OK
    4. -
    5. Name: Terminate existing node.js process(es)
    6. -
    7. Location: C:\Windows\System32\taskkill.exe (${env_var:SystemRoot}\System32\taskkill.exe did not work for me, it might for you)
    8. -
    9. Working Directory: Browse Workspace... > select your project > OK
    10. -
    11. Arguments: /IM node.exe /F
    12. -
    13. Switch to Build Options tab and tick During auto builds, untick Launch in background > OK
    14. -
    15. Create another builder: New... > Program > OK
    16. -
    17. Name: Start <your-project-name>
    18. -
    19. Location: C:\Program Files\nodejs\node.exe (you can try ${env_var:ProgramFiles}\nodejs\node.exe as well)
    20. -
    21. Working directory: same as point #5
    22. -
    23. Arguments: app.js (or any other file for application entry point)
    24. -
    25. Switch to Build Options tab and tick both During auto builds and Launch in background > OK
    26. -
    27. Turn on project autobuild: Window > Preferences > General > Workspace, tick Build automatically > OK
    28. -
    29. Change default build order: Window > Preferences > General > Workspace > Build Order, untick Use default build order and remove all projects except your node.js project > OK
    30. -
    31. Restart Aptana/Eclipse (There are bugs, so sometimes preference changes are just not saved and get lost. You have to double-check.)
    32. -
    -
    Option 3 #57 running app.js with node-dev, forever, supervisor, nodemon etc
    -

    A general approach was selected #57, however as I don't [yet] use any of Node.js module named above, some polishing is needed for this functionality, like #118 The use case "Nodeclipse with nodemon"

    -

    Start talking if you care.

    -

    Sources

    -

    Check LaunchConfigurationDelegate.java for launching Node.js logic.

    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.tutorials.md.html b/org.nodeclipse.help/contents/.tutorials.md.html deleted file mode 100644 index 9b34fce9..00000000 --- a/org.nodeclipse.help/contents/.tutorials.md.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - -C:\Users\weibl\git\Enide-nodeclipse-1\org.nodeclipse.help\contents\.tutorials.md.html - - - - - - - - - - -

    List of Node.js tutorials

    - -

    Books

    - -

    Sample 1

    -
    -
    var net = require('net')
    -
    -var chatServer = net.createServer()
    -
    -chatServer.on('connection', function(client) {
    -  client.write('Hi!\n');
    -  client.write('Bye!\n');
    -
    -  client.end()
    -})
    -
    -chatServer.listen(9000)
    -
    -
    -

    then run telnet to connect:

    -
    -

    $ telnet 127.0.0.1 9000

    -
    -

    and then by and by you get

    -
    -
    var net = require('net')
    -
    -var chatServer = net.createServer(), clientList = []
    -
    -chatServer.on('connection', function(client) {
    -    client.name = client.remoteAddress + ':' + client.remotePort
    -    client.write('Hi ' + client.name + '!\n');
    -
    -    clientList.push(client)
    -
    -    client.on('data', function(data) {
    -        console.log(data);
    -        broadcast(data, client)
    -    })
    -
    -    client.on('end', function() {
    -        clientList.splice(clientList.indexOf(client), 1)
    -    })
    -
    -    client.on('error', function(e) {
    -        console.log(e)
    -    })
    -
    -})
    -
    -function broadcast(message, client) {
    -    var cleanup = []
    -    for ( var i = 0; i < clientList.length; i += 1) {
    -        if (client !== clientList[i]) {
    -
    -            if (clientList[i].writable) {
    -                clientList[i].write(client.name + " says " + message)
    -            } else {
    -                cleanup.push(clientList[i])
    -                clientList[i].destroy()
    -            }
    -
    -        }
    -    } // Remove dead Nodes out of write loop to avoid trashing loop index
    -    for (i = 0; i < cleanup.length; i += 1) {
    -        clientList.splice(clientList.indexOf(cleanup[i]), 1)
    -    }
    -}
    -
    -chatServer.listen(9000)
    -
    -
    -

    Sample 2 Let’s Build Twitter

    -

    Example 2-15. Adding a basic API

    -
    -
    var express = require('express')
    -
    -var app = express.createServer()
    -app.listen(8000)
    -
    -var tweets = []
    -
    -app.get('/', function(req, res) {
    -  res.send('Welcome to Node Twitter')
    -})
    -
    -app.post('/send', express.bodyParser(), function(req, res) {
    -  if (req.body && req.body.tweet) {
    -    tweets.push(req.body.tweet)
    -    res.send({status:"ok", message:"Tweet received"})
    -  } else {
    -    //no tweet?
    -    res.send({status:"nok", message:"No tweet received"})
    -  }
    -})
    -
    -app.get('/tweets', function(req,res) {
    -  res.send(tweets)
    -})
    -
    -
    -

    Example 2-16. A test for the POST API

    -
    -
    var http = require('http'),
    -    assert = require('assert')
    -
    -var opts = {
    -  host: 'localhost',
    -  port: 8000,
    -  path: '/send',
    -  method: 'POST',
    -  headers: {'content-type':'application/x-www-form-urlencoded'}
    -}
    -
    -var req = http.request(opts, function(res) {
    -  res.setEncoding('utf8')
    -
    -  var data = ""
    -  res.on('data', function(d) {
    -    data += d
    -  })
    -
    -  res.on('end', function() {
    -    assert.strictEqual(data, '{"status":"ok","message":"Tweet received"}')
    -  })
    -})
    -
    -req.write('tweet=test')
    -req.end()
    -
    -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/.typescript.md.html b/org.nodeclipse.help/contents/.typescript.md.html deleted file mode 100644 index 7454123d..00000000 --- a/org.nodeclipse.help/contents/.typescript.md.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - -D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.help\contents\.typescript.md.html - - - - - - - - - - -

    Title: Nodeclipse Online Help - TypeScript

    -

    TypeSctipt Editor

    -

    -

    Current 1.0.0 version is unstable and causes Eclipse freezes.

    -

    Hello world server in TypeScript

    -
    -
    declare function require(name:string);
    -var http = require('http');
    -http.createServer(function (req, res) {
    -  res.writeHead(200, {'Content-Type': 'text/plain'});
    -  res.end('Hello TypeScript\n');
    -}).listen(1337, '127.0.0.1');
    -console.log('Server running at http://127.0.0.1:1337/');
    -
    -
    -

    tsc Util

    -
    
    -$ tsc
    -Version 0.9.0.1
    -Syntax:   tsc [options] [file ..]
    -
    -Examples: tsc hello.ts
    -          tsc --out foo.js foo.ts
    -          tsc @args.txt
    -
    -Options:
    -  -c, --comments              Emit comments to output
    -  -d, --declaration           Generates corresponding .d.ts file
    -  -b, --disallowbool          Throw error for use of deprecated "bool" type
    -  -m, --disallowimportmodule  Throw error for use of deprecated "module" keyword when referencing an external module. Only allow "require" keyword.
    -  -e, --exec                  Execute the script after compilation
    -  -h, --help                  Print this message
    -  --module KIND               Specify module code generation: "commonjs" (default) or "amd"
    -  --nolib                     Do not include a default lib.d.ts with global declarations
    -  --out FILE|DIRECTORY        Concatenate and emit output to single file | Redirect output structure to the directory
    -  --sourcemap                 Generates corresponding .map file
    -  --target VER                Specify ECMAScript target version: "ES3" (default), or "ES5"
    -  -v, --version               Print the compiler's version: 0.9.0.1
    -  -w, --watch                 Watch input files
    -  @                     Insert command line options and files from a file.    
    -
    -

    Contribute

    -

    Edit online on GitHub

    - - diff --git a/org.nodeclipse.help/contents/FAQ.md b/org.nodeclipse.help/contents/FAQ.md deleted file mode 100644 index fe599893..00000000 --- a/org.nodeclipse.help/contents/FAQ.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: community -title: Nodeclipse - Community - Q & A ---- - -# FAQ - -> Q: [How to install nodeclipse in myeclipse2013? I have no eclipse.](https://github.com/Nodeclipse/nodeclipse-1/issues/60) - -If you don't have Eclipse and you use Windows, you can download [Nodeclipse NTS](http://www.nodeclipse.org/nts/) - or [Enide Studio](http://www.nodeclipse.org/enide/studio/). -(quick link ) - -Otherwise follow instructions on - -Check also - -> Q: [Is there a way to create a nodeclipse project from an existing project (e.g. clone a github nodejs project, and - get all the nodeclipse functionality when I work on it).](https://groups.google.com/forum/#!topic/nodeclipse/WWLp-p6iaDo) - -1. Select [File]-[New]-[Node Project] to open New Node Project Wizard. -2. Enter [Project name] and uncheck [Use default location] checkbox. -3. Select location of existing project into [Location]. -4. Press [Finish] button. - -Then the existing project will appear in Project Explorer. - -> Q: [How to add a new dependency while working with Nodeclipse](https://groups.google.com/forum/#!topic/nodeclipse/FgUci2ZXpoQ) - -1. Double-click package.json on the Package Explorer to open it. -2. Add into dependencies section what you want to install, and save it. - -```javascript - "dependencies": { - "beloved-module": "1.1.0", - "awesome-module": "*" - } -``` - -3. Select package.json on the Package Explorer, open context menu by right-clicking, and select [Run As]-[npm install] menu. - -or from Terminal `npm install beloved-module --save` - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/README.md b/org.nodeclipse.help/contents/README.md deleted file mode 100644 index e853b271..00000000 --- a/org.nodeclipse.help/contents/README.md +++ /dev/null @@ -1,54 +0,0 @@ -Title: README Nodeclipse Online Help - -# Intro - -Online help is set of .md files at . - -When viewing on GitHub they are just above this note. - -One topic is one .md file: - <./configuration.md>, <./run.md>, <./debug.md>, <./coffeescript.md>, <./typescript.md>, <./plugins.md> . -`.html` files are generated and are not intended for edit. - -If you happened to explain to a colleague how to use Nodeclipse, this is the destination to check. - -## Table of Contents - -- [Configuration](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/configuration.md) -- [Node.js](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/nodejs.md) -- [Import](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/import.md) -- [Run](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/run.md) -- [Debug](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/debug.md) -- [Monitor](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/monitor.md) -- [Markdown](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/markdown.md) -- [Github Flavored Markdown (GFM)](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/github-flavored-markdown.md) -- [JavaScript](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/javascript.md) -- [CoffeeScript](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/coffeescript.md) -- [TypeeScript](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/typescript.md) -- [node_redis](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/node_redis.md) -- [Plugins](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/plugins.md) -- [FAQ](.FAQ.md.html) -- [PhantomJS](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/phantomjs.md) -- [Nashorn](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.help/contents/nashorn.md) - -## Tools - -GFM Viewer - - -## Other links - -- http://daringfireball.net/projects/markdown/syntax -- https://jira.codehaus.org/browse/DOXIA-472 -- https://github.com/sirthias/pegdown - -### Metadata - -- https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#metadata - - Title: A New MultiMarkdown Document - Author: Fletcher T. Penney - John Doe - Date: July 25, 2005 - - \ No newline at end of file diff --git a/org.nodeclipse.help/contents/coffeescript.md b/org.nodeclipse.help/contents/coffeescript.md deleted file mode 100644 index e1abd53c..00000000 --- a/org.nodeclipse.help/contents/coffeescript.md +++ /dev/null @@ -1,71 +0,0 @@ - - -### Hello world server in CoffeeScript - -```coffeescript -http = require 'http' - -http.createServer (req, res) -> - res.writeHead 200, {'Content-Type': 'text/plain'} - res.end 'Hello World\n' -.listen 1337, '127.0.0.1' - -console.log 'Server running at http://127.0.0.1:1337/' -``` - -### Running/debugging - -Nodeclipse since version 0.6 allows to run and debug .coffee file directly. -Node.js command line tool 'coffee' is used. -Note that when debugging, source map are not implemeted, and execution start from this coffee tool - that compiles your module. - Stay in Node perspective until compilation to see your modules appear in V8 virtual project. - Then open those files and set breakpoints. - -### coffee Util - -``` -$coffee --help - -Usage: coffee [options] path/to/script.coffee -- [args] - -If called without options, `coffee` will run your script. - - -b, --bare compile without a top-level function wrapper - -c, --compile compile to JavaScript and save as .js files - -e, --eval pass a string from the command line as input - -h, --help display this help message - -i, --interactive run an interactive CoffeeScript REPL - -j, --join concatenate the source CoffeeScript before compiling - -m, --map generate source map and save as .map files - -n, --nodes print out the parse tree that the parser produces - --nodejs pass options directly to the "node" binary - -o, --output set the output directory for compiled JavaScript - -p, --print print out the compiled JavaScript - -s, --stdio listen for and compile scripts over stdio - -l, --literate treat stdio as literate style coffee-script - -t, --tokens print out the tokens that the lexer/rewriter produce - -v, --version display the version number - -w, --watch watch scripts for changes and rerun commands -``` - -Run `coffee -c -w .` from project root to compile every time you save .coffee file. - -It is very convenient to have this command running in Eclipse integrated Terminal. - -### CoffeeSctipt Editor - -CoffeeSctipt Editor 0.3.0 (as version show) is in early stage, and looking for contributors familiar with XTend -or just brave enough to dive into [code](https://github.com/Nodeclipse/coffeescript-eclipse). - -Included in [Enide](www.nodeclipse.org/enide) since 0.4.20 - -It has XText dependency, that can usually be automatically resolved by Eclipse (that was downloaded from eclipse.org) - -for other Eclipse distributions use [CoffeeScript Editor quick installer](http://marketplace.eclipse.org/content/coffeescript-editor-quick-installer) -or install prior from - -### Contribute - -Edit online on GitHub - \ No newline at end of file diff --git a/org.nodeclipse.help/contents/configuration.md b/org.nodeclipse.help/contents/configuration.md deleted file mode 100644 index bc18aba6..00000000 --- a/org.nodeclipse.help/contents/configuration.md +++ /dev/null @@ -1,73 +0,0 @@ -Title: Nodeclipse Online Help - Configuration - -## Configuration - -Some recommended configuration (These steps are needed for every new workspace): - -Goto Window->Preferences - -General select Show heap status -General->Workspace -> Text file encoding select other UTF-8 -(if Eclipse 4.x Chrome Theme installed (Optional, recommended) ) -General->Appearance ->Theme select Jeeeyul's themes - Chrome Theme, restart Eclipse -Team -> Git -> History : Check "Follow renames" - -Switch to Node perspective (e.g. Window -> Open Perspective -> Other ... -> Node) - -In Project Explorer press small triangle to open View Menu - and select Customize View... Then on Filter tab deselect `.* resources` - -[REST Client Tool](http://www.nodeclipse.org/restclient-tool/) is also nice to use in Debug perspective. - -Window -> Show View -> Other... -> REST Client -> REST Client Tool -or Ctrl+3 type `rest` - - -#### Optional general Eclipse configuration - -General -> Workspace -> Refresh on access -General -> Workspace -> Refresh using native hooks or polling (so that you don't need to press F5 - after npm install or other changes on file system) -General -> Workspace -> Text file encoding - select UTF-8 - -General -> Editors -> Text Editors -> Show print margin, 120 - -General -> Editors -> Text Editors -> Show whitespace characters (just remeber where is this setting) - -Take a time to explore other Eclipse setting, you may be rewarded with findings. - -### Nodeclipse Preferences - -Check preferences ( Window -> Preferences ) for Node.js, PhantomJS, MongoDB and Nashorn related settings. - - - -## In previous versions - -### Before 0.6 - -Window -> Show View -> Other... -> GFM Support -> GFM View -(Very useful when exploring node_modules folders) - -#### File associations - -Window -> Preferences -> General -> Editors -> File Associations Add... - -- *.jade - associate with Scrapbook (from JDT) -- *.ejs - associate with HTML Editor (from WebTools, Aptana, etc) - or better with Amateras HTML Editor (check on Nodeclipse Plugin List) - -#### [NTS](http://www.nodeclipse.org/nts/) Only - -Window -> Show View -> Other... -> MiniMap -> MiniMap - -### Before 0.4 - -Window -> Show View -> Other... -> Markdown -> Markdown HTML Preview -(Very useful when exploring node_modules folders) - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/debug.md b/org.nodeclipse.help/contents/debug.md deleted file mode 100644 index 49285296..00000000 --- a/org.nodeclipse.help/contents/debug.md +++ /dev/null @@ -1,65 +0,0 @@ -Title: Nodeclipse Help - Debug - - -## Debugging - -Right-click `.js` file with Node.js app and select "Debug As -> Node Application" (similar to Java applications). - -Notice that Nodeclipse by default enters step-by-step debugging mode from very first line. - Press F8 to continue until breakpoint is reached. - -Press F11 to launch debug [again]. - -### Debugging issues - - - -see also Run page. - -### debug-brk option - -By default Nodeclipse stops on the first line when debugging. The cause is that V8 remote debugger needs some time (~100ms) - to connect to Node.js and get actual modules loaded in V8. - -Since Nodeclipse 0.6 there is option "Node debug no -break:" in Preferences to disable interruption at first line. -It is good when your application is web server and you don't need to debug initialization lines, but mostly request handlers. - -From [Node wiki](https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger) - -> There are 2 debug related node options: - -> node --debug[=port] NodeApp.js - -> node --debug-brk[=port] NodeApp.js - -> The `--debug` option will just enable remote debugger connection on given port and then start the application normally. - Even when debugger is connected to the running node instance later on, the script execution will not be stopped until - “Suspend” command is issued by Eclipse debugger. Another way to stop the execution is to browse the source code of the - JavaScript modules comprising the application and double click on the line number at the desired position in script to - break at (most likely a callback). Once execution stops you can set/clear more breakpoints, but also inspect call stack - and view content of all program variables. - -> The `--debug-brk` option is needed when your script is short lived (no time to attach debugger) and/or you want to observe -the NodeApp.js execution from the very start. This option will force execution to break at the first line of the main script -and wait for debugger to connect. The behavior upon connection is now different – the script is suspended and no breakpoints are set. -Note that V8 engine debugger is not behaving very good when it steps over or steps into require() method (it will crash), -so try to set up first breakpoint past the initial module loading. This will also enable you to set breakpoints in any of those modules as well. - -That is, when `--debug` is used, than small apps and the beginning of an application are unable to debug. -You will get "Failed to connect to Standalone V8 VM" error, when the app has already finished. - -![Connection-to-V8-timed-out.png](images/Connection-to-V8-timed-out.png) - -### "Failed to connect to Standalone V8 VM" - -There were other reasons reported, when getting "Failed to connect to Standalone V8 VM" error. -Check - -### Sources - -Check [LaunchConfigurationDelegate.java](https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java) -for launching Node.js logic. - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/express.md b/org.nodeclipse.help/contents/express.md deleted file mode 100644 index 5940a303..00000000 --- a/org.nodeclipse.help/contents/express.md +++ /dev/null @@ -1,17 +0,0 @@ - -
    
    -	$ express -h
    -
    -  Usage: express [options]
    -
    -  Options:
    -
    -    -h, --help          output usage information
    -    -V, --version       output the version number
    -    -s, --sessions      add session support
    -    -e, --ejs           add ejs engine support (defaults to jade)
    -    -J, --jshtml        add jshtml engine support (defaults to jade)
    -    -H, --hogan         add hogan.js engine support
    -    -c, --css   add stylesheet  support (less|stylus) (defaults to plain css)
    -    -f, --force         force on non-empty directory
    -
    \ No newline at end of file diff --git a/org.nodeclipse.help/contents/external-tools.md b/org.nodeclipse.help/contents/external-tools.md deleted file mode 100644 index 2e40f875..00000000 --- a/org.nodeclipse.help/contents/external-tools.md +++ /dev/null @@ -1,55 +0,0 @@ -Title: Nodeclipse Help - External Tools - - -## External Tools - -add `External Tool Configuration` - -![](images/External-Tool-Configuration.png) - -via `Run` menu or `External Tools` icon - -![](images/External-Tool-Launch.png) - -Launched programs are visible in `Debug` View. - -![](images/External-Tool-Launch-Are-Seen-In-Debug-View.png) - -Hints. - -1. On Windows your `cmd` path likely is `C:\WINDOWS\system32\cmd.exe` -2. [Git for Windows](http://msysgit.github.io/) comes with great bash shell. - On Windows by default path is like `C:\Program Files (x86)\Git\bin\sh.exe`, add `--login -i` to Arguments. - -[![](images/try-git-74x71.png)](http://git-scm.com/) - -
    
    ->"C:\Program Files (x86)\Git\bin\sh.exe" --help
    -GNU bash, version 3.1.0(1)-release-(i686-pc-msys)
    -Usage:  "C:/Program Files (x86)/Git/bin/sh.exe" [GNU long option] [option] ...
    -        "C:/Program Files (x86)/Git/bin/sh.exe" [GNU long option] [option] script-file ...
    -GNU long options:
    -        --debug
    -        --debugger
    -        --dump-po-strings
    -        --dump-strings
    -        --help
    -        --init-file
    -        --login
    -        --noediting
    -        --noprofile
    -        --norc
    -        --posix
    -        --protected
    -        --rcfile
    -        --restricted
    -        --verbose
    -        --version
    -        --wordexp
    -Shell options:
    -        -irsD or -c command or -O shopt_option          (invocation only)
    -        -abefhkmnptuvxBCHP or -o option
    -Type `"C:/Program Files (x86)/Git/bin/sh.exe" -c "help set"' for more information about shell options.
    -Type `"C:/Program Files (x86)/Git/bin/sh.exe" -c help' for more information about shell builtin commands.
    -Use the `bashbug' command to report bugs.
    -
    diff --git a/org.nodeclipse.help/contents/github-flavored-markdown.md b/org.nodeclipse.help/contents/github-flavored-markdown.md deleted file mode 100644 index d5ad5a74..00000000 --- a/org.nodeclipse.help/contents/github-flavored-markdown.md +++ /dev/null @@ -1,23 +0,0 @@ -Title: Nodeclipse Online Help - GFM - - -## Github Flavored Markdown (GFM) - -Github Flavored Markdown (GFM) is extension of [Markdown by GitHub](http://github.github.com/github-flavored-markdown/). - -> GitHub uses what we're calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality. - -> If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent Markdown Syntax Guide at Daring Fireball. Note that markup that's not covered by GFM can't be supplanted with HTML. - -Continue at . - -### GFM Viewer plugin - -For GFM Viewer check . -It also has its own Help. - -You can open it any time from Windows -> Show View -> GFM View - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/images/Connection-to-V8-timed-out.png b/org.nodeclipse.help/contents/images/Connection-to-V8-timed-out.png deleted file mode 100644 index a4616b9b..00000000 Binary files a/org.nodeclipse.help/contents/images/Connection-to-V8-timed-out.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/External-Tool-Configuration.png b/org.nodeclipse.help/contents/images/External-Tool-Configuration.png deleted file mode 100644 index 835b79bf..00000000 Binary files a/org.nodeclipse.help/contents/images/External-Tool-Configuration.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/External-Tool-Launch-Are-Seen-In-Debug-View.png b/org.nodeclipse.help/contents/images/External-Tool-Launch-Are-Seen-In-Debug-View.png deleted file mode 100644 index c8c931ec..00000000 Binary files a/org.nodeclipse.help/contents/images/External-Tool-Launch-Are-Seen-In-Debug-View.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/External-Tool-Launch.png b/org.nodeclipse.help/contents/images/External-Tool-Launch.png deleted file mode 100644 index b1f4a5cc..00000000 Binary files a/org.nodeclipse.help/contents/images/External-Tool-Launch.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/Nodeclipse_logo_light.png b/org.nodeclipse.help/contents/images/Nodeclipse_logo_light.png deleted file mode 100644 index 401a6a67..00000000 Binary files a/org.nodeclipse.help/contents/images/Nodeclipse_logo_light.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/Redis-project.PNG b/org.nodeclipse.help/contents/images/Redis-project.PNG deleted file mode 100644 index 80c51c53..00000000 Binary files a/org.nodeclipse.help/contents/images/Redis-project.PNG and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/ResetPerspective.png b/org.nodeclipse.help/contents/images/ResetPerspective.png deleted file mode 100644 index b06216d1..00000000 Binary files a/org.nodeclipse.help/contents/images/ResetPerspective.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/installbutton.png b/org.nodeclipse.help/contents/images/installbutton.png deleted file mode 100644 index f39c881e..00000000 Binary files a/org.nodeclipse.help/contents/images/installbutton.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/nodejs-sources-lib.PNG b/org.nodeclipse.help/contents/images/nodejs-sources-lib.PNG deleted file mode 100644 index 7796a94a..00000000 Binary files a/org.nodeclipse.help/contents/images/nodejs-sources-lib.PNG and /dev/null differ diff --git a/org.nodeclipse.help/contents/images/try-git-74x71.png b/org.nodeclipse.help/contents/images/try-git-74x71.png deleted file mode 100644 index 154476eb..00000000 Binary files a/org.nodeclipse.help/contents/images/try-git-74x71.png and /dev/null differ diff --git a/org.nodeclipse.help/contents/import.md b/org.nodeclipse.help/contents/import.md deleted file mode 100644 index d7dffc65..00000000 --- a/org.nodeclipse.help/contents/import.md +++ /dev/null @@ -1,44 +0,0 @@ -Title: Nodeclipse Help - Import - -## Import - -_1. Add `.project` file (3 option a,b,c,d) - -a. (via shell) run `nodeclipse -p` from project root. It will add `.project` file and some configuration files. - -b. (GUI) You can just select File -> New -> Node.js Project. It will add only new `.project` file. -And you have your project opened in Eclipse / Enide Studio. - -c. create new project and learn what files there are. - -d. (manualy, minimal) add file `.project` into your project root with following content (change name): - -```xml - - - MyNodeProject1 - - - - - - com.eclipsesource.jshint.ui.builder - - - - - - org.nodeclipse.ui.NodeNature - org.eclipse.wst.jsdt.core.jsNature - - -``` - -Now your project is Eclipse project :) - -_2. Import via standard File -> Import -> General -> Existing Projects into Workspace and select folder where the project is located. - -### Contribute - -Edit online on GitHub - \ No newline at end of file diff --git a/org.nodeclipse.help/contents/index.md b/org.nodeclipse.help/contents/index.md deleted file mode 100644 index 230daf8d..00000000 --- a/org.nodeclipse.help/contents/index.md +++ /dev/null @@ -1,37 +0,0 @@ -Title: Nodeclipse Online Help - - -# Nodeclipse Help - -![logo](images/Nodeclipse_logo_light.png) - -Online version is at (do open in new browser window) - . - -[Nodeclipse at GitHub](https://github.com/Nodeclipse/nodeclipse-1) - ([Eclipse Marketplace](http://marketplace.eclipse.org/content/nodeclipse), [site](http://www.nodeclipse.org)) - -Nodeclipse is free open-source project that grows with your contributions. - -##Table of Contents - -- [Configuration](.configuration.md.html) -- [Node.js](.nodejs.md.html) -- [Import](.import.md.html) -- [Run](.run.md.html) -- [Debug](.debug.md.html) -- [Monitor](.monitor.md.html) -- [Markdown](.markdown.md.html) -- [Github Flavored Markdown (GFM)](.github-flavored-markdown.md.html) -- [JavaScript](.javascript.md.html) -- [CoffeeScript](.coffeescript.md.html) -- [TypeeScript](.typescript.md.html) -- [node_redis](.node_redis.md.html) -- [Plugins](.plugins.md.html) -- [FAQ](.FAQ.md.html) -- [PhantomJS](.phantomjs.md.html) -- [Nashorn](.nashorn.md.html) - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/javascript.md b/org.nodeclipse.help/contents/javascript.md deleted file mode 100644 index 3f747a3c..00000000 --- a/org.nodeclipse.help/contents/javascript.md +++ /dev/null @@ -1,27 +0,0 @@ -Title: Nodeclipse Online Help - JavaScript - - - -## JavaScript - ->JavaScript (JS) is an interpreted computer programming language. It was originally implemented as part of web browsers so that client-side scripts could interact with the user, control the browser, communicate asynchronously, and alter the document content that was displayed.[5] More recently, however, it has become common in server-side programming, game development and the creation of desktop applications. - - -Links: - -- -- - -### Nodeclipse JavaScript Editor - -Nodeclipse JavaScript Editor is based on standard Eclipse JSDT (JavaScript Development Tools). -Check JavaScript Development Guide in Help. - -#### Hints - -- Press Ctrl+Shift+F to format. -- main page has many usefull shortcuts. - -### Contribute - -Edit online on GitHub diff --git a/org.nodeclipse.help/contents/markdown.md b/org.nodeclipse.help/contents/markdown.md deleted file mode 100644 index 3a6da41a..00000000 --- a/org.nodeclipse.help/contents/markdown.md +++ /dev/null @@ -1,19 +0,0 @@ -Title: Nodeclipse Online Help - Markdown - -## Markdown - -`npm` Node.js Package Manager assumes that every project has file README.md. It is good practice to have this file, -with minimal description of your project. - -`.md` or `.markdown` are file with text in markdown format. -Markdown is markup language, a superset of HTML, with focus on content authoring (not design). - -Home page is - -Markdown is default on and - ( see [Github Flavored Markdown (GFM)](.github-flavored-markdown.md.html)) - -### Contribute - -Edit online on GitHub - \ No newline at end of file diff --git a/org.nodeclipse.help/contents/monitor.md b/org.nodeclipse.help/contents/monitor.md deleted file mode 100644 index 822a3e5b..00000000 --- a/org.nodeclipse.help/contents/monitor.md +++ /dev/null @@ -1,42 +0,0 @@ -Title: Nodeclipse Help - Run/Debug with Monitor - - -## Run/Debug with Monitor - -https://github.com/Nodeclipse/nodeclipse-1/issues/57 -running app.js with node-dev, forever, supervisor, nodemon etc - -Select monitor - -- https://www.npmjs.org/package/forever -- https://www.npmjs.org/package/nodemon -- https://www.npmjs.org/package/node-dev -- https://www.npmjs.org/package/supervisor - -They all have similar command line - -forever [action] [options] SCRIPT [script-options] -nodemon [your node app] -node-dev foo.js -supervisor [options] - -Below are some remarks about GitHub stars: - -- [forever](https://github.com/nodejitsu/forever) - 2700 stars -- [node-dev](https://github.com/fgnass/node-dev) - 380 stars (doesn't require any configuration) -- [nodemon](https://github.com/remy/nodemon) 1500 stars - support running .coffee -- [supervisor](https://github.com/isaacs/node-supervisor) 1100 stars - - -After installing with `npm install * -g`, browse for CLI file - -e.g. `C:\Users\weibl\AppData\Roaming\npm\node_modules\forever\bin\forever` - -Configure path to your source file monitor in Preferences -> Nodeclipse -> Node monitor path - - - -### Contribute - -Edit online on GitHub - diff --git a/org.nodeclipse.help/contents/nashorn.md b/org.nodeclipse.help/contents/nashorn.md deleted file mode 100644 index 9784e0a5..00000000 --- a/org.nodeclipse.help/contents/nashorn.md +++ /dev/null @@ -1,185 +0,0 @@ - - -# Nashorn - -## Links - -Main blog by Jim Laskey - -Sources: - -- - references Node.jar project (implementation of Node.js on JVM). However there are no more news, and the projects - is closed-sourced in Oracle. - - - Node.jar, Akhil Arora - - JPA & Node.jar, Doug Clarke - - -- [Java Platform, Standard Edition Nashorn User's Guide](http://download.java.net/jdk8/docs/technotes/guides/scripting/nashorn/) - - -- [Java Scripting Programmer's Guide](http://hg.openjdk.java.net/nashorn/jdk8/nashorn/raw-file/29b2b2ed954c/docs/JavaScriptingProgrammersGuide.html) - - -Old and excited blog post: - -If you use JavaFX inside JavaScript, you should use SDK, not just JRE. - -## Java 8 script utils - -Java 8 goes with 2 utils: `jjs` for running JavaScript on Nashorn engine - and `jrunscript` for running any script engine - -### `jjs` command line util - -
    
    -C:\Program Files\Java\jdk1.8.0\bin>jjs.exe -v
    -
    -nashorn 1.8.0
    -
    -
    -C:\Program Files\Java\jdk1.8.0\bin>jjs.exe -h
    -
    -jjs []  [-- ]
    -        -D (-Dname=value. Set a system property. This option can be repeated.)
    -
    -        -cp, -classpath (-cp path. Specify where to find user class files.)
    -
    -        -doe, -dump-on-error (Dump a stack trace on errors.)
    -                param: [true|false]   default: false
    -
    -        -fv, -fullversion (Print full version info of Nashorn.)
    -                param: [true|false]   default: false
    -
    -        -fx (Launch script as an fx application.)
    -                param: [true|false]   default: false
    -
    -        -h, -help (Print help for command line flags.)
    -                param: [true|false]   default: false
    -
    -        -scripting (Enable scripting features.)
    -                param: [true|false]   default: false
    -
    -        -strict (Run scripts in strict mode.)
    -                param: [true|false]   default: false
    -
    -        -t, -timezone (Set timezone for script execution.)
    -                param:    default: Asia/Shanghai
    -
    -        -v, -version (Print version info of Nashorn.)
    -                param: [true|false]   default: false
    -
    - -### `jrunscript` command line util - -
    
    -C:\Program Files\Java\jdk1.8.0\bin>jrunscript.exe  -h
    -Usage: jrunscript [options] [arguments...]
    -
    -where [options] include:
    -  -classpath     Specify where to find user class files
    -  -cp            Specify where to find user class files
    -  -D=     Set a system property
    -  -J             Pass  directly to the runtime system
    -  -l         Use specified scripting language
    -  -e 
    -
    -
    -
    -
    -

    Nashorn Examples

    -
      -
    • fxhelloworld.js
    • -
    -
    -
    function start(stage) {
    -    stage.title = "Hello World!";
    -    var button = new Button();
    -    button.text = "Say 'Hello World'";
    -    button.onAction = function() print("Hello World!");
    -    var root = new StackPane();
    -    root.children.add(button);
    -    stage.scene = new Scene(root, 300, 250);
    -    stage.show();
    -}
    -load("fxinit.js");
    -
    -
      -
    • fxinit.js
    • -
    -
    -
    GLOBAL = this;
    -javafx = Packages.javafx;
    -com.sun.javafx.application.LauncherImpl.launchApplication(
    -(Java.extend(javafx.application.Application, {
    -    init: function() {
    -        // FX packages and classes must be defined here because they may not be
    -        // viable until launch time.
    -        Stage          = javafx.stage.Stage;
    -        scene          = javafx.scene;
    -        Scene          = scene.Scene;
    -        Group          = scene.Group;
    -        chart          = scene.chart;
    -        control        = scene.control;
    -        Button         = control.Button;
    -        StackPane      = scene.layout.StackPane;
    -        FXCollections  = javafx.collections.FXCollections;
    -        ObservableList = javafx.collections.ObservableList;
    -        Chart          = chart.Chart;
    -        CategoryAxis   = chart.CategoryAxis;
    -        NumberAxis     = chart.NumberAxis;
    -        BarChart       = chart.BarChart;
    -        XYChart        = chart.XYChart;
    -        Series         = chart.XYChart$Series;
    -        Data           = chart.XYChart$Data;
    -        TreeView       = control.TreeView;
    -        TreeItem       = control.TreeItem;
    -        if (GLOBAL.init) {
    -            init();
    -        }
    -    },
    -    start: function(stage) {
    -        if (GLOBAL.start) {
    -            start(stage);
    -        }
    -    },
    -    stop: function() {
    -        if (GLOBAL.stop) {
    -            stop();
    -        }
    -    }
    -})).class, new (Java.type("java.lang.String[]"))(0));
    -
    -
      -
    • javaextend.js
    • -
    -
    -
    // http://hg.openjdk.java.net/nashorn/jdk8/nashorn/raw-file/29b2b2ed954c/docs/JavaScriptingProgrammersGuide.html#jsextendconcrete
    -
    -/**
    - * Results: 
    -size invoked!
    -add(i, e) invoked!
    -
    - */
    -
    -var ArrayList = Java.type("java.util.ArrayList")
    -var ArrayListExtender = Java.extend(ArrayList)
    -var printSizeInvokedArrayList = new ArrayListExtender() {
    -    size: function() { print("size invoked!"); }
    -}
    -var printAddInvokedArrayList = new ArrayListExtender() {
    -    add: function(x, y) {
    -        if(typeof(y) === "undefined") {
    -            print("add(e) invoked!");
    -        } else {
    -            print("add(i, e) invoked!");
    -        }
    -    }
    -};
    -printSizeInvokedArrayList.size();
    -printAddInvokedArrayList.add(33, 33);
    -
    - - diff --git a/org.nodeclipse.jjs/help/fxhelloworld.js b/org.nodeclipse.jjs/help/fxhelloworld.js deleted file mode 100644 index af7e44f0..00000000 --- a/org.nodeclipse.jjs/help/fxhelloworld.js +++ /dev/null @@ -1,12 +0,0 @@ - -function start(stage) { - stage.title = "Hello World!"; - var button = new Button(); - button.text = "Say 'Hello World'"; - button.onAction = function() print("Hello World!"); - var root = new StackPane(); - root.children.add(button); - stage.scene = new Scene(root, 300, 250); - stage.show(); -} -load("fxinit.js"); diff --git a/org.nodeclipse.jjs/help/fxinit.js b/org.nodeclipse.jjs/help/fxinit.js deleted file mode 100644 index 5fb5b3c9..00000000 --- a/org.nodeclipse.jjs/help/fxinit.js +++ /dev/null @@ -1,41 +0,0 @@ -GLOBAL = this; -javafx = Packages.javafx; -com.sun.javafx.application.LauncherImpl.launchApplication( -(Java.extend(javafx.application.Application, { - init: function() { - // FX packages and classes must be defined here because they may not be - // viable until launch time. - Stage = javafx.stage.Stage; - scene = javafx.scene; - Scene = scene.Scene; - Group = scene.Group; - chart = scene.chart; - control = scene.control; - Button = control.Button; - StackPane = scene.layout.StackPane; - FXCollections = javafx.collections.FXCollections; - ObservableList = javafx.collections.ObservableList; - Chart = chart.Chart; - CategoryAxis = chart.CategoryAxis; - NumberAxis = chart.NumberAxis; - BarChart = chart.BarChart; - XYChart = chart.XYChart; - Series = chart.XYChart$Series; - Data = chart.XYChart$Data; - TreeView = control.TreeView; - TreeItem = control.TreeItem; - if (GLOBAL.init) { - init(); - } - }, - start: function(stage) { - if (GLOBAL.start) { - start(stage); - } - }, - stop: function() { - if (GLOBAL.stop) { - stop(); - } - } -})).class, new (Java.type("java.lang.String[]"))(0)); \ No newline at end of file diff --git a/org.nodeclipse.jjs/help/index.md b/org.nodeclipse.jjs/help/index.md deleted file mode 100644 index 031682e6..00000000 --- a/org.nodeclipse.jjs/help/index.md +++ /dev/null @@ -1,96 +0,0 @@ - - -## Nashorn Examples - -- fxhelloworld.js - -```js -function start(stage) { - stage.title = "Hello World!"; - var button = new Button(); - button.text = "Say 'Hello World'"; - button.onAction = function() print("Hello World!"); - var root = new StackPane(); - root.children.add(button); - stage.scene = new Scene(root, 300, 250); - stage.show(); -} -load("fxinit.js"); -``` - -- fxinit.js - -```js -GLOBAL = this; -javafx = Packages.javafx; -com.sun.javafx.application.LauncherImpl.launchApplication( -(Java.extend(javafx.application.Application, { - init: function() { - // FX packages and classes must be defined here because they may not be - // viable until launch time. - Stage = javafx.stage.Stage; - scene = javafx.scene; - Scene = scene.Scene; - Group = scene.Group; - chart = scene.chart; - control = scene.control; - Button = control.Button; - StackPane = scene.layout.StackPane; - FXCollections = javafx.collections.FXCollections; - ObservableList = javafx.collections.ObservableList; - Chart = chart.Chart; - CategoryAxis = chart.CategoryAxis; - NumberAxis = chart.NumberAxis; - BarChart = chart.BarChart; - XYChart = chart.XYChart; - Series = chart.XYChart$Series; - Data = chart.XYChart$Data; - TreeView = control.TreeView; - TreeItem = control.TreeItem; - if (GLOBAL.init) { - init(); - } - }, - start: function(stage) { - if (GLOBAL.start) { - start(stage); - } - }, - stop: function() { - if (GLOBAL.stop) { - stop(); - } - } -})).class, new (Java.type("java.lang.String[]"))(0)); -``` - -- javaextend.js - -```js -// http://hg.openjdk.java.net/nashorn/jdk8/nashorn/raw-file/29b2b2ed954c/docs/JavaScriptingProgrammersGuide.html#jsextendconcrete - -/** - * Results: -size invoked! -add(i, e) invoked! - - */ - -var ArrayList = Java.type("java.util.ArrayList") -var ArrayListExtender = Java.extend(ArrayList) -var printSizeInvokedArrayList = new ArrayListExtender() { - size: function() { print("size invoked!"); } -} -var printAddInvokedArrayList = new ArrayListExtender() { - add: function(x, y) { - if(typeof(y) === "undefined") { - print("add(e) invoked!"); - } else { - print("add(i, e) invoked!"); - } - } -}; -printSizeInvokedArrayList.size(); -printAddInvokedArrayList.add(33, 33); -``` - diff --git a/org.nodeclipse.jjs/help/javaextend.js b/org.nodeclipse.jjs/help/javaextend.js deleted file mode 100644 index c6afb37d..00000000 --- a/org.nodeclipse.jjs/help/javaextend.js +++ /dev/null @@ -1,27 +0,0 @@ -//javaextend.js - -// http://hg.openjdk.java.net/nashorn/jdk8/nashorn/raw-file/29b2b2ed954c/docs/JavaScriptingProgrammersGuide.html#jsextendconcrete - -/** - * Results: -size invoked! -add(i, e) invoked! - - */ - -var ArrayList = Java.type("java.util.ArrayList") -var ArrayListExtender = Java.extend(ArrayList) -var printSizeInvokedArrayList = new ArrayListExtender() { - size: function() { print("size invoked!"); } -} -var printAddInvokedArrayList = new ArrayListExtender() { - add: function(x, y) { - if(typeof(y) === "undefined") { - print("add(e) invoked!"); - } else { - print("add(i, e) invoked!"); - } - } -}; -printSizeInvokedArrayList.size(); -printAddInvokedArrayList.add(33, 33); \ No newline at end of file diff --git a/org.nodeclipse.jjs/iconbank/java_16x16_on_white.png b/org.nodeclipse.jjs/iconbank/java_16x16_on_white.png deleted file mode 100644 index 2e4dca8a..00000000 Binary files a/org.nodeclipse.jjs/iconbank/java_16x16_on_white.png and /dev/null differ diff --git a/org.nodeclipse.jjs/icons/java_16x16.png b/org.nodeclipse.jjs/icons/java_16x16.png deleted file mode 100644 index 1611a164..00000000 Binary files a/org.nodeclipse.jjs/icons/java_16x16.png and /dev/null differ diff --git a/org.nodeclipse.jjs/icons/java_21x21.png b/org.nodeclipse.jjs/icons/java_21x21.png deleted file mode 100644 index 232cb2ca..00000000 Binary files a/org.nodeclipse.jjs/icons/java_21x21.png and /dev/null differ diff --git a/org.nodeclipse.jjs/icons/nashorn_16x16.png b/org.nodeclipse.jjs/icons/nashorn_16x16.png deleted file mode 100644 index adccd238..00000000 Binary files a/org.nodeclipse.jjs/icons/nashorn_16x16.png and /dev/null differ diff --git a/org.nodeclipse.jjs/icons/nashorn_16x16_bottom_right_corner_run_half_size.png b/org.nodeclipse.jjs/icons/nashorn_16x16_bottom_right_corner_run_half_size.png deleted file mode 100644 index a5b6351c..00000000 Binary files a/org.nodeclipse.jjs/icons/nashorn_16x16_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.jjs/icons/nashorn_16x16_top_right_corner_new.png b/org.nodeclipse.jjs/icons/nashorn_16x16_top_right_corner_new.png deleted file mode 100644 index f68cfb55..00000000 Binary files a/org.nodeclipse.jjs/icons/nashorn_16x16_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.jjs/plugin.xml b/org.nodeclipse.jjs/plugin.xml deleted file mode 100644 index a1daeb4a..00000000 --- a/org.nodeclipse.jjs/plugin.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - Create a new Nashorn project (or add .project file to an existing project) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.jjs/pom.xml b/org.nodeclipse.jjs/pom.xml deleted file mode 100644 index 83f816ca..00000000 --- a/org.nodeclipse.jjs/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.jjs - eclipse-plugin - - org.nodeclipse.jjs - org.nodeclipse.jjs - - diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/Activator.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/Activator.java deleted file mode 100644 index 24d53d2f..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/Activator.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.nodeclipse.jjs; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.nodeclipse.jjs.preferences.JJSConstants; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = JJSConstants.PLUGIN_ID; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index bde22bb7..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.nodeclipse.jjs.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.common.preferences.CommonDialogs; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.jjs.preferences.JJSConstants; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Launching `jjs` from Java 8.
    - * see LaunchConfigurationDelegate in .debug and .phantomjs module for comparison. - * - * @since 0.7 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - //NodeclipseConsole.write("launch jjs\n"); - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean isDebugMode = mode.equals(ILaunchManager.DEBUG_MODE); - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - String jjsPath= preferenceStore.getString(PreferenceConstants.JJS_PATH); - // Check if the node location is correctly configured - File jjsFile = new File(jjsPath); - if(!jjsFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page -// Dialogs.showPreferencesDialog("path to jjs util from Java 8 runtime is not correctly configured.\n\n" -// + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location under 'JJS path:'"); - CommonDialogs.showPreferencesDialog(JJSConstants.PREFERENCES_PAGE, - "Java 8 Nashorn jjs location is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+JJSConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - cmdLine.add(jjsPath); - - String jjsOptions= preferenceStore.getString(PreferenceConstants.JJS_OPTIONS); - if(!jjsOptions.equals("")) { - String[] sa = jjsOptions.split(" "); - for(String s : sa) { - cmdLine.add(s); - } - } - - if (isDebugMode) { - //TODO research how to debug - } - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add(filePath); - - File workingPath = null; - String workingDirectory = configuration.getAttribute(Constants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - workingPath = (new File(filePath)).getParentFile(); - } - - Map envm = new HashMap(); - envm = configuration.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, envm); - String[] envp = new String[envm.size()]; - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to debug.eg, - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, JJSConstants.PROCESS_MESSAGE); - if (isDebugMode) { - //TODO research how to debug - } - - } - -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationTabGroup.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationTabGroup.java deleted file mode 100644 index d819b517..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.jjs.launch; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), - new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationType.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationType.java deleted file mode 100644 index 14da534c..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.jjs.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchShortcut.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchShortcut.java deleted file mode 100644 index dbfdd75c..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchShortcut.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.nodeclipse.jjs.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.jjs.preferences.JJSConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "JJS Application" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(JJSConstants.LAUNCH_CONFIGURATION_TYPE_ID); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/nature/NashornNature.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/nature/NashornNature.java deleted file mode 100644 index 72a87eda..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/nature/NashornNature.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.nodeclipse.jjs.nature; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -/** - * NashornNature is copied NodeNature with NATURE_ID changed, - * just like PhantomjsNature - */ -public class NashornNature implements IProjectNature { - - /** - * ID of this project nature - */ - public static final String NATURE_ID = "org.nodeclipse.jjs.NashornNature"; - - private IProject project; - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#configure() - */ - public void configure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#deconfigure() - */ - public void deconfigure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#getProject() - */ - public IProject getProject() { - return project; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) - */ - public void setProject(IProject project) { - this.project = project; - } - -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSConstants.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSConstants.java deleted file mode 100644 index 6e116f6c..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSConstants.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.nodeclipse.jjs.preferences; - -public class JJSConstants { - - public static final String PLUGIN_ID = "org.nodeclipse.jjs"; - public static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.jjs.launch.LaunchConfigurationType"; - - public static final String PROCESS_MESSAGE = "JJS Process"; - - public static final String PREFERENCES_PAGE = "org.nodeclipse.jjs.preferences.JJSPreferencePage"; - public static final String PREFERENCE_PAGE_NAME ="Nodeclipse/JJS"; // ! not the same as in plugin.xml -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSPreferencePage.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSPreferencePage.java deleted file mode 100644 index 8b3dc00c..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSPreferencePage.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.nodeclipse.jjs.preferences; - -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.nodeclipse.ui.preferences.PreferenceConstants; - -/** - * @author Paul Verest - * @since 0.11 moved from NodePreferencePage - */ -public class JJSPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - private FileFieldEditor jjsPath; - private BooleanFieldEditor jjsJustJJS; - private StringFieldEditor jjsOptions; - - public JJSPreferencePage(){ - super(GRID); - setPreferenceStore(org.nodeclipse.ui.Activator.getDefault().getPreferenceStore()); - setImageDescriptor(org.nodeclipse.jjs.Activator.getImageDescriptor("icons/nashorn_16x16.png")); - setDescription("Java 8 Nashorn jjs settings"); - } - - @Override - public void init(IWorkbench workbench) { - } - - @Override - protected void createFieldEditors() { - jjsJustJJS = new BooleanFieldEditor(PreferenceConstants.JJS_JUST_JJS, - "just `jjs` (find `jjs` on PATH. Useful when there are 2 or more JDK 8 instances)", getFieldEditorParent()); - addField(jjsJustJJS); - - jjsPath = new FileFieldEditor(PreferenceConstants.JJS_PATH, "`jjs` path:", getFieldEditorParent()); - addField(jjsPath); - - jjsOptions = new StringFieldEditor(PreferenceConstants.JJS_OPTIONS, "jjs options (jjs -h):", getFieldEditorParent()); - addField(jjsOptions); - - } - -} diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/AbstractNashornProjectWizard.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/AbstractNashornProjectWizard.java deleted file mode 100644 index 8bc56b15..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/AbstractNashornProjectWizard.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.nodeclipse.jjs.wizards; - -import org.nodeclipse.jjs.nature.NashornNature; -import org.nodeclipse.ui.wizards.AbstractNodeProjectWizard; - -/** - * AbstractNashornProjectWizard (copied AbstractNodeProjectWizard), then made as subclass; - * just like AbstractPhantomjsProjectWizard - * @author Paul Verest - */ - -//@SuppressWarnings("restriction") -public abstract class AbstractNashornProjectWizard extends AbstractNodeProjectWizard { -//extends Wizard implements INewWizard { - - //+ to let overriding - @Override - protected String getProjectNature(){ - return NashornNature.NATURE_ID; - } - - -// private IWorkbench workbench; -// private IStructuredSelection selection; -// -// private IProject newProject; -// -// public AbstractPhantomjsProjectWizard() { -// setNeedsProgressMonitor(true); -// } -// -// @Override -// public void init(IWorkbench workbench, IStructuredSelection selection) { -// this.workbench = workbench; -// this.selection = selection; -// } -// -// public IWorkbench getWorkbench() { -// return workbench; -// } -// -// protected IStructuredSelection getSelection() { -// return selection; -// } -// -// @Override -// public boolean performFinish() { -// newProject = createNewProject(); -// if (newProject == null) { -// return false; -// } -// -// updatePerspective(); -// selectAndReveal(); -// return true; -// } -// -// protected abstract IProject createNewProject(); -// -// protected IProjectDescription createProjectDescription(IProject newProjectHandle, URI location) { -// IWorkspace workspace = ResourcesPlugin.getWorkspace(); -// final IProjectDescription description = workspace -// .newProjectDescription(newProjectHandle.getName()); -// description.setLocationURI(location); -// String[] natures = description.getNatureIds(); -// String[] newNatures = new String[natures.length + 2]; -// System.arraycopy(natures, 0, newNatures, 0, natures.length); -// newNatures[natures.length] = PhantomjsNature.NATURE_ID; -// newNatures[natures.length+1] = JavaScriptCore.NATURE_ID; -// description.setNatureIds(newNatures); -// -// return description; -// } -// -// protected void generateTemplates(String path, IProject projectHandle) throws CoreException { -// Bundle bundle = Activator.getDefault().getBundle(); -// if (bundle == null) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, "bundle not found")); -// } -// -// try { -// URL location = FileLocator.toFileURL(bundle.getEntry("/")); -// File templateRoot = new File(location.getPath(), path); -// LogUtil.info("templateRoot: " + templateRoot.getAbsolutePath()); -// -// RelativityFileSystemStructureProvider structureProvider = new RelativityFileSystemStructureProvider( -// templateRoot); -// ImportOperation operation = new ImportOperation( -// projectHandle.getFullPath(), templateRoot, -// structureProvider, new IOverwriteQuery() { -// public String queryOverwrite(String pathString) { -// return ALL; -// } -// }, structureProvider.getChildren(templateRoot)); -// -// operation.setContext(getShell()); -// operation.run(null); -// } catch (Exception e) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, e.getLocalizedMessage())); -// } -// } -// -// protected void rewriteFile(String filename, IProject projectHandle) -// throws CoreException { -// String newLine = System.getProperty("line.separator"); -// IFile readme = projectHandle.getFile(filename); -// if (!readme.exists()) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, filename + "not found")); -// } -// InputStreamReader ir = new InputStreamReader(readme.getContents()); -// BufferedReader br = new BufferedReader(ir); -// StringBuilder sb = new StringBuilder(); -// String line; -// try { -// while ((line = br.readLine()) != null) { -// if (line.contains("${projectname}")) { -// line = line.replace("${projectname}", -// projectHandle.getName()); -// } -// sb.append(line); -// sb.append(newLine); -// } -// ByteArrayInputStream source = new ByteArrayInputStream(sb -// .toString().getBytes()); -// readme.setContents(source, true, true, null); -// } catch (IOException e) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, "Cannot read " + filename)); -// } finally { -// try { -// ir.close(); -// br.close(); -// } catch (IOException e) { -// } -// ir = null; -// br = null; -// } -// } -// -// protected void runJSHint(IProject projectHandle) throws CoreException { -// String builderId = "com.eclipsesource.jshint.ui.builder"; -// IProjectDescription description = projectHandle.getDescription(); -// -// if (!containsBuildCommand(description, builderId)) { -// addBuildCommand(description, builderId); -// projectHandle.setDescription(description, null); -// } -// -// triggerClean(projectHandle, builderId); -// } -// -// protected boolean isExistsProjectFolder(IProjectDescription description) { -// URI location = description.getLocationURI(); -// String name = description.getName(); -// -// File folder = null; -// if(location != null) { -// folder = FileUtil.toPath(FileUtil.canonicalURI(location)).toFile(); -// } else { -// Workspace workspace = (Workspace)ResourcesPlugin.getWorkspace(); -// folder = workspace.getRoot().getLocation().append(name).toFile(); -// } -// -// if(folder.exists()) { -// if(folder.isDirectory()) { -// File[] files = folder.listFiles(); -// if(files.length == 0) { -// return false; -// } else { -// return true; -// } -// } else { -// return true; -// } -// } else { -// return false; -// } -// } -// -// protected boolean containsBuildCommand(IProjectDescription description, -// String builderId) { -// for (ICommand command : description.getBuildSpec()) { -// if (command.getBuilderName().equals(builderId)) { -// return true; -// } -// } -// return false; -// } -// -// protected void addBuildCommand(IProjectDescription description, String builderId) { -// ICommand[] oldCommands = description.getBuildSpec(); -// ICommand[] newCommands = new ICommand[oldCommands.length + 1]; -// System.arraycopy(oldCommands, 0, newCommands, 0, oldCommands.length); -// newCommands[newCommands.length - 1] = createBuildCommand(description, builderId); -// description.setBuildSpec(newCommands); -// } -// -// protected ICommand createBuildCommand(IProjectDescription description, String builderId) { -// ICommand command = description.newCommand(); -// command.setBuilderName(builderId); -// return command; -// } -// -// protected void triggerClean(IProject project, String builderName) throws CoreException { -// project.build(IncrementalProjectBuilder.CLEAN_BUILD, builderName, null, null); -// } -// -// private void selectAndReveal() { -// BasicNewResourceWizard.selectAndReveal(newProject, workbench.getActiveWorkbenchWindow()); -// } -// -// protected void updatePerspective() { -// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); -// IPerspectiveRegistry reg = WorkbenchPlugin.getDefault().getPerspectiveRegistry(); -// PerspectiveDescriptor rtPerspectiveDesc = (PerspectiveDescriptor) reg.findPerspectiveWithId(NodePerspective.ID); -// // Now set it as the active perspective. -// if (window != null) { -// IWorkbenchPage page = window.getActivePage(); -// page.setPerspective(rtPerspectiveDesc); -// } -// } -} - diff --git a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/NashornProjectWizard.java b/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/NashornProjectWizard.java deleted file mode 100644 index 655245ab..00000000 --- a/org.nodeclipse.jjs/src/org/nodeclipse/jjs/wizards/NashornProjectWizard.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.nodeclipse.jjs.wizards; - -import java.lang.reflect.InvocationTargetException; -import java.net.URI; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.ide.undo.CreateProjectOperation; -import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; -import org.eclipse.wst.jsdt.internal.ui.workingsets.JavaWorkingSetUpdater; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.wizards.NodeProjectWizardPage; - -/** - * NashornProjectWizard is copied NodeProjectWizard with changed line marked with //+ (edited strings); - * just like PhantomjsProjectWizard - * @author Paul Verest - */ -@SuppressWarnings("restriction") -public class NashornProjectWizard extends AbstractNashornProjectWizard implements INewWizard { - - private final String WINDOW_TITLE = "New Nashorn Project"; //+ - private NodeProjectWizardPage mainPage; - - private IProject newProject; - - public NashornProjectWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - @Override - public void addPages() { - mainPage = new NodeProjectWizardPage("NodeNewProjectPage") { //$NON-NLS-1$ - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl - * (org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - super.createControl(parent); - createWorkingSetGroup( - (Composite) getControl(), - getSelection(), - new String[] { JavaWorkingSetUpdater.ID, "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ - Dialog.applyDialogFont(getControl()); - } - }; - mainPage.setTitle("Create a Nashorn Project"); //+ - mainPage.setDescription("Create a new Nashorn project."); //+ - addPage(mainPage); - } - - @Override - protected IProject createNewProject() { - if (newProject != null) { - return null; - } - final IProject newProjectHandle = mainPage.getProjectHandle(); - URI location = null; - if (!mainPage.useDefaults()) { - location = mainPage.getLocationURI(); - } -/* - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProjectDescription description = workspace - .newProjectDescription(newProjectHandle.getName()); - description.setLocationURI(location); - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = NodeNature.NATURE_ID; - description.setNatureIds(newNatures); -*/ - final IProjectDescription description = createProjectDescription(newProjectHandle, location); - final boolean exists = isExistingProjectFolder(description); - - IRunnableWithProgress op = new IRunnableWithProgress() { - @Override - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - CreateProjectOperation op = new CreateProjectOperation( - description, WINDOW_TITLE); - try { - op.execute(monitor, - WorkspaceUndoUtil.getUIInfoAdapter(getShell())); - } catch (ExecutionException e) { - throw new InvocationTargetException(e); - } - - try { - if(!exists) { - // copy README.md, package.json & hello-world-server.js - generateTemplates("templates/common-templates", newProjectHandle); - //generateTemplates("templates", newProjectHandle); //+ Node specific - rewriteFile("README.md", newProjectHandle); - //rewriteFile("package.json", newProjectHandle); //+ Node specific - } - // JSHint support - runJSHint(newProjectHandle); - } catch (CoreException e) { - LogUtil.error(e); - } - } - }; - - try { - getContainer().run(true, true, op); - } catch (InvocationTargetException e) { - LogUtil.error(e); - } catch (InterruptedException e) { - } - - if (newProjectHandle != null) { - // add to workingsets - IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets(); - getWorkbench().getWorkingSetManager().addToWorkingSets( - newProjectHandle, workingSets); - } - - newProject = newProjectHandle; - return newProject; - } -} diff --git a/org.nodeclipse.mongodb/.classpath b/org.nodeclipse.mongodb/.classpath deleted file mode 100644 index 5a6b974b..00000000 --- a/org.nodeclipse.mongodb/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.mongodb/.project b/org.nodeclipse.mongodb/.project deleted file mode 100644 index 50ba313b..00000000 --- a/org.nodeclipse.mongodb/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.mongodb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.mongodb/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.mongodb/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.mongodb/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.mongodb/HelpToc.xml b/org.nodeclipse.mongodb/HelpToc.xml deleted file mode 100644 index abc88e73..00000000 --- a/org.nodeclipse.mongodb/HelpToc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/org.nodeclipse.mongodb/META-INF/MANIFEST.MF b/org.nodeclipse.mongodb/META-INF/MANIFEST.MF deleted file mode 100644 index 345a1ae3..00000000 --- a/org.nodeclipse.mongodb/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse MongoDB -Bundle-SymbolicName: org.nodeclipse.mongodb;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.mongodb.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.ui.editors, - org.eclipse.debug.ui, - org.nodeclipse.ui, - org.nodeclipse.common -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy -Import-Package: org.nodeclipse.debug.launch, - org.nodeclipse.debug.util diff --git a/org.nodeclipse.mongodb/README.md b/org.nodeclipse.mongodb/README.md deleted file mode 100644 index c54d87af..00000000 --- a/org.nodeclipse.mongodb/README.md +++ /dev/null @@ -1,7 +0,0 @@ - -Run .js files using MongoDB shell - -Depends on `.ui` and `.common` - -See also -and [#155](https://github.com/angelozerr/tern.java/issues/155) diff --git a/org.nodeclipse.mongodb/build.properties b/org.nodeclipse.mongodb/build.properties deleted file mode 100644 index bac53cb9..00000000 --- a/org.nodeclipse.mongodb/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - help/,\ - HelpToc.xml diff --git a/org.nodeclipse.mongodb/help/.mongo.md.html b/org.nodeclipse.mongodb/help/.mongo.md.html deleted file mode 100644 index a27fe286..00000000 --- a/org.nodeclipse.mongodb/help/.mongo.md.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - -C:\Users\weibl\git\NTS\nodeclipse-1\org.nodeclipse.mongodb\help\.mongo.md.html - - - - - - - - - - -

    MongoDB

    -

    From Wikipedia

    -
    -

    MongoDB (from "humongous") is a cross-platform document-oriented database system. Classified as a "NoSQL" database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.

    -
    -

    From MongoDB README

    -
    -
        COMPONENTS
    -
    -      bin/mongod - The database process.
    -      bin/mongos - Sharding controller.
    -      bin/mongo  - The database shell (uses interactive javascript).
    -
    -    UTILITIES
    -
    -      bin/mongodump         - MongoDB dump tool - for backups, snapshots, etc..
    -      bin/mongorestore      - MongoDB restore a dump
    -      bin/mongoexport       - Export a single collection to test (JSON, CSV)
    -      bin/mongoimport       - Import from JSON or CSV
    -      bin/mongofiles        - Utility for putting and getting files from MongoDB GridFS
    -      bin/mongostat         - Show performance statistics
    -
    -
    -

    Learning

    -

    There is great & simple online tutorial as Online Shell at http://www.mongodb.org/

    -

    MongoDB shell

    -
    -
        D:\Progs\MongoDB\mongodb-win32-x86_64-2.4.6\bin>mongo.exe -h
    -    MongoDB shell version: 2.4.6
    -    usage: D:\Progs\MongoDB\mongodb-win32-x86_64-2.4.6\bin\mongo.exe [options] [db address] [file names (ending in .js)]
    -    db address can be:
    -      foo                   foo database on local machine
    -      192.169.0.5/foo       foo database on 192.168.0.5 machine
    -      192.169.0.5:9999/foo  foo database on 192.168.0.5 machine on port 9999
    -    options:
    -      --shell                               run the shell after executing files
    -      --nodb                                don't connect to mongod on startup - no
    -                                            'db address' arg expected
    -      --norc                                will not run the ".mongorc.js" file on
    -                                            start up
    -      --quiet                               be less chatty
    -      --port arg                            port to connect to
    -      --host arg                            server to connect to
    -      --eval arg                            evaluate javascript
    -      -u [ --username ] arg                 username for authentication
    -      -p [ --password ] arg                 password for authentication
    -      --authenticationDatabase arg          user source (defaults to dbname)
    -      --authenticationMechanism arg (=MONGODB-CR)
    -                                            authentication mechanism
    -      -h [ --help ]                         show this usage information
    -      --version                             show version information
    -      --verbose                             increase verbosity
    -      --ipv6                                enable IPv6 support (disabled by
    -                                            default)
    -
    -    file names: a list of files to run. files have to end in .js and will exit after unless --shell is specified
    -
    -
    - - \ No newline at end of file diff --git a/org.nodeclipse.mongodb/help/mongo.md b/org.nodeclipse.mongodb/help/mongo.md deleted file mode 100644 index 6b20980c..00000000 --- a/org.nodeclipse.mongodb/help/mongo.md +++ /dev/null @@ -1,64 +0,0 @@ - - -# MongoDB - -From [Wikipedia](http://en.wikipedia.org/wiki/Mongodb) - -> MongoDB (from "humongous") is a cross-platform document-oriented database system. Classified as a "NoSQL" database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster. - -From MongoDB README - -```txt - COMPONENTS - - bin/mongod - The database process. - bin/mongos - Sharding controller. - bin/mongo - The database shell (uses interactive javascript). - - UTILITIES - - bin/mongodump - MongoDB dump tool - for backups, snapshots, etc.. - bin/mongorestore - MongoDB restore a dump - bin/mongoexport - Export a single collection to test (JSON, CSV) - bin/mongoimport - Import from JSON or CSV - bin/mongofiles - Utility for putting and getting files from MongoDB GridFS - bin/mongostat - Show performance statistics -``` - -### Learning - -There is great & simple online tutorial as Online Shell at - -### MongoDB shell - -```txt - D:\Progs\MongoDB\mongodb-win32-x86_64-2.4.6\bin>mongo.exe -h - MongoDB shell version: 2.4.6 - usage: D:\Progs\MongoDB\mongodb-win32-x86_64-2.4.6\bin\mongo.exe [options] [db address] [file names (ending in .js)] - db address can be: - foo foo database on local machine - 192.169.0.5/foo foo database on 192.168.0.5 machine - 192.169.0.5:9999/foo foo database on 192.168.0.5 machine on port 9999 - options: - --shell run the shell after executing files - --nodb don't connect to mongod on startup - no - 'db address' arg expected - --norc will not run the ".mongorc.js" file on - start up - --quiet be less chatty - --port arg port to connect to - --host arg server to connect to - --eval arg evaluate javascript - -u [ --username ] arg username for authentication - -p [ --password ] arg password for authentication - --authenticationDatabase arg user source (defaults to dbname) - --authenticationMechanism arg (=MONGODB-CR) - authentication mechanism - -h [ --help ] show this usage information - --version show version information - --verbose increase verbosity - --ipv6 enable IPv6 support (disabled by - default) - - file names: a list of files to run. files have to end in .js and will exit after unless --shell is specified -``` \ No newline at end of file diff --git a/org.nodeclipse.mongodb/icons/mongodb.ico b/org.nodeclipse.mongodb/icons/mongodb.ico deleted file mode 100644 index ae231c1c..00000000 Binary files a/org.nodeclipse.mongodb/icons/mongodb.ico and /dev/null differ diff --git a/org.nodeclipse.mongodb/icons/mongodb.png b/org.nodeclipse.mongodb/icons/mongodb.png deleted file mode 100644 index f463d9af..00000000 Binary files a/org.nodeclipse.mongodb/icons/mongodb.png and /dev/null differ diff --git a/org.nodeclipse.mongodb/icons/mongodb_bottom_right_corner_run_half_size.png b/org.nodeclipse.mongodb/icons/mongodb_bottom_right_corner_run_half_size.png deleted file mode 100644 index cb887450..00000000 Binary files a/org.nodeclipse.mongodb/icons/mongodb_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.mongodb/icons/mongodb_top_right_corner_new.png b/org.nodeclipse.mongodb/icons/mongodb_top_right_corner_new.png deleted file mode 100644 index 61930e2d..00000000 Binary files a/org.nodeclipse.mongodb/icons/mongodb_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.mongodb/plugin.xml b/org.nodeclipse.mongodb/plugin.xml deleted file mode 100644 index f5c53384..00000000 --- a/org.nodeclipse.mongodb/plugin.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.mongodb/pom.xml b/org.nodeclipse.mongodb/pom.xml deleted file mode 100644 index 4dbf1f74..00000000 --- a/org.nodeclipse.mongodb/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.mongodb - eclipse-plugin - - org.nodeclipse.mongodb - org.nodeclipse.mongodb - - diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/Activator.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/Activator.java deleted file mode 100644 index 2ce07601..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/Activator.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.nodeclipse.mongodb; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.mongodb"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index 22d07ef3..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.nodeclipse.mongodb.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.common.preferences.CommonDialogs; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.mongodb.preferences.MongoDBConstants; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Launching mongodb shell.
    - * see LaunchConfigurationDelegate in .debug and .phantomjs module for comparison. - * - * @since 0.7 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean isDebugMode = mode.equals(ILaunchManager.DEBUG_MODE); - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - String mongoDBShellPath= preferenceStore.getString(PreferenceConstants.MONGODB_SHELL_PATH); - // Check if the node location is correctly configured - File mongoDBShellFile = new File(mongoDBShellPath); - if(!mongoDBShellFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page -// Dialogs.showPreferencesDialog("Path to MongoDB Shell (e.g. mongo.exe) is not correctly configured.\n\n" -// + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location under 'MongoDB Shell path:'"); - CommonDialogs.showPreferencesDialog(MongoDBConstants.PREFERENCES_PAGE, - "MongoDB Shell location is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+MongoDBConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - cmdLine.add(mongoDBShellPath); - - String mongoShellOptions = preferenceStore.getString(PreferenceConstants.MONGODB_SHELL_OPTIONS); - if(!mongoShellOptions.equals("")) { - cmdLine.add(mongoShellOptions); - } - - if (isDebugMode) { - //TODO research how to debug - } - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add(filePath); - - File workingPath = null; - String workingDirectory = configuration.getAttribute(Constants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - workingPath = (new File(filePath)).getParentFile(); - } - - Map envm = new HashMap(); - envm = configuration.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, envm); - String[] envp = new String[envm.size()]; - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to debug.eg, - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, MongoDBConstants.PROCESS_MESSAGE); - if (isDebugMode) { - //TODO research how to debug - } - - } - -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationTabGroup.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationTabGroup.java deleted file mode 100644 index ecc67982..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.mongodb.launch; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), - new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationType.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationType.java deleted file mode 100644 index 1f8bc933..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.mongodb.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchShortcut.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchShortcut.java deleted file mode 100644 index 69465c81..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/launch/LaunchShortcut.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.nodeclipse.mongodb.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "mongodb shell JavaScript" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType("org.nodeclipse.mongodb.launch.LaunchConfigurationType"); //Constants."LAUNCH_CONFIGURATION_TYPE_ID" - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongoDBConstants.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongoDBConstants.java deleted file mode 100644 index 723b69ce..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongoDBConstants.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.nodeclipse.mongodb.preferences; - -public class MongoDBConstants { - - public static final String PROCESS_MESSAGE = "MongoDB Shell Process"; - - public static final String PREFERENCES_PAGE = "org.nodeclipse.mongodb.preferences.MongodbPreferencePage"; - public static final String PREFERENCE_PAGE_NAME ="Nodeclipse/MongoDB"; // ! not the same as in plugin.xml -} diff --git a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongodbPreferencePage.java b/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongodbPreferencePage.java deleted file mode 100644 index 12845e56..00000000 --- a/org.nodeclipse.mongodb/src/org/nodeclipse/mongodb/preferences/MongodbPreferencePage.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.nodeclipse.mongodb.preferences; - -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; - -/** - * @author Paul Verest - * @since 0.11 moved from NodePreferencePage - */ -public class MongodbPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - private FileFieldEditor mongoDBShellPath; - private StringFieldEditor mongoDBShellOptions; - - public MongodbPreferencePage(){ - super(GRID); - setPreferenceStore(org.nodeclipse.ui.Activator.getDefault().getPreferenceStore()); - setImageDescriptor(org.nodeclipse.mongodb.Activator.getImageDescriptor("icons/mongodb.png")); - setDescription("Mongodb Shell settings"); - } - - @Override - public void init(IWorkbench workbench) { - } - - @Override - protected void createFieldEditors() { - mongoDBShellPath = new FileFieldEditor(PreferenceConstants.MONGODB_SHELL_PATH, "MongoDB Shell path:", getFieldEditorParent()); - addField(mongoDBShellPath); - - mongoDBShellOptions = new StringFieldEditor(PreferenceConstants.MONGODB_SHELL_OPTIONS, "MongoDB Shell options:", getFieldEditorParent()); - addField(mongoDBShellOptions); - - } - -} diff --git a/org.nodeclipse.phantomjs/.classpath b/org.nodeclipse.phantomjs/.classpath deleted file mode 100644 index 5a6b974b..00000000 --- a/org.nodeclipse.phantomjs/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.phantomjs/.gitignore b/org.nodeclipse.phantomjs/.gitignore deleted file mode 100644 index 5e56e040..00000000 --- a/org.nodeclipse.phantomjs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/org.nodeclipse.phantomjs/.project b/org.nodeclipse.phantomjs/.project deleted file mode 100644 index 68995a7b..00000000 --- a/org.nodeclipse.phantomjs/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.phantomjs - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.phantomjs/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.phantomjs/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.phantomjs/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.phantomjs/META-INF/MANIFEST.MF b/org.nodeclipse.phantomjs/META-INF/MANIFEST.MF deleted file mode 100644 index 597f33d8..00000000 --- a/org.nodeclipse.phantomjs/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse PhantomJS -Bundle-SymbolicName: org.nodeclipse.phantomjs;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.phantomjs.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.ui.editors, - org.eclipse.debug.ui, - org.nodeclipse.ui, - org.nodeclipse.debug, - org.eclipse.wst.jsdt.core;bundle-version="1.1.102", - org.eclipse.wst.jsdt.ui, - org.nodeclipse.common -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy diff --git a/org.nodeclipse.phantomjs/README.md b/org.nodeclipse.phantomjs/README.md deleted file mode 100644 index 3dce3a10..00000000 --- a/org.nodeclipse.phantomjs/README.md +++ /dev/null @@ -1,11 +0,0 @@ - -## Usage - -Read at - -Read also built-in F1 - and [Online Help](https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.help/contents#intro) - -## Developing - -Depends on `.ui` and `.common` \ No newline at end of file diff --git a/org.nodeclipse.phantomjs/build.properties b/org.nodeclipse.phantomjs/build.properties deleted file mode 100644 index 0d3d3a74..00000000 --- a/org.nodeclipse.phantomjs/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/ diff --git a/org.nodeclipse.phantomjs/icons/phantomjs.ico b/org.nodeclipse.phantomjs/icons/phantomjs.ico deleted file mode 100644 index b7d71f95..00000000 Binary files a/org.nodeclipse.phantomjs/icons/phantomjs.ico and /dev/null differ diff --git a/org.nodeclipse.phantomjs/icons/phantomjs.png b/org.nodeclipse.phantomjs/icons/phantomjs.png deleted file mode 100644 index e344ae3c..00000000 Binary files a/org.nodeclipse.phantomjs/icons/phantomjs.png and /dev/null differ diff --git a/org.nodeclipse.phantomjs/icons/phantomjs_bottom_right_corner_run_half_size.png b/org.nodeclipse.phantomjs/icons/phantomjs_bottom_right_corner_run_half_size.png deleted file mode 100644 index 2e275fea..00000000 Binary files a/org.nodeclipse.phantomjs/icons/phantomjs_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.phantomjs/icons/phantomjs_half_size.png b/org.nodeclipse.phantomjs/icons/phantomjs_half_size.png deleted file mode 100644 index 3f35715c..00000000 Binary files a/org.nodeclipse.phantomjs/icons/phantomjs_half_size.png and /dev/null differ diff --git a/org.nodeclipse.phantomjs/icons/phantomjs_top_right_corner_new.png b/org.nodeclipse.phantomjs/icons/phantomjs_top_right_corner_new.png deleted file mode 100644 index 6969b908..00000000 Binary files a/org.nodeclipse.phantomjs/icons/phantomjs_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.phantomjs/plugin.xml b/org.nodeclipse.phantomjs/plugin.xml deleted file mode 100644 index f5490ccd..00000000 --- a/org.nodeclipse.phantomjs/plugin.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - Create a new PhantomJS project (or add .project file to an existing project) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.phantomjs/pom.xml b/org.nodeclipse.phantomjs/pom.xml deleted file mode 100644 index 369ce157..00000000 --- a/org.nodeclipse.phantomjs/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.phantomjs - eclipse-plugin - - org.nodeclipse.phantomjs - - Support for PhantomJS - - http://phantomjs.org/ - - PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: - DOM handling, CSS selector, JSON, Canvas, and SVG. - - - - diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/Activator.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/Activator.java deleted file mode 100644 index 0811922b..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/Activator.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.nodeclipse.phantomjs; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.phantomjs"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/editors/PhantomjsEditor.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/editors/PhantomjsEditor.java deleted file mode 100644 index f6cf16f5..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/editors/PhantomjsEditor.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.nodeclipse.phantomjs.editors; - -//import org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor; - -//import org.nodeclipse.ui.editors.NodeEditor; - -public class PhantomjsEditor{ -//public class PhantomjsEditor extends NodeEditor{ //The hierarchy of the type PhantomjsEditor is inconsistent - -//@SuppressWarnings("restriction") -//public class PhantomjsEditor extends CompilationUnitEditor{ ////The hierarchy of the type PhantomjsEditor is inconsistent - - //into MANIFEST.MF -// , -// org.eclipse.wst.jsdt.core;bundle-version="1.1.102", -// org.eclipse.wst.jsdt.ui;bundle-version="1.1.102" - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index 040f8561..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.nodeclipse.phantomjs.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.common.preferences.CommonDialogs; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.NodeDebugUtil; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.phantomjs.preferences.PhantomjsConstants; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Launching PhantomJS is similar to Node.js -
    -D:\Progs\phantomjs-1.9.2-windows>phantomjs.exe  --remote-debugger-port=6060 --remote-debugger-autorun=yes  examples\arguments.js 123
    -0: examples\arguments.js
    -1: 123
    -Phantom::exit() called but not quitting in debug mode.
    -
    - * - * @since 0.7 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate - //extends org.nodeclipse.debug.launch.LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate { - - //@SuppressWarnings("unchecked") - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - //NodeclipseConsole.write("launch phantomjs\n"); - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean isDebugMode = mode.equals(ILaunchManager.DEBUG_MODE); - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - String phantomjsPath= preferenceStore.getString(PreferenceConstants.PHANTOMJS_PATH); - // Check if the node location is correctly configured - File phantomjsFile = new File(phantomjsPath); - if(!phantomjsFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page -// Dialogs.showPreferencesDialog("PhantomJS runtime is not correctly configured.\n\n" -// + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location under 'PhanthomJS path:'"); - CommonDialogs.showPreferencesDialog(PhantomjsConstants.PREFERENCES_PAGE, - "PhantomJS installation is not correctly configured.\n\n" - + "Please goto Window -> Preferences -> "+PhantomjsConstants.PREFERENCE_PAGE_NAME - +" and configure the correct location"); - return; - } - cmdLine.add(phantomjsPath); - - if (isDebugMode) { - int phantomjsDebugPort = preferenceStore.getInt(PreferenceConstants.PHANTOMJS_DEBUG_PORT); - cmdLine.add("--remote-debugger-port="+phantomjsDebugPort); - - if (preferenceStore.getBoolean(PreferenceConstants.PHANTOMJS_DEBUG_AUTORUN)) //default false - cmdLine.add("--remote-debugger-autorun=yes"); - } - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - // path is relative, so cannot find it, unless get absolute path - cmdLine.add(filePath); - - File workingPath = null; - String workingDirectory = configuration.getAttribute(Constants.ATTR_WORKING_DIRECTORY, ""); - if(workingDirectory.length() > 0) { - workingDirectory = VariablesUtil.resolveValue(workingDirectory); - if(workingDirectory != null) { - workingPath = new File(workingDirectory); - } - } - if (workingPath == null){ - workingPath = (new File(filePath)).getParentFile(); - } - - Map envm = new HashMap(); - envm = configuration.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, envm); - String[] envp = new String[envm.size()]; - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to run or debug - Process p = DebugPlugin.exec(cmds, workingPath, envp); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, PhantomjsConstants.PROCESS_MESSAGE); - if (isDebugMode) { - int phantomjsDebugPort = preferenceStore.getInt(PreferenceConstants.PHANTOMJS_DEBUG_PORT); - NodeDebugUtil.launch(mode, launch, monitor, phantomjsDebugPort); - } -// if(!process.isTerminated()) { -// NodeDebugUtil.launch(mode, launch, monitor); -// } -// } - - - } - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationTabGroup.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationTabGroup.java deleted file mode 100644 index 39bddaf7..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.phantomjs.launch; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), - new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationType.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationType.java deleted file mode 100644 index dc9b46a6..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.phantomjs.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchShortcut.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchShortcut.java deleted file mode 100644 index 477575c4..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/launch/LaunchShortcut.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.nodeclipse.phantomjs.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "PhantomJS Script" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType("org.nodeclipse.phantomjs.launch.LaunchConfigurationType"); - //Constants."LAUNCH_CONFIGURATION_TYPE_ID" - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getCanonicalName()+"\n"); - } -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/nature/PhantomjsNature.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/nature/PhantomjsNature.java deleted file mode 100644 index d530d8f6..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/nature/PhantomjsNature.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.nodeclipse.phantomjs.nature; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -/** - * PhantomjsNature is copied NodeNature with NATURE_ID changed - */ -public class PhantomjsNature implements IProjectNature { - - /** - * ID of this project nature - */ - public static final String NATURE_ID = "org.nodeclipse.phantomjs.PhantomjsNature"; - - private IProject project; - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#configure() - */ - public void configure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#deconfigure() - */ - public void deconfigure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#getProject() - */ - public IProject getProject() { - return project; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) - */ - public void setProject(IProject project) { - this.project = project; - } - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsConstants.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsConstants.java deleted file mode 100644 index eb0a37d2..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsConstants.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.nodeclipse.phantomjs.preferences; - -public class PhantomjsConstants { - - public static final String PROCESS_MESSAGE = "PhantomJS Process"; - - public static final String PREFERENCES_PAGE = "org.nodeclipse.phantomjs.preferences.PhantomjsPreferencePage"; - public static final String PREFERENCE_PAGE_NAME ="Nodeclipse/PhantomJS"; // ! not the same as in plugin.xml -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferenceInitializer.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferenceInitializer.java deleted file mode 100644 index 7f677b19..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferenceInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.nodeclipse.phantomjs.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; - -public class PhantomjsPreferenceInitializer extends AbstractPreferenceInitializer { - - @Override - public void initializeDefaultPreferences() { - // ! uses .ui.preferences - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - //TODO this does not work! - store.setDefault(PreferenceConstants.PHANTOMJS_DEBUG_PORT, "6060"); // is free as on http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_ports - } - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferencePage.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferencePage.java deleted file mode 100644 index 9e8674a0..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/preferences/PhantomjsPreferencePage.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.nodeclipse.phantomjs.preferences; - -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.IntegerFieldEditor; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.nodeclipse.ui.preferences.PreferenceConstants; - -/** - * @author Paul Verest - * @since 0.11 moved from NodePreferencePage - */ -public class PhantomjsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - private FileFieldEditor phanthomjsPath; - private BooleanFieldEditor phanthomjsDebugAutorun; - private IntegerFieldEditor phanthomjsDebugPort; - - public PhantomjsPreferencePage(){ - super(GRID); - setPreferenceStore(org.nodeclipse.ui.Activator.getDefault().getPreferenceStore()); - setImageDescriptor(org.nodeclipse.phantomjs.Activator.getImageDescriptor("icons/phantomjs.png")); - setDescription("PhantomJS settings"); - } - - @Override - public void init(IWorkbench workbench) { - } - - @Override - protected void createFieldEditors() { - phanthomjsPath = new FileFieldEditor(PreferenceConstants.PHANTOMJS_PATH, "PhanthomJS path:", getFieldEditorParent()); - addField(phanthomjsPath); - - phanthomjsDebugPort = new IntegerFieldEditor(PreferenceConstants.PHANTOMJS_DEBUG_PORT, "PhantomJS debug port:", getFieldEditorParent()); - phanthomjsDebugPort.setEnabled(false, getFieldEditorParent()); - addField(phanthomjsDebugPort); - - phanthomjsDebugAutorun = new BooleanFieldEditor(PreferenceConstants.PHANTOMJS_DEBUG_AUTORUN, "PhantomJS debug autorun", getFieldEditorParent()); - phanthomjsDebugAutorun.setEnabled(false, getFieldEditorParent()); - addField(phanthomjsDebugAutorun); - - } - -} diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/AbstractPhantomjsProjectWizard.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/AbstractPhantomjsProjectWizard.java deleted file mode 100644 index 9fef135e..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/AbstractPhantomjsProjectWizard.java +++ /dev/null @@ -1,225 +0,0 @@ -package org.nodeclipse.phantomjs.wizards; - -import org.nodeclipse.phantomjs.nature.PhantomjsNature; -import org.nodeclipse.ui.wizards.AbstractNodeProjectWizard; - -/** - * AbstractPhantomjsProjectWizard (copied AbstractNodeProjectWizard), then made as subclass - * @author Paul Verest - */ - -@SuppressWarnings("restriction") -public abstract class AbstractPhantomjsProjectWizard extends AbstractNodeProjectWizard { -//extends Wizard implements INewWizard { - - //+ to let overriding - @Override - protected String getProjectNature(){ - return PhantomjsNature.NATURE_ID; - } - - -// private IWorkbench workbench; -// private IStructuredSelection selection; -// -// private IProject newProject; -// -// public AbstractPhantomjsProjectWizard() { -// setNeedsProgressMonitor(true); -// } -// -// @Override -// public void init(IWorkbench workbench, IStructuredSelection selection) { -// this.workbench = workbench; -// this.selection = selection; -// } -// -// public IWorkbench getWorkbench() { -// return workbench; -// } -// -// protected IStructuredSelection getSelection() { -// return selection; -// } -// -// @Override -// public boolean performFinish() { -// newProject = createNewProject(); -// if (newProject == null) { -// return false; -// } -// -// updatePerspective(); -// selectAndReveal(); -// return true; -// } -// -// protected abstract IProject createNewProject(); -// -// protected IProjectDescription createProjectDescription(IProject newProjectHandle, URI location) { -// IWorkspace workspace = ResourcesPlugin.getWorkspace(); -// final IProjectDescription description = workspace -// .newProjectDescription(newProjectHandle.getName()); -// description.setLocationURI(location); -// String[] natures = description.getNatureIds(); -// String[] newNatures = new String[natures.length + 2]; -// System.arraycopy(natures, 0, newNatures, 0, natures.length); -// newNatures[natures.length] = PhantomjsNature.NATURE_ID; -// newNatures[natures.length+1] = JavaScriptCore.NATURE_ID; -// description.setNatureIds(newNatures); -// -// return description; -// } -// -// protected void generateTemplates(String path, IProject projectHandle) throws CoreException { -// Bundle bundle = Activator.getDefault().getBundle(); -// if (bundle == null) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, "bundle not found")); -// } -// -// try { -// URL location = FileLocator.toFileURL(bundle.getEntry("/")); -// File templateRoot = new File(location.getPath(), path); -// LogUtil.info("templateRoot: " + templateRoot.getAbsolutePath()); -// -// RelativityFileSystemStructureProvider structureProvider = new RelativityFileSystemStructureProvider( -// templateRoot); -// ImportOperation operation = new ImportOperation( -// projectHandle.getFullPath(), templateRoot, -// structureProvider, new IOverwriteQuery() { -// public String queryOverwrite(String pathString) { -// return ALL; -// } -// }, structureProvider.getChildren(templateRoot)); -// -// operation.setContext(getShell()); -// operation.run(null); -// } catch (Exception e) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, e.getLocalizedMessage())); -// } -// } -// -// protected void rewriteFile(String filename, IProject projectHandle) -// throws CoreException { -// String newLine = System.getProperty("line.separator"); -// IFile readme = projectHandle.getFile(filename); -// if (!readme.exists()) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, filename + "not found")); -// } -// InputStreamReader ir = new InputStreamReader(readme.getContents()); -// BufferedReader br = new BufferedReader(ir); -// StringBuilder sb = new StringBuilder(); -// String line; -// try { -// while ((line = br.readLine()) != null) { -// if (line.contains("${projectname}")) { -// line = line.replace("${projectname}", -// projectHandle.getName()); -// } -// sb.append(line); -// sb.append(newLine); -// } -// ByteArrayInputStream source = new ByteArrayInputStream(sb -// .toString().getBytes()); -// readme.setContents(source, true, true, null); -// } catch (IOException e) { -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, "Cannot read " + filename)); -// } finally { -// try { -// ir.close(); -// br.close(); -// } catch (IOException e) { -// } -// ir = null; -// br = null; -// } -// } -// -// protected void runJSHint(IProject projectHandle) throws CoreException { -// String builderId = "com.eclipsesource.jshint.ui.builder"; -// IProjectDescription description = projectHandle.getDescription(); -// -// if (!containsBuildCommand(description, builderId)) { -// addBuildCommand(description, builderId); -// projectHandle.setDescription(description, null); -// } -// -// triggerClean(projectHandle, builderId); -// } -// -// protected boolean isExistsProjectFolder(IProjectDescription description) { -// URI location = description.getLocationURI(); -// String name = description.getName(); -// -// File folder = null; -// if(location != null) { -// folder = FileUtil.toPath(FileUtil.canonicalURI(location)).toFile(); -// } else { -// Workspace workspace = (Workspace)ResourcesPlugin.getWorkspace(); -// folder = workspace.getRoot().getLocation().append(name).toFile(); -// } -// -// if(folder.exists()) { -// if(folder.isDirectory()) { -// File[] files = folder.listFiles(); -// if(files.length == 0) { -// return false; -// } else { -// return true; -// } -// } else { -// return true; -// } -// } else { -// return false; -// } -// } -// -// protected boolean containsBuildCommand(IProjectDescription description, -// String builderId) { -// for (ICommand command : description.getBuildSpec()) { -// if (command.getBuilderName().equals(builderId)) { -// return true; -// } -// } -// return false; -// } -// -// protected void addBuildCommand(IProjectDescription description, String builderId) { -// ICommand[] oldCommands = description.getBuildSpec(); -// ICommand[] newCommands = new ICommand[oldCommands.length + 1]; -// System.arraycopy(oldCommands, 0, newCommands, 0, oldCommands.length); -// newCommands[newCommands.length - 1] = createBuildCommand(description, builderId); -// description.setBuildSpec(newCommands); -// } -// -// protected ICommand createBuildCommand(IProjectDescription description, String builderId) { -// ICommand command = description.newCommand(); -// command.setBuilderName(builderId); -// return command; -// } -// -// protected void triggerClean(IProject project, String builderName) throws CoreException { -// project.build(IncrementalProjectBuilder.CLEAN_BUILD, builderName, null, null); -// } -// -// private void selectAndReveal() { -// BasicNewResourceWizard.selectAndReveal(newProject, workbench.getActiveWorkbenchWindow()); -// } -// -// protected void updatePerspective() { -// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); -// IPerspectiveRegistry reg = WorkbenchPlugin.getDefault().getPerspectiveRegistry(); -// PerspectiveDescriptor rtPerspectiveDesc = (PerspectiveDescriptor) reg.findPerspectiveWithId(NodePerspective.ID); -// // Now set it as the active perspective. -// if (window != null) { -// IWorkbenchPage page = window.getActivePage(); -// page.setPerspective(rtPerspectiveDesc); -// } -// } -} - diff --git a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/PhantomjsProjectWizard.java b/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/PhantomjsProjectWizard.java deleted file mode 100644 index b7795311..00000000 --- a/org.nodeclipse.phantomjs/src/org/nodeclipse/phantomjs/wizards/PhantomjsProjectWizard.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.nodeclipse.phantomjs.wizards; - -import java.lang.reflect.InvocationTargetException; -import java.net.URI; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.ide.undo.CreateProjectOperation; -import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; -import org.eclipse.wst.jsdt.internal.ui.workingsets.JavaWorkingSetUpdater; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.wizards.NodeProjectWizardPage; - -/** - * copied NodeProjectWizard with changed line marked with //+ (edited strings) - * @author Paul Verest - */ -@SuppressWarnings("restriction") -public class PhantomjsProjectWizard extends AbstractPhantomjsProjectWizard implements INewWizard { - - private final String WINDOW_TITLE = "New PhantomJS Project"; //+ - private NodeProjectWizardPage mainPage; - - private IProject newProject; - - public PhantomjsProjectWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - @Override - public void addPages() { - mainPage = new NodeProjectWizardPage("NodeNewProjectPage") { //$NON-NLS-1$ - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl - * (org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - super.createControl(parent); - createWorkingSetGroup( - (Composite) getControl(), - getSelection(), - new String[] { JavaWorkingSetUpdater.ID, "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ - Dialog.applyDialogFont(getControl()); - } - }; - mainPage.setTitle("Create a PhantomJS Project"); //+ - mainPage.setDescription("Create a new PhantomJS project."); //+ - addPage(mainPage); - } - - @Override - protected IProject createNewProject() { - if (newProject != null) { - return null; - } - final IProject newProjectHandle = mainPage.getProjectHandle(); - URI location = null; - if (!mainPage.useDefaults()) { - location = mainPage.getLocationURI(); - } -/* - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProjectDescription description = workspace - .newProjectDescription(newProjectHandle.getName()); - description.setLocationURI(location); - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = NodeNature.NATURE_ID; - description.setNatureIds(newNatures); -*/ - final IProjectDescription description = createProjectDescription(newProjectHandle, location); - final boolean exists = isExistingProjectFolder(description); - - IRunnableWithProgress op = new IRunnableWithProgress() { - @Override - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - CreateProjectOperation op = new CreateProjectOperation( - description, WINDOW_TITLE); - try { - op.execute(monitor, - WorkspaceUndoUtil.getUIInfoAdapter(getShell())); - } catch (ExecutionException e) { - throw new InvocationTargetException(e); - } - - try { - if(!exists) { - // copy README.md, package.json & hello-world-server.js - generateTemplates("templates/common-templates", newProjectHandle); - //generateTemplates("templates", newProjectHandle); //+ Node specific - rewriteFile("README.md", newProjectHandle); - //rewriteFile("package.json", newProjectHandle); //+ Node specific - } - // JSHint support - runJSHint(newProjectHandle); - } catch (CoreException e) { - LogUtil.error(e); - } - } - }; - - try { - getContainer().run(true, true, op); - } catch (InvocationTargetException e) { - LogUtil.error(e); - } catch (InterruptedException e) { - } - - if (newProjectHandle != null) { - // add to workingsets - IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets(); - getWorkbench().getWorkingSetManager().addToWorkingSets( - newProjectHandle, workingSets); - } - - newProject = newProjectHandle; - return newProject; - } -} diff --git a/org.nodeclipse.pluginslist.core/.classpath b/org.nodeclipse.pluginslist.core/.classpath deleted file mode 100644 index 32a9aa47..00000000 --- a/org.nodeclipse.pluginslist.core/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.pluginslist.core/.project b/org.nodeclipse.pluginslist.core/.project deleted file mode 100644 index 2acf47d6..00000000 --- a/org.nodeclipse.pluginslist.core/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.pluginslist.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.pluginslist.core/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.pluginslist.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.pluginslist.core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.pluginslist.core/META-INF/MANIFEST.MF b/org.nodeclipse.pluginslist.core/META-INF/MANIFEST.MF deleted file mode 100644 index c193158a..00000000 --- a/org.nodeclipse.pluginslist.core/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse Plugins List -Bundle-SymbolicName: org.nodeclipse.pluginslist.core;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.pluginslist.core.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.workbench -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5, - JavaSE-1.6 -Bundle-Vendor: Nodeclipse organization diff --git a/org.nodeclipse.pluginslist.core/build.properties b/org.nodeclipse.pluginslist.core/build.properties deleted file mode 100644 index 89500559..00000000 --- a/org.nodeclipse.pluginslist.core/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/ diff --git a/org.nodeclipse.pluginslist.core/iconbank/github-cat_yellow_bottom_right_corner_node_favicon_16x16_half_size.png b/org.nodeclipse.pluginslist.core/iconbank/github-cat_yellow_bottom_right_corner_node_favicon_16x16_half_size.png deleted file mode 100644 index 8a6b796b..00000000 Binary files a/org.nodeclipse.pluginslist.core/iconbank/github-cat_yellow_bottom_right_corner_node_favicon_16x16_half_size.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/iconbank/stackoverflow.ico b/org.nodeclipse.pluginslist.core/iconbank/stackoverflow.ico deleted file mode 100644 index 2d04cd6f..00000000 Binary files a/org.nodeclipse.pluginslist.core/iconbank/stackoverflow.ico and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/iconbank/stackoverflow16_green.png b/org.nodeclipse.pluginslist.core/iconbank/stackoverflow16_green.png deleted file mode 100644 index d2f3898f..00000000 Binary files a/org.nodeclipse.pluginslist.core/iconbank/stackoverflow16_green.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/iconbank/tennis_ball.png b/org.nodeclipse.pluginslist.core/iconbank/tennis_ball.png deleted file mode 100644 index 1e3e5867..00000000 Binary files a/org.nodeclipse.pluginslist.core/iconbank/tennis_ball.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/icons/github-cat_green.png b/org.nodeclipse.pluginslist.core/icons/github-cat_green.png deleted file mode 100644 index 87e26fbd..00000000 Binary files a/org.nodeclipse.pluginslist.core/icons/github-cat_green.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/icons/green.png b/org.nodeclipse.pluginslist.core/icons/green.png deleted file mode 100644 index 2a049767..00000000 Binary files a/org.nodeclipse.pluginslist.core/icons/green.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/icons/stackoverflow16.png b/org.nodeclipse.pluginslist.core/icons/stackoverflow16.png deleted file mode 100644 index 8821053c..00000000 Binary files a/org.nodeclipse.pluginslist.core/icons/stackoverflow16.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/icons/tennis_ball_16x16_bottom_right_corner_green_half_size.png b/org.nodeclipse.pluginslist.core/icons/tennis_ball_16x16_bottom_right_corner_green_half_size.png deleted file mode 100644 index a29d1443..00000000 Binary files a/org.nodeclipse.pluginslist.core/icons/tennis_ball_16x16_bottom_right_corner_green_half_size.png and /dev/null differ diff --git a/org.nodeclipse.pluginslist.core/plugin.xml b/org.nodeclipse.pluginslist.core/plugin.xml deleted file mode 100644 index 7a74881b..00000000 --- a/org.nodeclipse.pluginslist.core/plugin.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.pluginslist.core/pom.xml b/org.nodeclipse.pluginslist.core/pom.xml deleted file mode 100644 index 75459bac..00000000 --- a/org.nodeclipse.pluginslist.core/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.pluginslist.core - eclipse-plugin - org.nodeclipse.pluginslist - org.nodeclipse.pluginslist Plugin - diff --git a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Activator.java b/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Activator.java deleted file mode 100644 index 0cacd02c..00000000 --- a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Activator.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.nodeclipse.pluginslist.core; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.pluginslist.core"; - - // The shared instance - private static Activator plugin; - - boolean started; - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - started = true; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - started = false; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Constants.java b/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Constants.java deleted file mode 100644 index 88272fc9..00000000 --- a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/Constants.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.nodeclipse.pluginslist.core; - -import java.net.MalformedURLException; -import java.net.URL; - -public class Constants { - - public static final String LIST_BROWSER_ID = "NodeclipsePluginsListID"; - public static final String GITHUB_BROWSER_ID = "NodeclipseGithubID"; - public static final String STACKOVERFLOW_BROWSER_ID = "NodeclipseStackoverflowID"; - - public static final String LIST_BROWSER_NAME = "Nodeclipse Plugins List"; - public static final String LIST_BROWSER_TOOLTIP = "Install plugins via drag-n-drop on main toolbar"; - public static final String GITHUB_BROWSER_NAME = "Nodeclipse effort on GitHub"; - public static final String GITHUB_BROWSER_TOOLTIP = "https://github.com/nodeclipse/"; - public static final String STACKOVERFLOW_BROWSER_NAME = "Nodeclipse support on Stackoverflow"; - public static final String STACKOVERFLOW_BROWSER_TOOLTIP = "http://stackoverflow.com/tags/nodeclipse"; - - public static final String ERROR1_MESSAGE = "Error creating browser component"; - - public static URL listUrl; - public static URL githubUrl; - public static URL stackoverflowUrl; - - static{ - try { - listUrl = new URL("http://www.nodeclipse.org/updates/list"); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - try { - githubUrl = new URL("https://github.com/nodeclipse/"); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - try { - stackoverflowUrl = new URL("http://stackoverflow.com/tags/nodeclipse"); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - -} diff --git a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/GithubAction.java b/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/GithubAction.java deleted file mode 100644 index 44c6e2e0..00000000 --- a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/GithubAction.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.nodeclipse.pluginslist.core; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.browser.IWebBrowser; -import org.eclipse.ui.browser.IWorkbenchBrowserSupport; -import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport; - -public class GithubAction implements IWorkbenchWindowActionDelegate { - private IWorkbenchWindow window; - - public GithubAction() { - } - - /** - * The action has been activated. The argument of the - * method represents the 'real' action sitting - * in the workbench UI. - * @see IWorkbenchWindowActionDelegate#run - */ - public void run(IAction action) { - - int style = IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS; - IWebBrowser browser; - try { - browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, - Constants.GITHUB_BROWSER_ID, Constants.GITHUB_BROWSER_NAME, Constants.GITHUB_BROWSER_TOOLTIP); - } catch (PartInitException e) { - e.printStackTrace(); - MessageDialog.openError( - window.getShell(), - Constants.ERROR1_MESSAGE, - Constants.ERROR1_MESSAGE+" to show "+Constants.GITHUB_BROWSER_NAME); - return; - } - try { - browser.openURL(Constants.githubUrl); - } catch (PartInitException e) { - e.printStackTrace(); - } - - } - - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - } - - /** - * We will cache window object in order to - * be able to provide parent shell for the message dialog. - * @see IWorkbenchWindowActionDelegate#init - */ - public void init(IWorkbenchWindow window) { - this.window = window; - } -} \ No newline at end of file diff --git a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/PluginsListAction.java b/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/PluginsListAction.java deleted file mode 100644 index 31467d6d..00000000 --- a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/PluginsListAction.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.nodeclipse.pluginslist.core; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.browser.IWebBrowser; -import org.eclipse.ui.browser.IWorkbenchBrowserSupport; -import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport; -import org.eclipse.jface.dialogs.MessageDialog; - -/** - * Our sample action implements workbench action delegate. - * The action proxy will be created by the workbench and - * shown in the UI. When the user tries to use the action, - * this delegate will be created and execution will be - * delegated to it. - * @see IWorkbenchWindowActionDelegate - */ -public class PluginsListAction implements IWorkbenchWindowActionDelegate { - private IWorkbenchWindow window; - /** - * The constructor. - */ - public PluginsListAction() { - } - - /** - * The action has been activated. The argument of the - * method represents the 'real' action sitting - * in the workbench UI. - * @see IWorkbenchWindowActionDelegate#run - */ - public void run(IAction action) { - -// -// -// To open the `Internal Browser` you need this code: -// -// int style = IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.STATUS; -// IWebBrowser browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, "MyBrowserID", "MyBrowserName", "MyBrowser Tooltip"); -// browser.openURL(new URL("http://www.google.de")); -// -// Alternative: -// -// final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser("abc"); -// browser.openURL(new URL("http://www.google.de")); - - int style = IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS; - IWebBrowser browser; - try { - browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, - Constants.LIST_BROWSER_ID, Constants.LIST_BROWSER_NAME, Constants.LIST_BROWSER_TOOLTIP); - } catch (PartInitException e) { - e.printStackTrace(); - MessageDialog.openError( - window.getShell(), - Constants.ERROR1_MESSAGE, - Constants.ERROR1_MESSAGE+" to show "+Constants.LIST_BROWSER_NAME); - return; - } - try { - browser.openURL(Constants.listUrl); - } catch (PartInitException e) { - e.printStackTrace(); - } - - } - - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - } - - /** - * We will cache window object in order to - * be able to provide parent shell for the message dialog. - * @see IWorkbenchWindowActionDelegate#init - */ - public void init(IWorkbenchWindow window) { - this.window = window; - } -} \ No newline at end of file diff --git a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/StackoverflowAction.java b/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/StackoverflowAction.java deleted file mode 100644 index d03aba02..00000000 --- a/org.nodeclipse.pluginslist.core/src/main/java/org/nodeclipse/pluginslist/core/StackoverflowAction.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.nodeclipse.pluginslist.core; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.browser.IWebBrowser; -import org.eclipse.ui.browser.IWorkbenchBrowserSupport; -import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport; - -public class StackoverflowAction implements IWorkbenchWindowActionDelegate { - private IWorkbenchWindow window; - - public StackoverflowAction() { - } - - /** - * The action has been activated. The argument of the - * method represents the 'real' action sitting - * in the workbench UI. - * @see IWorkbenchWindowActionDelegate#run - */ - public void run(IAction action) { - - int style = IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS; - IWebBrowser browser; - try { - browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, - Constants.STACKOVERFLOW_BROWSER_ID, Constants.STACKOVERFLOW_BROWSER_NAME, Constants.STACKOVERFLOW_BROWSER_TOOLTIP); - } catch (PartInitException e) { - e.printStackTrace(); - MessageDialog.openError( - window.getShell(), - Constants.ERROR1_MESSAGE, - Constants.ERROR1_MESSAGE+" to show "+Constants.STACKOVERFLOW_BROWSER_NAME); - return; - } - try { - browser.openURL(Constants.stackoverflowUrl); - } catch (PartInitException e) { - e.printStackTrace(); - } - - } - - /** - * Selection in the workbench has been changed. We - * can change the state of the 'real' action here - * if we want, but this can only happen after - * the delegate has been created. - * @see IWorkbenchWindowActionDelegate#selectionChanged - */ - public void selectionChanged(IAction action, ISelection selection) { - } - - /** - * We can use this method to dispose of any system - * resources we previously allocated. - * @see IWorkbenchWindowActionDelegate#dispose - */ - public void dispose() { - } - - /** - * We will cache window object in order to - * be able to provide parent shell for the message dialog. - * @see IWorkbenchWindowActionDelegate#init - */ - public void init(IWorkbenchWindow window) { - this.window = window; - } -} \ No newline at end of file diff --git a/org.nodeclipse.redis/.classpath b/org.nodeclipse.redis/.classpath deleted file mode 100644 index ad32c83a..00000000 --- a/org.nodeclipse.redis/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.redis/.project b/org.nodeclipse.redis/.project deleted file mode 100644 index a5e53d6a..00000000 --- a/org.nodeclipse.redis/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.redis - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.redis/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.redis/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.redis/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.redis/HelpToc.xml b/org.nodeclipse.redis/HelpToc.xml deleted file mode 100644 index 72e43fc0..00000000 --- a/org.nodeclipse.redis/HelpToc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/org.nodeclipse.redis/META-INF/MANIFEST.MF b/org.nodeclipse.redis/META-INF/MANIFEST.MF deleted file mode 100644 index de2cd6c5..00000000 --- a/org.nodeclipse.redis/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse Redis -Bundle-SymbolicName: org.nodeclipse.redis;singleton:=true -Bundle-Version: 0.7.0.qualifier -Bundle-Activator: org.nodeclipse.redis.Activator -Bundle-Vendor: Enide -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.ide, - org.eclipse.ui.editors, - org.eclipse.debug.ui, - org.nodeclipse.ui -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy -Import-Package: org.nodeclipse.debug.launch, - org.nodeclipse.debug.util diff --git a/org.nodeclipse.redis/README.md b/org.nodeclipse.redis/README.md deleted file mode 100644 index dd3ef567..00000000 --- a/org.nodeclipse.redis/README.md +++ /dev/null @@ -1,4 +0,0 @@ - -Redis support is under investigation - - \ No newline at end of file diff --git a/org.nodeclipse.redis/build.properties b/org.nodeclipse.redis/build.properties deleted file mode 100644 index bac53cb9..00000000 --- a/org.nodeclipse.redis/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - help/,\ - HelpToc.xml diff --git a/org.nodeclipse.redis/help/redis-logo.png b/org.nodeclipse.redis/help/redis-logo.png deleted file mode 100644 index abb69c09..00000000 Binary files a/org.nodeclipse.redis/help/redis-logo.png and /dev/null differ diff --git a/org.nodeclipse.redis/icons/redis-ico-16x16.png b/org.nodeclipse.redis/icons/redis-ico-16x16.png deleted file mode 100644 index 99ba5960..00000000 Binary files a/org.nodeclipse.redis/icons/redis-ico-16x16.png and /dev/null differ diff --git a/org.nodeclipse.redis/icons/redis-ico.png b/org.nodeclipse.redis/icons/redis-ico.png deleted file mode 100644 index e34b989d..00000000 Binary files a/org.nodeclipse.redis/icons/redis-ico.png and /dev/null differ diff --git a/org.nodeclipse.redis/plugin.xml b/org.nodeclipse.redis/plugin.xml deleted file mode 100644 index e0b524b5..00000000 --- a/org.nodeclipse.redis/plugin.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.redis/pom.xml b/org.nodeclipse.redis/pom.xml deleted file mode 100644 index fc530334..00000000 --- a/org.nodeclipse.redis/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 0.7.0-SNAPSHOT - - - org.nodeclipse.redis - eclipse-plugin - - org.nodeclipse.redis - org.nodeclipse.redis #84 - - diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/Activator.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/Activator.java deleted file mode 100644 index bd6ea4e7..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nodeclipse.redis; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.redis"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/ConstantsRedis.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/ConstantsRedis.java deleted file mode 100644 index ad75aef7..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/ConstantsRedis.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.nodeclipse.redis.launch; - -public class ConstantsRedis { - - public static final String PROCESS_MESSAGE = "Redis-cli Process"; - -} diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationDelegate.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationDelegate.java deleted file mode 100644 index 7f6c7ee2..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.nodeclipse.redis.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.debug.core.model.RuntimeProcess; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.debug.util.Constants; -import org.nodeclipse.debug.util.VariablesUtil; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.Dialogs; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Launching mongodb shell.
    - * see LaunchConfigurationDelegate in .debug and .phantomjs module for comparison. - * - * @version dirty - * @since 0.7 - * @author Paul Verest - */ -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - @Override - public void launch(ILaunchConfiguration configuration, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - - NodeclipseConsole.write("redis-cli\n"); - - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean isDebugMode = mode.equals(ILaunchManager.DEBUG_MODE); - - // Using configuration to build command line - List cmdLine = new ArrayList(); - - //TODO how to execute cmd or shell being OS independent ? - - String mongoDBShellPath= preferenceStore.getString(PreferenceConstants.MONGODB_SHELL_PATH); - // Check if the node location is correctly configured - File mongoDBShellFile = new File(mongoDBShellPath); - if(!mongoDBShellFile.exists()){ - // If the location is not valid than show a dialog which prompts the user to goto the preferences page - Dialogs.showPreferencesDialog("Path to MongoDB Shell (e.g. mongo.exe) is not correctly configured.\n\n" - + "Please goto Window -> Prefrences -> Nodeclipse and configure the correct location under 'MongoDB Shell path:'"); - return; - } - cmdLine.add(mongoDBShellPath); - - cmdLine.add("--shell"); //run the shell after executing files - - if (isDebugMode) { - //TODO research how to debug - } - - String file = configuration.getAttribute("KEY_FILE_PATH", ""); - - //TODO iterate over file and execute as redis command line by line - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - // Launch a process to debug.eg, - Process p = DebugPlugin.exec(cmds, null, null); - RuntimeProcess process = (RuntimeProcess)DebugPlugin.newProcess(launch, p, ConstantsRedis.PROCESS_MESSAGE); - if (isDebugMode) { - //TODO research how to debug - } - - } - -} diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationTabGroup.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationTabGroup.java deleted file mode 100644 index f2643321..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.nodeclipse.redis.launch; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.nodeclipse.debug.launch.LaunchConfigurationEnvironmentTab; - - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" will lead - * here. - * @author Paul Verest - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { -// new LaunchConfigurationMainTab(), -// new NodeArgumentsTab(), - //new LaunchConfigurationEnvironmentTab(), - new CommonTab() - }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationType.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationType.java deleted file mode 100644 index 12ed171a..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchConfigurationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.redis.launch; - -public class LaunchConfigurationType { - -} diff --git a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchShortcut.java b/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchShortcut.java deleted file mode 100644 index 5fb41f37..00000000 --- a/org.nodeclipse.redis/src/org/nodeclipse/redis/launch/LaunchShortcut.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.nodeclipse.redis.launch; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "mongodb shell JavaScript" will lead here - **/ -public class LaunchShortcut implements ILaunchShortcut { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - private void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType("org.nodeclipse.mongodb.launch.LaunchConfigurationType"); //Constants."LAUNCH_CONFIGURATION_TYPE_ID" - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - DebugUITools.launch(configuration, mode); - // then execution goes in LaunchConfigurationDelegate.java launch() method - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - String configname = file.getFullPath().toString().replace('/', '-'); - if(configname.startsWith("-")) { - configname = configname.substring(1); - } - - ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); - for(ILaunchConfiguration config : configs) { - if(configname.equals(config.getName())) { - return config; - } - } - - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, configname); - workingCopy.setAttribute("KEY_FILE_PATH", path); //Constants. - setMoreAttributes(workingCopy); - return workingCopy.doSave(); - } - - protected void setMoreAttributes(ILaunchConfigurationWorkingCopy workingCopy) { - NodeclipseConsole.write(this.getClass().getName()+"\n"); - } -} diff --git a/org.nodeclipse.site.quick/README.md b/org.nodeclipse.site.quick/README.md deleted file mode 100644 index 10923fce..00000000 --- a/org.nodeclipse.site.quick/README.md +++ /dev/null @@ -1,5 +0,0 @@ - -Simpler build during dev. Not full. See also `org.nodeclipse.site` module. - - -Idea: 2 stages to include external plugins. (No way known to make include or extend `category.xml` ) diff --git a/org.nodeclipse.site.quick/category.xml b/org.nodeclipse.site.quick/category.xml deleted file mode 100644 index a93ffffb..00000000 --- a/org.nodeclipse.site.quick/category.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - Grouping of related features - - - - - - - - - - - Nodeclipse Plugins List by Paul Verest, - Nodeclipse-1 Core, Chromium Dev tools, - JSHint integration by Ralf Sternberg - (together make minimal required set for Node.js and server side JavaScript) - Enide Node.js is set of Node.js related feature (made for convenience) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No need to install these plug-ins, if you have already installed these Node.js packages using npm (e.g. npm installl express -g). - See also #109, these bundle's jars are required, and installed even when corresponding features are not selected. - TODO make them really optional. - - - - - - - - - - - - - Enide Gradle, - Minimalist Gradle Editor by Paul Verest, - Enide Maven, - Nodeclipse Git Addon by Paul Verest, - YAML YEdit by http://dadacoalition.org/yedit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.site.quick/pom.xml b/org.nodeclipse.site.quick/pom.xml deleted file mode 100644 index e1b0948b..00000000 --- a/org.nodeclipse.site.quick/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.updates - eclipse-repository - - org.nodeclipse.updates - org.nodeclipse.updates (p2 repository / update site) - diff --git a/org.nodeclipse.site.quick/src/main/resources/index.html b/org.nodeclipse.site.quick/src/main/resources/index.html deleted file mode 100644 index b2ab4d66..00000000 --- a/org.nodeclipse.site.quick/src/main/resources/index.html +++ /dev/null @@ -1,2 +0,0 @@ -test -https://wiki.eclipse.org/Tycho/Release_Notes/0.22 \ No newline at end of file diff --git a/org.nodeclipse.site.test/category.xml b/org.nodeclipse.site.test/category.xml deleted file mode 100644 index ad99f021..00000000 --- a/org.nodeclipse.site.test/category.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - eExplorer (embedded Explorer, Windows only) by Matthias Cullmann https://github.com/culmat/eExplorer, - - - - - - - - diff --git a/org.nodeclipse.site.test/pom.xml b/org.nodeclipse.site.test/pom.xml deleted file mode 100644 index 9e2ac1d0..00000000 --- a/org.nodeclipse.site.test/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.site.test - eclipse-repository - - org.nodeclipse.site.test - org.nodeclipse.site.test (p2 repository / update site) - - - - eexplorer - p2 - http://culmat.github.io/eExplorer/updatesite/ - - - - - - - - com.github.github - site-maven-plugin - 0.9 - - culmat - eExplorer - Releasing update site for ${project.version} - updatesite - - - - - site - - site - - - - - - - diff --git a/org.nodeclipse.site/category.xml b/org.nodeclipse.site/category.xml deleted file mode 100644 index 9ed36228..00000000 --- a/org.nodeclipse.site/category.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - Grouping of related features - - - - - - - - - - - - - Nodeclipse Plugins List by Paul Verest, - Nodeclipse-1 Core, Chromium Dev tools, - JSHint integration by Ralf Sternberg - (together make minimal required set for Node.js and server side JavaScript) - Enide Node.js is set of Node.js related feature (made for convenience) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No need to install these plug-ins, if you have already installed these Node.js packages using npm (e.g. npm installl express -g). - See also #109, these bundle's jars are required, and installed even when corresponding features are not selected. - TODO make them really optional. - - - - - - - - - - - - - - Enide Gradle, - Minimalist Gradle Editor by Paul Verest, - Enide Maven, - Nodeclipse Git Addon by Paul Verest, - YAML YEdit by http://dadacoalition.org/yedit - - - - - - - - - - - - - - - - - - - - - - - Markdown Editor by Daniel Winterstein, - Github Flavored Markdown Viewer by Satyagraha, - RestClient Tool by Yadu Vendra, - StartExplorer (on any OS) by Bastian Krol, - Icons Editor by Jabier Martinez (requires org.eclipse.draw2d), - PDE-Tools and Eclipse Themes by Jeeeyul, - MonjaDB (MongoDB GUI) by Kanatoko Anvil, - ShellEd https://sourceforge.net/projects/shelled/ requires 'bundle org.eclipse.dltk.core [4.0.0,6.0.0)' - Json Tools by Denis Mirochnik https://bitbucket.org/denmiroch/jsontools - Ansy Console by Mihai Nita http://www.mihai-nita.net/eclipse - Grep Console by Marian Schedenig http://marian.schedenig.name/projects/grep-console/ - Nodeclipse EditBox (created in 2009-2011 by Piotr Metel) https://github.com/Nodeclipse/EditBox - Emmet (ex-Zen Coding) Eclipse plugin by Sergey Chikuyonok - Zip Editor by Uwe Voigt with refresh from https://github.com/Nodeclipse/zipeditor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JDT Spelling by Stuart Hendren http://www.stuarthendren.net - - - - - - - - - - InstaSearch by Andrejs Jermakovics https://github.com/ajermakovics/eclipse-instasearch, - Glance by Xored (Highlight anywhere, Ctrl+Alt+F) - Eclipse Color Theme (for Editors) by http://eclipse-color-theme.github.com - Eclipse 4 color Themes by Jeeeyul (requires 'org.eclipse.xtend2.lib`), - Eclipse 4 Moonrise dark color UI theme by Andrea Guarinoni github.com/guari - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JSON Edit by https://sourceforge.net/projects/eclipsejsonedit - EclipseRunner by Lukasz Wachowicz and Bartosz Roznowski (Runner View) http://code.google.com/p/eclipserunnerplugin/ - PracticallyMacro by Ernest Pasour (Macros for Editors using BeanShell.org) http://sourceforge.net/projects/practicalmacro/ - SelectionExplorer by Sandip Chitales - Open Closed Projects by Sandip Chitales - (some parts are missing) Eclipse plugin for LESS by Vincent Simonet http://www.normalesup.org/~simonet/soft/ow/eclipse-less.en.html - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.site/pom.xml b/org.nodeclipse.site/pom.xml deleted file mode 100644 index 944c38d9..00000000 --- a/org.nodeclipse.site/pom.xml +++ /dev/null @@ -1,302 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.site - eclipse-repository - - org.nodeclipse.site - org.nodeclipse.site (p2 repository / update site) - - - - - - - - jshint-eclipse - p2 - http://github.eclipsesource.com/jshint-eclipse/updates/ - - - - - - org.dadacoalition.yedit - p2 - http://dadacoalition.org/yedit - - - - git-addon - p2 - http://www.nodeclipse.org/git/addon/ - - - - - - - winterwell.markdown - p2 - http://www.nodeclipse.org/updates/markdown/ - - - gfm.viewer - p2 - http://dl.bintray.com/satyagraha/generic/1.9.3/ - - - - startexplorer - p2 - http://basti1302.github.com/startexplorer/update/ - - - Icons-Editor - p2 - http://eclipse-icons-editor.eclipselabs.org.codespot.com/git/site/org.eclipse_icons.editor.site/ - - - jeeeyul - p2 - http://jeeeyul.github.io/update/ - - - - net.jumperz.app.MMonjaDB - p2 - http://www.jumperz.net/update/ - - - shelled - p2 - https://downloads.sourceforge.net/project/shelled/shelled/update/ - - - eclipsejsonedit - p2 - https://sourceforge.net/projects/eclipsejsonedit/files/update - - - - - ansy-console - p2 - http://www.mihai-nita.net/eclipse - - - grep-console - p2 - http://eclipse.schedenig.name - - - editbox - p2 - http://nodeclipse.github.io/updates/editbox-0.70.0/ - - - - io.emmet.eclipse - p2 - http://emmet.io/eclipse/updates/ - - - - zipeditor - p2 - http://nodeclipse.github.io/updates/zipeditor/ - - - - - - jdt.spelling.feature - p2 - - http://jdt.spelling.s3-website-us-east-1.amazonaws.com - - - - - - it.unibz.instasearch.feature.indigo - p2 - http://dl.bintray.com/ajermakovics/InstaSearch/ - - - com.xored.glance - p2 - http://eclipse-glance.googlecode.com/svn/site/ - - - - com.github.eclipsecolortheme.feature - p2 - http://eclipse-color-theme.github.com/update - - - net.jeeeyul.eclipse.themes.updatesite - p2 - http://eclipse.jeeeyul.net/update/ - - - moonrise.com.github.eclipseuitheme.themes.feature - p2 - https://raw.github.com/guari/eclipse-ui-theme/master/com.github.eclipseuitheme.themes.updatesite - - - - - - coffeescript-eclipse - p2 - http://dl.bintray.com/nodeclipse/CoffeeScriptEditor/0.4.0-201403250304/ - - - - - - EclipseRunner - p2 - http://eclipserunnerplugin.googlecode.com/svn/trunk/EclipseRunnerSite - - - practicallymacro - p2 - http://puremvcnotificationviewer.googlecode.com/svn/trunk/PracticallyMacroGoogleUpdateSite - - - SelectionExplorer - p2 - http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/SelectionExplorerUpdateSite - - - OpenClosedProjectsFeature - p2 - http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/OpenClosedProjectsFeatureUpdateSite/ - - - - - - - fail-back - p2 - http://dl.bintray.com/nodeclipse/nodeclipse/0.15/ - - - - - - - - - - - - - com.github.github - site-maven-plugin - ${github-site-maven-plugin-version} - - Nodeclipse - nodeclipse-1 - Releasing updatesite for ${project.version} - updatesite - ${env.githubuser_oauth2Token} - - - - - site - - site - - - - - - - diff --git a/org.nodeclipse.ui/.classpath b/org.nodeclipse.ui/.classpath deleted file mode 100644 index 121e527a..00000000 --- a/org.nodeclipse.ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.ui/.gitignore b/org.nodeclipse.ui/.gitignore deleted file mode 100644 index 3230424e..00000000 --- a/org.nodeclipse.ui/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/templates/node_modules -.project_ \ No newline at end of file diff --git a/org.nodeclipse.ui/.project b/org.nodeclipse.ui/.project deleted file mode 100644 index 0e4e7e1a..00000000 --- a/org.nodeclipse.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.nodeclipse.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.nodeclipse.ui/.settings/org.eclipse.jdt.core.prefs b/org.nodeclipse.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ef8a789c..00000000 --- a/org.nodeclipse.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.nodeclipse.ui/META-INF/MANIFEST.MF b/org.nodeclipse.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 06cd66fe..00000000 --- a/org.nodeclipse.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,32 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Nodeclipse -Bundle-SymbolicName: org.nodeclipse.ui;singleton:=true -Bundle-Version: 1.0.2.qualifier -Bundle-Activator: org.nodeclipse.ui.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.ui.ide, - org.eclipse.jface.text, - org.eclipse.ui.editors, - org.eclipse.ui.console, - org.eclipse.debug.ui, - org.eclipse.ui.navigator, - org.chromium.debug.ui;bundle-version="0.3.9", - org.eclipse.wst.jsdt.core;bundle-version="1.1.102", - org.eclipse.wst.jsdt.ui;bundle-version="1.1.102", - org.nodeclipse.bundle.coffee, - org.nodeclipse.bundle.express, - org.eclipse.ui.workbench -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.nodeclipse.ui, - org.nodeclipse.ui.editors, - org.nodeclipse.ui.perspectives, - org.nodeclipse.ui.preferences, - org.nodeclipse.ui.util, - org.nodeclipse.ui.wizards -Bundle-Vendor: Nodeclipse organization -Import-Package: org.nodeclipse.bundle.coffee, - org.nodeclipse.bundle.express diff --git a/org.nodeclipse.ui/README.md b/org.nodeclipse.ui/README.md deleted file mode 100644 index 81e9112e..00000000 --- a/org.nodeclipse.ui/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - -### Eclipse RCP notes - -http://stackoverflow.com/questions/16755481/eclipse-plugin-how-to-show-resources-by-default-in-perspective - - -- http://aniefer.blogspot.dk/2009/06/patching-features-with-p2.html - -> Say I have a feature that I build, it runs on top of the Eclipse Platform. I know Eclipse Galileo is coming out soon, so I download it and try it out with my feature. - -> Oh No! It doesn't work! I've found a bug in the platform, and its a major blocker for me. (Oops, maybe I should have tried this a couple of months ago when there still would have been time to fix the bug.) - -> Meta-Comment: The Eclipse Platform Project has a reputation for shipping on time (even if that means there are unresolved bugs). There is a strict end game plan that is followed for the release, lock down started back at the beginning of May. The further we are along in the plan, the harder it is to get a fix approved for release. A lot of people don't seem to relealize this happens, and perhaps wonder why their important bugs are defered with the comment "Its too late". \ No newline at end of file diff --git a/org.nodeclipse.ui/build.properties b/org.nodeclipse.ui/build.properties deleted file mode 100644 index 02422f7f..00000000 --- a/org.nodeclipse.ui/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - templates/ diff --git a/org.nodeclipse.ui/docs/HippieProposalProcessor.java b/org.nodeclipse.ui/docs/HippieProposalProcessor.java deleted file mode 100644 index 8929f795..00000000 --- a/org.nodeclipse.ui/docs/HippieProposalProcessor.java +++ /dev/null @@ -1,291 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -/******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Genady Beryozkin, me@genady.org - #getSuggestions implementation copied from HippieCompleteAction - *******************************************************************************/ -//package org.eclipse.ui.texteditor; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.DocumentEvent; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IInformationControlCreator; -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; -import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2; -import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; -import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.jface.text.contentassist.IContextInformationValidator; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorReference; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.internal.texteditor.HippieCompletionEngine; -import org.eclipse.ui.texteditor.ITextEditor; - -/** - * A completion proposal computer for hippie word completions. - *

    - * Clients may instantiate. - *

    - * - * @since 3.2 - */ -public final class HippieProposalProcessor implements IContentAssistProcessor { - - private static final ICompletionProposal[] NO_PROPOSALS= new ICompletionProposal[0]; - private static final IContextInformation[] NO_CONTEXTS= new IContextInformation[0]; - - private static final class Proposal implements ICompletionProposal, ICompletionProposalExtension, ICompletionProposalExtension2, ICompletionProposalExtension3, ICompletionProposalExtension4 { - - private final String fString; - private final String fPrefix; - private final int fOffset; - - public Proposal(String string, String prefix, int offset) { - fString= string; - fPrefix= prefix; - fOffset= offset; - } - - public void apply(IDocument document) { - apply(null, '\0', 0, fOffset); - } - - public Point getSelection(IDocument document) { - return new Point(fOffset + fString.length(), 0); - } - - public String getAdditionalProposalInfo() { - return null; - } - - public String getDisplayString() { - return fPrefix + fString; - } - - public Image getImage() { - return null; - } - - public IContextInformation getContextInformation() { - return null; - } - - public void apply(IDocument document, char trigger, int offset) { - try { - String replacement= fString.substring(offset - fOffset); - document.replace(offset, 0, replacement); - } catch (BadLocationException x) { - // TODO Auto-generated catch block - x.printStackTrace(); - } - } - - public boolean isValidFor(IDocument document, int offset) { - return validate(document, offset, null); - } - - public char[] getTriggerCharacters() { - return null; - } - - public int getContextInformationPosition() { - return 0; - } - - public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) { - apply(viewer.getDocument(), trigger, offset); - } - - public void selected(ITextViewer viewer, boolean smartToggle) { - } - - public void unselected(ITextViewer viewer) { - } - - public boolean validate(IDocument document, int offset, DocumentEvent event) { - try { - int prefixStart= fOffset - fPrefix.length(); - return offset >= fOffset && offset < fOffset + fString.length() && document.get(prefixStart, offset - (prefixStart)).equals((fPrefix + fString).substring(0, offset - prefixStart)); - } catch (BadLocationException x) { - return false; - } - } - - public IInformationControlCreator getInformationControlCreator() { - return null; - } - - public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) { - return fPrefix + fString; - } - - public int getPrefixCompletionStart(IDocument document, int completionOffset) { - return fOffset - fPrefix.length(); - } - - public boolean isAutoInsertable() { - return true; - } - - } - - private final HippieCompletionEngine fEngine= new HippieCompletionEngine(); - - /** - * Creates a new hippie completion proposal computer. - */ - public HippieProposalProcessor() { - } - - /* - * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int) - */ - public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { - try { - String prefix= getPrefix(viewer, offset); - if (prefix == null || prefix.length() == 0) - return NO_PROPOSALS; - - List suggestions= getSuggestions(viewer, offset, prefix); - - List result= new ArrayList(); - for (Iterator it= suggestions.iterator(); it.hasNext();) { - String string= (String) it.next(); - if (string.length() > 0) - result.add(createProposal(string, prefix, offset)); - } - - return (ICompletionProposal[]) result.toArray(new ICompletionProposal[result.size()]); - - } catch (BadLocationException x) { - // ignore and return no proposals - return NO_PROPOSALS; - } - } - - private String getPrefix(ITextViewer viewer, int offset) throws BadLocationException { - IDocument doc= viewer.getDocument(); - if (doc == null || offset > doc.getLength()) - return null; - - int length= 0; - while (--offset >= 0 && Character.isJavaIdentifierPart(doc.getChar(offset))) - length++; - - return doc.get(offset + 1, length); - } - - private ICompletionProposal createProposal(String string, String prefix, int offset) { - return new Proposal(string, prefix, offset); - } - - /* - * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int) - */ - public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { - // no context informations for hippie completions - return NO_CONTEXTS; - } - - /* - * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters() - */ - public char[] getCompletionProposalAutoActivationCharacters() { - return null; - } - - /* - * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters() - */ - public char[] getContextInformationAutoActivationCharacters() { - return null; - } - - /* - * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator() - */ - public IContextInformationValidator getContextInformationValidator() { - return null; - } - - /** - * Return the list of suggestions from the current document. First the document is searched - * backwards from the caret position and then forwards. - * - * @param offset the offset - * @param viewer the viewer - * @param prefix the completion prefix - * @return all possible completions that were found in the current document - * @throws BadLocationException if accessing the document fails - */ - private ArrayList createSuggestionsFromOpenDocument(ITextViewer viewer, int offset, String prefix) throws BadLocationException { - IDocument document= viewer.getDocument(); - ArrayList completions= new ArrayList(); - completions.addAll(fEngine.getCompletionsBackwards(document, prefix, offset)); - completions.addAll(fEngine.getCompletionsForward(document, prefix, offset - prefix.length(), true)); - - return completions; - } - - /** - * Create the array of suggestions. It scans all open text editors and prefers suggestions from - * the currently open editor. It also adds the empty suggestion at the end. - * - * @param viewer the viewer - * @param offset the offset - * @param prefix the prefix to search for - * @return the list of all possible suggestions in the currently open editors - * @throws BadLocationException if accessing the current document fails - */ - private List getSuggestions(ITextViewer viewer, int offset, String prefix) throws BadLocationException { - - ArrayList suggestions= createSuggestionsFromOpenDocument(viewer, offset, prefix); - IDocument currentDocument= viewer.getDocument(); - - IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - IEditorReference editorReferences[]= window.getActivePage().getEditorReferences(); - - for (int i= 0; i < editorReferences.length; i++) { - IEditorPart editor= editorReferences[i].getEditor(false); // don't create! - if (editor instanceof ITextEditor) { - ITextEditor textEditor= (ITextEditor) editor; - IEditorInput input= textEditor.getEditorInput(); - IDocument doc= textEditor.getDocumentProvider().getDocument(input); - if (!currentDocument.equals(doc)) - suggestions.addAll(fEngine.getCompletionsForward(doc, prefix, 0, false)); - } - } - // add the empty suggestion - suggestions.add(""); //$NON-NLS-1$ - - List uniqueSuggestions= fEngine.makeUnique(suggestions); - - return uniqueSuggestions; - } - - /* - * @see org.eclipse.jface.text.contentassist.ICompletionProposalComputer#getErrorMessage() - */ - public String getErrorMessage() { - return null; // no custom error message - } -} diff --git a/org.nodeclipse.ui/docs/JSDTContentAssistProcessor.java b/org.nodeclipse.ui/docs/JSDTContentAssistProcessor.java deleted file mode 100644 index c229321b..00000000 --- a/org.nodeclipse.ui/docs/JSDTContentAssistProcessor.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.jface.text.contentassist.IContextInformationValidator; - -public class JSDTContentAssistProcessor implements IContentAssistProcessor{ - - @Override - public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { - // TODO Auto-generated method stub - return null; - } - - @Override - public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { - // TODO Auto-generated method stub - return null; - } - - @Override - public char[] getCompletionProposalAutoActivationCharacters() { - // TODO Auto-generated method stub - return null; - } - - @Override - public char[] getContextInformationAutoActivationCharacters() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getErrorMessage() { - // TODO Auto-generated method stub - return null; - } - - @Override - public IContextInformationValidator getContextInformationValidator() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/org.nodeclipse.ui/iconbank/bower.ico b/org.nodeclipse.ui/iconbank/bower.ico deleted file mode 100644 index dbbb1be2..00000000 Binary files a/org.nodeclipse.ui/iconbank/bower.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/coffee.ico b/org.nodeclipse.ui/iconbank/coffee.ico deleted file mode 100644 index ce45abc4..00000000 Binary files a/org.nodeclipse.ui/iconbank/coffee.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/e.PNG b/org.nodeclipse.ui/iconbank/e.PNG deleted file mode 100644 index 639f7c60..00000000 Binary files a/org.nodeclipse.ui/iconbank/e.PNG and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/e_16x16.png b/org.nodeclipse.ui/iconbank/e_16x16.png deleted file mode 100644 index 356cbdf3..00000000 Binary files a/org.nodeclipse.ui/iconbank/e_16x16.png and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/eclipse.ico b/org.nodeclipse.ui/iconbank/eclipse.ico deleted file mode 100644 index 97dadf3c..00000000 Binary files a/org.nodeclipse.ui/iconbank/eclipse.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/git.ico b/org.nodeclipse.ui/iconbank/git.ico deleted file mode 100644 index 47b2aa33..00000000 Binary files a/org.nodeclipse.ui/iconbank/git.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/jshint-blue.png b/org.nodeclipse.ui/iconbank/jshint-blue.png deleted file mode 100644 index 0430f6b3..00000000 Binary files a/org.nodeclipse.ui/iconbank/jshint-blue.png and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/jshint-dark.png b/org.nodeclipse.ui/iconbank/jshint-dark.png deleted file mode 100644 index 3b712041..00000000 Binary files a/org.nodeclipse.ui/iconbank/jshint-dark.png and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/node.ico b/org.nodeclipse.ui/iconbank/node.ico deleted file mode 100644 index 2799f8ce..00000000 Binary files a/org.nodeclipse.ui/iconbank/node.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/node_favicon.ico b/org.nodeclipse.ui/iconbank/node_favicon.ico deleted file mode 100644 index c7699ee7..00000000 Binary files a/org.nodeclipse.ui/iconbank/node_favicon.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/node_half_size.png b/org.nodeclipse.ui/iconbank/node_half_size.png deleted file mode 100644 index 735c70f0..00000000 Binary files a/org.nodeclipse.ui/iconbank/node_half_size.png and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/npm.ico b/org.nodeclipse.ui/iconbank/npm.ico deleted file mode 100644 index 9e0d4eef..00000000 Binary files a/org.nodeclipse.ui/iconbank/npm.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/typescript.ico b/org.nodeclipse.ui/iconbank/typescript.ico deleted file mode 100644 index 1ac65b69..00000000 Binary files a/org.nodeclipse.ui/iconbank/typescript.ico and /dev/null differ diff --git a/org.nodeclipse.ui/iconbank/typescript_16.png b/org.nodeclipse.ui/iconbank/typescript_16.png deleted file mode 100644 index 850ac9e7..00000000 Binary files a/org.nodeclipse.ui/iconbank/typescript_16.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/bower16.png b/org.nodeclipse.ui/icons/bower16.png deleted file mode 100644 index fdc379ad..00000000 Binary files a/org.nodeclipse.ui/icons/bower16.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/coffee.png b/org.nodeclipse.ui/icons/coffee.png deleted file mode 100644 index 2a8c92bc..00000000 Binary files a/org.nodeclipse.ui/icons/coffee.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/coffee_top_right_corner_new.png b/org.nodeclipse.ui/icons/coffee_top_right_corner_new.png deleted file mode 100644 index 39c2b412..00000000 Binary files a/org.nodeclipse.ui/icons/coffee_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/contentassist/method.gif b/org.nodeclipse.ui/icons/contentassist/method.gif deleted file mode 100644 index 7d24707e..00000000 Binary files a/org.nodeclipse.ui/icons/contentassist/method.gif and /dev/null differ diff --git a/org.nodeclipse.ui/icons/contentassist/method_blue.png b/org.nodeclipse.ui/icons/contentassist/method_blue.png deleted file mode 100644 index dee8d79d..00000000 Binary files a/org.nodeclipse.ui/icons/contentassist/method_blue.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/contentassist/property.gif b/org.nodeclipse.ui/icons/contentassist/property.gif deleted file mode 100644 index 2cf0a625..00000000 Binary files a/org.nodeclipse.ui/icons/contentassist/property.gif and /dev/null differ diff --git a/org.nodeclipse.ui/icons/e_16x16_top_right_corner_new.png b/org.nodeclipse.ui/icons/e_16x16_top_right_corner_new.png deleted file mode 100644 index 6bdc275d..00000000 Binary files a/org.nodeclipse.ui/icons/e_16x16_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/jsh_16.png b/org.nodeclipse.ui/icons/jsh_16.png deleted file mode 100644 index 47d2698c..00000000 Binary files a/org.nodeclipse.ui/icons/jsh_16.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node-nature.png b/org.nodeclipse.ui/icons/node-nature.png deleted file mode 100644 index 0f3c2eec..00000000 Binary files a/org.nodeclipse.ui/icons/node-nature.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node.png b/org.nodeclipse.ui/icons/node.png deleted file mode 100644 index 8e9e64a2..00000000 Binary files a/org.nodeclipse.ui/icons/node.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node_blue.png b/org.nodeclipse.ui/icons/node_blue.png deleted file mode 100644 index f0bc7cbc..00000000 Binary files a/org.nodeclipse.ui/icons/node_blue.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node_red.png b/org.nodeclipse.ui/icons/node_red.png deleted file mode 100644 index 267bf7f9..00000000 Binary files a/org.nodeclipse.ui/icons/node_red.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node_top_right_corner_file.png b/org.nodeclipse.ui/icons/node_top_right_corner_file.png deleted file mode 100644 index 078f6c0e..00000000 Binary files a/org.nodeclipse.ui/icons/node_top_right_corner_file.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node_top_right_corner_file_top_right_corner_new.png b/org.nodeclipse.ui/icons/node_top_right_corner_file_top_right_corner_new.png deleted file mode 100644 index e896614e..00000000 Binary files a/org.nodeclipse.ui/icons/node_top_right_corner_file_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/node_top_right_corner_new.png b/org.nodeclipse.ui/icons/node_top_right_corner_new.png deleted file mode 100644 index 54382dae..00000000 Binary files a/org.nodeclipse.ui/icons/node_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/npm/npm.png b/org.nodeclipse.ui/icons/npm/npm.png deleted file mode 100644 index 826a0e70..00000000 Binary files a/org.nodeclipse.ui/icons/npm/npm.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/npm/npm_bottom_right_corner_run_half_size.png b/org.nodeclipse.ui/icons/npm/npm_bottom_right_corner_run_half_size.png deleted file mode 100644 index b1e4fd9a..00000000 Binary files a/org.nodeclipse.ui/icons/npm/npm_bottom_right_corner_run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/npm/npm_gray.png b/org.nodeclipse.ui/icons/npm/npm_gray.png deleted file mode 100644 index aceb0dc7..00000000 Binary files a/org.nodeclipse.ui/icons/npm/npm_gray.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/ovr16/CreateChild.gif b/org.nodeclipse.ui/icons/ovr16/CreateChild.gif deleted file mode 100644 index e370e324..00000000 Binary files a/org.nodeclipse.ui/icons/ovr16/CreateChild.gif and /dev/null differ diff --git a/org.nodeclipse.ui/icons/ovr16/file.gif b/org.nodeclipse.ui/icons/ovr16/file.gif deleted file mode 100644 index 89b62527..00000000 Binary files a/org.nodeclipse.ui/icons/ovr16/file.gif and /dev/null differ diff --git a/org.nodeclipse.ui/icons/ovr16/new.gif b/org.nodeclipse.ui/icons/ovr16/new.gif deleted file mode 100644 index 719a53e7..00000000 Binary files a/org.nodeclipse.ui/icons/ovr16/new.gif and /dev/null differ diff --git a/org.nodeclipse.ui/icons/run.png b/org.nodeclipse.ui/icons/run.png deleted file mode 100644 index 3e93738d..00000000 Binary files a/org.nodeclipse.ui/icons/run.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/run_half_size.png b/org.nodeclipse.ui/icons/run_half_size.png deleted file mode 100644 index 7235cd37..00000000 Binary files a/org.nodeclipse.ui/icons/run_half_size.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/tern.png b/org.nodeclipse.ui/icons/tern.png deleted file mode 100644 index d80d6d98..00000000 Binary files a/org.nodeclipse.ui/icons/tern.png and /dev/null differ diff --git a/org.nodeclipse.ui/icons/typescript_16_top_right_corner_new.png b/org.nodeclipse.ui/icons/typescript_16_top_right_corner_new.png deleted file mode 100644 index b7fb28d6..00000000 Binary files a/org.nodeclipse.ui/icons/typescript_16_top_right_corner_new.png and /dev/null differ diff --git a/org.nodeclipse.ui/plugin.xml b/org.nodeclipse.ui/plugin.xml deleted file mode 100644 index b1cb7e1c..00000000 --- a/org.nodeclipse.ui/plugin.xml +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - Create a new Node.js project (or add .project file to an existing project and import) - - - - - Create a new Node.js project with Express.js framework (Express should be installed before with npm install -g express) - - - - - Create a new JavaScript file - - - - - Create a new CoffeeScript file - - - - - Create a new TypeScript file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.nodeclipse.ui/pom.xml b/org.nodeclipse.ui/pom.xml deleted file mode 100644 index 9f500606..00000000 --- a/org.nodeclipse.ui/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - - org.nodeclipse.nodeclipse-1 - parent - 1.0.2-SNAPSHOT - - - org.nodeclipse.ui - eclipse-plugin - - org.nodeclipse.ui - org.nodeclipse.ui - - diff --git a/org.nodeclipse.ui/src/org/json/JSONArray.java b/org.nodeclipse.ui/src/org/json/JSONArray.java deleted file mode 100644 index f91fc00e..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONArray.java +++ /dev/null @@ -1,907 +0,0 @@ -package org.json; - -/* -Copyright (c) 2002 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; - -/** - * A JSONArray is an ordered sequence of values. Its external text form is a - * string wrapped in square brackets with commas separating the values. The - * internal form is an object having get and opt - * methods for accessing the values by index, and put methods for - * adding or replacing values. The values can be any of these types: - * Boolean, JSONArray, JSONObject, - * Number, String, or the - * JSONObject.NULL object. - *

    - * The constructor can convert a JSON text into a Java object. The - * toString method converts to JSON text. - *

    - * A get method returns a value if one can be found, and throws an - * exception if one cannot be found. An opt method returns a - * default value instead of throwing an exception, and so is useful for - * obtaining optional values. - *

    - * The generic get() and opt() methods return an - * object which you can cast or query for type. There are also typed - * get and opt methods that do type checking and type - * coercion for you. - *

    - * The texts produced by the toString methods strictly conform to - * JSON syntax rules. The constructors are more forgiving in the texts they will - * accept: - *

      - *
    • An extra , (comma) may appear just - * before the closing bracket.
    • - *
    • The null value will be inserted when there is , - *  (comma) elision.
    • - *
    • Strings may be quoted with ' (single - * quote).
    • - *
    • Strings do not need to be quoted at all if they do not begin with a quote - * or single quote, and if they do not contain leading or trailing spaces, and - * if they do not contain any of these characters: - * { } [ ] / \ : , = ; # and if they do not look like numbers and - * if they are not the reserved words true, false, or - * null.
    • - *
    • Values can be separated by ; (semicolon) as - * well as by , (comma).
    • - *
    - * - * @author JSON.org - * @version 2012-04-20 - */ -@SuppressWarnings({"rawtypes","unchecked"}) -public class JSONArray { - - - /** - * The arrayList where the JSONArray's properties are kept. - */ - private final ArrayList myArrayList; - - - /** - * Construct an empty JSONArray. - */ - public JSONArray() { - this.myArrayList = new ArrayList(); - } - - /** - * Construct a JSONArray from a JSONTokener. - * @param x A JSONTokener - * @throws JSONException If there is a syntax error. - */ - public JSONArray(JSONTokener x) throws JSONException { - this(); - if (x.nextClean() != '[') { - throw x.syntaxError("A JSONArray text must start with '['"); - } - if (x.nextClean() != ']') { - x.back(); - for (;;) { - if (x.nextClean() == ',') { - x.back(); - this.myArrayList.add(JSONObject.NULL); - } else { - x.back(); - this.myArrayList.add(x.nextValue()); - } - switch (x.nextClean()) { - case ';': - case ',': - if (x.nextClean() == ']') { - return; - } - x.back(); - break; - case ']': - return; - default: - throw x.syntaxError("Expected a ',' or ']'"); - } - } - } - } - - - /** - * Construct a JSONArray from a source JSON text. - * @param source A string that begins with - * [ (left bracket) - * and ends with ] (right bracket). - * @throws JSONException If there is a syntax error. - */ - public JSONArray(String source) throws JSONException { - this(new JSONTokener(source)); - } - - - /** - * Construct a JSONArray from a Collection. - * @param collection A Collection. - */ - public JSONArray(Collection collection) { - this.myArrayList = new ArrayList(); - if (collection != null) { - Iterator iter = collection.iterator(); - while (iter.hasNext()) { - this.myArrayList.add(JSONObject.wrap(iter.next())); - } - } - } - - - /** - * Construct a JSONArray from an array - * @throws JSONException If not an array. - */ - public JSONArray(Object array) throws JSONException { - this(); - if (array.getClass().isArray()) { - int length = Array.getLength(array); - for (int i = 0; i < length; i += 1) { - this.put(JSONObject.wrap(Array.get(array, i))); - } - } else { - throw new JSONException( -"JSONArray initial value should be a string or collection or array."); - } - } - - - /** - * Get the object value associated with an index. - * @param index - * The index must be between 0 and length() - 1. - * @return An object value. - * @throws JSONException If there is no value for the index. - */ - public Object get(int index) throws JSONException { - Object object = this.opt(index); - if (object == null) { - throw new JSONException("JSONArray[" + index + "] not found."); - } - return object; - } - - - /** - * Get the boolean value associated with an index. - * The string values "true" and "false" are converted to boolean. - * - * @param index The index must be between 0 and length() - 1. - * @return The truth. - * @throws JSONException If there is no value for the index or if the - * value is not convertible to boolean. - */ - public boolean getBoolean(int index) throws JSONException { - Object object = this.get(index); - if (object.equals(Boolean.FALSE) || - (object instanceof String && - ((String)object).equalsIgnoreCase("false"))) { - return false; - } else if (object.equals(Boolean.TRUE) || - (object instanceof String && - ((String)object).equalsIgnoreCase("true"))) { - return true; - } - throw new JSONException("JSONArray[" + index + "] is not a boolean."); - } - - - /** - * Get the double value associated with an index. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException If the key is not found or if the value cannot - * be converted to a number. - */ - public double getDouble(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number - ? ((Number)object).doubleValue() - : Double.parseDouble((String)object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + - "] is not a number."); - } - } - - - /** - * Get the int value associated with an index. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException If the key is not found or if the value is not a number. - */ - public int getInt(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number - ? ((Number)object).intValue() - : Integer.parseInt((String)object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + - "] is not a number."); - } - } - - - /** - * Get the JSONArray associated with an index. - * @param index The index must be between 0 and length() - 1. - * @return A JSONArray value. - * @throws JSONException If there is no value for the index. or if the - * value is not a JSONArray - */ - public JSONArray getJSONArray(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof JSONArray) { - return (JSONArray)object; - } - throw new JSONException("JSONArray[" + index + - "] is not a JSONArray."); - } - - - /** - * Get the JSONObject associated with an index. - * @param index subscript - * @return A JSONObject value. - * @throws JSONException If there is no value for the index or if the - * value is not a JSONObject - */ - public JSONObject getJSONObject(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof JSONObject) { - return (JSONObject)object; - } - throw new JSONException("JSONArray[" + index + - "] is not a JSONObject."); - } - - - /** - * Get the long value associated with an index. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException If the key is not found or if the value cannot - * be converted to a number. - */ - public long getLong(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number - ? ((Number)object).longValue() - : Long.parseLong((String)object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + - "] is not a number."); - } - } - - - /** - * Get the string associated with an index. - * @param index The index must be between 0 and length() - 1. - * @return A string value. - * @throws JSONException If there is no string value for the index. - */ - public String getString(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof String) { - return (String)object; - } - throw new JSONException("JSONArray[" + index + "] not a string."); - } - - - /** - * Determine if the value is null. - * @param index The index must be between 0 and length() - 1. - * @return true if the value at the index is null, or if there is no value. - */ - public boolean isNull(int index) { - return JSONObject.NULL.equals(this.opt(index)); - } - - - /** - * Make a string from the contents of this JSONArray. The - * separator string is inserted between each element. - * Warning: This method assumes that the data structure is acyclical. - * @param separator A string that will be inserted between the elements. - * @return a string. - * @throws JSONException If the array contains an invalid number. - */ - public String join(String separator) throws JSONException { - int len = this.length(); - StringBuffer sb = new StringBuffer(); - - for (int i = 0; i < len; i += 1) { - if (i > 0) { - sb.append(separator); - } - sb.append(JSONObject.valueToString(this.myArrayList.get(i))); - } - return sb.toString(); - } - - - /** - * Get the number of elements in the JSONArray, included nulls. - * - * @return The length (or size). - */ - public int length() { - return this.myArrayList.size(); - } - - - /** - * Get the optional object value associated with an index. - * @param index The index must be between 0 and length() - 1. - * @return An object value, or null if there is no - * object at that index. - */ - public Object opt(int index) { - return (index < 0 || index >= this.length()) - ? null - : this.myArrayList.get(index); - } - - - /** - * Get the optional boolean value associated with an index. - * It returns false if there is no value at that index, - * or if the value is not Boolean.TRUE or the String "true". - * - * @param index The index must be between 0 and length() - 1. - * @return The truth. - */ - public boolean optBoolean(int index) { - return this.optBoolean(index, false); - } - - - /** - * Get the optional boolean value associated with an index. - * It returns the defaultValue if there is no value at that index or if - * it is not a Boolean or the String "true" or "false" (case insensitive). - * - * @param index The index must be between 0 and length() - 1. - * @param defaultValue A boolean default. - * @return The truth. - */ - public boolean optBoolean(int index, boolean defaultValue) { - try { - return this.getBoolean(index); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get the optional double value associated with an index. - * NaN is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - */ - public double optDouble(int index) { - return this.optDouble(index, Double.NaN); - } - - - /** - * Get the optional double value associated with an index. - * The defaultValue is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * - * @param index subscript - * @param defaultValue The default value. - * @return The value. - */ - public double optDouble(int index, double defaultValue) { - try { - return this.getDouble(index); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get the optional int value associated with an index. - * Zero is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - */ - public int optInt(int index) { - return this.optInt(index, 0); - } - - - /** - * Get the optional int value associated with an index. - * The defaultValue is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * @param index The index must be between 0 and length() - 1. - * @param defaultValue The default value. - * @return The value. - */ - public int optInt(int index, int defaultValue) { - try { - return this.getInt(index); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get the optional JSONArray associated with an index. - * @param index subscript - * @return A JSONArray value, or null if the index has no value, - * or if the value is not a JSONArray. - */ - public JSONArray optJSONArray(int index) { - Object o = this.opt(index); - return o instanceof JSONArray ? (JSONArray)o : null; - } - - - /** - * Get the optional JSONObject associated with an index. - * Null is returned if the key is not found, or null if the index has - * no value, or if the value is not a JSONObject. - * - * @param index The index must be between 0 and length() - 1. - * @return A JSONObject value. - */ - public JSONObject optJSONObject(int index) { - Object o = this.opt(index); - return o instanceof JSONObject ? (JSONObject)o : null; - } - - - /** - * Get the optional long value associated with an index. - * Zero is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * - * @param index The index must be between 0 and length() - 1. - * @return The value. - */ - public long optLong(int index) { - return this.optLong(index, 0); - } - - - /** - * Get the optional long value associated with an index. - * The defaultValue is returned if there is no value for the index, - * or if the value is not a number and cannot be converted to a number. - * @param index The index must be between 0 and length() - 1. - * @param defaultValue The default value. - * @return The value. - */ - public long optLong(int index, long defaultValue) { - try { - return this.getLong(index); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get the optional string value associated with an index. It returns an - * empty string if there is no value at that index. If the value - * is not a string and is not null, then it is coverted to a string. - * - * @param index The index must be between 0 and length() - 1. - * @return A String value. - */ - public String optString(int index) { - return this.optString(index, ""); - } - - - /** - * Get the optional string associated with an index. - * The defaultValue is returned if the key is not found. - * - * @param index The index must be between 0 and length() - 1. - * @param defaultValue The default value. - * @return A String value. - */ - public String optString(int index, String defaultValue) { - Object object = this.opt(index); - return JSONObject.NULL.equals(object) - ? defaultValue : object - .toString(); - } - - - /** - * Append a boolean value. This increases the array's length by one. - * - * @param value A boolean value. - * @return this. - */ - public JSONArray put(boolean value) { - this.put(value ? Boolean.TRUE : Boolean.FALSE); - return this; - } - - - /** - * Put a value in the JSONArray, where the value will be a - * JSONArray which is produced from a Collection. - * @param value A Collection value. - * @return this. - */ - public JSONArray put(Collection value) { - this.put(new JSONArray(value)); - return this; - } - - - /** - * Append a double value. This increases the array's length by one. - * - * @param value A double value. - * @throws JSONException if the value is not finite. - * @return this. - */ - public JSONArray put(double value) throws JSONException { - Double d = new Double(value); - JSONObject.testValidity(d); - this.put(d); - return this; - } - - - /** - * Append an int value. This increases the array's length by one. - * - * @param value An int value. - * @return this. - */ - public JSONArray put(int value) { - this.put(new Integer(value)); - return this; - } - - - /** - * Append an long value. This increases the array's length by one. - * - * @param value A long value. - * @return this. - */ - public JSONArray put(long value) { - this.put(new Long(value)); - return this; - } - - - /** - * Put a value in the JSONArray, where the value will be a - * JSONObject which is produced from a Map. - * @param value A Map value. - * @return this. - */ - public JSONArray put(Map value) { - this.put(new JSONObject(value)); - return this; - } - - - /** - * Append an object value. This increases the array's length by one. - * @param value An object value. The value should be a - * Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the - * JSONObject.NULL object. - * @return this. - */ - public JSONArray put(Object value) { - this.myArrayList.add(value); - return this; - } - - - /** - * Put or replace a boolean value in the JSONArray. If the index is greater - * than the length of the JSONArray, then null elements will be added as - * necessary to pad it out. - * @param index The subscript. - * @param value A boolean value. - * @return this. - * @throws JSONException If the index is negative. - */ - public JSONArray put(int index, boolean value) throws JSONException { - this.put(index, value ? Boolean.TRUE : Boolean.FALSE); - return this; - } - - - /** - * Put a value in the JSONArray, where the value will be a - * JSONArray which is produced from a Collection. - * @param index The subscript. - * @param value A Collection value. - * @return this. - * @throws JSONException If the index is negative or if the value is - * not finite. - */ - public JSONArray put(int index, Collection value) throws JSONException { - this.put(index, new JSONArray(value)); - return this; - } - - - /** - * Put or replace a double value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad - * it out. - * @param index The subscript. - * @param value A double value. - * @return this. - * @throws JSONException If the index is negative or if the value is - * not finite. - */ - public JSONArray put(int index, double value) throws JSONException { - this.put(index, new Double(value)); - return this; - } - - - /** - * Put or replace an int value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad - * it out. - * @param index The subscript. - * @param value An int value. - * @return this. - * @throws JSONException If the index is negative. - */ - public JSONArray put(int index, int value) throws JSONException { - this.put(index, new Integer(value)); - return this; - } - - - /** - * Put or replace a long value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad - * it out. - * @param index The subscript. - * @param value A long value. - * @return this. - * @throws JSONException If the index is negative. - */ - public JSONArray put(int index, long value) throws JSONException { - this.put(index, new Long(value)); - return this; - } - - - /** - * Put a value in the JSONArray, where the value will be a - * JSONObject that is produced from a Map. - * @param index The subscript. - * @param value The Map value. - * @return this. - * @throws JSONException If the index is negative or if the the value is - * an invalid number. - */ - public JSONArray put(int index, Map value) throws JSONException { - this.put(index, new JSONObject(value)); - return this; - } - - - /** - * Put or replace an object value in the JSONArray. If the index is greater - * than the length of the JSONArray, then null elements will be added as - * necessary to pad it out. - * @param index The subscript. - * @param value The value to put into the array. The value should be a - * Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the - * JSONObject.NULL object. - * @return this. - * @throws JSONException If the index is negative or if the the value is - * an invalid number. - */ - public JSONArray put(int index, Object value) throws JSONException { - JSONObject.testValidity(value); - if (index < 0) { - throw new JSONException("JSONArray[" + index + "] not found."); - } - if (index < this.length()) { - this.myArrayList.set(index, value); - } else { - while (index != this.length()) { - this.put(JSONObject.NULL); - } - this.put(value); - } - return this; - } - - - /** - * Remove an index and close the hole. - * @param index The index of the element to be removed. - * @return The value that was associated with the index, - * or null if there was no value. - */ - public Object remove(int index) { - Object o = this.opt(index); - this.myArrayList.remove(index); - return o; - } - - - /** - * Produce a JSONObject by combining a JSONArray of names with the values - * of this JSONArray. - * @param names A JSONArray containing a list of key strings. These will be - * paired with the values. - * @return A JSONObject, or null if there are no names or if this JSONArray - * has no values. - * @throws JSONException If any of the names are null. - */ - public JSONObject toJSONObject(JSONArray names) throws JSONException { - if (names == null || names.length() == 0 || this.length() == 0) { - return null; - } - JSONObject jo = new JSONObject(); - for (int i = 0; i < names.length(); i += 1) { - jo.put(names.getString(i), this.opt(i)); - } - return jo; - } - - - /** - * Make a JSON text of this JSONArray. For compactness, no - * unnecessary whitespace is added. If it is not possible to produce a - * syntactically correct JSON text then null will be returned instead. This - * could occur if the array contains an invalid number. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @return a printable, displayable, transmittable - * representation of the array. - */ - public String toString() { - try { - return '[' + this.join(",") + ']'; - } catch (Exception e) { - return null; - } - } - - - /** - * Make a prettyprinted JSON text of this JSONArray. - * Warning: This method assumes that the data structure is acyclical. - * @param indentFactor The number of spaces to add to each level of - * indentation. - * @return a printable, displayable, transmittable - * representation of the object, beginning - * with [ (left bracket) and ending - * with ] (right bracket). - * @throws JSONException - */ - public String toString(int indentFactor) throws JSONException { - StringWriter sw = new StringWriter(); - synchronized (sw.getBuffer()) { - return this.write(sw, indentFactor, 0).toString(); - } - } - - /** - * Write the contents of the JSONArray as JSON text to a writer. For - * compactness, no whitespace is added. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer) throws JSONException { - return this.write(writer, 0, 0); - } - - /** - * Write the contents of the JSONArray as JSON text to a writer. For - * compactness, no whitespace is added. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @param indentFactor - * The number of spaces to add to each level of indentation. - * @param indent - * The indention of the top level. - * @return The writer. - * @throws JSONException - */ - Writer write(Writer writer, int indentFactor, int indent) - throws JSONException { - try { - boolean commanate = false; - int length = this.length(); - writer.write('['); - - if (length == 1) { - JSONObject.writeValue(writer, this.myArrayList.get(0), - indentFactor, indent); - } else if (length != 0) { - final int newindent = indent + indentFactor; - - for (int i = 0; i < length; i += 1) { - if (commanate) { - writer.write(','); - } - if (indentFactor > 0) { - writer.write('\n'); - } - JSONObject.indent(writer, newindent); - JSONObject.writeValue(writer, this.myArrayList.get(i), - indentFactor, newindent); - commanate = true; - } - if (indentFactor > 0) { - writer.write('\n'); - } - JSONObject.indent(writer, indent); - } - writer.write(']'); - return writer; - } catch (IOException e) { - throw new JSONException(e); - } - } -} diff --git a/org.nodeclipse.ui/src/org/json/JSONException.java b/org.nodeclipse.ui/src/org/json/JSONException.java deleted file mode 100644 index 3ec8fb99..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONException.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.json; - -/** - * The JSONException is thrown by the JSON.org classes when things are amiss. - * @author JSON.org - * @version 2010-12-24 - */ -public class JSONException extends Exception { - private static final long serialVersionUID = 0; - private Throwable cause; - - /** - * Constructs a JSONException with an explanatory message. - * @param message Detail about the reason for the exception. - */ - public JSONException(String message) { - super(message); - } - - public JSONException(Throwable cause) { - super(cause.getMessage()); - this.cause = cause; - } - - public Throwable getCause() { - return this.cause; - } -} diff --git a/org.nodeclipse.ui/src/org/json/JSONObject.java b/org.nodeclipse.ui/src/org/json/JSONObject.java deleted file mode 100644 index 0312fdab..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONObject.java +++ /dev/null @@ -1,1594 +0,0 @@ -package org.json; - -/* -Copyright (c) 2002 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.Collection; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; - -/** - * A JSONObject is an unordered collection of name/value pairs. Its external - * form is a string wrapped in curly braces with colons between the names and - * values, and commas between the values and names. The internal form is an - * object having get and opt methods for accessing the - * values by name, and put methods for adding or replacing values - * by name. The values can be any of these types: Boolean, - * JSONArray, JSONObject, Number, - * String, or the JSONObject.NULL object. A JSONObject - * constructor can be used to convert an external form JSON text into an - * internal form whose values can be retrieved with the get and - * opt methods, or to convert values into a JSON text using the - * put and toString methods. A get method - * returns a value if one can be found, and throws an exception if one cannot be - * found. An opt method returns a default value instead of throwing - * an exception, and so is useful for obtaining optional values. - *

    - * The generic get() and opt() methods return an - * object, which you can cast or query for type. There are also typed - * get and opt methods that do type checking and type - * coercion for you. The opt methods differ from the get methods in that they do - * not throw. Instead, they return a specified value, such as null. - *

    - * The put methods add or replace values in an object. For example, - * - *

    - * myString = new JSONObject().put("JSON", "Hello, World!").toString();
    - * 
    - * - * produces the string {"JSON": "Hello, World"}. - *

    - * The texts produced by the toString methods strictly conform to - * the JSON syntax rules. The constructors are more forgiving in the texts they - * will accept: - *

      - *
    • An extra , (comma) may appear just - * before the closing brace.
    • - *
    • Strings may be quoted with ' (single - * quote).
    • - *
    • Strings do not need to be quoted at all if they do not begin with a quote - * or single quote, and if they do not contain leading or trailing spaces, and - * if they do not contain any of these characters: - * { } [ ] / \ : , = ; # and if they do not look like numbers and - * if they are not the reserved words true, false, or - * null.
    • - *
    • Keys can be followed by = or => as well as by - * :.
    • - *
    • Values can be followed by ; (semicolon) as - * well as by , (comma).
    • - *
    - * - * @author JSON.org - * @version 2012-05-29 - */ -@SuppressWarnings({"rawtypes","unchecked"}) -public class JSONObject { - - /** - * JSONObject.NULL is equivalent to the value that JavaScript calls null, - * whilst Java's null is equivalent to the value that JavaScript calls - * undefined. - */ - private static final class Null { - - /** - * There is only intended to be a single instance of the NULL object, - * so the clone method returns itself. - * @return NULL. - */ - protected final Object clone() { - return this; - } - - /** - * A Null object is equal to the null value and to itself. - * @param object An object to test for nullness. - * @return true if the object parameter is the JSONObject.NULL object - * or null. - */ - public boolean equals(Object object) { - return object == null || object == this; - } - - /** - * Get the "null" string value. - * @return The string "null". - */ - public String toString() { - return "null"; - } - } - - - /** - * The map where the JSONObject's properties are kept. - */ - private final Map map; - - - /** - * It is sometimes more convenient and less ambiguous to have a - * NULL object than to use Java's null value. - * JSONObject.NULL.equals(null) returns true. - * JSONObject.NULL.toString() returns "null". - */ - public static final Object NULL = new Null(); - - - /** - * Construct an empty JSONObject. - */ - public JSONObject() { - this.map = new HashMap(); - } - - - /** - * Construct a JSONObject from a subset of another JSONObject. - * An array of strings is used to identify the keys that should be copied. - * Missing keys are ignored. - * @param jo A JSONObject. - * @param names An array of strings. - * @throws JSONException - * @exception JSONException If a value is a non-finite number or if a name is duplicated. - */ - public JSONObject(JSONObject jo, String[] names) { - this(); - for (int i = 0; i < names.length; i += 1) { - try { - this.putOnce(names[i], jo.opt(names[i])); - } catch (Exception ignore) { - } - } - } - - - /** - * Construct a JSONObject from a JSONTokener. - * @param x A JSONTokener object containing the source string. - * @throws JSONException If there is a syntax error in the source string - * or a duplicated key. - */ - public JSONObject(JSONTokener x) throws JSONException { - this(); - char c; - String key; - - if (x.nextClean() != '{') { - throw x.syntaxError("A JSONObject text must begin with '{'"); - } - for (;;) { - c = x.nextClean(); - switch (c) { - case 0: - throw x.syntaxError("A JSONObject text must end with '}'"); - case '}': - return; - default: - x.back(); - key = x.nextValue().toString(); - } - -// The key is followed by ':'. We will also tolerate '=' or '=>'. - - c = x.nextClean(); - if (c == '=') { - if (x.next() != '>') { - x.back(); - } - } else if (c != ':') { - throw x.syntaxError("Expected a ':' after a key"); - } - this.putOnce(key, x.nextValue()); - -// Pairs are separated by ','. We will also tolerate ';'. - - switch (x.nextClean()) { - case ';': - case ',': - if (x.nextClean() == '}') { - return; - } - x.back(); - break; - case '}': - return; - default: - throw x.syntaxError("Expected a ',' or '}'"); - } - } - } - - - /** - * Construct a JSONObject from a Map. - * - * @param map A map object that can be used to initialize the contents of - * the JSONObject. - * @throws JSONException - */ - public JSONObject(Map map) { - this.map = new HashMap(); - if (map != null) { - Iterator i = map.entrySet().iterator(); - while (i.hasNext()) { - Map.Entry e = (Map.Entry)i.next(); - Object value = e.getValue(); - if (value != null) { - this.map.put(e.getKey(), wrap(value)); - } - } - } - } - - - /** - * Construct a JSONObject from an Object using bean getters. - * It reflects on all of the public methods of the object. - * For each of the methods with no parameters and a name starting - * with "get" or "is" followed by an uppercase letter, - * the method is invoked, and a key and the value returned from the getter method - * are put into the new JSONObject. - * - * The key is formed by removing the "get" or "is" prefix. - * If the second remaining character is not upper case, then the first - * character is converted to lower case. - * - * For example, if an object has a method named "getName", and - * if the result of calling object.getName() is "Larry Fine", - * then the JSONObject will contain "name": "Larry Fine". - * - * @param bean An object that has getter methods that should be used - * to make a JSONObject. - */ - public JSONObject(Object bean) { - this(); - this.populateMap(bean); - } - - - /** - * Construct a JSONObject from an Object, using reflection to find the - * public members. The resulting JSONObject's keys will be the strings - * from the names array, and the values will be the field values associated - * with those keys in the object. If a key is not found or not visible, - * then it will not be copied into the new JSONObject. - * @param object An object that has fields that should be used to make a - * JSONObject. - * @param names An array of strings, the names of the fields to be obtained - * from the object. - */ - public JSONObject(Object object, String names[]) { - this(); - Class c = object.getClass(); - for (int i = 0; i < names.length; i += 1) { - String name = names[i]; - try { - this.putOpt(name, c.getField(name).get(object)); - } catch (Exception ignore) { - } - } - } - - - /** - * Construct a JSONObject from a source JSON text string. - * This is the most commonly used JSONObject constructor. - * @param source A string beginning - * with { (left brace) and ending - * with } (right brace). - * @exception JSONException If there is a syntax error in the source - * string or a duplicated key. - */ - public JSONObject(String source) throws JSONException { - this(new JSONTokener(source)); - } - - - /** - * Construct a JSONObject from a ResourceBundle. - * @param baseName The ResourceBundle base name. - * @param locale The Locale to load the ResourceBundle for. - * @throws JSONException If any JSONExceptions are detected. - */ - public JSONObject(String baseName, Locale locale) throws JSONException { - this(); - ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, - Thread.currentThread().getContextClassLoader()); - -// Iterate through the keys in the bundle. - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - Object key = keys.nextElement(); - if (key instanceof String) { - -// Go through the path, ensuring that there is a nested JSONObject for each -// segment except the last. Add the value using the last segment's name into -// the deepest nested JSONObject. - - String[] path = ((String)key).split("\\."); - int last = path.length - 1; - JSONObject target = this; - for (int i = 0; i < last; i += 1) { - String segment = path[i]; - JSONObject nextTarget = target.optJSONObject(segment); - if (nextTarget == null) { - nextTarget = new JSONObject(); - target.put(segment, nextTarget); - } - target = nextTarget; - } - target.put(path[last], bundle.getString((String)key)); - } - } - } - - - /** - * Accumulate values under a key. It is similar to the put method except - * that if there is already an object stored under the key then a - * JSONArray is stored under the key to hold all of the accumulated values. - * If there is already a JSONArray, then the new value is appended to it. - * In contrast, the put method replaces the previous value. - * - * If only one value is accumulated that is not a JSONArray, then the - * result will be the same as using put. But if multiple values are - * accumulated, then the result will be like append. - * @param key A key string. - * @param value An object to be accumulated under the key. - * @return this. - * @throws JSONException If the value is an invalid number - * or if the key is null. - */ - public JSONObject accumulate( - String key, - Object value - ) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, value instanceof JSONArray - ? new JSONArray().put(value) - : value); - } else if (object instanceof JSONArray) { - ((JSONArray)object).put(value); - } else { - this.put(key, new JSONArray().put(object).put(value)); - } - return this; - } - - - /** - * Append values to the array under a key. If the key does not exist in the - * JSONObject, then the key is put in the JSONObject with its value being a - * JSONArray containing the value parameter. If the key was already - * associated with a JSONArray, then the value parameter is appended to it. - * @param key A key string. - * @param value An object to be accumulated under the key. - * @return this. - * @throws JSONException If the key is null or if the current value - * associated with the key is not a JSONArray. - */ - public JSONObject append(String key, Object value) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, new JSONArray().put(value)); - } else if (object instanceof JSONArray) { - this.put(key, ((JSONArray)object).put(value)); - } else { - throw new JSONException("JSONObject[" + key + - "] is not a JSONArray."); - } - return this; - } - - - /** - * Produce a string from a double. The string "null" will be returned if - * the number is not finite. - * @param d A double. - * @return A String. - */ - public static String doubleToString(double d) { - if (Double.isInfinite(d) || Double.isNaN(d)) { - return "null"; - } - -// Shave off trailing zeros and decimal point, if possible. - - String string = Double.toString(d); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && - string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - - /** - * Get the value object associated with a key. - * - * @param key A key string. - * @return The object associated with the key. - * @throws JSONException if the key is not found. - */ - public Object get(String key) throws JSONException { - if (key == null) { - throw new JSONException("Null key."); - } - Object object = this.opt(key); - if (object == null) { - throw new JSONException("JSONObject[" + quote(key) + - "] not found."); - } - return object; - } - - - /** - * Get the boolean value associated with a key. - * - * @param key A key string. - * @return The truth. - * @throws JSONException - * if the value is not a Boolean or the String "true" or "false". - */ - public boolean getBoolean(String key) throws JSONException { - Object object = this.get(key); - if (object.equals(Boolean.FALSE) || - (object instanceof String && - ((String)object).equalsIgnoreCase("false"))) { - return false; - } else if (object.equals(Boolean.TRUE) || - (object instanceof String && - ((String)object).equalsIgnoreCase("true"))) { - return true; - } - throw new JSONException("JSONObject[" + quote(key) + - "] is not a Boolean."); - } - - - /** - * Get the double value associated with a key. - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or - * if the value is not a Number object and cannot be converted to a number. - */ - public double getDouble(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number - ? ((Number)object).doubleValue() - : Double.parseDouble((String)object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + - "] is not a number."); - } - } - - - /** - * Get the int value associated with a key. - * - * @param key A key string. - * @return The integer value. - * @throws JSONException if the key is not found or if the value cannot - * be converted to an integer. - */ - public int getInt(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number - ? ((Number)object).intValue() - : Integer.parseInt((String)object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + - "] is not an int."); - } - } - - - /** - * Get the JSONArray value associated with a key. - * - * @param key A key string. - * @return A JSONArray which is the value. - * @throws JSONException if the key is not found or - * if the value is not a JSONArray. - */ - public JSONArray getJSONArray(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONArray) { - return (JSONArray)object; - } - throw new JSONException("JSONObject[" + quote(key) + - "] is not a JSONArray."); - } - - - /** - * Get the JSONObject value associated with a key. - * - * @param key A key string. - * @return A JSONObject which is the value. - * @throws JSONException if the key is not found or - * if the value is not a JSONObject. - */ - public JSONObject getJSONObject(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONObject) { - return (JSONObject)object; - } - throw new JSONException("JSONObject[" + quote(key) + - "] is not a JSONObject."); - } - - - /** - * Get the long value associated with a key. - * - * @param key A key string. - * @return The long value. - * @throws JSONException if the key is not found or if the value cannot - * be converted to a long. - */ - public long getLong(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number - ? ((Number)object).longValue() - : Long.parseLong((String)object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + - "] is not a long."); - } - } - - - /** - * Get an array of field names from a JSONObject. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(JSONObject jo) { - int length = jo.length(); - if (length == 0) { - return null; - } - Iterator iterator = jo.keys(); - String[] names = new String[length]; - int i = 0; - while (iterator.hasNext()) { - names[i] = (String)iterator.next(); - i += 1; - } - return names; - } - - - /** - * Get an array of field names from an Object. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(Object object) { - if (object == null) { - return null; - } - Class klass = object.getClass(); - Field[] fields = klass.getFields(); - int length = fields.length; - if (length == 0) { - return null; - } - String[] names = new String[length]; - for (int i = 0; i < length; i += 1) { - names[i] = fields[i].getName(); - } - return names; - } - - - /** - * Get the string associated with a key. - * - * @param key A key string. - * @return A string which is the value. - * @throws JSONException if there is no string value for the key. - */ - public String getString(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof String) { - return (String)object; - } - throw new JSONException("JSONObject[" + quote(key) + - "] not a string."); - } - - - /** - * Determine if the JSONObject contains a specific key. - * @param key A key string. - * @return true if the key exists in the JSONObject. - */ - public boolean has(String key) { - return this.map.containsKey(key); - } - - - /** - * Increment a property of a JSONObject. If there is no such property, - * create one with a value of 1. If there is such a property, and if - * it is an Integer, Long, Double, or Float, then add one to it. - * @param key A key string. - * @return this. - * @throws JSONException If there is already a property with this name - * that is not an Integer, Long, Double, or Float. - */ - public JSONObject increment(String key) throws JSONException { - Object value = this.opt(key); - if (value == null) { - this.put(key, 1); - } else if (value instanceof Integer) { - this.put(key, ((Integer)value).intValue() + 1); - } else if (value instanceof Long) { - this.put(key, ((Long)value).longValue() + 1); - } else if (value instanceof Double) { - this.put(key, ((Double)value).doubleValue() + 1); - } else if (value instanceof Float) { - this.put(key, ((Float)value).floatValue() + 1); - } else { - throw new JSONException("Unable to increment [" + quote(key) + "]."); - } - return this; - } - - - /** - * Determine if the value associated with the key is null or if there is - * no value. - * @param key A key string. - * @return true if there is no value associated with the key or if - * the value is the JSONObject.NULL object. - */ - public boolean isNull(String key) { - return JSONObject.NULL.equals(this.opt(key)); - } - - - /** - * Get an enumeration of the keys of the JSONObject. - * - * @return An iterator of the keys. - */ - public Iterator keys() { - return this.map.keySet().iterator(); - } - - - /** - * Get the number of keys stored in the JSONObject. - * - * @return The number of keys in the JSONObject. - */ - public int length() { - return this.map.size(); - } - - - /** - * Produce a JSONArray containing the names of the elements of this - * JSONObject. - * @return A JSONArray containing the key strings, or null if the JSONObject - * is empty. - */ - public JSONArray names() { - JSONArray ja = new JSONArray(); - Iterator keys = this.keys(); - while (keys.hasNext()) { - ja.put(keys.next()); - } - return ja.length() == 0 ? null : ja; - } - - /** - * Produce a string from a Number. - * @param number A Number - * @return A String. - * @throws JSONException If n is a non-finite number. - */ - public static String numberToString(Number number) - throws JSONException { - if (number == null) { - throw new JSONException("Null pointer"); - } - testValidity(number); - -// Shave off trailing zeros and decimal point, if possible. - - String string = number.toString(); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && - string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - - /** - * Get an optional value associated with a key. - * @param key A key string. - * @return An object which is the value, or null if there is no value. - */ - public Object opt(String key) { - return key == null ? null : this.map.get(key); - } - - - /** - * Get an optional boolean associated with a key. - * It returns false if there is no such key, or if the value is not - * Boolean.TRUE or the String "true". - * - * @param key A key string. - * @return The truth. - */ - public boolean optBoolean(String key) { - return this.optBoolean(key, false); - } - - - /** - * Get an optional boolean associated with a key. - * It returns the defaultValue if there is no such key, or if it is not - * a Boolean or the String "true" or "false" (case insensitive). - * - * @param key A key string. - * @param defaultValue The default. - * @return The truth. - */ - public boolean optBoolean(String key, boolean defaultValue) { - try { - return this.getBoolean(key); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get an optional double associated with a key, - * or NaN if there is no such key or if its value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A string which is the key. - * @return An object which is the value. - */ - public double optDouble(String key) { - return this.optDouble(key, Double.NaN); - } - - - /** - * Get an optional double associated with a key, or the - * defaultValue if there is no such key or if its value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public double optDouble(String key, double defaultValue) { - try { - return this.getDouble(key); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get an optional int value associated with a key, - * or zero if there is no such key or if the value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A key string. - * @return An object which is the value. - */ - public int optInt(String key) { - return this.optInt(key, 0); - } - - - /** - * Get an optional int value associated with a key, - * or the default if there is no such key or if the value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public int optInt(String key, int defaultValue) { - try { - return this.getInt(key); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get an optional JSONArray associated with a key. - * It returns null if there is no such key, or if its value is not a - * JSONArray. - * - * @param key A key string. - * @return A JSONArray which is the value. - */ - public JSONArray optJSONArray(String key) { - Object o = this.opt(key); - return o instanceof JSONArray ? (JSONArray)o : null; - } - - - /** - * Get an optional JSONObject associated with a key. - * It returns null if there is no such key, or if its value is not a - * JSONObject. - * - * @param key A key string. - * @return A JSONObject which is the value. - */ - public JSONObject optJSONObject(String key) { - Object object = this.opt(key); - return object instanceof JSONObject ? (JSONObject)object : null; - } - - - /** - * Get an optional long value associated with a key, - * or zero if there is no such key or if the value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A key string. - * @return An object which is the value. - */ - public long optLong(String key) { - return this.optLong(key, 0); - } - - - /** - * Get an optional long value associated with a key, - * or the default if there is no such key or if the value is not a number. - * If the value is a string, an attempt will be made to evaluate it as - * a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public long optLong(String key, long defaultValue) { - try { - return this.getLong(key); - } catch (Exception e) { - return defaultValue; - } - } - - - /** - * Get an optional string associated with a key. - * It returns an empty string if there is no such key. If the value is not - * a string and is not null, then it is converted to a string. - * - * @param key A key string. - * @return A string which is the value. - */ - public String optString(String key) { - return this.optString(key, ""); - } - - - /** - * Get an optional string associated with a key. - * It returns the defaultValue if there is no such key. - * - * @param key A key string. - * @param defaultValue The default. - * @return A string which is the value. - */ - public String optString(String key, String defaultValue) { - Object object = this.opt(key); - return NULL.equals(object) ? defaultValue : object.toString(); - } - - - private void populateMap(Object bean) { - Class klass = bean.getClass(); - -// If klass is a System class then set includeSuperClass to false. - - boolean includeSuperClass = klass.getClassLoader() != null; - - Method[] methods = includeSuperClass - ? klass.getMethods() - : klass.getDeclaredMethods(); - for (int i = 0; i < methods.length; i += 1) { - try { - Method method = methods[i]; - if (Modifier.isPublic(method.getModifiers())) { - String name = method.getName(); - String key = ""; - if (name.startsWith("get")) { - if ("getClass".equals(name) || - "getDeclaringClass".equals(name)) { - key = ""; - } else { - key = name.substring(3); - } - } else if (name.startsWith("is")) { - key = name.substring(2); - } - if (key.length() > 0 && - Character.isUpperCase(key.charAt(0)) && - method.getParameterTypes().length == 0) { - if (key.length() == 1) { - key = key.toLowerCase(); - } else if (!Character.isUpperCase(key.charAt(1))) { - key = key.substring(0, 1).toLowerCase() + - key.substring(1); - } - - Object result = method.invoke(bean, (Object[])null); - if (result != null) { - this.map.put(key, wrap(result)); - } - } - } - } catch (Exception ignore) { - } - } - } - - - /** - * Put a key/boolean pair in the JSONObject. - * - * @param key A key string. - * @param value A boolean which is the value. - * @return this. - * @throws JSONException If the key is null. - */ - public JSONObject put(String key, boolean value) throws JSONException { - this.put(key, value ? Boolean.TRUE : Boolean.FALSE); - return this; - } - - - /** - * Put a key/value pair in the JSONObject, where the value will be a - * JSONArray which is produced from a Collection. - * @param key A key string. - * @param value A Collection value. - * @return this. - * @throws JSONException - */ - public JSONObject put(String key, Collection value) throws JSONException { - this.put(key, new JSONArray(value)); - return this; - } - - - /** - * Put a key/double pair in the JSONObject. - * - * @param key A key string. - * @param value A double which is the value. - * @return this. - * @throws JSONException If the key is null or if the number is invalid. - */ - public JSONObject put(String key, double value) throws JSONException { - this.put(key, new Double(value)); - return this; - } - - - /** - * Put a key/int pair in the JSONObject. - * - * @param key A key string. - * @param value An int which is the value. - * @return this. - * @throws JSONException If the key is null. - */ - public JSONObject put(String key, int value) throws JSONException { - this.put(key, new Integer(value)); - return this; - } - - - /** - * Put a key/long pair in the JSONObject. - * - * @param key A key string. - * @param value A long which is the value. - * @return this. - * @throws JSONException If the key is null. - */ - public JSONObject put(String key, long value) throws JSONException { - this.put(key, new Long(value)); - return this; - } - - - /** - * Put a key/value pair in the JSONObject, where the value will be a - * JSONObject which is produced from a Map. - * @param key A key string. - * @param value A Map value. - * @return this. - * @throws JSONException - */ - public JSONObject put(String key, Map value) throws JSONException { - this.put(key, new JSONObject(value)); - return this; - } - - - /** - * Put a key/value pair in the JSONObject. If the value is null, - * then the key will be removed from the JSONObject if it is present. - * @param key A key string. - * @param value An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, - * or the JSONObject.NULL object. - * @return this. - * @throws JSONException If the value is non-finite number - * or if the key is null. - */ - public JSONObject put(String key, Object value) throws JSONException { - if (key == null) { - throw new JSONException("Null key."); - } - if (value != null) { - testValidity(value); - this.map.put(key, value); - } else { - this.remove(key); - } - return this; - } - - - /** - * Put a key/value pair in the JSONObject, but only if the key and the - * value are both non-null, and only if there is not already a member - * with that name. - * @param key - * @param value - * @return his. - * @throws JSONException if the key is a duplicate - */ - public JSONObject putOnce(String key, Object value) throws JSONException { - if (key != null && value != null) { - if (this.opt(key) != null) { - throw new JSONException("Duplicate key \"" + key + "\""); - } - this.put(key, value); - } - return this; - } - - - /** - * Put a key/value pair in the JSONObject, but only if the - * key and the value are both non-null. - * @param key A key string. - * @param value An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, - * or the JSONObject.NULL object. - * @return this. - * @throws JSONException If the value is a non-finite number. - */ - public JSONObject putOpt(String key, Object value) throws JSONException { - if (key != null && value != null) { - this.put(key, value); - } - return this; - } - - - /** - * Produce a string in double quotes with backslash sequences in all the - * right places. A backslash will be inserted within = '\u0080' && c < '\u00a0') - || (c >= '\u2000' && c < '\u2100')) { - hhhh = "000" + Integer.toHexString(c); - w.write("\\u" + hhhh.substring(hhhh.length() - 4)); - } else { - w.write(c); - } - } - } - w.write('"'); - return w; - } - - /** - * Remove a name and its value, if present. - * @param key The name to be removed. - * @return The value that was associated with the name, - * or null if there was no value. - */ - public Object remove(String key) { - return this.map.remove(key); - } - - /** - * Try to convert a string into a number, boolean, or null. If the string - * can't be converted, return the string. - * @param string A String. - * @return A simple JSON value. - */ - public static Object stringToValue(String string) { - Double d; - if (string.equals("")) { - return string; - } - if (string.equalsIgnoreCase("true")) { - return Boolean.TRUE; - } - if (string.equalsIgnoreCase("false")) { - return Boolean.FALSE; - } - if (string.equalsIgnoreCase("null")) { - return JSONObject.NULL; - } - - /* - * If it might be a number, try converting it. - * If a number cannot be produced, then the value will just - * be a string. Note that the plus and implied string - * conventions are non-standard. A JSON parser may accept - * non-JSON forms as long as it accepts all correct JSON forms. - */ - - char b = string.charAt(0); - if ((b >= '0' && b <= '9') || b == '.' || b == '-' || b == '+') { - try { - if (string.indexOf('.') > -1 || - string.indexOf('e') > -1 || string.indexOf('E') > -1) { - d = Double.valueOf(string); - if (!d.isInfinite() && !d.isNaN()) { - return d; - } - } else { - Long myLong = new Long(string); - if (myLong.longValue() == myLong.intValue()) { - return new Integer(myLong.intValue()); - } else { - return myLong; - } - } - } catch (Exception ignore) { - } - } - return string; - } - - - /** - * Throw an exception if the object is a NaN or infinite number. - * @param o The object to test. - * @throws JSONException If o is a non-finite number. - */ - public static void testValidity(Object o) throws JSONException { - if (o != null) { - if (o instanceof Double) { - if (((Double)o).isInfinite() || ((Double)o).isNaN()) { - throw new JSONException( - "JSON does not allow non-finite numbers."); - } - } else if (o instanceof Float) { - if (((Float)o).isInfinite() || ((Float)o).isNaN()) { - throw new JSONException( - "JSON does not allow non-finite numbers."); - } - } - } - } - - - /** - * Produce a JSONArray containing the values of the members of this - * JSONObject. - * @param names A JSONArray containing a list of key strings. This - * determines the sequence of the values in the result. - * @return A JSONArray of values. - * @throws JSONException If any of the values are non-finite numbers. - */ - public JSONArray toJSONArray(JSONArray names) throws JSONException { - if (names == null || names.length() == 0) { - return null; - } - JSONArray ja = new JSONArray(); - for (int i = 0; i < names.length(); i += 1) { - ja.put(this.opt(names.getString(i))); - } - return ja; - } - - /** - * Make a JSON text of this JSONObject. For compactness, no whitespace - * is added. If this would not result in a syntactically correct JSON text, - * then null will be returned instead. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @return a printable, displayable, portable, transmittable - * representation of the object, beginning - * with { (left brace) and ending - * with } (right brace). - */ - public String toString() { - try { - return this.toString(0); - } catch (Exception e) { - return null; - } - } - - - /** - * Make a prettyprinted JSON text of this JSONObject. - *

    - * Warning: This method assumes that the data structure is acyclical. - * @param indentFactor The number of spaces to add to each level of - * indentation. - * @return a printable, displayable, portable, transmittable - * representation of the object, beginning - * with { (left brace) and ending - * with } (right brace). - * @throws JSONException If the object contains an invalid number. - */ - public String toString(int indentFactor) throws JSONException { - StringWriter w = new StringWriter(); - synchronized (w.getBuffer()) { - return this.write(w, indentFactor, 0).toString(); - } - } - - /** - * Make a JSON text of an Object value. If the object has an - * value.toJSONString() method, then that method will be used to produce - * the JSON text. The method is required to produce a strictly - * conforming text. If the object does not contain a toJSONString - * method (which is the most common case), then a text will be - * produced by other means. If the value is an array or Collection, - * then a JSONArray will be made from it and its toJSONString method - * will be called. If the value is a MAP, then a JSONObject will be made - * from it and its toJSONString method will be called. Otherwise, the - * value's toString method will be called, and the result will be quoted. - * - *

    - * Warning: This method assumes that the data structure is acyclical. - * @param value The value to be serialized. - * @return a printable, displayable, transmittable - * representation of the object, beginning - * with { (left brace) and ending - * with } (right brace). - * @throws JSONException If the value is or contains an invalid number. - */ - public static String valueToString(Object value) throws JSONException { - if (value == null || value.equals(null)) { - return "null"; - } - if (value instanceof JSONString) { - Object object; - try { - object = ((JSONString)value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - if (object instanceof String) { - return (String)object; - } - throw new JSONException("Bad value from toJSONString: " + object); - } - if (value instanceof Number) { - return numberToString((Number) value); - } - if (value instanceof Boolean || value instanceof JSONObject || - value instanceof JSONArray) { - return value.toString(); - } - if (value instanceof Map) { - return new JSONObject((Map)value).toString(); - } - if (value instanceof Collection) { - return new JSONArray((Collection)value).toString(); - } - if (value.getClass().isArray()) { - return new JSONArray(value).toString(); - } - return quote(value.toString()); - } - - /** - * Wrap an object, if necessary. If the object is null, return the NULL - * object. If it is an array or collection, wrap it in a JSONArray. If - * it is a map, wrap it in a JSONObject. If it is a standard property - * (Double, String, et al) then it is already wrapped. Otherwise, if it - * comes from one of the java packages, turn it into a string. And if - * it doesn't, try to wrap it in a JSONObject. If the wrapping fails, - * then null is returned. - * - * @param object The object to wrap - * @return The wrapped value - */ - public static Object wrap(Object object) { - try { - if (object == null) { - return NULL; - } - if (object instanceof JSONObject || object instanceof JSONArray || - NULL.equals(object) || object instanceof JSONString || - object instanceof Byte || object instanceof Character || - object instanceof Short || object instanceof Integer || - object instanceof Long || object instanceof Boolean || - object instanceof Float || object instanceof Double || - object instanceof String) { - return object; - } - - if (object instanceof Collection) { - return new JSONArray((Collection)object); - } - if (object.getClass().isArray()) { - return new JSONArray(object); - } - if (object instanceof Map) { - return new JSONObject((Map)object); - } - Package objectPackage = object.getClass().getPackage(); - String objectPackageName = objectPackage != null - ? objectPackage.getName() - : ""; - if ( - objectPackageName.startsWith("java.") || - objectPackageName.startsWith("javax.") || - object.getClass().getClassLoader() == null - ) { - return object.toString(); - } - return new JSONObject(object); - } catch(Exception exception) { - return null; - } - } - - - /** - * Write the contents of the JSONObject as JSON text to a writer. - * For compactness, no whitespace is added. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer) throws JSONException { - return this.write(writer, 0, 0); - } - - - static final Writer writeValue(Writer writer, Object value, - int indentFactor, int indent) throws JSONException, IOException { - if (value == null || value.equals(null)) { - writer.write("null"); - } else if (value instanceof JSONObject) { - ((JSONObject) value).write(writer, indentFactor, indent); - } else if (value instanceof JSONArray) { - ((JSONArray) value).write(writer, indentFactor, indent); - } else if (value instanceof Map) { - new JSONObject((Map) value).write(writer, indentFactor, indent); - } else if (value instanceof Collection) { - new JSONArray((Collection) value).write(writer, indentFactor, - indent); - } else if (value.getClass().isArray()) { - new JSONArray(value).write(writer, indentFactor, indent); - } else if (value instanceof Number) { - writer.write(numberToString((Number) value)); - } else if (value instanceof Boolean) { - writer.write(value.toString()); - } else if (value instanceof JSONString) { - Object o; - try { - o = ((JSONString) value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - writer.write(o != null ? o.toString() : quote(value.toString())); - } else { - quote(value.toString(), writer); - } - return writer; - } - - static final void indent(Writer writer, int indent) throws IOException { - for (int i = 0; i < indent; i += 1) { - writer.write(' '); - } - } - - /** - * Write the contents of the JSONObject as JSON text to a writer. For - * compactness, no whitespace is added. - *

    - * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - Writer write(Writer writer, int indentFactor, int indent) - throws JSONException { - try { - boolean commanate = false; - final int length = this.length(); - Iterator keys = this.keys(); - writer.write('{'); - - if (length == 1) { - Object key = keys.next(); - writer.write(quote(key.toString())); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - writeValue(writer, this.map.get(key), indentFactor, indent); - } else if (length != 0) { - final int newindent = indent + indentFactor; - while (keys.hasNext()) { - Object key = keys.next(); - if (commanate) { - writer.write(','); - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, newindent); - writer.write(quote(key.toString())); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - writeValue(writer, this.map.get(key), indentFactor, - newindent); - commanate = true; - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, indent); - } - writer.write('}'); - return writer; - } catch (IOException exception) { - throw new JSONException(exception); - } - } -} diff --git a/org.nodeclipse.ui/src/org/json/JSONString.java b/org.nodeclipse.ui/src/org/json/JSONString.java deleted file mode 100644 index 6efd68e7..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONString.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.json; -/** - * The JSONString interface allows a toJSONString() - * method so that a class can change the behavior of - * JSONObject.toString(), JSONArray.toString(), - * and JSONWriter.value(Object). The - * toJSONString method will be used instead of the default behavior - * of using the Object's toString() method and quoting the result. - */ -public interface JSONString { - /** - * The toJSONString method allows a class to produce its own JSON - * serialization. - * - * @return A strictly syntactically correct JSON text. - */ - public String toJSONString(); -} diff --git a/org.nodeclipse.ui/src/org/json/JSONStringer.java b/org.nodeclipse.ui/src/org/json/JSONStringer.java deleted file mode 100644 index 32c9f7f4..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONStringer.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.json; - -/* -Copyright (c) 2006 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -import java.io.StringWriter; - -/** - * JSONStringer provides a quick and convenient way of producing JSON text. - * The texts produced strictly conform to JSON syntax rules. No whitespace is - * added, so the results are ready for transmission or storage. Each instance of - * JSONStringer can produce one JSON text. - *

    - * A JSONStringer instance provides a value method for appending - * values to the - * text, and a key - * method for adding keys before values in objects. There are array - * and endArray methods that make and bound array values, and - * object and endObject methods which make and bound - * object values. All of these methods return the JSONWriter instance, - * permitting cascade style. For example,

    - * myString = new JSONStringer()
    - *     .object()
    - *         .key("JSON")
    - *         .value("Hello, World!")
    - *     .endObject()
    - *     .toString();
    which produces the string
    - * {"JSON":"Hello, World!"}
    - *

    - * The first method called must be array or object. - * There are no methods for adding commas or colons. JSONStringer adds them for - * you. Objects and arrays can be nested up to 20 levels deep. - *

    - * This can sometimes be easier than using a JSONObject to build a string. - * @author JSON.org - * @version 2008-09-18 - */ -public class JSONStringer extends JSONWriter { - /** - * Make a fresh JSONStringer. It can be used to build one JSON text. - */ - public JSONStringer() { - super(new StringWriter()); - } - - /** - * Return the JSON text. This method is used to obtain the product of the - * JSONStringer instance. It will return null if there was a - * problem in the construction of the JSON text (such as the calls to - * array were not properly balanced with calls to - * endArray). - * @return The JSON text. - */ - public String toString() { - return this.mode == 'd' ? this.writer.toString() : null; - } -} diff --git a/org.nodeclipse.ui/src/org/json/JSONTokener.java b/org.nodeclipse.ui/src/org/json/JSONTokener.java deleted file mode 100644 index 13c84f1f..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONTokener.java +++ /dev/null @@ -1,446 +0,0 @@ -package org.json; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringReader; - -/* -Copyright (c) 2002 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -/** - * A JSONTokener takes a source string and extracts characters and tokens from - * it. It is used by the JSONObject and JSONArray constructors to parse - * JSON source strings. - * @author JSON.org - * @version 2012-02-16 - */ -public class JSONTokener { - - private long character; - private boolean eof; - private long index; - private long line; - private char previous; - private Reader reader; - private boolean usePrevious; - - - /** - * Construct a JSONTokener from a Reader. - * - * @param reader A reader. - */ - public JSONTokener(Reader reader) { - this.reader = reader.markSupported() - ? reader - : new BufferedReader(reader); - this.eof = false; - this.usePrevious = false; - this.previous = 0; - this.index = 0; - this.character = 1; - this.line = 1; - } - - - /** - * Construct a JSONTokener from an InputStream. - */ - public JSONTokener(InputStream inputStream) throws JSONException { - this(new InputStreamReader(inputStream)); - } - - - /** - * Construct a JSONTokener from a string. - * - * @param s A source string. - */ - public JSONTokener(String s) { - this(new StringReader(s)); - } - - - /** - * Back up one character. This provides a sort of lookahead capability, - * so that you can test for a digit or letter before attempting to parse - * the next number or identifier. - */ - public void back() throws JSONException { - if (this.usePrevious || this.index <= 0) { - throw new JSONException("Stepping back two steps is not supported"); - } - this.index -= 1; - this.character -= 1; - this.usePrevious = true; - this.eof = false; - } - - - /** - * Get the hex value of a character (base16). - * @param c A character between '0' and '9' or between 'A' and 'F' or - * between 'a' and 'f'. - * @return An int between 0 and 15, or -1 if c was not a hex digit. - */ - public static int dehexchar(char c) { - if (c >= '0' && c <= '9') { - return c - '0'; - } - if (c >= 'A' && c <= 'F') { - return c - ('A' - 10); - } - if (c >= 'a' && c <= 'f') { - return c - ('a' - 10); - } - return -1; - } - - public boolean end() { - return this.eof && !this.usePrevious; - } - - - /** - * Determine if the source string still contains characters that next() - * can consume. - * @return true if not yet at the end of the source. - */ - public boolean more() throws JSONException { - this.next(); - if (this.end()) { - return false; - } - this.back(); - return true; - } - - - /** - * Get the next character in the source string. - * - * @return The next character, or 0 if past the end of the source string. - */ - public char next() throws JSONException { - int c; - if (this.usePrevious) { - this.usePrevious = false; - c = this.previous; - } else { - try { - c = this.reader.read(); - } catch (IOException exception) { - throw new JSONException(exception); - } - - if (c <= 0) { // End of stream - this.eof = true; - c = 0; - } - } - this.index += 1; - if (this.previous == '\r') { - this.line += 1; - this.character = c == '\n' ? 0 : 1; - } else if (c == '\n') { - this.line += 1; - this.character = 0; - } else { - this.character += 1; - } - this.previous = (char) c; - return this.previous; - } - - - /** - * Consume the next character, and check that it matches a specified - * character. - * @param c The character to match. - * @return The character. - * @throws JSONException if the character does not match. - */ - public char next(char c) throws JSONException { - char n = this.next(); - if (n != c) { - throw this.syntaxError("Expected '" + c + "' and instead saw '" + - n + "'"); - } - return n; - } - - - /** - * Get the next n characters. - * - * @param n The number of characters to take. - * @return A string of n characters. - * @throws JSONException - * Substring bounds error if there are not - * n characters remaining in the source string. - */ - public String next(int n) throws JSONException { - if (n == 0) { - return ""; - } - - char[] chars = new char[n]; - int pos = 0; - - while (pos < n) { - chars[pos] = this.next(); - if (this.end()) { - throw this.syntaxError("Substring bounds error"); - } - pos += 1; - } - return new String(chars); - } - - - /** - * Get the next char in the string, skipping whitespace. - * @throws JSONException - * @return A character, or 0 if there are no more characters. - */ - public char nextClean() throws JSONException { - for (;;) { - char c = this.next(); - if (c == 0 || c > ' ') { - return c; - } - } - } - - - /** - * Return the characters up to the next close quote character. - * Backslash processing is done. The formal JSON format does not - * allow strings in single quotes, but an implementation is allowed to - * accept them. - * @param quote The quoting character, either - * " (double quote) or - * ' (single quote). - * @return A String. - * @throws JSONException Unterminated string. - */ - public String nextString(char quote) throws JSONException { - char c; - StringBuffer sb = new StringBuffer(); - for (;;) { - c = this.next(); - switch (c) { - case 0: - case '\n': - case '\r': - throw this.syntaxError("Unterminated string"); - case '\\': - c = this.next(); - switch (c) { - case 'b': - sb.append('\b'); - break; - case 't': - sb.append('\t'); - break; - case 'n': - sb.append('\n'); - break; - case 'f': - sb.append('\f'); - break; - case 'r': - sb.append('\r'); - break; - case 'u': - sb.append((char)Integer.parseInt(this.next(4), 16)); - break; - case '"': - case '\'': - case '\\': - case '/': - sb.append(c); - break; - default: - throw this.syntaxError("Illegal escape."); - } - break; - default: - if (c == quote) { - return sb.toString(); - } - sb.append(c); - } - } - } - - - /** - * Get the text up but not including the specified character or the - * end of line, whichever comes first. - * @param delimiter A delimiter character. - * @return A string. - */ - public String nextTo(char delimiter) throws JSONException { - StringBuffer sb = new StringBuffer(); - for (;;) { - char c = this.next(); - if (c == delimiter || c == 0 || c == '\n' || c == '\r') { - if (c != 0) { - this.back(); - } - return sb.toString().trim(); - } - sb.append(c); - } - } - - - /** - * Get the text up but not including one of the specified delimiter - * characters or the end of line, whichever comes first. - * @param delimiters A set of delimiter characters. - * @return A string, trimmed. - */ - public String nextTo(String delimiters) throws JSONException { - char c; - StringBuffer sb = new StringBuffer(); - for (;;) { - c = this.next(); - if (delimiters.indexOf(c) >= 0 || c == 0 || - c == '\n' || c == '\r') { - if (c != 0) { - this.back(); - } - return sb.toString().trim(); - } - sb.append(c); - } - } - - - /** - * Get the next value. The value can be a Boolean, Double, Integer, - * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object. - * @throws JSONException If syntax error. - * - * @return An object. - */ - public Object nextValue() throws JSONException { - char c = this.nextClean(); - String string; - - switch (c) { - case '"': - case '\'': - return this.nextString(c); - case '{': - this.back(); - return new JSONObject(this); - case '[': - this.back(); - return new JSONArray(this); - } - - /* - * Handle unquoted text. This could be the values true, false, or - * null, or it can be a number. An implementation (such as this one) - * is allowed to also accept non-standard forms. - * - * Accumulate characters until we reach the end of the text or a - * formatting character. - */ - - StringBuffer sb = new StringBuffer(); - while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { - sb.append(c); - c = this.next(); - } - this.back(); - - string = sb.toString().trim(); - if ("".equals(string)) { - throw this.syntaxError("Missing value"); - } - return JSONObject.stringToValue(string); - } - - - /** - * Skip characters until the next character is the requested character. - * If the requested character is not found, no characters are skipped. - * @param to A character to skip to. - * @return The requested character, or zero if the requested character - * is not found. - */ - public char skipTo(char to) throws JSONException { - char c; - try { - long startIndex = this.index; - long startCharacter = this.character; - long startLine = this.line; - this.reader.mark(1000000); - do { - c = this.next(); - if (c == 0) { - this.reader.reset(); - this.index = startIndex; - this.character = startCharacter; - this.line = startLine; - return c; - } - } while (c != to); - } catch (IOException exc) { - throw new JSONException(exc); - } - - this.back(); - return c; - } - - - /** - * Make a JSONException to signal a syntax error. - * - * @param message The error message. - * @return A JSONException object, suitable for throwing - */ - public JSONException syntaxError(String message) { - return new JSONException(message + this.toString()); - } - - - /** - * Make a printable string of this JSONTokener. - * - * @return " at {index} [character {character} line {line}]" - */ - public String toString() { - return " at " + this.index + " [character " + this.character + " line " + - this.line + "]"; - } -} diff --git a/org.nodeclipse.ui/src/org/json/JSONWriter.java b/org.nodeclipse.ui/src/org/json/JSONWriter.java deleted file mode 100644 index 35b60d90..00000000 --- a/org.nodeclipse.ui/src/org/json/JSONWriter.java +++ /dev/null @@ -1,327 +0,0 @@ -package org.json; - -import java.io.IOException; -import java.io.Writer; - -/* -Copyright (c) 2006 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -/** - * JSONWriter provides a quick and convenient way of producing JSON text. - * The texts produced strictly conform to JSON syntax rules. No whitespace is - * added, so the results are ready for transmission or storage. Each instance of - * JSONWriter can produce one JSON text. - *

    - * A JSONWriter instance provides a value method for appending - * values to the - * text, and a key - * method for adding keys before values in objects. There are array - * and endArray methods that make and bound array values, and - * object and endObject methods which make and bound - * object values. All of these methods return the JSONWriter instance, - * permitting a cascade style. For example,

    - * new JSONWriter(myWriter)
    - *     .object()
    - *         .key("JSON")
    - *         .value("Hello, World!")
    - *     .endObject();
    which writes
    - * {"JSON":"Hello, World!"}
    - *

    - * The first method called must be array or object. - * There are no methods for adding commas or colons. JSONWriter adds them for - * you. Objects and arrays can be nested up to 20 levels deep. - *

    - * This can sometimes be easier than using a JSONObject to build a string. - * @author JSON.org - * @version 2011-11-24 - */ -public class JSONWriter { - private static final int maxdepth = 200; - - /** - * The comma flag determines if a comma should be output before the next - * value. - */ - private boolean comma; - - /** - * The current mode. Values: - * 'a' (array), - * 'd' (done), - * 'i' (initial), - * 'k' (key), - * 'o' (object). - */ - protected char mode; - - /** - * The object/array stack. - */ - private final JSONObject stack[]; - - /** - * The stack top index. A value of 0 indicates that the stack is empty. - */ - private int top; - - /** - * The writer that will receive the output. - */ - protected Writer writer; - - /** - * Make a fresh JSONWriter. It can be used to build one JSON text. - */ - public JSONWriter(Writer w) { - this.comma = false; - this.mode = 'i'; - this.stack = new JSONObject[maxdepth]; - this.top = 0; - this.writer = w; - } - - /** - * Append a value. - * @param string A string value. - * @return this - * @throws JSONException If the value is out of sequence. - */ - private JSONWriter append(String string) throws JSONException { - if (string == null) { - throw new JSONException("Null pointer"); - } - if (this.mode == 'o' || this.mode == 'a') { - try { - if (this.comma && this.mode == 'a') { - this.writer.write(','); - } - this.writer.write(string); - } catch (IOException e) { - throw new JSONException(e); - } - if (this.mode == 'o') { - this.mode = 'k'; - } - this.comma = true; - return this; - } - throw new JSONException("Value out of sequence."); - } - - /** - * Begin appending a new array. All values until the balancing - * endArray will be appended to this array. The - * endArray method must be called to mark the array's end. - * @return this - * @throws JSONException If the nesting is too deep, or if the object is - * started in the wrong place (for example as a key or after the end of the - * outermost array or object). - */ - public JSONWriter array() throws JSONException { - if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { - this.push(null); - this.append("["); - this.comma = false; - return this; - } - throw new JSONException("Misplaced array."); - } - - /** - * End something. - * @param mode Mode - * @param c Closing character - * @return this - * @throws JSONException If unbalanced. - */ - private JSONWriter end(char mode, char c) throws JSONException { - if (this.mode != mode) { - throw new JSONException(mode == 'a' - ? "Misplaced endArray." - : "Misplaced endObject."); - } - this.pop(mode); - try { - this.writer.write(c); - } catch (IOException e) { - throw new JSONException(e); - } - this.comma = true; - return this; - } - - /** - * End an array. This method most be called to balance calls to - * array. - * @return this - * @throws JSONException If incorrectly nested. - */ - public JSONWriter endArray() throws JSONException { - return this.end('a', ']'); - } - - /** - * End an object. This method most be called to balance calls to - * object. - * @return this - * @throws JSONException If incorrectly nested. - */ - public JSONWriter endObject() throws JSONException { - return this.end('k', '}'); - } - - /** - * Append a key. The key will be associated with the next value. In an - * object, every value must be preceded by a key. - * @param string A key string. - * @return this - * @throws JSONException If the key is out of place. For example, keys - * do not belong in arrays or if the key is null. - */ - public JSONWriter key(String string) throws JSONException { - if (string == null) { - throw new JSONException("Null key."); - } - if (this.mode == 'k') { - try { - this.stack[this.top - 1].putOnce(string, Boolean.TRUE); - if (this.comma) { - this.writer.write(','); - } - this.writer.write(JSONObject.quote(string)); - this.writer.write(':'); - this.comma = false; - this.mode = 'o'; - return this; - } catch (IOException e) { - throw new JSONException(e); - } - } - throw new JSONException("Misplaced key."); - } - - - /** - * Begin appending a new object. All keys and values until the balancing - * endObject will be appended to this object. The - * endObject method must be called to mark the object's end. - * @return this - * @throws JSONException If the nesting is too deep, or if the object is - * started in the wrong place (for example as a key or after the end of the - * outermost array or object). - */ - public JSONWriter object() throws JSONException { - if (this.mode == 'i') { - this.mode = 'o'; - } - if (this.mode == 'o' || this.mode == 'a') { - this.append("{"); - this.push(new JSONObject()); - this.comma = false; - return this; - } - throw new JSONException("Misplaced object."); - - } - - - /** - * Pop an array or object scope. - * @param c The scope to close. - * @throws JSONException If nesting is wrong. - */ - private void pop(char c) throws JSONException { - if (this.top <= 0) { - throw new JSONException("Nesting error."); - } - char m = this.stack[this.top - 1] == null ? 'a' : 'k'; - if (m != c) { - throw new JSONException("Nesting error."); - } - this.top -= 1; - this.mode = this.top == 0 - ? 'd' - : this.stack[this.top - 1] == null - ? 'a' - : 'k'; - } - - /** - * Push an array or object scope. - * @param c The scope to open. - * @throws JSONException If nesting is too deep. - */ - private void push(JSONObject jo) throws JSONException { - if (this.top >= maxdepth) { - throw new JSONException("Nesting too deep."); - } - this.stack[this.top] = jo; - this.mode = jo == null ? 'a' : 'k'; - this.top += 1; - } - - - /** - * Append either the value true or the value - * false. - * @param b A boolean. - * @return this - * @throws JSONException - */ - public JSONWriter value(boolean b) throws JSONException { - return this.append(b ? "true" : "false"); - } - - /** - * Append a double value. - * @param d A double. - * @return this - * @throws JSONException If the number is not finite. - */ - public JSONWriter value(double d) throws JSONException { - return this.value(new Double(d)); - } - - /** - * Append a long value. - * @param l A long. - * @return this - * @throws JSONException - */ - public JSONWriter value(long l) throws JSONException { - return this.append(Long.toString(l)); - } - - - /** - * Append an object value. - * @param object The object to append. It can be null, or a Boolean, Number, - * String, JSONObject, or JSONArray, or an object that implements JSONString. - * @return this - * @throws JSONException If the value is out of sequence. - */ - public JSONWriter value(Object object) throws JSONException { - return this.append(JSONObject.valueToString(object)); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/Activator.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/Activator.java deleted file mode 100644 index 051d885c..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/Activator.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.nodeclipse.ui; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.nodeclipse.ui"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - /** - * Returns the active workbench shell or null if none - * - * @return the active workbench shell or null if none - */ - public static Shell getActiveWorkbenchShell() { - IWorkbenchWindow window = getActiveWorkbenchWindow(); - if (window != null) { - return window.getShell(); - } - return null; - } - - /** - * Returns the active workbench window - * - * @return the active workbench window - */ - public static IWorkbenchWindow getActiveWorkbenchWindow() { - return getDefault().getWorkbench().getActiveWorkbenchWindow(); - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromCompletionsJson.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromCompletionsJson.java deleted file mode 100644 index 700935fa..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromCompletionsJson.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; -import org.nodeclipse.ui.util.ProcessUtils; - -/** - * @author LambGao - * @author Paul Verest - * TODO don't use static {} - */ -public class ContentFromCompletionsJson { - - public static JSONArray COMPLETIONS = null; - - static { - try { - InputStream is = null; - // option to have completions.json as external file - String completionJsonPath = ProcessUtils.getCompletionsJsonPath(); - if (completionJsonPath == null || completionJsonPath.equals("")) { - completionJsonPath = Constants.COMPLETIONS_JSON; - is = ContentFromCompletionsJson.class.getClassLoader().getResourceAsStream(completionJsonPath); - } else { - File file = new File(completionJsonPath); - if (!file.exists()) { - NodeclipseConsole.write("File "+completionJsonPath+" does not exist! \n"); - }else{ - is = new FileInputStream(file); - } - } - - if (is==null){ - NodeclipseConsole.write("Error while reading file "+completionJsonPath+"! \n"); - }else{ - JSONObject object = new JSONObject(inputStream2String(is)); - COMPLETIONS = object.getJSONArray(Constants.COMPLETIONS_KEY); - } - } catch (JSONException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } catch (IOException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - public static String inputStream2String(InputStream is) throws IOException { - BufferedReader in = new BufferedReader(new InputStreamReader(is)); - StringBuffer buffer = new StringBuffer(); - String line = ""; - while ((line = in.readLine()) != null) { - buffer.append(line); - } - return buffer.toString(); - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromDefinitelyTyped.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromDefinitelyTyped.java deleted file mode 100644 index 54594896..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromDefinitelyTyped.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -/** - * Taking some completions from TypeScript type defnitions files. - * Example of .d.ts -

    -/**
    - * Interface for the AJAX setting that will configure the AJAX request
    - * /
    -interface JQueryAjaxSettings {
    -    /**
    -     * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
    -     * /
    -    accepts?: any;
    -    /**
    -     * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
    -     * /
    -    async?: boolean;
    -
    -
    - * - * @author Paul Verest - * @since 0.12 - */ -public class ContentFromDefinitelyTyped { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromOrionIndexFiles.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromOrionIndexFiles.java deleted file mode 100644 index 6eb20a93..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromOrionIndexFiles.java +++ /dev/null @@ -1,234 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Iterator; - -import org.json.JSONException; -import org.json.JSONObject; - -/** - * Using Orion IndexFiles for libraries for content assist
    - * This is logic class without Eclipse API dependencies. Just run it as Java App -
    -express={
    -  "!define": {
    -    "response": {
    -      "send": {"!type": "fn(body: String) -> response"},
    -      "get": {"!type": "fn(field: String) -> String"},
    -      "location": {"!type": "fn(url: String) -> response"},
    -      "status": {"!type": "fn(code: Number) -> response"},
    -      "set": {"!type": "fn(field: Object, val: String) -> response"},
    -      "links": {"!type": "fn(links: Object) -> response"},
    -      "download": {"!type": "fn(path: String, filename: String, fn: fn())"}, * 
    -
    - * @author Paul Verest - * @since 0.12 - */ -public class ContentFromOrionIndexFiles // implements IModelFiller -{ - private static boolean verbose = true; - private static int errorCounter = 0; - private static Model model = null; - - /* - * Run this As Java Application to check .indexFiles - * - * Reading Libraries IndexFiles finished in 40 ms. errorCounter=2 - * */ - public static void main(String[] args) { - model = new Model(); - initModel(model); - //code example from https://github.com/demodays/bjdd/issues/1 -// model.processWith(new EntryProcessor(){ -// entry -> System.out.println(entry.toFullString()); -// } - model.processWith(new EntryProcessor(){ - @Override - public void process(Entry entry) { - System.out.println(entry.toFullString()); - } - }); - } - - //@Override - public static void initModel(Model model) { - long startTime = System.currentTimeMillis(); //nanoTime(); - addIndexFile(model, "amqp"); -// addIndexFile(model, "browser"); -// addIndexFile(model, "ecma5"); - addIndexFile(model, "express"); - addIndexFile(model, "mongodb"); - addIndexFile(model, "mysql"); -// addIndexFile(model, "node"); - addIndexFile(model, "postgres"); - addIndexFile(model, "redis"); - - long time = System.currentTimeMillis() - startTime; - log("Reading Libraries IndexFiles finished in "+time+" ms. errorCounter="+errorCounter); - } - - // see analog ContentFromSources.populateModel() - private static boolean addIndexFile(Model model, String libname) { - JSONObject libraryIndex = jsonForLibrary(libname); - if (libraryIndex == null){ - return false; - } - try { - String moduleName = libraryIndex.getString("!name"); - debug(", " + moduleName); - Module moduleObj = new Module(moduleName); - model.addModule(moduleObj); - - JSONObject module = (JSONObject) libraryIndex.get("!define"); - if (verbose) debug("(("+module.length()+")):"); - - //DONE add moduleDesc as list of higher level objects - String moduleDesc = formatedName(moduleName)+module.names(); - Entry moduleEntry = new Entry(moduleObj,EntryType.module,moduleName,moduleName,moduleDesc,null); - model.addEntry(moduleEntry); - - if (verbose) debug("\n Model size="+model.entries.size()); - -// "response": { -// "send": {"!type": "fn(body: String) -> response"}, - - Iterator keysIterator = module.keys(); - while (keysIterator.hasNext()){ - String key = keysIterator.next().toString(); - JSONObject obj = (JSONObject) module.get(key); - if (verbose) debug("\n"+key+"("+obj.length()+"):"); - - String trigger = moduleName+'.'+key; - String name = key; - String desc = formatedName(name,trigger); - //read !proto, !type to make desc - String proto = obj.optString("!proto"); - if (""!=proto){ desc+="prototype:"+proto+' ';} - String type = obj.optString("!type"); - if (""!=type){ desc+="type:"+type+' ';} - - Entry entry = new Entry(moduleObj,EntryType.unknown,name,trigger,desc,moduleEntry); - model.addEntry(entry); - - // obj may have other objects inside - populateCheckObj(model, obj, name, moduleObj, entry); - - if (verbose) debug("\n Model size="+model.entries.size()); - } - if (verbose) debug(";\n"); - - - } catch (ClassCastException e) { - errorCounter++; - error(e.getLocalizedMessage() + "\n" + e + "\n"); - } catch (JSONException e) { - errorCounter++; - error(e.getLocalizedMessage() + "\n" + e + "\n"); - } - - return true; - } - - public static boolean checkProperties = true; - - private static void populateCheckObj(Model model, JSONObject obj, String word, Module moduleObj, Entry parent) throws JSONException { - if (!checkProperties){ - return; - } - - Iterator keysIterator = obj.keys(); - while (keysIterator.hasNext()){ - String key = keysIterator.next().toString(); - if (verbose) debug(key+'`'); - if (key.equals("!proto")||key.equals("!type")) { - continue; - } - //JSONObject objEement = (JSONObject) obj.get(key); - Object objEementObject = obj.get(key); - JSONObject objEement = null; - - String trigger = word+'.'+key; - String name = key; - String desc = formatedName(name,trigger); - - if (objEementObject instanceof String ){ -// "express": { -// "response": "response", - } else{ - objEement = (JSONObject) objEementObject; - //read !proto, !type to make desc - String proto = objEement.optString("!proto"); - if (""!=proto){ desc+="prototype:"+proto+' ';} - String type = objEement.optString("!type"); - if (""!=type){ desc+="type:"+type+' ';} - } - - Entry entry = new Entry(moduleObj,EntryType.unknown,name,trigger,desc,parent); - model.addEntry(entry); - } - - } - - private static String formatedName(String name) { - return ""+name+"
    "; - } - private static String formatedName(String name, String trigger) { - return formatedName(name)+""+trigger+"
    "; - } - - private static JSONObject jsonForLibrary(String libname){ - if (libname==null || libname.length()==0) - return null; - String filename = "org/nodeclipse/ui/contentassist/indexFiles/"+libname+"Index.js"; - JSONObject libraryIndex = null; - try { - InputStream is = ContentFromSources.class.getClassLoader().getResourceAsStream(filename); - String index = inputStream2StringWithJson(is); - libraryIndex = new JSONObject(index); - if (verbose) debug( libname+'='+ libraryIndex.toString(2)+'\n'); - } catch (JSONException e) { - errorCounter++; - error("error "+errorCounter+" in "+libname+": "+ e.getLocalizedMessage()+"\n"); - } catch (IOException e) { - error(e.getLocalizedMessage()+"\n"); - } - return libraryIndex; - } - - private static String inputStream2StringWithJson(InputStream is) throws IOException { - BufferedReader in = new BufferedReader(new InputStreamReader(is)); - StringBuilder buffer = new StringBuilder(); - String line = ""; - boolean isJsonStarted = false; - while ((line = in.readLine()) != null) { - if (!isJsonStarted){ //skipping header - if (!line.contains("return")){ - continue; - } - isJsonStarted = true; - buffer.append("{"); - continue; - } - buffer.append(line); - } - return buffer.toString(); - } - - - private static void error(String s){ - //NodeclipseConsole.write(s); - System.err.print(s); - } - private static void debug(String s){ - //NodeclipseConsole.write(s); - System.out.print(s); - } - private static void log(String s){ - //NodeclipseConsole.write(s); - System.out.print(s); - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromProject.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromProject.java deleted file mode 100644 index ee97c79d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromProject.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -/** - * idea: - * - read project's package.json file to get list of used packages - * - read node_modules/~/README.* to get some module description - * - * @author Paul - */ -public class ContentFromProject { - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSources.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSources.java deleted file mode 100644 index 70be1d59..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSources.java +++ /dev/null @@ -1,292 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.nodeclipse.ui.util.NodeclipseConsole; -import org.nodeclipse.ui.util.ProcessUtils; - -/** - * Node.js Context from Sources all.json. - * May be multiple instances, defaultInstance uses bundled all.json file. - * - * TODO Model population checking is very suitable for Unit Testing - * - * Example from http.json - * -
     
    -      "methods": [
    -        {
    -          "textRaw": "http.createServer([requestListener])",
    -          "type": "method",
    -          "name": "createServer",
    -          "desc": "

    Returns a new web server object.\n\n

    \n

    The requestListener is a function which is automatically\nadded to the 'request' event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "requestListener", - "optional": true - } - ] - } - ] - }, -
    - * - * - * @author Paul Verest - */ -class ContentFromSources { - - static final String ALL_JSON = "org/nodeclipse/ui/contentassist/all.json"; - - //public static JSONArray METHODS; - JSONObject NodejsContext; - Model model; - public static boolean checkProperties = true; - - static ContentFromSources defaultInstance = null; - static { - defaultInstance = new ContentFromSources(ALL_JSON); - } - - public static ContentFromSources getDefaultInstances() { - if (defaultInstance == null) { - defaultInstance = new ContentFromSources(ALL_JSON); - } - return defaultInstance; - } - - public ContentFromSources(String sourcesAllJsonPath) { - try { - // check if sources to use are selected - //String sourcesAllJsonPath = ProcessUtils.getSourcesAllJsonPath(); - if ("".equals(sourcesAllJsonPath)) { - sourcesAllJsonPath = ALL_JSON; - } - InputStream is = ContentFromSources.class.getClassLoader().getResourceAsStream(sourcesAllJsonPath); - NodejsContext = new JSONObject(inputStream2String(is)); - } catch (JSONException e) { - log(e.getLocalizedMessage()+"\n"); - } catch (IOException e) { - log(e.getLocalizedMessage()+"\n"); - } -// if (defaultInstance == null){ -// defaultInstance = this; -// } - populateModel(); - } - - public static String inputStream2String(InputStream is) throws IOException { - BufferedReader in = new BufferedReader(new InputStreamReader(is)); - StringBuilder buffer = new StringBuilder(); // no need for thread-safe StringBuffer buffer = new StringBuffer(); - String line = ""; - while ((line = in.readLine()) != null) { - buffer.append(line); - } - return buffer.toString(); - } - - /** - * Reading JSON file - */ - private void populateModel(){ - // modules30: timers(m8), module, addons, util(m13), Events(c1), domain(m1)(c1), buffer(c2), stream(c4), crypto(m18)(c7), - // tls_(ssl)(m5)(c4), stringdecoder(c1), fs(m67)(c4), path(m7), net(m10)(c2), dgram(m1)(c1), dns(m10), http(m4)(c4), https(m3)(c2), - // url(m3), querystring(m2), punycode(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), child_process(m4)(c1), assert(m11), tty(m2)(c2), zlib(m14)(c8), os(m13), cluster(m3)(c1) - - - model = new Model(); - try { - JSONObject nodejsContextJSONObject = NodejsContext; - JSONArray modules = nodejsContextJSONObject.getJSONArray("modules"); - log("modules"+modules.length()+" "); - for (int i = 0; i < modules.length(); i++) { - JSONObject module = (JSONObject) modules.get(i); - String moduleName = module.getString("name"); - debug( ", "+moduleName); - Module moduleObj = new Module(moduleName); - model.addModule(moduleObj); - - String moduleDesc = formatedName(moduleName)+module.getString("desc"); - Entry moduleEntry = new Entry(moduleObj,EntryType.module,moduleName,moduleName,moduleDesc,null); - model.addEntry(moduleEntry); - - populateCheckProperties(module, moduleName, moduleObj, moduleEntry); - - if (module.has("methods")) { - JSONArray methods = module.getJSONArray("methods"); - debug("(m"+methods.length()+")"); - for (int j = 0; j < methods.length(); j++) { - JSONObject method = (JSONObject) methods.get(j); - // example: "textRaw": "http.createServer([requestListener])","type": "method","name": "createServer", - String trigger = method.getString("textRaw"); - String name = method.getString("name"); - String desc = formatedName(name,trigger)+method.getString("desc"); - - Entry entry = new Entry(moduleObj,EntryType.method,name,trigger,desc,moduleEntry); - model.addEntry(entry); - } - } - - if (module.has("classes")){ - JSONArray classes = module.getJSONArray("classes"); - debug("(c"+classes.length()+")"); - for (int j = 0; j < classes.length(); j++) { - JSONObject clazz = (JSONObject) classes.get(j); - // example: "textRaw": "Class: Domain","type": "class","name": "Domain" - String trigger = clazz.getString("name"); - if (!trigger.startsWith(moduleName)) { - trigger=moduleName+'.'+trigger; - } - String desc = formatedName(trigger,clazz.getString("textRaw"))+clazz.getString("desc"); - Entry entry = new Entry(moduleObj,EntryType.clazz,trigger,trigger,desc,moduleEntry); - model.addEntry(entry); - - // Class may have properties, see http.IncomingMessage -> message.httpVersion - populateCheckProperties(module, moduleName, moduleObj, entry); - - } - } - - - } - } catch (JSONException e) { - log(e.getLocalizedMessage()+"\n"+e); - } - - - } - - private void populateCheckProperties(JSONObject obj, String moduleName, Module moduleObj, Entry parent) throws JSONException { - if (!checkProperties){ - return; - } - if (obj.has("properties")) { - JSONArray properties = obj.getJSONArray("properties"); - debug("("+moduleName+".p"+properties.length()+")"); - for (int j = 0; j < properties.length(); j++) { - JSONObject property = (JSONObject) properties.get(j); - // example: see http.json (2 cases) - String trigger = property.getString("name"); - if (!trigger.startsWith(moduleName)) { - trigger=moduleName+'.'+trigger; - } - String name = property.getString("name"); - String desc = formatedName(name,trigger); //+property.getString("desc"); - if (property.has("desc")) { - desc = desc+property.getString("desc"); - }else{ - debug("(p"+properties.length()+")"); - } - - Entry entry = new Entry(moduleObj,EntryType.property,name,trigger,desc, null); - model.addEntry(entry); - - // property may have properties, see http.IncomingMessage -> message.httpVersion - populateCheckProperties(property, trigger, moduleObj, entry); - - //TODO methods of properties: http.IncomingMessage -> message.setTimeout(msecs, callback) - } - } - } - - // href won't be rendered as link - private String formatedModuleName(String moduleName) { - String res = formatedName(moduleName)+"Node.js Manual & Documentation
    "; - return res; - } - - private String formatedName(String name) { - return ""+name+"
    "; - } - private String formatedName(String name, String trigger) { - return formatedName(name)+""+trigger+"
    "; - } - - - private static void debug(String s){ - //NodeclipseConsole.write(s); - System.out.print(s); - } - private static void log(String s){ - //NodeclipseConsole.write(s); - System.out.print(s); - } - - //TODO unit tests - public static void main(String[] args){ - //System.out.println(x); - ContentFromSources c = getDefaultInstances(); // new ContentFromSources(ALL_JSON); - //c.populateModel(); - System.out.println(); - System.out.println("- Matches http. :"); - List matches = c.model.findMatchingEntries("http."); - for(Entry entry: matches){ - System.out.println(entry); - } - -// modules30 , timers(m8), module, addons, util(m13), Events(c1), domain(m1)(c1), buffer(c2), stream(c4), crypto(m18)(c7), tls_(ssl)(m5)(c4), stringdecoder(c1), fs(m67)(c4), path(m7), net(m10)(c2), dgram(m1)(c1), dns(m10), http(m4)(c4), https(m3)(c2), url(m3), querystring(m2), punycode(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), child_process(m4)(c1), assert(m11), tty(m2)(c2), zlib(m14)(c8), os(m13), cluster(m3)(c1)modules30 , timers(m8), module, addons, util(m13), Events(c1), domain(m1)(c1), buffer(c2), stream(c4), crypto(m18)(c7), tls_(ssl)(m5)(c4), stringdecoder(c1), fs(m67)(c4), path(m7), net(m10)(c2), dgram(m1)(c1), dns(m10), http(m4)(c4), https(m3)(c2), url(m3), querystring(m2), punycode(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), child_process(m4)(c1), assert(m11), tty(m2)(c2), zlib(m14)(c8), os(m13), cluster(m3)(c1) - - // modules30 , timers(m8), module, addons, util(m13), Events(c1), - // domain(m1)(c1), buffer(p1)(c2)(p1)(p1), stream(c4), - // crypto(p1)(m18)(c7)(p1)(p1)(p1)(p1)(p1)(p1)(p1), - // tls_(ssl)(p1)(m5)(c4)(p1)(p1)(p1)(p1), stringdecoder(c1), - // fs(m67)(c4), path(p2)(m7), net(m10)(c2), dgram(m1)(c1), dns(m10), - // http(p3)(p7)(m4)(c4)(p3)(p7)(p3)(p7)(p3)(p7)(p3)(p7), - // https(p1)(m3)(c2)(p1)(p1), url(m3), querystring(p2)(m2), - // punycode(p2)(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), - // child_process(m4)(c1), assert(m11), tty(m2)(c2), zlib(m14)(c8), - // os(p1)(m13), cluster(p5)(m3)(c1)(p5) - -// http.Agent -// http.ClientRequest -// http.Server -// http.ServerResponse -// http.createClient([port], [host]) -// http.createServer([requestListener]) -// http.get(options, callback) -// http.request(options, callback) -// https.Agent -// https.Server -// https.createServer(options, [requestListener]) -// https.get(options, callback) -// https.request(options, callback) - - - //TODO this however is not is Editor content assist - // follows punycode(p2)(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), child_process(m4)(c1), - // assert(m11), tty(m2)(c2), zlib(m14)(c8), os(p1)(m13), cluster(p5)(m3)(c1)(p5) - - System.out.println("- Matches os. :"); - List matchesOs = c.model.findMatchingEntries("os."); - for(Entry entry: matchesOs){ - System.out.println(entry); - } - -// Matches os. : -// os.EOL -// os.arch() -// os.cpus() -// os.endianness() -// os.freemem() -// os.hostname() -// os.loadavg() -// os.networkInterfaces() -// os.platform() -// os.release() -// os.tmpdir() -// os.totalmem() -// os.type() -// os.uptime() - - } -} - diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSourcesTest.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSourcesTest.java deleted file mode 100644 index 75f9315f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/ContentFromSourcesTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -//import static org.junit.Assert.*; -// -//import org.junit.Test; -// -//public class ContentFromSourcesTest { -// -// @Test -// public void test() { -// fail("Not yet implemented"); -// } -// -//} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/README.md b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/README.md deleted file mode 100644 index d2f00cc6..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/README.md +++ /dev/null @@ -1,10 +0,0 @@ -See #24 Improving Code Assist with TypeScript - -github.com/borisyankov/DefinitelyTyped -has accumulated type definitions for a lot of JS frameworks - - -To start with searched for TOP10 web frameworks - -- http://www.sitepoint.com/top-10-front-end-development-frameworks/ -- (not useful) http://www.infoq.com/research/jvm-web-frameworks diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/bootstrap/bootstrap.d.ts b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/bootstrap/bootstrap.d.ts deleted file mode 100644 index 30aeadb0..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/bootstrap/bootstrap.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -// Type definitions for Bootstrap 2.2 -// Project: http://twitter.github.com/bootstrap/ -// Definitions by: Boris Yankov -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - -/// - -interface ModalOptions { - backdrop?: boolean; - keyboard?: boolean; - show?: boolean; - remote?: string; -} - -interface ModalOptionsBackdropString { - backdrop?: string; // for "static" - keyboard?: boolean; - show?: boolean; - remote?: string; -} - -interface ScrollSpyOptions { - offset?: number; -} - -interface TooltipOptions { - animation?: boolean; - html?: boolean; - placement?: any; - selector?: string; - title?: any; - trigger?: string; - delay?: any; - container?: any; -} - -interface PopoverOptions { - animation?: boolean; - html?: boolean; - placement?: any; - selector?: string; - trigger?: string; - title?: any; - content?: any; - delay?: any; - container?: any; -} - -interface CollapseOptions { - parent?: any; - toggle?: boolean; -} - -interface CarouselOptions { - interval?: number; - pause?: string; -} - -interface TypeaheadOptions { - source?: any; - items?: number; - minLength?: number; - matcher?: (item: any) => boolean; - sorter?: (items: any[]) => any[]; - updater?: (item: any) => any; - highlighter?: (item: any) => string; -} - -interface AffixOptions { - offset?: any; -} - -interface JQuery { - modal(options?: ModalOptions): JQuery; - modal(options?: ModalOptionsBackdropString): JQuery; - modal(command: string): JQuery; - - dropdown(): JQuery; - dropdown(command: string): JQuery; - - scrollspy(command: string): JQuery; - scrollspy(options?: ScrollSpyOptions): JQuery; - - tab(): JQuery; - tab(command: string): JQuery; - - tooltip(options?: TooltipOptions): JQuery; - tooltip(command: string): JQuery; - - popover(options?: PopoverOptions): JQuery; - popover(command: string): JQuery; - - alert(): JQuery; - alert(command: string): JQuery; - - button(): JQuery; - button(command: string): JQuery; - - collapse(options?: CollapseOptions): JQuery; - collapse(command: string): JQuery; - - carousel(options?: CarouselOptions): JQuery; - carousel(command: string): JQuery; - - typeahead(options?: TypeaheadOptions): JQuery; - - affix(options?: AffixOptions): JQuery; -} - -declare module "bootstrap" { -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/jquery/jquery.d.ts b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/jquery/jquery.d.ts deleted file mode 100644 index 558453ab..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/DefinitelyTyped/jquery/jquery.d.ts +++ /dev/null @@ -1,3862 +0,0 @@ -// Type definitions for jQuery 1.10.x / 2.0.x -// Project: http://jquery.com/ -// Definitions by: Boris Yankov , Christian Hoffmeister , Steve Fenton, Diullei Gomes , Tass Iliopoulos , Jason Swearingen, Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/* ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -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 - -THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - - -/** - * Interface for the AJAX setting that will configure the AJAX request - */ -interface JQueryAjaxSettings { - /** - * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. - */ - accepts?: any; - /** - * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success(). - */ - async?: boolean; - /** - * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request. - */ - beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any; - /** - * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET. - */ - cache?: boolean; - /** - * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - complete? (jqXHR: JQueryXHR, textStatus: string): any; - /** - * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5) - */ - contents?: { [key: string]: any; }; - //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false" - // https://github.com/borisyankov/DefinitelyTyped/issues/742 - /** - * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. - */ - contentType?: any; - /** - * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). - */ - context?: any; - /** - * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5) - */ - converters?: { [key: string]: any; }; - /** - * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5) - */ - crossDomain?: boolean; - /** - * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). - */ - data?: any; - /** - * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter. - */ - dataFilter? (data: any, ty: any): any; - /** - * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). - */ - dataType?: string; - /** - * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event. - */ - error? (jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any; - /** - * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events. - */ - global?: boolean; - /** - * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5) - */ - headers?: { [key: string]: any; }; - /** - * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data. - */ - ifModified?: boolean; - /** - * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1) - */ - isLocal?: boolean; - /** - * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" } - */ - jsonp?: any; - /** - * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. - */ - jsonpCallback?: any; - /** - * A mime type to override the XHR mime type. (version added: 1.5.1) - */ - mimeType?: string; - /** - * A password to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - password?: string; - /** - * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false. - */ - processData?: boolean; - /** - * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script. - */ - scriptCharset?: string; - /** - * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5) - */ - statusCode?: { [key: string]: any; }; - /** - * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. - */ - success? (data: any, textStatus: string, jqXHR: JQueryXHR): any; - /** - * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period. - */ - timeout?: number; - /** - * Set this to true if you wish to use the traditional style of param serialization. - */ - traditional?: boolean; - /** - * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. - */ - type?: string; - /** - * A string containing the URL to which the request is sent. - */ - url?: string; - /** - * A username to be used with XMLHttpRequest in response to an HTTP access authentication request. - */ - username?: string; - /** - * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory. - */ - xhr?: any; - /** - * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1) - */ - xhrFields?: { [key: string]: any; }; -} - -/** - * Interface for the jqXHR object - */ -interface JQueryXHR extends XMLHttpRequest, JQueryPromise { - /** - * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). - */ - overrideMimeType(mimeType: string): any; - abort(statusText?: string): void; -} - -/** - * Interface for the JQuery callback - */ -interface JQueryCallback { - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function): JQueryCallback; - /** - * Add a callback or a collection of callbacks to a callback list. - * - * @param callbacks A function, or array of functions, that are to be added to the callback list. - */ - add(callbacks: Function[]): JQueryCallback; - - /** - * Disable a callback list from doing anything more. - */ - disable(): JQueryCallback; - - /** - * Determine if the callbacks list has been disabled. - */ - disabled(): boolean; - - /** - * Remove all of the callbacks from a list. - */ - empty(): JQueryCallback; - - /** - * Call all of the callbacks with the given arguments - * - * @param arguments The argument or list of arguments to pass back to the callback list. - */ - fire(...arguments: any[]): JQueryCallback; - - /** - * Determine if the callbacks have already been called at least once. - */ - fired(): boolean; - - /** - * Call all callbacks in a list with the given context and arguments. - * - * @param context A reference to the context in which the callbacks in the list should be fired. - * @param arguments An argument, or array of arguments, to pass to the callbacks in the list. - */ - fireWith(context?: any, ...args: any[]): JQueryCallback; - - /** - * Determine whether a supplied callback is in a list - * - * @param callback The callback to search for. - */ - has(callback: Function): boolean; - - /** - * Lock a callback list in its current state. - */ - lock(): JQueryCallback; - - /** - * Determine if the callbacks list has been locked. - */ - locked(): boolean; - - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function): JQueryCallback; - /** - * Remove a callback or a collection of callbacks from a callback list. - * - * @param callbacks A function, or array of functions, that are to be removed from the callback list. - */ - remove(callbacks: Function[]): JQueryCallback; -} - -/** - * Allows jQuery Promises to interop with non-jQuery promises - */ -interface JQueryGenericPromise { - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value: T) => U, failFilter?: (reason: any) => U): JQueryGenericPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value: T) => JQueryGenericPromise, failFilter?: (reason: any) => U): JQueryGenericPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value: T) => U, failFilter?: (reason: any) => JQueryGenericPromise): JQueryGenericPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - */ - then(doneFilter: (value: T) => JQueryGenericPromise, failFilter?: (reason: any) => JQueryGenericPromise): JQueryGenericPromise; -} - -/** - * Interface for the JQuery promise, part of callbacks - */ -interface JQueryPromise { - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallbacks1?: T, ...alwaysCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallbacks1?: T, ...doneCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallbacks1?: T, ...failCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(...progressCallbacks: T[]): JQueryDeferred; - - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks A function, or array of functions, that is called when the Deferred is resolved or rejected. - */ - always(...alwaysCallbacks: any[]): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks A function, or array of functions, that are called when the Deferred is resolved. - */ - done(...doneCallbacks: any[]): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks A function, or array of functions, that are called when the Deferred is rejected. - */ - fail(...failCallbacks: any[]): JQueryPromise; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(...progressCallbacks: any[]): JQueryPromise; - - // Deprecated - given no typings - pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise; - - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (value: T) => JQueryGenericPromise, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (value: T) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (value: T) => JQueryGenericPromise, failFilter?: (...reasons: any[]) => JQueryGenericPromise, progressFilter?: (...progression: any[]) => any): JQueryPromise; - - // Because JQuery Promises Suck - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (...values: any[]) => JQueryGenericPromise, failFilter?: (...reasons: any[]) => U, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (...values: any[]) => U, failFilter?: (...reasons: any[]) => JQueryGenericPromise, progressFilter?: (...progression: any[]) => any): JQueryPromise; - /** - * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * - * @param doneFilter A function that is called when the Deferred is resolved. - * @param failFilter An optional function that is called when the Deferred is rejected. - * @param progressFilter An optional function that is called when progress notifications are sent to the Deferred. - */ - then(doneFilter: (...values: any[]) => JQueryGenericPromise, failFilter?: (...reasons: any[]) => JQueryGenericPromise, progressFilter?: (...progression: any[]) => any): JQueryPromise; -} - -/** - * Interface for the JQuery deferred, part of callbacks - */ -interface JQueryDeferred extends JQueryPromise { - /** - * Add handlers to be called when the Deferred object is either resolved or rejected. - * - * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. - * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. - */ - always(alwaysCallbacks1?: T, ...alwaysCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is resolved. - * - * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. - * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. - */ - done(doneCallbacks1?: T, ...doneCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object is rejected. - * - * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. - * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. - */ - fail(failCallbacks1?: T, ...failCallbacks2: T[]): JQueryDeferred; - /** - * Add handlers to be called when the Deferred object generates progress notifications. - * - * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. - */ - progress(...progressCallbacks: T[]): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given args. - * - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notify(...args: any[]): JQueryDeferred; - - /** - * Call the progressCallbacks on a Deferred object with the given context and args. - * - * @param context Context passed to the progressCallbacks as the this object. - * @param args Optional arguments that are passed to the progressCallbacks. - */ - notifyWith(context: any, ...args: any[]): JQueryDeferred; - - /** - * Reject a Deferred object and call any failCallbacks with the given args. - * - * @param args Optional arguments that are passed to the failCallbacks. - */ - reject(...args: any[]): JQueryDeferred; - /** - * Reject a Deferred object and call any failCallbacks with the given context and args. - * - * @param context Context passed to the failCallbacks as the this object. - * @param args An optional array of arguments that are passed to the failCallbacks. - */ - rejectWith(context: any, ...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given args. - * - * @param value First argument passed to doneCallbacks. - * @param args Optional subsequent arguments that are passed to the doneCallbacks. - */ - resolve(value: T, ...args: any[]): JQueryDeferred; - - // COMMENTED OUT AS MAKES resolve LESS USEFUL - PERHAPS REMOVE ENTIRELY LATER - /** - * Resolve a Deferred object and call any doneCallbacks with the given args. - * - * @param args Optional arguments that are passed to the doneCallbacks. - */ - //resolve(...args: any[]): JQueryDeferred; - - /** - * Resolve a Deferred object and call any doneCallbacks with the given context and args. - * - * @param context Context passed to the doneCallbacks as the this object. - * @param args An optional array of arguments that are passed to the doneCallbacks. - */ - resolveWith(context: any, ...args: any[]): JQueryDeferred; - /** - * Determine the current state of a Deferred object. - */ - state(): string; - - /** - * Return a Deferred's Promise object. - * - * @param target Object onto which the promise methods have to be attached - */ - promise(target?: any): JQueryPromise; -} - -/** - * Interface of the JQuery extension of the W3C event object - */ -interface BaseJQueryEventObject extends Event { - data: any; - delegateTarget: Element; - isDefaultPrevented(): boolean; - isImmediatePropogationStopped(): boolean; - isPropagationStopped(): boolean; - namespace: string; - preventDefault(): any; - relatedTarget: Element; - result: any; - stopImmediatePropagation(): void; - stopPropagation(): void; - pageX: number; - pageY: number; - which: number; - metaKey: boolean; -} - -interface JQueryInputEventObject extends BaseJQueryEventObject { - altKey: boolean; - ctrlKey: boolean; - metaKey: boolean; - shiftKey: boolean; -} - -interface JQueryMouseEventObject extends JQueryInputEventObject { - button: number; - clientX: number; - clientY: number; - offsetX: number; - offsetY: number; - pageX: number; - pageY: number; - screenX: number; - screenY: number; -} - -interface JQueryKeyEventObject extends JQueryInputEventObject { - char: any; - charCode: number; - key: any; - keyCode: number; -} - -interface JQueryPopStateEventObject extends BaseJQueryEventObject { - originalEvent: PopStateEvent; -} - -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject, JQueryPopStateEventObject { -} - -/* - Collection of properties of the current browser -*/ - -interface JQuerySupport { - ajax?: boolean; - boxModel?: boolean; - changeBubbles?: boolean; - checkClone?: boolean; - checkOn?: boolean; - cors?: boolean; - cssFloat?: boolean; - hrefNormalized?: boolean; - htmlSerialize?: boolean; - leadingWhitespace?: boolean; - noCloneChecked?: boolean; - noCloneEvent?: boolean; - opacity?: boolean; - optDisabled?: boolean; - optSelected?: boolean; - scriptEval? (): boolean; - style?: boolean; - submitBubbles?: boolean; - tbody?: boolean; -} - -interface JQueryParam { - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - */ - (obj: any): string; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * - * @param obj An array or object to serialize. - * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. - */ - (obj: any, traditional: boolean): string; -} - -/** - * The interface used to construct jQuery events (with $.Event). It is - * defined separately instead of inline in JQueryStatic to allow - * overriding the construction function with specific strings - * returning specific event objects. - */ -interface JQueryEventConstructor { - (name: string, eventProperties?: any): JQueryEventObject; - new (name: string, eventProperties?: any): JQueryEventObject; -} - -/** - * The interface used to specify coordinates. - */ -interface JQueryCoordinates { - left: number; - top: number; -} - -interface JQueryAnimationOptions { - /** - * A string or number determining how long the animation will run. - */ - duration?: any; - /** - * A string indicating which easing function to use for the transition. - */ - easing?: string; - /** - * A function to call once the animation is complete. - */ - complete?: Function; - /** - * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. - */ - step?: (now: number, tween: any) => any; - /** - * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8) - */ - progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; - /** - * A function to call when the animation begins. (version added: 1.8) - */ - start?: (animation: JQueryPromise) => any; - /** - * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8) - */ - done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8) - */ - fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8) - */ - always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; - /** - * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. - */ - queue?: any; - /** - * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4) - */ - specialEasing?: Object; -} - -/** - * Static members of jQuery (those on $ and jQuery themselves) - */ -interface JQueryStatic { - - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(settings: JQueryAjaxSettings): JQueryXHR; - /** - * Perform an asynchronous HTTP (Ajax) request. - * - * @param url A string containing the URL to which the request is sent. - * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). - */ - ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR; - - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param dataTypes An optional string containing one or more space-separated dataTypes - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - /** - * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax(). - * - * @param handler A handler to set default values for future Ajax requests. - */ - ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void; - - ajaxSettings: JQueryAjaxSettings; - - /** - * Set default values for future Ajax requests. Its use is not recommended. - * - * @param options A set of key/value pairs that configure the default Ajax request. All options are optional. - */ - ajaxSetup(options: JQueryAjaxSettings): void; - - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, data?: Object, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP GET request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). - */ - get(url: string, data?: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, data?: Object, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load JSON-encoded data from the server using a GET HTTP request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. - */ - getJSON(url: string, data?: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - /** - * Load a JavaScript file from the server using a GET HTTP request, then execute it. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. - */ - getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR; - - /** - * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - */ - param: JQueryParam; - - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, data?: Object, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - /** - * Load data from the server using a HTTP POST request. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case. - * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). - */ - post(url: string, data?: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR; - - /** - * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. - * - * @param flags An optional list of space-separated flags that change how the callback list behaves. - */ - Callbacks(flags?: string): JQueryCallback; - - /** - * Holds or releases the execution of jQuery's ready event. - * - * @param hold Indicates whether the ready hold is being requested or released - */ - holdReady(hold: boolean): void; - - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param selector A string containing a selector expression - * @param context A DOM Element, Document, or jQuery to use as context - */ - (selector: string, context?: Element): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param selector A string containing a selector expression - * @param context A DOM Element, Document, or jQuery to use as context - */ - (selector: string, context?: JQuery): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param element A DOM element to wrap in a jQuery object. - */ - (element: Element): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object. - */ - (elementArray: Element[]): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object A plain object to wrap in a jQuery object. - */ - (object: {}): JQuery; - /** - * Accepts a string containing a CSS selector which is then used to match a set of elements. - * - * @param object An existing jQuery object to clone. - */ - (object: JQuery): JQuery; - /** - * Specify a function to execute when the DOM is fully loaded. - */ - (): JQuery; - - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. - * @param ownerDocument A document in which the new elements will be created. - */ - (html: string, ownerDocument?: Document): JQuery; - /** - * Creates DOM elements on the fly from the provided string of raw HTML. - * - * @param html A string defining a single, standalone, HTML element (e.g.
    or
    ). - * @param attributes An object of attributes, events, and methods to call on the newly-created element. - */ - (html: string, attributes: Object): JQuery; - - /** - * Binds a function to be executed when the DOM has finished loading. - * - * @param callback A function to execute after the DOM is ready. - */ - (callback: Function): JQuery; - - /** - * Relinquish jQuery's control of the $ variable. - * - * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself). - */ - noConflict(removeAll?: boolean): Object; - - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - */ - when(...deferreds: JQueryGenericPromise[]): JQueryPromise; - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - */ - when(...deferreds: T[]): JQueryPromise; - /** - * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. - * - * @param deferreds One or more Deferred objects, or plain JavaScript objects. - */ - when(...deferreds: any[]): JQueryPromise; - - /** - * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties. - */ - cssHooks: { [key: string]: any; }; - cssNumber: any; - - /** - * Store arbitrary data associated with the specified element. Returns the value that was set. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - * @param value The new data value. - */ - data(element: Element, key: string, value: T): T; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - * @param key A string naming the piece of data to set. - */ - data(element: Element, key: string): any; - /** - * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. - * - * @param element The DOM element to associate with the data. - */ - data(element: Element): any; - - /** - * Execute the next function on the queue for the matched element. - * - * @param element A DOM element from which to remove and execute a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(element: Element, queueName?: string): void; - - /** - * Determine whether an element has any jQuery data associated with it. - * - * @param element A DOM element to be checked for data. - */ - hasData(element: Element): boolean; - - /** - * Show the queue of functions to be executed on the matched element. - * - * @param element A DOM element to inspect for an attached queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(element: Element, queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element where the array of queued functions is attached. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(element: Element, queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed on the matched element. - * - * @param element A DOM element on which to add a queued function. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue. - */ - queue(element: Element, queueName: string, callback: Function): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param element A DOM element from which to remove data. - * @param name A string naming the piece of data to remove. - */ - removeData(element: Element, name?: string): JQuery; - - /** - * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. - * - * @param beforeStart A function that is called just before the constructor returns. - */ - Deferred(beforeStart?: (deferred: JQueryDeferred) => any): JQueryDeferred; - - /** - * Effects - */ - fx: { - tick: () => void; - /** - * The rate (in milliseconds) at which animations fire. - */ - interval: number; - stop: () => void; - speeds: { slow: number; fast: number; }; - /** - * Globally disable all animations. - */ - off: boolean; - step: any; - }; - - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param fnction The function whose context will be changed. - * @param context The object to which the context (this) of the function should be set. - * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument. - */ - proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any; - /** - * Takes a function and returns a new one that will always have a particular context. - * - * @param context The object to which the context (this) of the function should be set. - * @param name The name of the function whose context will be changed (should be a property of the context object). - * @param additionalArguments Any number of arguments to be passed to the function named in the name argument. - */ - proxy(context: Object, name: string, ...additionalArguments: any[]): any; - - Event: JQueryEventConstructor; - - /** - * Takes a string and throws an exception containing it. - * - * @param message The message to send out. - */ - error(message: any): JQuery; - - expr: any; - fn: any; //TODO: Decide how we want to type this - - isReady: boolean; - - // Properties - support: JQuerySupport; - - /** - * Check to see if a DOM element is a descendant of another DOM element. - * - * @param container The DOM element that may contain the other element. - * @param contained The DOM element that may be contained by (a descendant of) the other element. - */ - contains(container: Element, contained: Element): boolean; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: T[], - callback: (indexInArray: number, valueOfElement: T) => any - ): any; - - /** - * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * - * @param collection The object or array to iterate over. - * @param callback The function that will be executed on every object. - */ - each( - collection: any, - callback: (indexInArray: any, valueOfElement: any) => any - ): any; - - /** - * Merge the contents of two or more objects together into the first object. - * - * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(target: any, object1?: any, ...objectN: any[]): any; - /** - * Merge the contents of two or more objects together into the first object. - * - * @param deep If true, the merge becomes recursive (aka. deep copy). - * @param target The object to extend. It will receive the new properties. - * @param object1 An object containing additional properties to merge in. - * @param objectN Additional objects containing properties to merge in. - */ - extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any; - - /** - * Execute some JavaScript code globally. - * - * @param code The JavaScript code to execute. - */ - globalEval(code: string): any; - - /** - * Finds the elements of an array which satisfy a filter function. The original array is not affected. - * - * @param array The array to search through. - * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object. - * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false. - */ - grep(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[]; - - /** - * Search for a specified value within an array and return its index (or -1 if not found). - * - * @param value The value to search for. - * @param array An array through which to search. - * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array. - */ - inArray(value: T, array: T[], fromIndex?: number): number; - - /** - * Determine whether the argument is an array. - * - * @param obj Object to test whether or not it is an array. - */ - isArray(obj: any): boolean; - /** - * Check to see if an object is empty (contains no enumerable properties). - * - * @param obj The object that will be checked to see if it's empty. - */ - isEmptyObject(obj: any): boolean; - /** - * Determine if the argument passed is a Javascript function object. - * - * @param obj Object to test whether or not it is a function. - */ - isFunction(obj: any): boolean; - /** - * Determines whether its argument is a number. - * - * @param obj The value to be tested. - */ - isNumeric(value: any): boolean; - /** - * Check to see if an object is a plain object (created using "{}" or "new Object"). - * - * @param obj The object that will be checked to see if it's a plain object. - */ - isPlainObject(obj: any): boolean; - /** - * Determine whether the argument is a window. - * - * @param obj Object to test whether or not it is a window. - */ - isWindow(obj: any): boolean; - /** - * Check to see if a DOM node is within an XML document (or is an XML document). - * - * @param node he DOM node that will be checked to see if it's in an XML document. - */ - isXMLDoc(node: Node): boolean; - - /** - * Convert an array-like object into a true JavaScript array. - * - * @param obj Any object to turn into a native Array. - */ - makeArray(obj: any): any[]; - - /** - * Translate all items in an array or object to new array of items. - * - * @param array The Array to translate. - * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object. - */ - map(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[]; - /** - * Translate all items in an array or object to new array of items. - * - * @param arrayOrObject The Array or Object to translate. - * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. - */ - map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any; - - /** - * Merge the contents of two arrays together into the first array. - * - * @param first The first array to merge, the elements of second added. - * @param second The second array to merge into the first, unaltered. - */ - merge(first: T[], second: T[]): T[]; - - /** - * An empty function. - */ - noop(): any; - - /** - * Return a number representing the current time. - */ - now(): number; - - /** - * Takes a well-formed JSON string and returns the resulting JavaScript object. - * - * @param json The JSON string to parse. - */ - parseJSON(json: string): Object; - - /** - * Parses a string into an XML document. - * - * @param data a well-formed XML string to be parsed - */ - parseXML(data: string): XMLDocument; - - /** - * Remove the whitespace from the beginning and end of a string. - * - * @param str Remove the whitespace from the beginning and end of a string. - */ - trim(str: string): string; - - /** - * Determine the internal JavaScript [[Class]] of an object. - * - * @param obj Object to get the internal JavaScript [[Class]] of. - */ - type(obj: any): string; - - /** - * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. - * - * @param array The Array of DOM elements. - */ - unique(array: Element[]): Element[]; - - /** - * Parses a string into an array of DOM nodes. - * - * @param data HTML string to be parsed - * @param context DOM element to serve as the context in which the HTML fragment will be created - * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string - */ - parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[]; -} - -/** - * The jQuery instance members - */ -interface JQuery { - /** - * Register a handler to be called when Ajax requests complete. This is an AjaxEvent. - * - * @param handler The function to be invoked. - */ - ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery; - /** - * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery; - /** - * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - /** - * Register a handler to be called when the first Ajax request begins. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStart(handler: () => any): JQuery; - /** - * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxStop(handler: () => any): JQuery; - /** - * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event. - * - * @param handler The function to be invoked. - */ - ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery; - - /** - * Load data from the server and place the returned HTML into the matched element. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param complete A callback function that is executed when the request completes. - */ - load(url: string, data?: string, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery; - /** - * Load data from the server and place the returned HTML into the matched element. - * - * @param url A string containing the URL to which the request is sent. - * @param data A plain object or string that is sent to the server with the request. - * @param complete A callback function that is executed when the request completes. - */ - load(url: string, data?: Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery; - - /** - * Encode a set of form elements as a string for submission. - */ - serialize(): string; - /** - * Encode a set of form elements as an array of names and values. - */ - serializeArray(): Object[]; - - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param className One or more space-separated classes to be added to the class attribute of each matched element. - */ - addClass(className: string): JQuery; - /** - * Adds the specified class(es) to each of the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set. - */ - addClass(func: (index: number, className: string) => string): JQuery; - - /** - * Add the previous set of elements on the stack to the current set, optionally filtered by a selector. - */ - addBack(selector?: string): JQuery; - - /** - * Get the value of an attribute for the first element in the set of matched elements. - * - * @param attributeName The name of the attribute to get. - */ - attr(attributeName: string): string; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param value A value to set for the attribute. - */ - attr(attributeName: string, value: string): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param value A value to set for the attribute. - */ - attr(attributeName: string, value: number): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributeName The name of the attribute to set. - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments. - */ - attr(attributeName: string, func: (index: number, attr: any) => any): JQuery; - /** - * Set one or more attributes for the set of matched elements. - * - * @param attributes An object of attribute-value pairs to set. - */ - attr(attributes: Object): JQuery; - - /** - * Determine whether any of the matched elements are assigned the given class. - * - * @param className The class name to search for. - */ - hasClass(className: string): boolean; - - /** - * Get the HTML contents of the first element in the set of matched elements. - */ - html(): string; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param htmlString A string of HTML to set as the content of each matched element. - */ - html(htmlString: string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - html(func: (index: number, oldhtml: string) => string): JQuery; - /** - * Set the HTML contents of each element in the set of matched elements. - * - * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set. - */ - - /** - * Get the value of a property for the first element in the set of matched elements. - * - * @param propertyName The name of the property to get. - */ - prop(propertyName: string): any; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - */ - prop(propertyName: string, value: string): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - */ - prop(propertyName: string, value: number): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param value A value to set for the property. - */ - prop(propertyName: string, value: boolean): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - prop(properties: Object): JQuery; - /** - * Set one or more properties for the set of matched elements. - * - * @param propertyName The name of the property to set. - * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element. - */ - prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery; - - /** - * Remove an attribute from each element in the set of matched elements. - * - * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. - */ - removeAttr(attributeName: string): JQuery; - - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param className One or more space-separated classes to be removed from the class attribute of each matched element. - */ - removeClass(className?: string): JQuery; - /** - * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. - * - * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments. - */ - removeClass(func: (index: number, className: string) => string): JQuery; - - /** - * Remove a property for the set of matched elements. - * - * @param propertyName The name of the property to remove. - */ - removeProp(propertyName: string): JQuery; - - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set. - * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. - */ - toggleClass(className: string, swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(swtch?: boolean): JQuery; - /** - * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. - * - * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments. - * @param swtch A boolean value to determine whether the class should be added or removed. - */ - toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery; - - /** - * Get the current value of the first element in the set of matched elements. - */ - val(): any; - /** - * Set the value of each element in the set of matched elements. - * - * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked. - */ - val(value: string): JQuery; - /** - * Set the value of each element in the set of matched elements. - * - * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked. - */ - val(value: string[]): JQuery; - /** - * Set the value of each element in the set of matched elements. - * - * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - val(func: (index: number, value: any) => any): JQuery; - - /** - * Get the value of style properties for the first element in the set of matched elements. - * - * @param propertyName A CSS property. - */ - css(propertyName: string): string; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: string): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: string[]): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A value to set for the property. - */ - css(propertyName: string, value: number[]): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - css(propertyName: string, value: (index: number, value: string) => string): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param propertyName A CSS property name. - * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. - */ - css(propertyName: string, value: (index: number, value: number) => number): JQuery; - /** - * Set one or more CSS properties for the set of matched elements. - * - * @param properties An object of property-value pairs to set. - */ - css(properties: Object): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements. - */ - height(): number; - /** - * Set the CSS height of every matched element. - * - * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). - */ - height(value: number): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). - */ - height(value: string): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: number) => number): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: string) => string): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: string) => number): JQuery; - /** - * Set the CSS height of every matched element. - * - * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set. - */ - height(func: (index: number, height: number) => string): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding but not border. - */ - innerHeight(): number; - - /** - * Sets the inner height on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerHeight(height: number): JQuery; - - /** - * Sets the inner height on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerHeight(height: string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding but not border. - */ - innerWidth(): number; - - /** - * Sets the inner width on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerWidth(width: number): JQuery; - - /** - * Sets the inner width on elements in the set of matched elements, including padding but not border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - innerWidth(width: string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the document. - */ - offset(): JQueryCoordinates; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - */ - offset(coordinates: JQueryCoordinates): JQuery; - /** - * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements. - * - * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties. - */ - offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery; - - /** - * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerHeight(includeMargin?: boolean): number; - - /** - * Sets the outer height on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerHeight(height: number): JQuery; - - /** - * Sets the outer height on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerHeight(height: string): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements, including padding and border. - * - * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation. - */ - outerWidth(includeMargin?: boolean): number; - - /** - * Sets the outer width on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerWidth(width: number): JQuery; - - /** - * Sets the outer width on elements in the set of matched elements, including padding and border. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - outerWidth(width: string): JQuery; - - /** - * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. - */ - position(): JQueryCoordinates; - - /** - * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element. - */ - scrollLeft(): number; - /** - * Set the current horizontal position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollLeft(value: number): JQuery; - - /** - * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. - */ - scrollTop(): number; - /** - * Set the current vertical position of the scroll bar for each of the set of matched elements. - * - * @param value An integer indicating the new position to set the scroll bar to. - */ - scrollTop(value: number): JQuery; - - /** - * Get the current computed width for the first element in the set of matched elements. - */ - width(): number; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - width(value: number): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). - */ - width(value: string): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: number) => number): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: string) => string): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: string) => number): JQuery; - /** - * Set the CSS width of each element in the set of matched elements. - * - * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set. - */ - width(func: (index: number, width: number) => string): JQuery; - - /** - * Remove from the queue all items that have not yet been run. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - clearQueue(queueName?: string): JQuery; - - /** - * Store arbitrary data associated with the matched elements. - * - * @param key A string naming the piece of data to set. - * @param value The new data value; it can be any Javascript type including Array or Object. - */ - data(key: string, value: any): JQuery; - /** - * Store arbitrary data associated with the matched elements. - * - * @param obj An object of key-value pairs of data to update. - */ - data(obj: { [key: string]: any; }): JQuery; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - * - * @param key Name of the data stored. - */ - data(key: string): any; - /** - * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. - */ - data(): any; - - /** - * Execute the next function on the queue for the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - dequeue(queueName?: string): JQuery; - - /** - * Remove a previously-stored piece of data. - * - * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete. - */ - removeData(name: string): JQuery; - /** - * Remove a previously-stored piece of data. - * - * @param list An array of strings naming the pieces of data to delete. - */ - removeData(list: string[]): JQuery; - - /** - * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished. - * - * @param type The type of queue that needs to be observed. (default: fx) - * @param target Object onto which the promise methods have to be attached - */ - promise(type?: string, target?: Object): JQueryPromise; - - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: number, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. (default: swing) - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. (default: swing) - * @param complete A function to call once the animation is complete. - */ - animate(properties: Object, duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Perform a custom animation of a set of CSS properties. - * - * @param properties An object of CSS properties and values that the animation will move toward. - * @param options A map of additional options to pass to the method. - */ - animate(properties: Object, options: JQueryAnimationOptions): JQuery; - - /** - * Set a timer to delay execution of subsequent items in the queue. - * - * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue. - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - delay(duration: number, queueName?: string): JQuery; - - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeIn(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements by fading them to opaque. - * - * @param options A map of additional options to pass to the method. - */ - fadeIn(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeOut(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements by fading them to transparent. - * - * @param options A map of additional options to pass to the method. - */ - fadeOut(options: JQueryAnimationOptions): JQuery; - - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string, opacity: number, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: number, opacity: number, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: string, opacity: number, easing?: string, complete?: Function): JQuery; - /** - * Adjust the opacity of the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param opacity A number between 0 and 1 denoting the target opacity. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeTo(duration: number, opacity: number, easing?: string, complete?: Function): JQuery; - - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - fadeToggle(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements by animating their opacity. - * - * @param options A map of additional options to pass to the method. - */ - fadeToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements. - * - * @param queue The name of the queue in which to stop animations. - */ - finish(queue?: string): JQuery; - - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - hide(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - hide(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - show(duration?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - show(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - show(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - show(options: JQueryAnimationOptions): JQuery; - - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideDown(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideDown(options: JQueryAnimationOptions): JQuery; - - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideToggle(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideToggle(options: JQueryAnimationOptions): JQuery; - - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - slideUp(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Hide the matched elements with a sliding motion. - * - * @param options A map of additional options to pass to the method. - */ - slideUp(options: JQueryAnimationOptions): JQuery; - - /** - * Stop the currently-running animation on the matched elements. - * - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - /** - * Stop the currently-running animation on the matched elements. - * - * @param queue The name of the queue in which to stop animations. - * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false. - * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false. - */ - stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery; - - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: number, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param duration A string or number determining how long the animation will run. - * @param easing A string indicating which easing function to use for the transition. - * @param complete A function to call once the animation is complete. - */ - toggle(duration?: string, easing?: string, complete?: Function): JQuery; - /** - * Display or hide the matched elements. - * - * @param options A map of additional options to pass to the method. - */ - toggle(options: JQueryAnimationOptions): JQuery; - /** - * Display or hide the matched elements. - * - * @param showOrHide A Boolean indicating whether to show or hide the elements. - */ - toggle(showOrHide: boolean): JQuery; - - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute each time the event is triggered. - */ - bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param eventData An object containing data that will be passed to the event handler. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. - * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. - */ - bind(eventType: string, preventBubble: boolean): JQuery; - /** - * Attach a handler to an event for the elements. - * - * @param events An object containing one or more DOM event types and functions to execute for them. - */ - bind(events: any): JQuery; - - /** - * Trigger the "blur" event on an element - */ - blur(): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - blur(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "blur" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "change" event on an element. - */ - change(): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - change(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "change" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "click" event on an element. - */ - click(): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - */ - click(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "click" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "dblclick" event on an element. - */ - dblclick(): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "dblclick" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "focus" event on an element. - */ - focus(): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focus(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focus" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusin(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusin" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - focusout(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "focusout" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. - * - * @param handlerIn A function to execute when the mouse pointer enters the element. - * @param handlerOut A function to execute when the mouse pointer leaves the element. - */ - hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements. - * - * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element. - */ - hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "keydown" event on an element. - */ - keydown(): JQuery; - /** - * Bind an event handler to the "keydown" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the keydown"" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keypress" event on an element. - */ - keypress(): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keypress" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Trigger the "keyup" event on an element. - */ - keyup(): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery; - /** - * Bind an event handler to the "keyup" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery; - - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - load(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "load" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "mousedown" event on an element. - */ - mousedown(): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousedown" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseenter" event on an element. - */ - mouseenter(): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse enters an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseleave" event on an element. - */ - mouseleave(): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param handler A function to execute when the event is triggered. - */ - mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to be fired when the mouse leaves an element. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mousemove" event on an element. - */ - mousemove(): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mousemove" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseout" event on an element. - */ - mouseout(): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseout" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseover" event on an element. - */ - mouseover(): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseover" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Trigger the "mouseup" event on an element. - */ - mouseup(): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param handler A function to execute when the event is triggered. - */ - mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - /** - * Bind an event handler to the "mouseup" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery; - - /** - * Remove an event handler. - */ - off(): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". - * @param handler A handler function previously attached for the event(s), or the special value false. - */ - off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove an event handler. - * - * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s). - * @param selector A selector which should match the one originally passed to .on() when attaching event handlers. - */ - off(events: { [key: string]: any; }, selector?: string): JQuery; - - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax). - */ - on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach an event handler function for one or more events to the selected elements. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - on(events: { [key: string]: any; }, selector?: any, data?: any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. - * @param data An object containing data that will be passed to the event handler. - * @param handler A function to execute at the time the event is triggered. - */ - one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". - * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event is triggered. - * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Attach a handler to an event for the elements. The handler is executed at most once per element per event type. - * - * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s). - * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element. - * @param data Data to be passed to the handler in event.data when an event occurs. - */ - one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery; - - - /** - * Specify a function to execute when the DOM is fully loaded. - * - * @param handler A function to execute after the DOM is ready. - */ - ready(handler: Function): JQuery; - - /** - * Trigger the "resize" event on an element. - */ - resize(): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - resize(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "resize" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "scroll" event on an element. - */ - scroll(): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - scroll(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "scroll" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "select" event on an element. - */ - select(): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param handler A function to execute each time the event is triggered. - */ - select(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "select" JavaScript event. - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Trigger the "submit" event on an element. - */ - submit(): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param handler A function to execute each time the event is triggered. - */ - submit(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "submit" JavaScript event - * - * @param eventData An object containing data that will be passed to the event handler. - * @param handler A function to execute each time the event is triggered. - */ - submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(eventType: string, extraParameters?: any[]): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(eventType: string, extraParameters?: Object): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param event A jQuery.Event object. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(event: JQueryEventObject, extraParameters?: any[]): JQuery; - /** - * Execute all handlers and behaviors attached to the matched elements for the given event type. - * - * @param event A jQuery.Event object. - * @param extraParameters Additional parameters to pass along to the event handler. - */ - trigger(event: JQueryEventObject, extraParameters?: Object): JQuery; - - /** - * Execute all handlers attached to an element for an event. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param extraParameters An array of additional parameters to pass along to the event handler. - */ - triggerHandler(eventType: string, ...extraParameters: any[]): Object; - - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param handler The function that is to be no longer executed. - */ - unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param eventType A string containing a JavaScript event type, such as click or submit. - * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). - */ - unbind(eventType: string, fls: boolean): JQuery; - /** - * Remove a previously-attached event handler from the elements. - * - * @param evt A JavaScript event object as passed to an event handler. - */ - unbind(evt: any): JQuery; - - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - */ - undelegate(): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" - * @param handler A function to execute at the time the event is triggered. - */ - undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param selector A selector which will be used to filter the event results. - * @param events An object of one or more event types and previously bound functions to unbind from them. - */ - undelegate(selector: string, events: Object): JQuery; - /** - * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * - * @param namespace A string containing a namespace to unbind all events from. - */ - undelegate(namespace: string): JQuery; - - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - unload(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10) - */ - context: Element; - - jquery: string; - - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param handler A function to execute when the event is triggered. - */ - error(handler: (eventObject: JQueryEventObject) => any): JQuery; - /** - * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * - * @param eventData A plain object of data that will be passed to the event handler. - * @param handler A function to execute when the event is triggered. - */ - error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; - - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - */ - pushStack(elements: any[]): JQuery; - /** - * Add a collection of DOM elements onto the jQuery stack. - * - * @param elements An array of elements to push onto the stack and make into a new jQuery object. - * @param name The name of a jQuery method that generated the array of elements. - * @param arguments The arguments that were passed in to the jQuery method (for serialization). - */ - pushStack(elements: any[], name: string, arguments: any[]): JQuery; - - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: JQuery, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: any[], ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: Element, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: Text, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. - */ - after(content1: string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, after each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - after(func: (index: number) => any): JQuery; - - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: JQuery, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: any[], ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: Element, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: Text, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. - */ - append(content1: string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - append(func: (index: number, html: string) => any): JQuery; - - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: JQuery): JQuery; - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: any[]): JQuery; - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: Element): JQuery; - /** - * Insert every element in the set of matched elements to the end of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. - */ - appendTo(target: string): JQuery; - - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: JQuery, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: any[], ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: Element, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: Text, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. - */ - before(content1: string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, before each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - before(func: (index: number) => any): JQuery; - - /** - * Create a deep copy of the set of matched elements. - * - * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. - * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). - */ - clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * param selector A selector expression that filters the set of matched elements to be removed. - */ - detach(selector?: string): JQuery; - - /** - * Remove all child nodes of the set of matched elements from the DOM. - */ - empty(): JQuery; - - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: JQuery): JQuery; - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: any[]): JQuery; - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: Element): JQuery; - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: Text): JQuery; - /** - * Insert every element in the set of matched elements after the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. - */ - insertAfter(target: string): JQuery; - - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: JQuery): JQuery; - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: any[]): JQuery; - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: Element): JQuery; - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: Text): JQuery; - /** - * Insert every element in the set of matched elements before the target. - * - * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. - */ - insertBefore(target: string): JQuery; - - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: JQuery, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: any[], ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: Element, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: Text, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. - * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. - */ - prepend(content1: string, ...content2: any[]): JQuery; - /** - * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * - * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. - */ - prepend(func: (index: number, html: string) => any): JQuery; - - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: JQuery): JQuery; - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: any[]): JQuery; - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: Element): JQuery; - /** - * Insert every element in the set of matched elements to the beginning of the target. - * - * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. - */ - prependTo(target: string): JQuery; - - /** - * Remove the set of matched elements from the DOM. - * - * @param selector A selector expression that filters the set of matched elements to be removed. - */ - remove(selector?: string): JQuery; - - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: JQuery): JQuery; - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: any[]): JQuery; - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: Element): JQuery; - /** - * Replace each target element with the set of matched elements. - * - * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. - */ - replaceAll(target: string): JQuery; - - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: JQuery): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: any[]): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: Element): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: Text): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. - */ - replaceWith(newContent: string): JQuery; - /** - * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * - * param func A function that returns content with which to replace the set of matched elements. - */ - replaceWith(func: () => any): JQuery; - - /** - * Get the combined text contents of each element in the set of matched elements, including their descendants. - */ - text(): string; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. - */ - text(text: string): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. - */ - text(text: number): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param text The text to set as the content of each matched element. - */ - text(text: boolean): JQuery; - /** - * Set the content of each element in the set of matched elements to the specified text. - * - * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. - */ - text(func: (index: number, text: string) => string): JQuery; - - /** - * Retrieve all the elements contained in the jQuery set, as an array. - */ - toArray(): any[]; - - /** - * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place. - */ - unwrap(): JQuery; - - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrap(wrappingElement: JQuery): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrap(wrappingElement: Element): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrap(wrappingElement: string): JQuery; - /** - * Wrap an HTML structure around each element in the set of matched elements. - * - * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrap(func: (index: number) => any): JQuery; - - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrapAll(wrappingElement: JQuery): JQuery; - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrapAll(wrappingElement: Element): JQuery; - /** - * Wrap an HTML structure around all elements in the set of matched elements. - * - * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. - */ - wrapAll(wrappingElement: string): JQuery; - - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - */ - wrapInner(wrappingElement: JQuery): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - */ - wrapInner(wrappingElement: Element): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. - */ - wrapInner(wrappingElement: string): JQuery; - /** - * Wrap an HTML structure around the content of each element in the set of matched elements. - * - * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. - */ - wrapInner(func: (index: number) => any): JQuery; - - /** - * Iterate over a jQuery object, executing a function for each matched element. - * - * @param func A function to execute for each matched element. - */ - each(func: (index: number, elem: Element) => any): JQuery; - - /** - * Retrieve one of the elements matched by the jQuery object. - * - * @param index A zero-based integer indicating which element to retrieve. - */ - get(index: number): HTMLElement; - /** - * Retrieve the elements matched by the jQuery object. - */ - get(): any[]; - - /** - * Search for a given element from among the matched elements. - */ - index(): number; - /** - * Search for a given element from among the matched elements. - * - * @param selector A selector representing a jQuery collection in which to look for an element. - */ - index(selector: string): number; - /** - * Search for a given element from among the matched elements. - * - * @param element The DOM element or first element within the jQuery object to look for. - */ - index(element: JQuery): number; - /** - * Search for a given element from among the matched elements. - * - * @param element The DOM element or first element within the jQuery object to look for. - */ - index(element: Element): number; - - /** - * The number of elements in the jQuery object. - */ - length: number; - /** - * A selector representing selector passed to jQuery(), if any, when creating the original set. - * version deprecated: 1.7, removed: 1.9 - */ - selector: string; - [index: string]: any; - [index: number]: HTMLElement; - - /** - * Add elements to the set of matched elements. - * - * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. - * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method. - */ - add(selector: string, context?: Element): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param elements One or more elements to add to the set of matched elements. - */ - add(...elements: Element[]): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param html An HTML fragment to add to the set of matched elements. - */ - add(html: string): JQuery; - /** - * Add elements to the set of matched elements. - * - * @param obj An existing jQuery object to add to the set of matched elements. - */ - add(obj: JQuery): JQuery; - - /** - * Get the children of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - children(selector?: string): JQuery; - - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - */ - closest(selector: string): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param selector A string containing a selector expression to match elements against. - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selector: string, context?: Element): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param obj A jQuery object to match elements against. - */ - closest(obj: JQuery): JQuery; - /** - * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * - * @param element An element to match elements against. - */ - closest(element: Element): JQuery; - - /** - * Get an array of all the elements and selectors matched against the current element up through the DOM tree. - * - * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object). - * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. - */ - closest(selectors: any, context?: Element): any[]; - - /** - * Get the children of each element in the set of matched elements, including text and comment nodes. - */ - contents(): JQuery; - - /** - * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. - */ - end(): JQuery; - - /** - * Reduce the set of matched elements to the one at the specified index. - * - * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. - * - */ - eq(index: number): JQuery; - - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param selector A string containing a selector expression to match the current set of elements against. - */ - filter(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - filter(func: (index: number) => any): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param element An element to match the current set of elements against. - */ - filter(element: Element): JQuery; - /** - * Reduce the set of matched elements to those that match the selector or pass the function's test. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - filter(obj: JQuery): JQuery; - - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param selector A string containing a selector expression to match elements against. - */ - find(selector: string): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param element An element to match elements against. - */ - find(element: Element): JQuery; - /** - * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * - * @param obj A jQuery object to match elements against. - */ - find(obj: JQuery): JQuery; - - /** - * Reduce the set of matched elements to the first in the set. - */ - first(): JQuery; - - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param selector A string containing a selector expression to match elements against. - */ - has(selector: string): JQuery; - /** - * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * - * @param contained A DOM element to match elements against. - */ - has(contained: Element): JQuery; - - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param selector A string containing a selector expression to match elements against. - */ - is(selector: string): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element. - */ - is(func: (index: number) => any): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - is(obj: JQuery): boolean; - /** - * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * - * @param elements One or more elements to match the current set of elements against. - */ - is(elements: any): boolean; - - /** - * Reduce the set of matched elements to the final one in the set. - */ - last(): JQuery; - - /** - * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. - * - * @param callback A function object that will be invoked for each element in the current set. - */ - map(callback: (index: number, domElement: Element) => any): JQuery; - - /** - * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - next(selector?: string): JQuery; - - /** - * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - nextAll(selector?: string): JQuery; - - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(selector?: string, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(element?: Element, filter?: string): JQuery; - /** - * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * - * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - nextUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Remove elements from the set of matched elements. - * - * @param selector A string containing a selector expression to match elements against. - */ - not(selector: string): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param func A function used as a test for each element in the set. this is the current DOM element. - */ - not(func: (index: number) => any): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param elements One or more DOM elements to remove from the matched set. - */ - not(...elements: Element[]): JQuery; - /** - * Remove elements from the set of matched elements. - * - * @param obj An existing jQuery object to match the current set of elements against. - */ - not(obj: JQuery): JQuery; - - /** - * Get the closest ancestor element that is positioned. - */ - offsetParent(): JQuery; - - /** - * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parent(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - parents(selector?: string): JQuery; - - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(selector?: string, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(element?: Element, filter?: string): JQuery; - /** - * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements. - * @param filter A string containing a selector expression to match elements against. - */ - parentsUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prev(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - prevAll(selector?: string): JQuery; - - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(selector?: string, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(element?: Element, filter?: string): JQuery; - /** - * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * - * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements. - * @param filter A string containing a selector expression to match elements against. - */ - prevUntil(obj?: JQuery, filter?: string): JQuery; - - /** - * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. - * - * @param selector A string containing a selector expression to match elements against. - */ - siblings(selector?: string): JQuery; - - /** - * Reduce the set of matched elements to a subset specified by a range of indices. - * - * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set. - * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. - */ - slice(start: number, end?: number): JQuery; - - /** - * Show the queue of functions to be executed on the matched elements. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - */ - queue(queueName?: string): any[]; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(callback: Function): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param newQueue An array of functions to replace the current queue contents. - */ - queue(queueName: string, newQueue: Function[]): JQuery; - /** - * Manipulate the queue of functions to be executed, once for each matched element. - * - * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. - * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. - */ - queue(queueName: string, callback: Function): JQuery; -} -declare module "jquery" { - export = $; -} -declare var jQuery: JQueryStatic; -declare var $: JQueryStatic; diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Entry.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Entry.java deleted file mode 100644 index b7f36fce..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Entry.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -/** - * immutable Model Entry: - * it may represent module, method, class or property - * - * - * @author Paul Verest - */ -public class Entry implements Comparable{ - - final Module module; - final EntryType type; - final String name; - final String trigger; - final String desc; - final Entry parent; - -// @Deprecated -// public Entry(Module module,EntryType type, String name, String trigger, String desc){ -// this.module = module; -// this.type = type; -// this.name=name; -// this.trigger=trigger; -// this.desc=desc; -// parent = null; -// } - - public Entry(Module module,EntryType type, String name, String trigger, String desc, Entry parent){ - this.module = module; - this.type = type; - this.name=name; - this.trigger=trigger; - this.desc=desc; - this.parent = parent; - } - - @Override - public int compareTo(Entry o) { - return trigger.compareTo(o.trigger); - } - - @Override - public String toString(){ - return trigger; - } - public String toFullString(){ - return trigger+' '+module+" "+type+" "+name+" "+desc; - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryProcessor.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryProcessor.java deleted file mode 100644 index c5e00644..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryProcessor.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -public interface EntryProcessor { - - void process(Entry entry); - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryType.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryType.java deleted file mode 100644 index 467d4dac..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/EntryType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -public enum EntryType { - module, method, clazz, property, unknown -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IModelFiller.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IModelFiller.java deleted file mode 100644 index ff79caea..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IModelFiller.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -public interface IModelFiller { - - void initModel(Model model); - -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IRepo.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IRepo.java deleted file mode 100644 index b6fd26f4..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/IRepo.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.util.List; - -public interface IRepo { - - void addModule(Module module); - - void addEntry(Entry entry); - - List findMatchingEntries(String input); - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/JSDTProposalComputer.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/JSDTProposalComputer.java deleted file mode 100644 index 45cdd8d3..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/JSDTProposalComputer.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.wst.jsdt.ui.text.java.ContentAssistInvocationContext; -import org.eclipse.wst.jsdt.ui.text.java.IJavaCompletionProposalComputer; - - -/** - * This is wrapper for NodeContentAssistant - * as required by JSDT - * - * asked http://stackoverflow.com/questions/20738788/content-assist-for-eclipse-jsdt-based-editor - * HELP http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.wst.jsdt.doc/reference/extension-points/org_eclipse_wst_jsdt_ui_javaCompletionProposalComputer.html - * example - * HippieProposalComputer - http://svn.codespot.com/a/eclipselabs.org/mobile-web-development-with-phonegap/tags/r1.2/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/java/HippieProposalComputer.java - * HippieProposalProcessor - http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.5.2/org.eclipse.ui.workbench/texteditor/3.5.1/org/eclipse/ui/texteditor/HippieProposalProcessor.java - * - * @author Paul - */ -public class JSDTProposalComputer implements IJavaCompletionProposalComputer { - - IContentAssistProcessor assistant = new NodeContentAssistant(); - - @Override - public List computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) { -// ITextViewer v = context.getViewer(); -// context.getInvocationOffset(); - return Arrays.asList(assistant.computeCompletionProposals(context.getViewer(), context.getInvocationOffset())); - } - - @Override - public List computeContextInformation(ContentAssistInvocationContext context, IProgressMonitor monitor) { - return Arrays.asList(assistant.computeContextInformation(context.getViewer(), context.getInvocationOffset())); - } - - @Override - public String getErrorMessage() { - return assistant.getErrorMessage(); - } - - @Override - public void sessionEnded() { - } - - @Override - public void sessionStarted() { - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Model.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Model.java deleted file mode 100644 index 5b0c42a6..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Model.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.TreeSet; - -/** Read-only model of Node.js Context - * - * DONE sorted results (idea: sort when populating) - * - * @author pverest - */ -public class Model implements IRepo { - - List modules = new ArrayList(); - //List entries = new ArrayList(); - TreeSet entries = new TreeSet(); - - public Model(){ - //entries - } - - @Override - public void addModule(Module module) { - modules.add(module); - } - - @Override - public void addEntry(Entry entry) { - entries.add(entry); - } - - @Override - public List findMatchingEntries(String input) { - List matches = new LinkedList(); - if ( ( input == null) || ("".equals(input)) ){ - return matches; - } - for(Entry entry: entries){ - if (entry.trigger.startsWith(input)){ - matches.add(entry); - } - } - return matches; - } - - public void processWith(EntryProcessor proc){ - for(Entry entry: entries){ - proc.process(entry); - } - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Module.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Module.java deleted file mode 100644 index 925e5352..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/Module.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -/** - * @author Paul Verest - */ -public class Module { - - private String name; - - public Module(String name){ - this.name=name; - } - - @Override - public String toString(){ - return name; - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/NodeContentAssistant.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/NodeContentAssistant.java deleted file mode 100644 index b5ab4077..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/NodeContentAssistant.java +++ /dev/null @@ -1,259 +0,0 @@ -package org.nodeclipse.ui.contentassist; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jface.text.contentassist.CompletionProposal; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.jface.text.contentassist.IContextInformationValidator; -import org.eclipse.swt.graphics.Image; -//import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - - -/** - * Code completion (Content Assist) that works in TextEditor based Editor - * proposals are sorted inside Model.
    - * TODO make this class JSON independent - remove JSON processing in addCompletionProposalFromCompletionJson() - * @see method computeCompletionProposals(ITextViewer viewer, int offset) - * @see JSDTProposalComputer wrapper for JSDT, that calls computeCompletionProposals() - * - * @author Lamb Gao - * @author Paul Verest - * - * see grepcode.com/file/repository.grepcode.com/java/eclipse.org/4.3/org.eclipse.ui.workbench/texteditor/3.8.100/org/eclipse/ui/texteditor/HippieProposalProcessor.java - * - */ -public class NodeContentAssistant implements IContentAssistProcessor { - - private static final ICompletionProposal[] NO_PROPOSALS= new ICompletionProposal[0]; - private static final IContextInformation[] NO_CONTEXTS= new IContextInformation[0]; - - public static final Image MODULE = Activator.getImageDescriptor(Constants.MODULE_ICON).createImage(); - public static final Image METHOD = Activator.getImageDescriptor(Constants.METHOD_ICON).createImage(); - public static final Image CLASS = Activator.getImageDescriptor(Constants.CLASS_ICON).createImage(); - public static final Image PROPERTY = Activator.getImageDescriptor(Constants.PROPERTY_ICON).createImage(); - public static final Image UNKNOWN_BLUE = Activator.getImageDescriptor(Constants.UNKNOWN_BLUE_ICON).createImage(); - - private boolean indexFilesInitialized = false; - - private IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean useNodejsBaseModuleDefinitions = preferenceStore.getBoolean(PreferenceConstants.USE_NODEJS_BASE_MODULE_DEFINITIONS);//@since 0.12 - boolean useOrionIndexFiles = preferenceStore.getBoolean(PreferenceConstants.USE_ORION_INDEX_FILES);//@since 0.12 - boolean useCompletionJson = preferenceStore.getBoolean(PreferenceConstants.USE_COMPLETIONS_JSON);//@since 0.12 - - private Model model = null ; //new Model(); - - public String getInputString(IDocument doc, int offset) { - StringBuffer buf = new StringBuffer(); - while (true) { - try { - char charOffset = doc.getChar(--offset); - if (Character.isWhitespace(charOffset)) - break; - buf.append(charOffset); - } catch (BadLocationException e) { - break; - } - } - return buf.reverse().toString(); - } - -// the very first way -// private void addCompletionProposalFromNodejsSources( -// List list, String input, int offset) { -// try { -// for (int i = 0; i < ContentFromSources.METHODS.length(); i++) { -// JSONObject method = (JSONObject) ContentFromSources.METHODS.get(i); -// String trigger = method.getString("textRaw"); -// if (trigger != null && trigger.startsWith(input)) { -// int length = input.length(); -// list.add(new CompletionProposal(trigger, offset - length, length, trigger.length(), -// METHOD, null, null, method.getString("desc") )); -// //method.getString("name") -// } -// } -// } catch (JSONException e) { -// //e.printStackTrace(); -// NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); -// } -// } -// -// /** old first way, see addCompletionProposalFromModel() below (that most of code moved to ContentFromSources.populateModel() ) -// */ -// @Deprecated -// private void addCompletionProposalFromNodejsSources( -// List list, String input, int offset) { -// int length = input.length(); -// // modules30: timers(m8), module, addons, util(m13), Events(c1), domain(m1)(c1), buffer(c2), stream(c4), crypto(m18)(c7), -// // tls_(ssl)(m5)(c4), stringdecoder(c1), fs(m67)(c4), path(m7), net(m10)(c2), dgram(m1)(c1), dns(m10), http(m4)(c4), https(m3)(c2), -// // url(m3), querystring(m2), punycode(m4), readline(m1)(c1), repl(m1), vm(m5)(c1), child_process(m4)(c1), assert(m11), tty(m2)(c2), zlib(m14)(c8), os(m13), cluster(m3)(c1) -// try { -// JSONObject NodejsContext = ContentFromSources.defaultInstance.NodejsContext; -// JSONArray modules = NodejsContext.getJSONArray("modules"); -// log("modules"+modules.length()+" "); -// for (int i = 0; i < modules.length(); i++) { -// JSONObject module = (JSONObject) modules.get(i); -// String moduleName = module.getString("name"); -// debug( ", "+moduleName); -// -// if (module.has("methods")) { -// JSONArray methods = module.getJSONArray("methods"); -// debug("(m"+methods.length()+")"); -// for (int j = 0; j < methods.length(); j++) { -// JSONObject method = (JSONObject) methods.get(j); -// // example: "textRaw": "http.createServer([requestListener])","type": "method","name": "createServer", -// String trigger = method.getString("textRaw"); -// if (trigger != null && trigger.startsWith(input)) { -// String name = method.getString("name"); -// String desc = formatedName(name,trigger)+method.getString("desc"); -// list.add(new CompletionProposal(trigger, offset - length, length, trigger.length(), -// METHOD, trigger, null, desc)); -// } -// } -// } -// -// if (module.has("classes")){ -// JSONArray classes = module.getJSONArray("classes"); -// debug("(c"+classes.length()+")"); -// for (int j = 0; j < classes.length(); j++) { -// JSONObject clazz = (JSONObject) classes.get(j); -// // example: "textRaw": "Class: Domain","type": "class","name": "Domain" -// String trigger = clazz.getString("name"); -// if (!trigger.startsWith(moduleName)) { -// trigger=moduleName+'.'+trigger; -// } -// if (trigger != null && trigger.startsWith(input)) { -// //String name = clazz.getString("name"); -// String desc = formatedName(trigger,clazz.getString("textRaw"))+clazz.getString("desc"); -// list.add(new CompletionProposal(trigger, offset - length, length, trigger.length(), -// CLASS, trigger, null, desc )); -// } -// } -// } -// -// } -// } catch (JSONException e) { -// log(e.getLocalizedMessage()+"\n"+e); -// } -// } -// private String formatedName(String name) { -// return ""+name+"
    "; -// } -// private String formatedName(String name, String trigger) { -// return formatedName(name)+""+trigger+"
    "; -// } - - - private void addCompletionProposalFromModel(List list, String input, int offset) { - int length = input.length(); - //TODO create Model here and pass it as parameter - if (useNodejsBaseModuleDefinitions){ - model = ContentFromSources.getDefaultInstances().model; - }else{ - model = new Model(); - } - if (useOrionIndexFiles && !indexFilesInitialized){ //@since 0.12 context from Orion IndexFiles - ContentFromOrionIndexFiles.initModel(model); - indexFilesInitialized = true; - } - if (model==null){ - log("Model is empty! (There should have been initialization error)"); - } - for(Entry entry: model.findMatchingEntries(input)){ - String trigger = entry.trigger; - String desc = entry.desc; - //Image image = (entry.type == EntryType.clazz) ? CLASS : METHOD; - Image image = null; - switch (entry.type){ - case module: image = MODULE; break; - case method: image = METHOD; break; - case clazz: image = CLASS; break; - case property: image = PROPERTY; break; - case unknown: image = UNKNOWN_BLUE; - } - list.add(new CompletionProposal(trigger, offset - length, length, trigger.length(), - image, trigger, null, desc)); - } - } - - public void addCompletionProposalFromCompletionJson( - List list, String input, int offset) { - //List list = new ArrayList(); - int length = input.length(); - try { - for (int i = 0; i < ContentFromCompletionsJson.COMPLETIONS.length(); i++) { - JSONObject method = (JSONObject) ContentFromCompletionsJson.COMPLETIONS.get(i); - String trigger = method.getString("trigger"); - if (trigger != null && trigger.startsWith(input)) { - list.add(new CompletionProposal(trigger, offset - length, length, trigger.length(), - //METHOD - null, null, null, null)); - } - } - } catch (JSONException e) { - log(e.getLocalizedMessage()+"\n"); - } - //return list; - } - - // Entry point for JSDT API call - @Override - public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) { - IDocument doc = viewer.getDocument(); - String inputString = getInputString(doc, offset); - List list = new ArrayList(); - //list = getCompletionProposalFromCompletionJson(inputString , offset); - //addCompletionProposalFromNodejsSources(list, inputString , offset); - addCompletionProposalFromModel(list, inputString , offset); - if (useCompletionJson && ContentFromCompletionsJson.COMPLETIONS!=null){ - addCompletionProposalFromCompletionJson(list, inputString , offset); - } - return (CompletionProposal[]) list.toArray(new CompletionProposal[list.size()]); - } - - @Override - public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { - return NO_CONTEXTS; - } - - @Override - public char[] getCompletionProposalAutoActivationCharacters() { - // TODO Preferences - // may be null - return ".abcdefghijklmnopqrstuvwxyz".toCharArray(); - } - - @Override - public char[] getContextInformationAutoActivationCharacters() { - return null; - } - - @Override - public String getErrorMessage() { - return null; - } - - @Override - public IContextInformationValidator getContextInformationValidator() { - return null; - } - - // private static void debug(String s){ - // //NodeclipseConsole.write(s); - // } - private static void log(String s){ - NodeclipseConsole.write(s); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/README.md b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/README.md deleted file mode 100644 index d117a861..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/README.md +++ /dev/null @@ -1,76 +0,0 @@ - -# Notes - -Initial completion was procession completions.json file every time. -Then one more type from all.json (from Node.js sources) was added `ContentFromSources`, - that was precompiled into sorted TreeSet inside Model class. -As one more type from Orion IndexFiles was added `ContentFromOrionIndexFiles`, it is clear that all types should be precompiled, - and Model should be passed as parameter. - -## Eclipse API - -org.eclipse.jface.text.contentassist.IContentAssistProcessor - - -A content assist processor proposes completions and computes context information for a particular content type. A content assist processor is a org.eclipse.jface.text.contentassist.IContentAssistant plug-in. - -This interface must be implemented by clients. Implementers should be registered with a content assistant in order to get involved in the assisting process. - - "classes": [ - { - "textRaw": "Class: Domain", - "type": "class", - "name": "Domain", - - "textRaw": "Class: Domain","type": "class","name": "Domain" - - "textRaw": "http.createServer([requestListener])","type": "method","name": "createServer", - - -# all.json - -in Node.js sources folder `doc/api/all.json` - -search in all.json using '\n "' regexp option to get it structure overview - - -{ - "source": "doc/api/all.markdown", - "miscs": [ - "globals": [ - "vars": [ - "methods": [ - "modules": [ - { // at 1794 - "textRaw": "util", - "name": "util", - "stability": 4, - "stabilityText": "API Frozen", - "desc": "

    These functions are in the module 'util'. Use require('util') to access\nthem.\n\n\n

    \n", - "methods": [ - { - "textRaw": "util.format(format, [...])", - "type": "method", - "name": "format", - "desc": "

    Returns a formatted string ... - { // 2032 - "textRaw": "Events", - "name": "Events", - "stability": 4, - "stabilityText": "API Frozen", - "type": "module", - "desc": "

    Many objects in Node emit events: a net.Server emits an event each time\na peer connects to it, a fs.readStream emits an event when the file is\nopened. All objects which emit events are instances of events.EventEmitter.\nYou can access this module by doing: require("events");\n\n

    \n

    Typically, event names are represented by a camel-cased string, however,\nthere aren't any strict restrictions on that, as any string will be accepted.\n\n

    \n

    Functions can then be attached to objects, to be executed when an event\nis emitted. These functions are called listeners. Inside a listener\nfunction, this refers to the EventEmitter that the listener was\nattached to.\n\n\n

    \n", - "classes": [ - { - "textRaw": "Class: events.EventEmitter", - "type": "class", - "name": "events.EventEmitter", - "desc": "

    To access the EventEmitter class, require('events').EventEmitter.\n\n

    \n

    When an EventEmitter instance experiences an error, the typical action is\nto emit an 'error' event. Error events are treated as a special case in node.\nIf there is no listener for it, then the default action is to print a stack\ntrace and exit the program.\n\n

    \n

    All EventEmitters emit the event 'newListener' when new listeners are\nadded and 'removeListener' when a listener is removed.\n\n

    \n", - "methods": [ - { - { // 9976 - "textRaw": "HTTP", - "name": "http", - "stability": 3, - "stabilityText": "Stable", - \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/all.json b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/all.json deleted file mode 100644 index 3b86494d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/all.json +++ /dev/null @@ -1,13319 +0,0 @@ -{ - "source": "doc/api/all.markdown", - "miscs": [ - { - "textRaw": "About this Documentation", - "name": "About this Documentation", - "type": "misc", - "desc": "

    The goal of this documentation is to comprehensively explain the Node.js\nAPI, both from a reference as well as a conceptual point of view. Each\nsection describes a built-in module or high-level concept.\n\n

    \n

    Where appropriate, property types, method arguments, and the arguments\nprovided to event handlers are detailed in a list underneath the topic\nheading.\n\n

    \n

    Every .html document has a corresponding .json document presenting\nthe same information in a structured manner. This feature is\nexperimental, and added for the benefit of IDEs and other utilities that\nwish to do programmatic things with the documentation.\n\n

    \n

    Every .html and .json file is generated based on the corresponding\n.markdown file in the doc/api/ folder in node's source tree. The\ndocumentation is generated using the tools/doc/generate.js program.\nThe HTML template is located at doc/template.html.\n\n

    \n", - "miscs": [ - { - "textRaw": "Stability Index", - "name": "Stability Index", - "type": "misc", - "desc": "

    Throughout the documentation, you will see indications of a section's\nstability. The Node.js API is still somewhat changing, and as it\nmatures, certain parts are more reliable than others. Some are so\nproven, and so relied upon, that they are unlikely to ever change at\nall. Others are brand new and experimental, or known to be hazardous\nand in the process of being redesigned.\n\n

    \n

    The stability indices are as follows:\n\n

    \n
    Stability: 0 - Deprecated\nThis feature is known to be problematic, and changes are\nplanned.  Do not rely on it.  Use of the feature may cause warnings.  Backwards\ncompatibility should not be expected.
    \n
    Stability: 1 - Experimental\nThis feature was introduced recently, and may change\nor be removed in future versions.  Please try it out and provide feedback.\nIf it addresses a use-case that is important to you, tell the node core team.
    \n
    Stability: 2 - Unstable\nThe API is in the process of settling, but has not yet had\nsufficient real-world testing to be considered stable. Backwards-compatibility\nwill be maintained if reasonable.
    \n
    Stability: 3 - Stable\nThe API has proven satisfactory, but cleanup in the underlying\ncode may cause minor changes.  Backwards-compatibility is guaranteed.
    \n
    Stability: 4 - API Frozen\nThis API has been tested extensively in production and is\nunlikely to ever have to change.
    \n
    Stability: 5 - Locked\nUnless serious bugs are found, this code will not ever\nchange.  Please do not suggest changes in this area; they will be refused.
    \n" - }, - { - "textRaw": "JSON Output", - "name": "json_output", - "stability": 1, - "stabilityText": "Experimental", - "desc": "

    Every HTML file in the markdown has a corresponding JSON file with the\nsame data.\n\n

    \n

    This feature is new as of node v0.6.12. It is experimental.\n\n

    \n", - "type": "misc", - "displayName": "JSON Output" - } - ] - }, - { - "textRaw": "Synopsis", - "name": "Synopsis", - "type": "misc", - "desc": "

    An example of a web server written with Node which responds with 'Hello\nWorld':\n\n

    \n
    var http = require('http');\n\nhttp.createServer(function (request, response) {\n  response.writeHead(200, {'Content-Type': 'text/plain'});\n  response.end('Hello World\\n');\n}).listen(8124);\n\nconsole.log('Server running at http://127.0.0.1:8124/');
    \n

    To run the server, put the code into a file called example.js and execute\nit with the node program\n\n

    \n
    > node example.js\nServer running at http://127.0.0.1:8124/
    \n

    All of the examples in the documentation can be run similarly.\n\n

    \n" - }, - { - "textRaw": "Global Objects", - "name": "Global Objects", - "type": "misc", - "desc": "

    These objects are available in all modules. Some of these objects aren't\nactually in the global scope but in the module scope - this will be noted.\n\n

    \n", - "globals": [ - { - "textRaw": "global", - "name": "global", - "type": "global", - "desc": "

    In browsers, the top-level scope is the global scope. That means that in\nbrowsers if you're in the global scope var something will define a global\nvariable. In Node this is different. The top-level scope is not the global\nscope; var something inside a Node module will be local to that module.\n\n

    \n" - }, - { - "textRaw": "process", - "name": "process", - "type": "global", - "desc": "

    The process object. See the [process object][] section.\n\n

    \n" - }, - { - "textRaw": "console", - "name": "console", - "type": "global", - "desc": "

    Used to print to stdout and stderr. See the [console][] section.\n\n

    \n" - }, - { - "textRaw": "Class: Buffer", - "type": "global", - "name": "Buffer", - "desc": "

    Used to handle binary data. See the [buffer section][]\n\n

    \n" - }, - { - "textRaw": "clearInterval(t)", - "type": "global", - "name": "clearInterval", - "desc": "

    Stop a timer that was previously created with setInterval(). The callback\nwill not execute.\n\n

    \n

    The timer functions are global variables. See the [timers][] section.\n\n

    \n" - }, - { - "textRaw": "console", - "name": "console", - "stability": 4, - "stabilityText": "API Frozen", - "type": "global", - "desc": "

    For printing to stdout and stderr. Similar to the console object functions\nprovided by most web browsers, here the output is sent to stdout or stderr.\n\n

    \n

    The console functions are synchronous when the destination is a terminal or\na file (to avoid lost messages in case of premature exit) and asynchronous\nwhen it's a pipe (to avoid blocking for long periods of time).\n\n

    \n

    That is, in the following example, stdout is non-blocking while stderr\nis blocking:\n\n

    \n
    $ node script.js 2> error.log | tee info.log
    \n

    In daily use, the blocking/non-blocking dichotomy is not something you\nshould worry about unless you log huge amounts of data.\n\n\n

    \n", - "methods": [ - { - "textRaw": "console.log([data], [...])", - "type": "method", - "name": "log", - "desc": "

    Prints to stdout with newline. This function can take multiple arguments in a\nprintf()-like way. Example:\n\n

    \n
    console.log('count: %d', count);
    \n

    If formatting elements are not found in the first string then util.inspect\nis used on each argument. See [util.format()][] for more information.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.info([data], [...])", - "type": "method", - "name": "info", - "desc": "

    Same as console.log.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.error([data], [...])", - "type": "method", - "name": "error", - "desc": "

    Same as console.log but prints to stderr.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.warn([data], [...])", - "type": "method", - "name": "warn", - "desc": "

    Same as console.error.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.dir(obj)", - "type": "method", - "name": "dir", - "desc": "

    Uses util.inspect on obj and prints resulting string to stdout.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "obj" - } - ] - } - ] - }, - { - "textRaw": "console.time(label)", - "type": "method", - "name": "time", - "desc": "

    Mark a time.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.timeEnd(label)", - "type": "method", - "name": "timeEnd", - "desc": "

    Finish timer, record output. Example:\n\n

    \n
    console.time('100-elements');\nfor (var i = 0; i < 100; i++) {\n  ;\n}\nconsole.timeEnd('100-elements');
    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.trace(label)", - "type": "method", - "name": "trace", - "desc": "

    Print a stack trace to stderr of the current position.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.assert(expression, [message])", - "type": "method", - "name": "assert", - "desc": "

    Same as [assert.ok()][] where if the expression evaluates as false throw an\nAssertionError with message.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "expression" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "process", - "name": "process", - "type": "global", - "desc": "

    The process object is a global object and can be accessed from anywhere.\nIt is an instance of [EventEmitter][].\n\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "desc": "

    Emitted when the process is about to exit. This is a good hook to perform\nconstant time checks of the module's state (like for unit tests). The main\nevent loop will no longer be run after the 'exit' callback finishes, so\ntimers may not be scheduled.\n\n

    \n

    Example of listening for exit:\n\n

    \n
    process.on('exit', function() {\n  setTimeout(function() {\n    console.log('This will not run');\n  }, 0);\n  console.log('About to exit.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'uncaughtException'", - "type": "event", - "name": "uncaughtException", - "desc": "

    Emitted when an exception bubbles all the way back to the event loop. If a\nlistener is added for this exception, the default action (which is to print\na stack trace and exit) will not occur.\n\n

    \n

    Example of listening for uncaughtException:\n\n

    \n
    process.on('uncaughtException', function(err) {\n  console.log('Caught exception: ' + err);\n});\n\nsetTimeout(function() {\n  console.log('This will still run.');\n}, 500);\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\nconsole.log('This will not run.');
    \n

    Note that uncaughtException is a very crude mechanism for exception\nhandling and may be removed in the future.\n\n

    \n

    Don't use it, use domains instead. If you do use it, restart\nyour application after every unhandled exception!\n\n

    \n

    Do not use it as the node.js equivalent of On Error Resume Next. An\nunhandled exception means your application - and by extension node.js itself -\nis in an undefined state. Blindly resuming means anything could happen.\n\n

    \n

    Think of resuming as pulling the power cord when you are upgrading your system.\nNine out of ten times nothing happens - but the 10th time, your system is bust.\n\n

    \n

    You have been warned.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Signal Events", - "name": "SIGINT, SIGHUP, etc.", - "type": "event", - "desc": "

    Emitted when the processes receives a signal. See sigaction(2) for a list of\nstandard POSIX signal names such as SIGINT, SIGHUP, etc.\n\n

    \n

    Example of listening for SIGINT:\n\n

    \n
    // Start reading from stdin so we don't exit.\nprocess.stdin.resume();\n\nprocess.on('SIGINT', function() {\n  console.log('Got SIGINT.  Press Control-D to exit.');\n});
    \n

    An easy way to send the SIGINT signal is with Control-C in most terminal\nprograms.\n\n

    \n

    Note:\n\n

    \n
      \n
    • SIGUSR1 is reserved by node.js to start the debugger. It's possible to\ninstall a listener but that won't stop the debugger from starting.
    • \n
    • SIGTERM and SIGINT have default handlers on non-Windows platforms that resets\nthe terminal mode before exiting with code 128 + signal number. If one of\nthese signals has a listener installed, its default behaviour will be removed\n(node will no longer exit).
    • \n
    • SIGPIPE is ignored by default, it can have a listener installed.
    • \n
    • SIGHUP is generated on Windows when the console window is closed, and on other\nplatforms under various similar conditions, see signal(7). It can have a\nlistener installed, however node will be unconditionally terminated by Windows\nabout 10 seconds later. On non-Windows platforms, the default behaviour of\nSIGHUP is to terminate node, but once a listener has been installed its\ndefault behaviour will be removed.
    • \n
    • SIGTERM is not supported on Windows, it can be listened on.
    • \n
    • SIGINT is supported on all platforms, and can usually be generated with\nCTRL+C (though this may be configurable). It is not generated when terminal\nraw mode is enabled.
    • \n
    • SIGBREAK is delivered on Windows when CTRL+BREAK is pressed, on non-Windows\nplatforms it can be listened on, but there is no way to send or generate it.
    • \n
    • SIGWINCH is delivered when the console has been resized. On Windows, this will\nonly happen on write to the console when the cursor is being moved, or when a\nreadable tty is used in raw mode.
    • \n
    • SIGKILL cannot have a listener installed, it will unconditionally terminate\nnode on all platforms.
    • \n
    • SIGSTOP cannot have a listener installed.
    • \n
    \n", - "params": [] - } - ], - "properties": [ - { - "textRaw": "process.stdout", - "name": "stdout", - "desc": "

    A Writable Stream to stdout.\n\n

    \n

    Example: the definition of console.log\n\n

    \n
    console.log = function(d) {\n  process.stdout.write(d + '\\n');\n};
    \n

    process.stderr and process.stdout are unlike other streams in Node in\nthat writes to them are usually blocking. They are blocking in the case\nthat they refer to regular files or TTY file descriptors. In the case they\nrefer to pipes, they are non-blocking like other streams.\n\n

    \n

    To check if Node is being run in a TTY context, read the isTTY property\non process.stderr, process.stdout, or process.stdin:\n\n

    \n
    $ node -p "Boolean(process.stdin.isTTY)"\ntrue\n$ echo "foo" | node -p "Boolean(process.stdin.isTTY)"\nfalse\n\n$ node -p "Boolean(process.stdout.isTTY)"\ntrue\n$ node -p "Boolean(process.stdout.isTTY)" | cat\nfalse
    \n

    See the tty docs for more information.\n\n

    \n" - }, - { - "textRaw": "process.stderr", - "name": "stderr", - "desc": "

    A writable stream to stderr.\n\n

    \n

    process.stderr and process.stdout are unlike other streams in Node in\nthat writes to them are usually blocking. They are blocking in the case\nthat they refer to regular files or TTY file descriptors. In the case they\nrefer to pipes, they are non-blocking like other streams.\n\n\n

    \n" - }, - { - "textRaw": "process.stdin", - "name": "stdin", - "desc": "

    A Readable Stream for stdin. The stdin stream is paused by default, so one\nmust call process.stdin.resume() to read from it.\n\n

    \n

    Example of opening standard input and listening for both events:\n\n

    \n
    process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\n\nprocess.stdin.on('data', function(chunk) {\n  process.stdout.write('data: ' + chunk);\n});\n\nprocess.stdin.on('end', function() {\n  process.stdout.write('end');\n});
    \n" - }, - { - "textRaw": "process.argv", - "name": "argv", - "desc": "

    An array containing the command line arguments. The first element will be\n'node', the second element will be the name of the JavaScript file. The\nnext elements will be any additional command line arguments.\n\n

    \n
    // print process.argv\nprocess.argv.forEach(function(val, index, array) {\n  console.log(index + ': ' + val);\n});
    \n

    This will generate:\n\n

    \n
    $ node process-2.js one two=three four\n0: node\n1: /Users/mjr/work/node/process-2.js\n2: one\n3: two=three\n4: four
    \n" - }, - { - "textRaw": "process.execPath", - "name": "execPath", - "desc": "

    This is the absolute pathname of the executable that started the process.\n\n

    \n

    Example:\n\n

    \n
    /usr/local/bin/node
    \n" - }, - { - "textRaw": "process.execArgv", - "name": "execArgv", - "desc": "

    This is the set of node-specific command line options from the\nexecutable that started the process. These options do not show up in\nprocess.argv, and do not include the node executable, the name of\nthe script, or any options following the script name. These options\nare useful in order to spawn child processes with the same execution\nenvironment as the parent.\n\n

    \n

    Example:\n\n

    \n
    $ node --harmony script.js --version
    \n

    results in process.execArgv:\n\n

    \n
    ['--harmony']
    \n

    and process.argv:\n\n

    \n
    ['/usr/local/bin/node', 'script.js', '--version']
    \n" - }, - { - "textRaw": "process.env", - "name": "env", - "desc": "

    An object containing the user environment. See environ(7).\n\n\n

    \n" - }, - { - "textRaw": "process.version", - "name": "version", - "desc": "

    A compiled-in property that exposes NODE_VERSION.\n\n

    \n
    console.log('Version: ' + process.version);
    \n" - }, - { - "textRaw": "process.versions", - "name": "versions", - "desc": "

    A property exposing version strings of node and its dependencies.\n\n

    \n
    console.log(process.versions);
    \n

    Will print something like:\n\n

    \n
    { http_parser: '1.0',\n  node: '0.10.4',\n  v8: '3.14.5.8',\n  ares: '1.9.0-DEV',\n  uv: '0.10.3',\n  zlib: '1.2.3',\n  modules: '11',\n  openssl: '1.0.1e' }
    \n" - }, - { - "textRaw": "process.config", - "name": "config", - "desc": "

    An Object containing the JavaScript representation of the configure options\nthat were used to compile the current node executable. This is the same as\nthe "config.gypi" file that was produced when running the ./configure script.\n\n

    \n

    An example of the possible output looks like:\n\n

    \n
    { target_defaults:\n   { cflags: [],\n     default_configuration: 'Release',\n     defines: [],\n     include_dirs: [],\n     libraries: [] },\n  variables:\n   { host_arch: 'x64',\n     node_install_npm: 'true',\n     node_prefix: '',\n     node_shared_cares: 'false',\n     node_shared_http_parser: 'false',\n     node_shared_libuv: 'false',\n     node_shared_v8: 'false',\n     node_shared_zlib: 'false',\n     node_use_dtrace: 'false',\n     node_use_openssl: 'true',\n     node_shared_openssl: 'false',\n     strict_aliasing: 'true',\n     target_arch: 'x64',\n     v8_use_snapshot: 'true' } }
    \n" - }, - { - "textRaw": "process.pid", - "name": "pid", - "desc": "

    The PID of the process.\n\n

    \n
    console.log('This process is pid ' + process.pid);
    \n" - }, - { - "textRaw": "process.title", - "name": "title", - "desc": "

    Getter/setter to set what is displayed in 'ps'.\n\n

    \n

    When used as a setter, the maximum length is platform-specific and probably\nshort.\n\n

    \n

    On Linux and OS X, it's limited to the size of the binary name plus the\nlength of the command line arguments because it overwrites the argv memory.\n\n

    \n

    v0.8 allowed for longer process title strings by also overwriting the environ\nmemory but that was potentially insecure/confusing in some (rather obscure)\ncases.\n\n\n

    \n" - }, - { - "textRaw": "process.arch", - "name": "arch", - "desc": "

    What processor architecture you're running on: 'arm', 'ia32', or 'x64'.\n\n

    \n
    console.log('This processor architecture is ' + process.arch);
    \n" - }, - { - "textRaw": "process.platform", - "name": "platform", - "desc": "

    What platform you're running on:\n'darwin', 'freebsd', 'linux', 'sunos' or 'win32'\n\n

    \n
    console.log('This platform is ' + process.platform);
    \n" - }, - { - "textRaw": "`maxTickDepth` {Number} Default = 1000 ", - "name": "maxTickDepth", - "desc": "

    Callbacks passed to process.nextTick will usually be called at the\nend of the current flow of execution, and are thus approximately as fast\nas calling a function synchronously. Left unchecked, this would starve\nthe event loop, preventing any I/O from occurring.\n\n

    \n

    Consider this code:\n\n

    \n
    process.nextTick(function foo() {\n  process.nextTick(foo);\n});
    \n

    In order to avoid the situation where Node is blocked by an infinite\nloop of recursive series of nextTick calls, it defers to allow some I/O\nto be done every so often.\n\n

    \n

    The process.maxTickDepth value is the maximum depth of\nnextTick-calling nextTick-callbacks that will be evaluated before\nallowing other forms of I/O to occur.\n\n

    \n", - "shortDesc": "Default = 1000" - } - ], - "methods": [ - { - "textRaw": "process.abort()", - "type": "method", - "name": "abort", - "desc": "

    This causes node to emit an abort. This will cause node to exit and\ngenerate a core file.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.chdir(directory)", - "type": "method", - "name": "chdir", - "desc": "

    Changes the current working directory of the process or throws an exception if that fails.\n\n

    \n
    console.log('Starting directory: ' + process.cwd());\ntry {\n  process.chdir('/tmp');\n  console.log('New directory: ' + process.cwd());\n}\ncatch (err) {\n  console.log('chdir: ' + err);\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "directory" - } - ] - } - ] - }, - { - "textRaw": "process.cwd()", - "type": "method", - "name": "cwd", - "desc": "

    Returns the current working directory of the process.\n\n

    \n
    console.log('Current directory: ' + process.cwd());
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.exit([code])", - "type": "method", - "name": "exit", - "desc": "

    Ends the process with the specified code. If omitted, exit uses the\n'success' code 0.\n\n

    \n

    To exit with a 'failure' code:\n\n

    \n
    process.exit(1);
    \n

    The shell that executed node should see the exit code as 1.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.getgid()", - "type": "method", - "name": "getgid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Gets the group identity of the process. (See getgid(2).)\nThis is the numerical group id, not the group name.\n\n

    \n
    if (process.getgid) {\n  console.log('Current gid: ' + process.getgid());\n}
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setgid(id)", - "type": "method", - "name": "setgid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the group identity of the process. (See setgid(2).) This accepts either\na numerical ID or a groupname string. If a groupname is specified, this method\nblocks while resolving it to a numerical ID.\n\n

    \n
    if (process.getgid && process.setgid) {\n  console.log('Current gid: ' + process.getgid());\n  try {\n    process.setgid(501);\n    console.log('New gid: ' + process.getgid());\n  }\n  catch (err) {\n    console.log('Failed to set gid: ' + err);\n  }\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "id" - } - ] - } - ] - }, - { - "textRaw": "process.getuid()", - "type": "method", - "name": "getuid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Gets the user identity of the process. (See getuid(2).)\nThis is the numerical userid, not the username.\n\n

    \n
    if (process.getuid) {\n  console.log('Current uid: ' + process.getuid());\n}
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setuid(id)", - "type": "method", - "name": "setuid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the user identity of the process. (See setuid(2).) This accepts either\na numerical ID or a username string. If a username is specified, this method\nblocks while resolving it to a numerical ID.\n\n

    \n
    if (process.getuid && process.setuid) {\n  console.log('Current uid: ' + process.getuid());\n  try {\n    process.setuid(501);\n    console.log('New uid: ' + process.getuid());\n  }\n  catch (err) {\n    console.log('Failed to set uid: ' + err);\n  }\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "id" - } - ] - } - ] - }, - { - "textRaw": "process.getgroups()", - "type": "method", - "name": "getgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Returns an array with the supplementary group IDs. POSIX leaves it unspecified\nif the effective group ID is included but node.js ensures it always is.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setgroups(groups)", - "type": "method", - "name": "setgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the supplementary group IDs. This is a privileged operation, meaning you\nneed to be root or have the CAP_SETGID capability.\n\n

    \n

    The list can contain group IDs, group names or both.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "groups" - } - ] - } - ] - }, - { - "textRaw": "process.initgroups(user, extra_group)", - "type": "method", - "name": "initgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Reads /etc/group and initializes the group access list, using all groups of\nwhich the user is a member. This is a privileged operation, meaning you need\nto be root or have the CAP_SETGID capability.\n\n

    \n

    user is a user name or user ID. extra_group is a group name or group ID.\n\n

    \n

    Some care needs to be taken when dropping privileges. Example:\n\n

    \n
    console.log(process.getgroups());         // [ 0 ]\nprocess.initgroups('bnoordhuis', 1000);   // switch user\nconsole.log(process.getgroups());         // [ 27, 30, 46, 1000, 0 ]\nprocess.setgid(1000);                     // drop root gid\nconsole.log(process.getgroups());         // [ 27, 30, 46, 1000 ]
    \n", - "signatures": [ - { - "params": [ - { - "name": "user" - }, - { - "name": "extra_group" - } - ] - } - ] - }, - { - "textRaw": "process.kill(pid, [signal])", - "type": "method", - "name": "kill", - "desc": "

    Send a signal to a process. pid is the process id and signal is the\nstring describing the signal to send. Signal names are strings like\n'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'.\nSee kill(2) for more information.\n\n

    \n

    Note that just because the name of this function is process.kill, it is\nreally just a signal sender, like the kill system call. The signal sent\nmay do something other than kill the target process.\n\n

    \n

    Example of sending a signal to yourself:\n\n

    \n
    process.on('SIGHUP', function() {\n  console.log('Got SIGHUP signal.');\n});\n\nsetTimeout(function() {\n  console.log('Exiting.');\n  process.exit(0);\n}, 100);\n\nprocess.kill(process.pid, 'SIGHUP');
    \n

    Note: SIGUSR1 is reserved by node.js. It can be used to kickstart the\ndebugger.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "pid" - }, - { - "name": "signal", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.memoryUsage()", - "type": "method", - "name": "memoryUsage", - "desc": "

    Returns an object describing the memory usage of the Node process\nmeasured in bytes.\n\n

    \n
    var util = require('util');\n\nconsole.log(util.inspect(process.memoryUsage()));
    \n

    This will generate:\n\n

    \n
    { rss: 4935680,\n  heapTotal: 1826816,\n  heapUsed: 650472 }
    \n

    heapTotal and heapUsed refer to V8's memory usage.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.nextTick(callback)", - "type": "method", - "name": "nextTick", - "desc": "

    On the next loop around the event loop call this callback.\nThis is not a simple alias to setTimeout(fn, 0), it's much more\nefficient. It typically runs before any other I/O events fire, but there\nare some exceptions. See process.maxTickDepth below.\n\n

    \n
    process.nextTick(function() {\n  console.log('nextTick callback');\n});
    \n

    This is important in developing APIs where you want to give the user the\nchance to assign event handlers after an object has been constructed,\nbut before any I/O has occurred.\n\n

    \n
    function MyThing(options) {\n  this.setupOptions(options);\n\n  process.nextTick(function() {\n    this.startDoingStuff();\n  }.bind(this));\n}\n\nvar thing = new MyThing();\nthing.getReadyForStuff();\n\n// thing.startDoingStuff() gets called now, not before.
    \n

    It is very important for APIs to be either 100% synchronous or 100%\nasynchronous. Consider this example:\n\n

    \n
    // WARNING!  DO NOT USE!  BAD UNSAFE HAZARD!\nfunction maybeSync(arg, cb) {\n  if (arg) {\n    cb();\n    return;\n  }\n\n  fs.stat('file', cb);\n}
    \n

    This API is hazardous. If you do this:\n\n

    \n
    maybeSync(true, function() {\n  foo();\n});\nbar();
    \n

    then it's not clear whether foo() or bar() will be called first.\n\n

    \n

    This approach is much better:\n\n

    \n
    function definitelyAsync(arg, cb) {\n  if (arg) {\n    process.nextTick(cb);\n    return;\n  }\n\n  fs.stat('file', cb);\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "process.umask([mask])", - "type": "method", - "name": "umask", - "desc": "

    Sets or reads the process's file mode creation mask. Child processes inherit\nthe mask from the parent process. Returns the old mask if mask argument is\ngiven, otherwise returns the current mask.\n\n

    \n
    var oldmask, newmask = 0644;\n\noldmask = process.umask(newmask);\nconsole.log('Changed umask from: ' + oldmask.toString(8) +\n            ' to ' + newmask.toString(8));
    \n", - "signatures": [ - { - "params": [ - { - "name": "mask", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.uptime()", - "type": "method", - "name": "uptime", - "desc": "

    Number of seconds Node has been running.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.hrtime()", - "type": "method", - "name": "hrtime", - "desc": "

    Returns the current high-resolution real time in a [seconds, nanoseconds]\ntuple Array. It is relative to an arbitrary time in the past. It is not\nrelated to the time of day and therefore not subject to clock drift. The\nprimary use is for measuring performance between intervals.\n\n

    \n

    You may pass in the result of a previous call to process.hrtime() to get\na diff reading, useful for benchmarks and measuring intervals:\n\n

    \n
    var time = process.hrtime();\n// [ 1800216, 25 ]\n\nsetTimeout(function() {\n  var diff = process.hrtime(time);\n  // [ 1, 552 ]\n\n  console.log('benchmark took %d nanoseconds', diff[0] * 1e9 + diff[1]);\n  // benchmark took 1000000527 nanoseconds\n}, 1000);
    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "vars": [ - { - "textRaw": "require()", - "type": "var", - "name": "require", - "desc": "

    To require modules. See the [Modules][] section. require isn't actually a\nglobal but rather local to each module.\n\n

    \n", - "methods": [ - { - "textRaw": "require.resolve()", - "type": "method", - "name": "resolve", - "desc": "

    Use the internal require() machinery to look up the location of a module,\nbut rather than loading the module, just return the resolved filename.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "properties": [ - { - "textRaw": "`cache` {Object} ", - "name": "cache", - "desc": "

    Modules are cached in this object when they are required. By deleting a key\nvalue from this object, the next require will reload the module.\n\n

    \n" - }, - { - "textRaw": "`extensions` {Object} ", - "name": "extensions", - "stability": 0, - "stabilityText": "Deprecated", - "desc": "

    Instruct require on how to handle certain file extensions.\n\n

    \n

    Process files with the extension .sjs as .js:\n\n

    \n
    require.extensions['.sjs'] = require.extensions['.js'];
    \n

    Deprecated In the past, this list has been used to load\nnon-JavaScript modules into Node by compiling them on-demand.\nHowever, in practice, there are much better ways to do this, such as\nloading modules via some other Node program, or compiling them to\nJavaScript ahead of time.\n\n

    \n

    Since the Module system is locked, this feature will probably never go\naway. However, it may have subtle bugs and complexities that are best\nleft untouched.\n\n

    \n" - } - ] - }, - { - "textRaw": "__filename", - "name": "__filename", - "type": "var", - "desc": "

    The filename of the code being executed. This is the resolved absolute path\nof this code file. For a main program this is not necessarily the same\nfilename used in the command line. The value inside a module is the path\nto that module file.\n\n

    \n

    Example: running node example.js from /Users/mjr\n\n

    \n
    console.log(__filename);\n// /Users/mjr/example.js
    \n

    __filename isn't actually a global but rather local to each module.\n\n

    \n" - }, - { - "textRaw": "__dirname", - "name": "__dirname", - "type": "var", - "desc": "

    The name of the directory that the currently executing script resides in.\n\n

    \n

    Example: running node example.js from /Users/mjr\n\n

    \n
    console.log(__dirname);\n// /Users/mjr
    \n

    __dirname isn't actually a global but rather local to each module.\n\n\n

    \n" - }, - { - "textRaw": "module", - "name": "module", - "type": "var", - "desc": "

    A reference to the current module. In particular\nmodule.exports is used for defining what a module exports and makes\navailable through require().\n\n

    \n

    module isn't actually a global but rather local to each module.\n\n

    \n

    See the [module system documentation][] for more information.\n\n

    \n" - }, - { - "textRaw": "exports", - "name": "exports", - "type": "var", - "desc": "

    A reference to the module.exports that is shorter to type.\nSee [module system documentation][] for details on when to use exports and\nwhen to use module.exports.\n\n

    \n

    exports isn't actually a global but rather local to each module.\n\n

    \n

    See the [module system documentation][] for more information.\n\n

    \n

    See the [module section][] for more information.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "setTimeout(cb, ms)", - "type": "method", - "name": "setTimeout", - "desc": "

    Run callback cb after at least ms milliseconds. The actual delay depends\non external factors like OS timer granularity and system load.\n\n

    \n

    The timeout must be in the range of 1-2,147,483,647 inclusive. If the value is\noutside that range, it's changed to 1 millisecond. Broadly speaking, a timer\ncannot span more than 24.8 days.\n\n

    \n

    Returns an opaque value that represents the timer.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "cb" - }, - { - "name": "ms" - } - ] - } - ] - }, - { - "textRaw": "clearTimeout(t)", - "type": "method", - "name": "clearTimeout", - "desc": "

    Stop a timer that was previously created with setTimeout(). The callback will\nnot execute.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "t" - } - ] - } - ] - }, - { - "textRaw": "setInterval(cb, ms)", - "type": "method", - "name": "setInterval", - "desc": "

    Run callback cb repeatedly every ms milliseconds. Note that the actual\ninterval may vary, depending on external factors like OS timer granularity and\nsystem load. It's never less than ms but it may be longer.\n\n

    \n

    The interval must be in the range of 1-2,147,483,647 inclusive. If the value is\noutside that range, it's changed to 1 millisecond. Broadly speaking, a timer\ncannot span more than 24.8 days.\n\n

    \n

    Returns an opaque value that represents the timer.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "cb" - }, - { - "name": "ms" - } - ] - } - ] - } - ] - }, - { - "textRaw": "Debugger", - "name": "Debugger", - "stability": 3, - "stabilityText": "Stable", - "type": "misc", - "desc": "

    V8 comes with an extensive debugger which is accessible out-of-process via a\nsimple TCP protocol.\nNode has a built-in client for this debugger. To use this, start Node with the\ndebug argument; a prompt will appear:\n\n

    \n
    % node debug myscript.js\n< debugger listening on port 5858\nconnecting... ok\nbreak in /home/indutny/Code/git/indutny/myscript.js:1\n  1 x = 5;\n  2 setTimeout(function () {\n  3   debugger;\ndebug>
    \n

    Node's debugger client doesn't support the full range of commands, but\nsimple step and inspection is possible. By putting the statement debugger;\ninto the source code of your script, you will enable a breakpoint.\n\n

    \n

    For example, suppose myscript.js looked like this:\n\n

    \n
    // myscript.js\nx = 5;\nsetTimeout(function () {\n  debugger;\n  console.log("world");\n}, 1000);\nconsole.log("hello");
    \n

    Then once the debugger is run, it will break on line 4.\n\n

    \n
    % node debug myscript.js\n< debugger listening on port 5858\nconnecting... ok\nbreak in /home/indutny/Code/git/indutny/myscript.js:1\n  1 x = 5;\n  2 setTimeout(function () {\n  3   debugger;\ndebug> cont\n< hello\nbreak in /home/indutny/Code/git/indutny/myscript.js:3\n  1 x = 5;\n  2 setTimeout(function () {\n  3   debugger;\n  4   console.log("world");\n  5 }, 1000);\ndebug> next\nbreak in /home/indutny/Code/git/indutny/myscript.js:4\n  2 setTimeout(function () {\n  3   debugger;\n  4   console.log("world");\n  5 }, 1000);\n  6 console.log("hello");\ndebug> repl\nPress Ctrl + C to leave debug repl\n> x\n5\n> 2+2\n4\ndebug> next\n< world\nbreak in /home/indutny/Code/git/indutny/myscript.js:5\n  3   debugger;\n  4   console.log("world");\n  5 }, 1000);\n  6 console.log("hello");\n  7\ndebug> quit\n%
    \n

    The repl command allows you to evaluate code remotely. The next command\nsteps over to the next line. There are a few other commands available and more\nto come. Type help to see others.\n\n

    \n", - "miscs": [ - { - "textRaw": "Watchers", - "name": "watchers", - "desc": "

    You can watch expression and variable values while debugging your code.\nOn every breakpoint each expression from the watchers list will be evaluated\nin the current context and displayed just before the breakpoint's source code\nlisting.\n\n

    \n

    To start watching an expression, type watch("my_expression"). watchers\nprints the active watchers. To remove a watcher, type\nunwatch("my_expression").\n\n

    \n", - "type": "misc", - "displayName": "Watchers" - }, - { - "textRaw": "Commands reference", - "name": "commands_reference", - "modules": [ - { - "textRaw": "Stepping", - "name": "Stepping", - "desc": "

    It is also possible to set a breakpoint in a file (module) that\nisn't loaded yet:\n\n

    \n
    % ./node debug test/fixtures/break-in-module/main.js\n< debugger listening on port 5858\nconnecting to port 5858... ok\nbreak in test/fixtures/break-in-module/main.js:1\n  1 var mod = require('./mod.js');\n  2 mod.hello();\n  3 mod.hello();\ndebug> setBreakpoint('mod.js', 23)\nWarning: script 'mod.js' was not loaded yet.\n  1 var mod = require('./mod.js');\n  2 mod.hello();\n  3 mod.hello();\ndebug> c\nbreak in test/fixtures/break-in-module/mod.js:23\n 21\n 22 exports.hello = function() {\n 23   return 'hello from module';\n 24 };\n 25\ndebug>
    \n", - "type": "module", - "displayName": "Breakpoints" - }, - { - "textRaw": "Breakpoints", - "name": "breakpoints", - "desc": "

    It is also possible to set a breakpoint in a file (module) that\nisn't loaded yet:\n\n

    \n
    % ./node debug test/fixtures/break-in-module/main.js\n< debugger listening on port 5858\nconnecting to port 5858... ok\nbreak in test/fixtures/break-in-module/main.js:1\n  1 var mod = require('./mod.js');\n  2 mod.hello();\n  3 mod.hello();\ndebug> setBreakpoint('mod.js', 23)\nWarning: script 'mod.js' was not loaded yet.\n  1 var mod = require('./mod.js');\n  2 mod.hello();\n  3 mod.hello();\ndebug> c\nbreak in test/fixtures/break-in-module/mod.js:23\n 21\n 22 exports.hello = function() {\n 23   return 'hello from module';\n 24 };\n 25\ndebug>
    \n", - "type": "module", - "displayName": "Breakpoints" - }, - { - "textRaw": "Execution control", - "name": "Execution control", - "type": "module", - "displayName": "Various" - }, - { - "textRaw": "Various", - "name": "various", - "type": "module", - "displayName": "Various" - } - ], - "type": "misc", - "displayName": "Commands reference" - }, - { - "textRaw": "Advanced Usage", - "name": "advanced_usage", - "desc": "

    The V8 debugger can be enabled and accessed either by starting Node with\nthe --debug command-line flag or by signaling an existing Node process\nwith SIGUSR1.\n\n

    \n

    Once a process has been set in debug mode with this it can be connected to\nwith the node debugger. Either connect to the pid or the URI to the debugger.\nThe syntax is:\n\n

    \n
      \n
    • node debug -p <pid> - Connects to the process via the pid
    • \n
    • `node debug - Connects to the process via the URI such as localhost:5858
    • \n
    \n", - "type": "misc", - "displayName": "Advanced Usage" - } - ] - } - ], - "globals": [ - { - "textRaw": "global", - "name": "global", - "type": "global", - "desc": "

    In browsers, the top-level scope is the global scope. That means that in\nbrowsers if you're in the global scope var something will define a global\nvariable. In Node this is different. The top-level scope is not the global\nscope; var something inside a Node module will be local to that module.\n\n

    \n" - }, - { - "textRaw": "process", - "name": "process", - "type": "global", - "desc": "

    The process object. See the [process object][] section.\n\n

    \n" - }, - { - "textRaw": "console", - "name": "console", - "type": "global", - "desc": "

    Used to print to stdout and stderr. See the [console][] section.\n\n

    \n" - }, - { - "textRaw": "Class: Buffer", - "type": "global", - "name": "Buffer", - "desc": "

    Used to handle binary data. See the [buffer section][]\n\n

    \n" - }, - { - "textRaw": "clearInterval(t)", - "type": "global", - "name": "clearInterval", - "desc": "

    Stop a timer that was previously created with setInterval(). The callback\nwill not execute.\n\n

    \n

    The timer functions are global variables. See the [timers][] section.\n\n

    \n" - }, - { - "textRaw": "console", - "name": "console", - "stability": 4, - "stabilityText": "API Frozen", - "type": "global", - "desc": "

    For printing to stdout and stderr. Similar to the console object functions\nprovided by most web browsers, here the output is sent to stdout or stderr.\n\n

    \n

    The console functions are synchronous when the destination is a terminal or\na file (to avoid lost messages in case of premature exit) and asynchronous\nwhen it's a pipe (to avoid blocking for long periods of time).\n\n

    \n

    That is, in the following example, stdout is non-blocking while stderr\nis blocking:\n\n

    \n
    $ node script.js 2> error.log | tee info.log
    \n

    In daily use, the blocking/non-blocking dichotomy is not something you\nshould worry about unless you log huge amounts of data.\n\n\n

    \n", - "methods": [ - { - "textRaw": "console.log([data], [...])", - "type": "method", - "name": "log", - "desc": "

    Prints to stdout with newline. This function can take multiple arguments in a\nprintf()-like way. Example:\n\n

    \n
    console.log('count: %d', count);
    \n

    If formatting elements are not found in the first string then util.inspect\nis used on each argument. See [util.format()][] for more information.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.info([data], [...])", - "type": "method", - "name": "info", - "desc": "

    Same as console.log.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.error([data], [...])", - "type": "method", - "name": "error", - "desc": "

    Same as console.log but prints to stderr.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.warn([data], [...])", - "type": "method", - "name": "warn", - "desc": "

    Same as console.error.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "console.dir(obj)", - "type": "method", - "name": "dir", - "desc": "

    Uses util.inspect on obj and prints resulting string to stdout.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "obj" - } - ] - } - ] - }, - { - "textRaw": "console.time(label)", - "type": "method", - "name": "time", - "desc": "

    Mark a time.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.timeEnd(label)", - "type": "method", - "name": "timeEnd", - "desc": "

    Finish timer, record output. Example:\n\n

    \n
    console.time('100-elements');\nfor (var i = 0; i < 100; i++) {\n  ;\n}\nconsole.timeEnd('100-elements');
    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.trace(label)", - "type": "method", - "name": "trace", - "desc": "

    Print a stack trace to stderr of the current position.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "label" - } - ] - } - ] - }, - { - "textRaw": "console.assert(expression, [message])", - "type": "method", - "name": "assert", - "desc": "

    Same as [assert.ok()][] where if the expression evaluates as false throw an\nAssertionError with message.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "expression" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "process", - "name": "process", - "type": "global", - "desc": "

    The process object is a global object and can be accessed from anywhere.\nIt is an instance of [EventEmitter][].\n\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "desc": "

    Emitted when the process is about to exit. This is a good hook to perform\nconstant time checks of the module's state (like for unit tests). The main\nevent loop will no longer be run after the 'exit' callback finishes, so\ntimers may not be scheduled.\n\n

    \n

    Example of listening for exit:\n\n

    \n
    process.on('exit', function() {\n  setTimeout(function() {\n    console.log('This will not run');\n  }, 0);\n  console.log('About to exit.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'uncaughtException'", - "type": "event", - "name": "uncaughtException", - "desc": "

    Emitted when an exception bubbles all the way back to the event loop. If a\nlistener is added for this exception, the default action (which is to print\na stack trace and exit) will not occur.\n\n

    \n

    Example of listening for uncaughtException:\n\n

    \n
    process.on('uncaughtException', function(err) {\n  console.log('Caught exception: ' + err);\n});\n\nsetTimeout(function() {\n  console.log('This will still run.');\n}, 500);\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\nconsole.log('This will not run.');
    \n

    Note that uncaughtException is a very crude mechanism for exception\nhandling and may be removed in the future.\n\n

    \n

    Don't use it, use domains instead. If you do use it, restart\nyour application after every unhandled exception!\n\n

    \n

    Do not use it as the node.js equivalent of On Error Resume Next. An\nunhandled exception means your application - and by extension node.js itself -\nis in an undefined state. Blindly resuming means anything could happen.\n\n

    \n

    Think of resuming as pulling the power cord when you are upgrading your system.\nNine out of ten times nothing happens - but the 10th time, your system is bust.\n\n

    \n

    You have been warned.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Signal Events", - "name": "SIGINT, SIGHUP, etc.", - "type": "event", - "desc": "

    Emitted when the processes receives a signal. See sigaction(2) for a list of\nstandard POSIX signal names such as SIGINT, SIGHUP, etc.\n\n

    \n

    Example of listening for SIGINT:\n\n

    \n
    // Start reading from stdin so we don't exit.\nprocess.stdin.resume();\n\nprocess.on('SIGINT', function() {\n  console.log('Got SIGINT.  Press Control-D to exit.');\n});
    \n

    An easy way to send the SIGINT signal is with Control-C in most terminal\nprograms.\n\n

    \n

    Note:\n\n

    \n
      \n
    • SIGUSR1 is reserved by node.js to start the debugger. It's possible to\ninstall a listener but that won't stop the debugger from starting.
    • \n
    • SIGTERM and SIGINT have default handlers on non-Windows platforms that resets\nthe terminal mode before exiting with code 128 + signal number. If one of\nthese signals has a listener installed, its default behaviour will be removed\n(node will no longer exit).
    • \n
    • SIGPIPE is ignored by default, it can have a listener installed.
    • \n
    • SIGHUP is generated on Windows when the console window is closed, and on other\nplatforms under various similar conditions, see signal(7). It can have a\nlistener installed, however node will be unconditionally terminated by Windows\nabout 10 seconds later. On non-Windows platforms, the default behaviour of\nSIGHUP is to terminate node, but once a listener has been installed its\ndefault behaviour will be removed.
    • \n
    • SIGTERM is not supported on Windows, it can be listened on.
    • \n
    • SIGINT is supported on all platforms, and can usually be generated with\nCTRL+C (though this may be configurable). It is not generated when terminal\nraw mode is enabled.
    • \n
    • SIGBREAK is delivered on Windows when CTRL+BREAK is pressed, on non-Windows\nplatforms it can be listened on, but there is no way to send or generate it.
    • \n
    • SIGWINCH is delivered when the console has been resized. On Windows, this will\nonly happen on write to the console when the cursor is being moved, or when a\nreadable tty is used in raw mode.
    • \n
    • SIGKILL cannot have a listener installed, it will unconditionally terminate\nnode on all platforms.
    • \n
    • SIGSTOP cannot have a listener installed.
    • \n
    \n", - "params": [] - } - ], - "properties": [ - { - "textRaw": "process.stdout", - "name": "stdout", - "desc": "

    A Writable Stream to stdout.\n\n

    \n

    Example: the definition of console.log\n\n

    \n
    console.log = function(d) {\n  process.stdout.write(d + '\\n');\n};
    \n

    process.stderr and process.stdout are unlike other streams in Node in\nthat writes to them are usually blocking. They are blocking in the case\nthat they refer to regular files or TTY file descriptors. In the case they\nrefer to pipes, they are non-blocking like other streams.\n\n

    \n

    To check if Node is being run in a TTY context, read the isTTY property\non process.stderr, process.stdout, or process.stdin:\n\n

    \n
    $ node -p "Boolean(process.stdin.isTTY)"\ntrue\n$ echo "foo" | node -p "Boolean(process.stdin.isTTY)"\nfalse\n\n$ node -p "Boolean(process.stdout.isTTY)"\ntrue\n$ node -p "Boolean(process.stdout.isTTY)" | cat\nfalse
    \n

    See the tty docs for more information.\n\n

    \n" - }, - { - "textRaw": "process.stderr", - "name": "stderr", - "desc": "

    A writable stream to stderr.\n\n

    \n

    process.stderr and process.stdout are unlike other streams in Node in\nthat writes to them are usually blocking. They are blocking in the case\nthat they refer to regular files or TTY file descriptors. In the case they\nrefer to pipes, they are non-blocking like other streams.\n\n\n

    \n" - }, - { - "textRaw": "process.stdin", - "name": "stdin", - "desc": "

    A Readable Stream for stdin. The stdin stream is paused by default, so one\nmust call process.stdin.resume() to read from it.\n\n

    \n

    Example of opening standard input and listening for both events:\n\n

    \n
    process.stdin.resume();\nprocess.stdin.setEncoding('utf8');\n\nprocess.stdin.on('data', function(chunk) {\n  process.stdout.write('data: ' + chunk);\n});\n\nprocess.stdin.on('end', function() {\n  process.stdout.write('end');\n});
    \n" - }, - { - "textRaw": "process.argv", - "name": "argv", - "desc": "

    An array containing the command line arguments. The first element will be\n'node', the second element will be the name of the JavaScript file. The\nnext elements will be any additional command line arguments.\n\n

    \n
    // print process.argv\nprocess.argv.forEach(function(val, index, array) {\n  console.log(index + ': ' + val);\n});
    \n

    This will generate:\n\n

    \n
    $ node process-2.js one two=three four\n0: node\n1: /Users/mjr/work/node/process-2.js\n2: one\n3: two=three\n4: four
    \n" - }, - { - "textRaw": "process.execPath", - "name": "execPath", - "desc": "

    This is the absolute pathname of the executable that started the process.\n\n

    \n

    Example:\n\n

    \n
    /usr/local/bin/node
    \n" - }, - { - "textRaw": "process.execArgv", - "name": "execArgv", - "desc": "

    This is the set of node-specific command line options from the\nexecutable that started the process. These options do not show up in\nprocess.argv, and do not include the node executable, the name of\nthe script, or any options following the script name. These options\nare useful in order to spawn child processes with the same execution\nenvironment as the parent.\n\n

    \n

    Example:\n\n

    \n
    $ node --harmony script.js --version
    \n

    results in process.execArgv:\n\n

    \n
    ['--harmony']
    \n

    and process.argv:\n\n

    \n
    ['/usr/local/bin/node', 'script.js', '--version']
    \n" - }, - { - "textRaw": "process.env", - "name": "env", - "desc": "

    An object containing the user environment. See environ(7).\n\n\n

    \n" - }, - { - "textRaw": "process.version", - "name": "version", - "desc": "

    A compiled-in property that exposes NODE_VERSION.\n\n

    \n
    console.log('Version: ' + process.version);
    \n" - }, - { - "textRaw": "process.versions", - "name": "versions", - "desc": "

    A property exposing version strings of node and its dependencies.\n\n

    \n
    console.log(process.versions);
    \n

    Will print something like:\n\n

    \n
    { http_parser: '1.0',\n  node: '0.10.4',\n  v8: '3.14.5.8',\n  ares: '1.9.0-DEV',\n  uv: '0.10.3',\n  zlib: '1.2.3',\n  modules: '11',\n  openssl: '1.0.1e' }
    \n" - }, - { - "textRaw": "process.config", - "name": "config", - "desc": "

    An Object containing the JavaScript representation of the configure options\nthat were used to compile the current node executable. This is the same as\nthe "config.gypi" file that was produced when running the ./configure script.\n\n

    \n

    An example of the possible output looks like:\n\n

    \n
    { target_defaults:\n   { cflags: [],\n     default_configuration: 'Release',\n     defines: [],\n     include_dirs: [],\n     libraries: [] },\n  variables:\n   { host_arch: 'x64',\n     node_install_npm: 'true',\n     node_prefix: '',\n     node_shared_cares: 'false',\n     node_shared_http_parser: 'false',\n     node_shared_libuv: 'false',\n     node_shared_v8: 'false',\n     node_shared_zlib: 'false',\n     node_use_dtrace: 'false',\n     node_use_openssl: 'true',\n     node_shared_openssl: 'false',\n     strict_aliasing: 'true',\n     target_arch: 'x64',\n     v8_use_snapshot: 'true' } }
    \n" - }, - { - "textRaw": "process.pid", - "name": "pid", - "desc": "

    The PID of the process.\n\n

    \n
    console.log('This process is pid ' + process.pid);
    \n" - }, - { - "textRaw": "process.title", - "name": "title", - "desc": "

    Getter/setter to set what is displayed in 'ps'.\n\n

    \n

    When used as a setter, the maximum length is platform-specific and probably\nshort.\n\n

    \n

    On Linux and OS X, it's limited to the size of the binary name plus the\nlength of the command line arguments because it overwrites the argv memory.\n\n

    \n

    v0.8 allowed for longer process title strings by also overwriting the environ\nmemory but that was potentially insecure/confusing in some (rather obscure)\ncases.\n\n\n

    \n" - }, - { - "textRaw": "process.arch", - "name": "arch", - "desc": "

    What processor architecture you're running on: 'arm', 'ia32', or 'x64'.\n\n

    \n
    console.log('This processor architecture is ' + process.arch);
    \n" - }, - { - "textRaw": "process.platform", - "name": "platform", - "desc": "

    What platform you're running on:\n'darwin', 'freebsd', 'linux', 'sunos' or 'win32'\n\n

    \n
    console.log('This platform is ' + process.platform);
    \n" - }, - { - "textRaw": "`maxTickDepth` {Number} Default = 1000 ", - "name": "maxTickDepth", - "desc": "

    Callbacks passed to process.nextTick will usually be called at the\nend of the current flow of execution, and are thus approximately as fast\nas calling a function synchronously. Left unchecked, this would starve\nthe event loop, preventing any I/O from occurring.\n\n

    \n

    Consider this code:\n\n

    \n
    process.nextTick(function foo() {\n  process.nextTick(foo);\n});
    \n

    In order to avoid the situation where Node is blocked by an infinite\nloop of recursive series of nextTick calls, it defers to allow some I/O\nto be done every so often.\n\n

    \n

    The process.maxTickDepth value is the maximum depth of\nnextTick-calling nextTick-callbacks that will be evaluated before\nallowing other forms of I/O to occur.\n\n

    \n", - "shortDesc": "Default = 1000" - } - ], - "methods": [ - { - "textRaw": "process.abort()", - "type": "method", - "name": "abort", - "desc": "

    This causes node to emit an abort. This will cause node to exit and\ngenerate a core file.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.chdir(directory)", - "type": "method", - "name": "chdir", - "desc": "

    Changes the current working directory of the process or throws an exception if that fails.\n\n

    \n
    console.log('Starting directory: ' + process.cwd());\ntry {\n  process.chdir('/tmp');\n  console.log('New directory: ' + process.cwd());\n}\ncatch (err) {\n  console.log('chdir: ' + err);\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "directory" - } - ] - } - ] - }, - { - "textRaw": "process.cwd()", - "type": "method", - "name": "cwd", - "desc": "

    Returns the current working directory of the process.\n\n

    \n
    console.log('Current directory: ' + process.cwd());
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.exit([code])", - "type": "method", - "name": "exit", - "desc": "

    Ends the process with the specified code. If omitted, exit uses the\n'success' code 0.\n\n

    \n

    To exit with a 'failure' code:\n\n

    \n
    process.exit(1);
    \n

    The shell that executed node should see the exit code as 1.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.getgid()", - "type": "method", - "name": "getgid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Gets the group identity of the process. (See getgid(2).)\nThis is the numerical group id, not the group name.\n\n

    \n
    if (process.getgid) {\n  console.log('Current gid: ' + process.getgid());\n}
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setgid(id)", - "type": "method", - "name": "setgid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the group identity of the process. (See setgid(2).) This accepts either\na numerical ID or a groupname string. If a groupname is specified, this method\nblocks while resolving it to a numerical ID.\n\n

    \n
    if (process.getgid && process.setgid) {\n  console.log('Current gid: ' + process.getgid());\n  try {\n    process.setgid(501);\n    console.log('New gid: ' + process.getgid());\n  }\n  catch (err) {\n    console.log('Failed to set gid: ' + err);\n  }\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "id" - } - ] - } - ] - }, - { - "textRaw": "process.getuid()", - "type": "method", - "name": "getuid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Gets the user identity of the process. (See getuid(2).)\nThis is the numerical userid, not the username.\n\n

    \n
    if (process.getuid) {\n  console.log('Current uid: ' + process.getuid());\n}
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setuid(id)", - "type": "method", - "name": "setuid", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the user identity of the process. (See setuid(2).) This accepts either\na numerical ID or a username string. If a username is specified, this method\nblocks while resolving it to a numerical ID.\n\n

    \n
    if (process.getuid && process.setuid) {\n  console.log('Current uid: ' + process.getuid());\n  try {\n    process.setuid(501);\n    console.log('New uid: ' + process.getuid());\n  }\n  catch (err) {\n    console.log('Failed to set uid: ' + err);\n  }\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "id" - } - ] - } - ] - }, - { - "textRaw": "process.getgroups()", - "type": "method", - "name": "getgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Returns an array with the supplementary group IDs. POSIX leaves it unspecified\nif the effective group ID is included but node.js ensures it always is.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.setgroups(groups)", - "type": "method", - "name": "setgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Sets the supplementary group IDs. This is a privileged operation, meaning you\nneed to be root or have the CAP_SETGID capability.\n\n

    \n

    The list can contain group IDs, group names or both.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "groups" - } - ] - } - ] - }, - { - "textRaw": "process.initgroups(user, extra_group)", - "type": "method", - "name": "initgroups", - "desc": "

    Note: this function is only available on POSIX platforms (i.e. not Windows)\n\n

    \n

    Reads /etc/group and initializes the group access list, using all groups of\nwhich the user is a member. This is a privileged operation, meaning you need\nto be root or have the CAP_SETGID capability.\n\n

    \n

    user is a user name or user ID. extra_group is a group name or group ID.\n\n

    \n

    Some care needs to be taken when dropping privileges. Example:\n\n

    \n
    console.log(process.getgroups());         // [ 0 ]\nprocess.initgroups('bnoordhuis', 1000);   // switch user\nconsole.log(process.getgroups());         // [ 27, 30, 46, 1000, 0 ]\nprocess.setgid(1000);                     // drop root gid\nconsole.log(process.getgroups());         // [ 27, 30, 46, 1000 ]
    \n", - "signatures": [ - { - "params": [ - { - "name": "user" - }, - { - "name": "extra_group" - } - ] - } - ] - }, - { - "textRaw": "process.kill(pid, [signal])", - "type": "method", - "name": "kill", - "desc": "

    Send a signal to a process. pid is the process id and signal is the\nstring describing the signal to send. Signal names are strings like\n'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'.\nSee kill(2) for more information.\n\n

    \n

    Note that just because the name of this function is process.kill, it is\nreally just a signal sender, like the kill system call. The signal sent\nmay do something other than kill the target process.\n\n

    \n

    Example of sending a signal to yourself:\n\n

    \n
    process.on('SIGHUP', function() {\n  console.log('Got SIGHUP signal.');\n});\n\nsetTimeout(function() {\n  console.log('Exiting.');\n  process.exit(0);\n}, 100);\n\nprocess.kill(process.pid, 'SIGHUP');
    \n

    Note: SIGUSR1 is reserved by node.js. It can be used to kickstart the\ndebugger.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "pid" - }, - { - "name": "signal", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.memoryUsage()", - "type": "method", - "name": "memoryUsage", - "desc": "

    Returns an object describing the memory usage of the Node process\nmeasured in bytes.\n\n

    \n
    var util = require('util');\n\nconsole.log(util.inspect(process.memoryUsage()));
    \n

    This will generate:\n\n

    \n
    { rss: 4935680,\n  heapTotal: 1826816,\n  heapUsed: 650472 }
    \n

    heapTotal and heapUsed refer to V8's memory usage.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.nextTick(callback)", - "type": "method", - "name": "nextTick", - "desc": "

    On the next loop around the event loop call this callback.\nThis is not a simple alias to setTimeout(fn, 0), it's much more\nefficient. It typically runs before any other I/O events fire, but there\nare some exceptions. See process.maxTickDepth below.\n\n

    \n
    process.nextTick(function() {\n  console.log('nextTick callback');\n});
    \n

    This is important in developing APIs where you want to give the user the\nchance to assign event handlers after an object has been constructed,\nbut before any I/O has occurred.\n\n

    \n
    function MyThing(options) {\n  this.setupOptions(options);\n\n  process.nextTick(function() {\n    this.startDoingStuff();\n  }.bind(this));\n}\n\nvar thing = new MyThing();\nthing.getReadyForStuff();\n\n// thing.startDoingStuff() gets called now, not before.
    \n

    It is very important for APIs to be either 100% synchronous or 100%\nasynchronous. Consider this example:\n\n

    \n
    // WARNING!  DO NOT USE!  BAD UNSAFE HAZARD!\nfunction maybeSync(arg, cb) {\n  if (arg) {\n    cb();\n    return;\n  }\n\n  fs.stat('file', cb);\n}
    \n

    This API is hazardous. If you do this:\n\n

    \n
    maybeSync(true, function() {\n  foo();\n});\nbar();
    \n

    then it's not clear whether foo() or bar() will be called first.\n\n

    \n

    This approach is much better:\n\n

    \n
    function definitelyAsync(arg, cb) {\n  if (arg) {\n    process.nextTick(cb);\n    return;\n  }\n\n  fs.stat('file', cb);\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "process.umask([mask])", - "type": "method", - "name": "umask", - "desc": "

    Sets or reads the process's file mode creation mask. Child processes inherit\nthe mask from the parent process. Returns the old mask if mask argument is\ngiven, otherwise returns the current mask.\n\n

    \n
    var oldmask, newmask = 0644;\n\noldmask = process.umask(newmask);\nconsole.log('Changed umask from: ' + oldmask.toString(8) +\n            ' to ' + newmask.toString(8));
    \n", - "signatures": [ - { - "params": [ - { - "name": "mask", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "process.uptime()", - "type": "method", - "name": "uptime", - "desc": "

    Number of seconds Node has been running.\n\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "process.hrtime()", - "type": "method", - "name": "hrtime", - "desc": "

    Returns the current high-resolution real time in a [seconds, nanoseconds]\ntuple Array. It is relative to an arbitrary time in the past. It is not\nrelated to the time of day and therefore not subject to clock drift. The\nprimary use is for measuring performance between intervals.\n\n

    \n

    You may pass in the result of a previous call to process.hrtime() to get\na diff reading, useful for benchmarks and measuring intervals:\n\n

    \n
    var time = process.hrtime();\n// [ 1800216, 25 ]\n\nsetTimeout(function() {\n  var diff = process.hrtime(time);\n  // [ 1, 552 ]\n\n  console.log('benchmark took %d nanoseconds', diff[0] * 1e9 + diff[1]);\n  // benchmark took 1000000527 nanoseconds\n}, 1000);
    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "vars": [ - { - "textRaw": "require()", - "type": "var", - "name": "require", - "desc": "

    To require modules. See the [Modules][] section. require isn't actually a\nglobal but rather local to each module.\n\n

    \n", - "methods": [ - { - "textRaw": "require.resolve()", - "type": "method", - "name": "resolve", - "desc": "

    Use the internal require() machinery to look up the location of a module,\nbut rather than loading the module, just return the resolved filename.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "properties": [ - { - "textRaw": "`cache` {Object} ", - "name": "cache", - "desc": "

    Modules are cached in this object when they are required. By deleting a key\nvalue from this object, the next require will reload the module.\n\n

    \n" - }, - { - "textRaw": "`extensions` {Object} ", - "name": "extensions", - "stability": 0, - "stabilityText": "Deprecated", - "desc": "

    Instruct require on how to handle certain file extensions.\n\n

    \n

    Process files with the extension .sjs as .js:\n\n

    \n
    require.extensions['.sjs'] = require.extensions['.js'];
    \n

    Deprecated In the past, this list has been used to load\nnon-JavaScript modules into Node by compiling them on-demand.\nHowever, in practice, there are much better ways to do this, such as\nloading modules via some other Node program, or compiling them to\nJavaScript ahead of time.\n\n

    \n

    Since the Module system is locked, this feature will probably never go\naway. However, it may have subtle bugs and complexities that are best\nleft untouched.\n\n

    \n" - } - ] - }, - { - "textRaw": "__filename", - "name": "__filename", - "type": "var", - "desc": "

    The filename of the code being executed. This is the resolved absolute path\nof this code file. For a main program this is not necessarily the same\nfilename used in the command line. The value inside a module is the path\nto that module file.\n\n

    \n

    Example: running node example.js from /Users/mjr\n\n

    \n
    console.log(__filename);\n// /Users/mjr/example.js
    \n

    __filename isn't actually a global but rather local to each module.\n\n

    \n" - }, - { - "textRaw": "__dirname", - "name": "__dirname", - "type": "var", - "desc": "

    The name of the directory that the currently executing script resides in.\n\n

    \n

    Example: running node example.js from /Users/mjr\n\n

    \n
    console.log(__dirname);\n// /Users/mjr
    \n

    __dirname isn't actually a global but rather local to each module.\n\n\n

    \n" - }, - { - "textRaw": "module", - "name": "module", - "type": "var", - "desc": "

    A reference to the current module. In particular\nmodule.exports is used for defining what a module exports and makes\navailable through require().\n\n

    \n

    module isn't actually a global but rather local to each module.\n\n

    \n

    See the [module system documentation][] for more information.\n\n

    \n" - }, - { - "textRaw": "exports", - "name": "exports", - "type": "var", - "desc": "

    A reference to the module.exports that is shorter to type.\nSee [module system documentation][] for details on when to use exports and\nwhen to use module.exports.\n\n

    \n

    exports isn't actually a global but rather local to each module.\n\n

    \n

    See the [module system documentation][] for more information.\n\n

    \n

    See the [module section][] for more information.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "setTimeout(cb, ms)", - "type": "method", - "name": "setTimeout", - "desc": "

    Run callback cb after at least ms milliseconds. The actual delay depends\non external factors like OS timer granularity and system load.\n\n

    \n

    The timeout must be in the range of 1-2,147,483,647 inclusive. If the value is\noutside that range, it's changed to 1 millisecond. Broadly speaking, a timer\ncannot span more than 24.8 days.\n\n

    \n

    Returns an opaque value that represents the timer.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "cb" - }, - { - "name": "ms" - } - ] - } - ] - }, - { - "textRaw": "clearTimeout(t)", - "type": "method", - "name": "clearTimeout", - "desc": "

    Stop a timer that was previously created with setTimeout(). The callback will\nnot execute.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "t" - } - ] - } - ] - }, - { - "textRaw": "setInterval(cb, ms)", - "type": "method", - "name": "setInterval", - "desc": "

    Run callback cb repeatedly every ms milliseconds. Note that the actual\ninterval may vary, depending on external factors like OS timer granularity and\nsystem load. It's never less than ms but it may be longer.\n\n

    \n

    The interval must be in the range of 1-2,147,483,647 inclusive. If the value is\noutside that range, it's changed to 1 millisecond. Broadly speaking, a timer\ncannot span more than 24.8 days.\n\n

    \n

    Returns an opaque value that represents the timer.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "cb" - }, - { - "name": "ms" - } - ] - } - ] - } - ], - "modules": [ - { - "textRaw": "Timers", - "name": "timers", - "stability": 5, - "stabilityText": "Locked", - "desc": "

    All of the timer functions are globals. You do not need to require()\nthis module in order to use them.\n\n

    \n", - "methods": [ - { - "textRaw": "setTimeout(callback, delay, [arg], [...])", - "type": "method", - "name": "setTimeout", - "desc": "

    To schedule execution of a one-time callback after delay milliseconds. Returns a\ntimeoutId for possible use with clearTimeout(). Optionally you can\nalso pass arguments to the callback.\n\n

    \n

    It is important to note that your callback will probably not be called in exactly\ndelay milliseconds - Node.js makes no guarantees about the exact timing of when\nthe callback will fire, nor of the ordering things will fire in. The callback will\nbe called as close as possible to the time specified.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - }, - { - "name": "delay" - }, - { - "name": "arg", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "clearTimeout(timeoutId)", - "type": "method", - "name": "clearTimeout", - "desc": "

    Prevents a timeout from triggering.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "timeoutId" - } - ] - } - ] - }, - { - "textRaw": "setInterval(callback, delay, [arg], [...])", - "type": "method", - "name": "setInterval", - "desc": "

    To schedule the repeated execution of callback every delay milliseconds.\nReturns a intervalId for possible use with clearInterval(). Optionally\nyou can also pass arguments to the callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - }, - { - "name": "delay" - }, - { - "name": "arg", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "clearInterval(intervalId)", - "type": "method", - "name": "clearInterval", - "desc": "

    Stops a interval from triggering.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "intervalId" - } - ] - } - ] - }, - { - "textRaw": "unref()", - "type": "method", - "name": "unref", - "desc": "

    The opaque value returned by setTimeout and setInterval also has the method\ntimer.unref() which will allow you to create a timer that is active but if\nit is the only item left in the event loop won't keep the program running.\nIf the timer is already unrefd calling unref again will have no effect.\n\n

    \n

    In the case of setTimeout when you unref you create a separate timer that\nwill wakeup the event loop, creating too many of these may adversely effect\nevent loop performance -- use wisely.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "ref()", - "type": "method", - "name": "ref", - "desc": "

    If you had previously unref()d a timer you can call ref() to explicitly\nrequest the timer hold the program open. If the timer is already refd calling\nref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "setImmediate(callback, [arg], [...])", - "type": "method", - "name": "setImmediate", - "desc": "

    To schedule the "immediate" execution of callback after I/O events\ncallbacks and before setTimeout and setInterval . Returns an\nimmediateId for possible use with clearImmediate(). Optionally you\ncan also pass arguments to the callback.\n\n

    \n

    Immediates are queued in the order created, and are popped off the queue once\nper loop iteration. This is different from process.nextTick which will\nexecute process.maxTickDepth queued callbacks per iteration. setImmediate\nwill yield to the event loop after firing a queued callback to make sure I/O is\nnot being starved. While order is preserved for execution, other I/O events may\nfire between any two scheduled immediate callbacks.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - }, - { - "name": "arg", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "clearImmediate(immediateId)", - "type": "method", - "name": "clearImmediate", - "desc": "

    Stops an immediate from triggering.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "immediateId" - } - ] - } - ] - } - ], - "type": "module", - "displayName": "Timers" - }, - { - "textRaw": "Modules", - "name": "module", - "stability": 5, - "stabilityText": "Locked", - "desc": "

    Node has a simple module loading system. In Node, files and modules are in\none-to-one correspondence. As an example, foo.js loads the module\ncircle.js in the same directory.\n\n

    \n

    The contents of foo.js:\n\n

    \n
    var circle = require('./circle.js');\nconsole.log( 'The area of a circle of radius 4 is '\n           + circle.area(4));
    \n

    The contents of circle.js:\n\n

    \n
    var PI = Math.PI;\n\nexports.area = function (r) {\n  return PI * r * r;\n};\n\nexports.circumference = function (r) {\n  return 2 * PI * r;\n};
    \n

    The module circle.js has exported the functions area() and\ncircumference(). To add functions and objects to the root of your module,\nyou can add them to the special exports object.\n\n

    \n

    Variables local to the module will be private, as though the module was wrapped\nin a function. In this example the variable PI is private to circle.js.\n\n

    \n

    If you want the root of your module's export to be a function (such as a\nconstructor) or if you want to export a complete object in one assignment\ninstead of building it one property at a time, assign it to module.exports\ninstead of exports.\n\n

    \n

    Below, bar.js makes use of the square module, which exports a constructor:\n\n

    \n
    var square = require('./square.js');\nvar mySquare = square(2);\nconsole.log('The area of my square is ' + mySquare.area());
    \n

    The square module is defined in square.js:\n\n

    \n
    // assigning to exports will not modify module, must use module.exports\nmodule.exports = function(width) {\n  return {\n    area: function() {\n      return width * width;\n    }\n  };\n}
    \n

    The module system is implemented in the require("module") module.\n\n

    \n", - "miscs": [ - { - "textRaw": "Cycles", - "name": "Cycles", - "type": "misc", - "desc": "

    When there are circular require() calls, a module might not be\ndone being executed when it is returned.\n\n

    \n

    Consider this situation:\n\n

    \n

    a.js:\n\n

    \n
    console.log('a starting');\nexports.done = false;\nvar b = require('./b.js');\nconsole.log('in a, b.done = %j', b.done);\nexports.done = true;\nconsole.log('a done');
    \n

    b.js:\n\n

    \n
    console.log('b starting');\nexports.done = false;\nvar a = require('./a.js');\nconsole.log('in b, a.done = %j', a.done);\nexports.done = true;\nconsole.log('b done');
    \n

    main.js:\n\n

    \n
    console.log('main starting');\nvar a = require('./a.js');\nvar b = require('./b.js');\nconsole.log('in main, a.done=%j, b.done=%j', a.done, b.done);
    \n

    When main.js loads a.js, then a.js in turn loads b.js. At that\npoint, b.js tries to load a.js. In order to prevent an infinite\nloop an unfinished copy of the a.js exports object is returned to the\nb.js module. b.js then finishes loading, and its exports object is\nprovided to the a.js module.\n\n

    \n

    By the time main.js has loaded both modules, they're both finished.\nThe output of this program would thus be:\n\n

    \n
    $ node main.js\nmain starting\na starting\nb starting\nin b, a.done = false\nb done\nin a, b.done = true\na done\nin main, a.done=true, b.done=true
    \n

    If you have cyclic module dependencies in your program, make sure to\nplan accordingly.\n\n

    \n" - }, - { - "textRaw": "Core Modules", - "name": "Core Modules", - "type": "misc", - "desc": "

    Node has several modules compiled into the binary. These modules are\ndescribed in greater detail elsewhere in this documentation.\n\n

    \n

    The core modules are defined in node's source in the lib/ folder.\n\n

    \n

    Core modules are always preferentially loaded if their identifier is\npassed to require(). For instance, require('http') will always\nreturn the built in HTTP module, even if there is a file by that name.\n\n

    \n" - }, - { - "textRaw": "File Modules", - "name": "File Modules", - "type": "misc", - "desc": "

    If the exact filename is not found, then node will attempt to load the\nrequired filename with the added extension of .js, .json, and then .node.\n\n

    \n

    .js files are interpreted as JavaScript text files, and .json files are\nparsed as JSON text files. .node files are interpreted as compiled addon\nmodules loaded with dlopen.\n\n

    \n

    A module prefixed with '/' is an absolute path to the file. For\nexample, require('/home/marco/foo.js') will load the file at\n/home/marco/foo.js.\n\n

    \n

    A module prefixed with './' is relative to the file calling require().\nThat is, circle.js must be in the same directory as foo.js for\nrequire('./circle') to find it.\n\n

    \n

    Without a leading '/' or './' to indicate a file, the module is either a\n"core module" or is loaded from a node_modules folder.\n\n

    \n

    If the given path does not exist, require() will throw an Error with its\ncode property set to 'MODULE_NOT_FOUND'.\n\n

    \n" - }, - { - "textRaw": "Loading from `node_modules` Folders", - "name": "Loading from `node_modules` Folders", - "type": "misc", - "desc": "

    If the module identifier passed to require() is not a native module,\nand does not begin with '/', '../', or './', then node starts at the\nparent directory of the current module, and adds /node_modules, and\nattempts to load the module from that location.\n\n

    \n

    If it is not found there, then it moves to the parent directory, and so\non, until the root of the tree is reached.\n\n

    \n

    For example, if the file at '/home/ry/projects/foo.js' called\nrequire('bar.js'), then node would look in the following locations, in\nthis order:\n\n

    \n
      \n
    • /home/ry/projects/node_modules/bar.js
    • \n
    • /home/ry/node_modules/bar.js
    • \n
    • /home/node_modules/bar.js
    • \n
    • /node_modules/bar.js
    • \n
    \n

    This allows programs to localize their dependencies, so that they do not\nclash.\n\n

    \n" - }, - { - "textRaw": "Folders as Modules", - "name": "Folders as Modules", - "type": "misc", - "desc": "

    It is convenient to organize programs and libraries into self-contained\ndirectories, and then provide a single entry point to that library.\nThere are three ways in which a folder may be passed to require() as\nan argument.\n\n

    \n

    The first is to create a package.json file in the root of the folder,\nwhich specifies a main module. An example package.json file might\nlook like this:\n\n

    \n
    { "name" : "some-library",\n  "main" : "./lib/some-library.js" }
    \n

    If this was in a folder at ./some-library, then\nrequire('./some-library') would attempt to load\n./some-library/lib/some-library.js.\n\n

    \n

    This is the extent of Node's awareness of package.json files.\n\n

    \n

    If there is no package.json file present in the directory, then node\nwill attempt to load an index.js or index.node file out of that\ndirectory. For example, if there was no package.json file in the above\nexample, then require('./some-library') would attempt to load:\n\n

    \n
      \n
    • ./some-library/index.js
    • \n
    • ./some-library/index.node
    • \n
    \n" - }, - { - "textRaw": "Caching", - "name": "Caching", - "type": "misc", - "desc": "

    Modules are cached after the first time they are loaded. This means\n(among other things) that every call to require('foo') will get\nexactly the same object returned, if it would resolve to the same file.\n\n

    \n

    Multiple calls to require('foo') may not cause the module code to be\nexecuted multiple times. This is an important feature. With it,\n"partially done" objects can be returned, thus allowing transitive\ndependencies to be loaded even when they would cause cycles.\n\n

    \n

    If you want to have a module execute code multiple times, then export a\nfunction, and call that function.\n\n

    \n", - "miscs": [ - { - "textRaw": "Module Caching Caveats", - "name": "Module Caching Caveats", - "type": "misc", - "desc": "

    Modules are cached based on their resolved filename. Since modules may\nresolve to a different filename based on the location of the calling\nmodule (loading from node_modules folders), it is not a guarantee\nthat require('foo') will always return the exact same object, if it\nwould resolve to different files.\n\n

    \n" - } - ] - }, - { - "textRaw": "All Together...", - "name": "All Together...", - "type": "misc", - "desc": "

    To get the exact filename that will be loaded when require() is called, use\nthe require.resolve() function.\n\n

    \n

    Putting together all of the above, here is the high-level algorithm\nin pseudocode of what require.resolve does:\n\n

    \n
    require(X) from module at path Y\n1. If X is a core module,\n   a. return the core module\n   b. STOP\n2. If X begins with './' or '/' or '../'\n   a. LOAD_AS_FILE(Y + X)\n   b. LOAD_AS_DIRECTORY(Y + X)\n3. LOAD_NODE_MODULES(X, dirname(Y))\n4. THROW "not found"\n\nLOAD_AS_FILE(X)\n1. If X is a file, load X as JavaScript text.  STOP\n2. If X.js is a file, load X.js as JavaScript text.  STOP\n3. If X.node is a file, load X.node as binary addon.  STOP\n\nLOAD_AS_DIRECTORY(X)\n1. If X/package.json is a file,\n   a. Parse X/package.json, and look for "main" field.\n   b. let M = X + (json main field)\n   c. LOAD_AS_FILE(M)\n2. If X/index.js is a file, load X/index.js as JavaScript text.  STOP\n3. If X/index.node is a file, load X/index.node as binary addon.  STOP\n\nLOAD_NODE_MODULES(X, START)\n1. let DIRS=NODE_MODULES_PATHS(START)\n2. for each DIR in DIRS:\n   a. LOAD_AS_FILE(DIR/X)\n   b. LOAD_AS_DIRECTORY(DIR/X)\n\nNODE_MODULES_PATHS(START)\n1. let PARTS = path split(START)\n2. let ROOT = index of first instance of "node_modules" in PARTS, or 0\n3. let I = count of PARTS - 1\n4. let DIRS = []\n5. while I > ROOT,\n   a. if PARTS[I] = "node_modules" CONTINUE\n   c. DIR = path join(PARTS[0 .. I] + "node_modules")\n   b. DIRS = DIRS + DIR\n   c. let I = I - 1\n6. return DIRS
    \n" - }, - { - "textRaw": "Loading from the global folders", - "name": "Loading from the global folders", - "type": "misc", - "desc": "

    If the NODE_PATH environment variable is set to a colon-delimited list\nof absolute paths, then node will search those paths for modules if they\nare not found elsewhere. (Note: On Windows, NODE_PATH is delimited by\nsemicolons instead of colons.)\n\n

    \n

    Additionally, node will search in the following locations:\n\n

    \n
      \n
    • 1: $HOME/.node_modules
    • \n
    • 2: $HOME/.node_libraries
    • \n
    • 3: $PREFIX/lib/node
    • \n
    \n

    Where $HOME is the user's home directory, and $PREFIX is node's\nconfigured node_prefix.\n\n

    \n

    These are mostly for historic reasons. You are highly encouraged to\nplace your dependencies locally in node_modules folders. They will be\nloaded faster, and more reliably.\n\n

    \n" - }, - { - "textRaw": "Accessing the main module", - "name": "Accessing the main module", - "type": "misc", - "desc": "

    When a file is run directly from Node, require.main is set to its\nmodule. That means that you can determine whether a file has been run\ndirectly by testing\n\n

    \n
    require.main === module
    \n

    For a file foo.js, this will be true if run via node foo.js, but\nfalse if run by require('./foo').\n\n

    \n

    Because module provides a filename property (normally equivalent to\n__filename), the entry point of the current application can be obtained\nby checking require.main.filename.\n\n

    \n" - }, - { - "textRaw": "Addenda: Package Manager Tips", - "name": "Addenda: Package Manager Tips", - "type": "misc", - "desc": "

    The semantics of Node's require() function were designed to be general\nenough to support a number of sane directory structures. Package manager\nprograms such as dpkg, rpm, and npm will hopefully find it possible to\nbuild native packages from Node modules without modification.\n\n

    \n

    Below we give a suggested directory structure that could work:\n\n

    \n

    Let's say that we wanted to have the folder at\n/usr/lib/node/<some-package>/<some-version> hold the contents of a\nspecific version of a package.\n\n

    \n

    Packages can depend on one another. In order to install package foo, you\nmay have to install a specific version of package bar. The bar package\nmay itself have dependencies, and in some cases, these dependencies may even\ncollide or form cycles.\n\n

    \n

    Since Node looks up the realpath of any modules it loads (that is,\nresolves symlinks), and then looks for their dependencies in the\nnode_modules folders as described above, this situation is very simple to\nresolve with the following architecture:\n\n

    \n
      \n
    • /usr/lib/node/foo/1.2.3/ - Contents of the foo package, version 1.2.3.
    • \n
    • /usr/lib/node/bar/4.3.2/ - Contents of the bar package that foo\ndepends on.
    • \n
    • /usr/lib/node/foo/1.2.3/node_modules/bar - Symbolic link to\n/usr/lib/node/bar/4.3.2/.
    • \n
    • /usr/lib/node/bar/4.3.2/node_modules/* - Symbolic links to the packages\nthat bar depends on.
    • \n
    \n

    Thus, even if a cycle is encountered, or if there are dependency\nconflicts, every module will be able to get a version of its dependency\nthat it can use.\n\n

    \n

    When the code in the foo package does require('bar'), it will get the\nversion that is symlinked into /usr/lib/node/foo/1.2.3/node_modules/bar.\nThen, when the code in the bar package calls require('quux'), it'll get\nthe version that is symlinked into\n/usr/lib/node/bar/4.3.2/node_modules/quux.\n\n

    \n

    Furthermore, to make the module lookup process even more optimal, rather\nthan putting packages directly in /usr/lib/node, we could put them in\n/usr/lib/node_modules/<name>/<version>. Then node will not bother\nlooking for missing dependencies in /usr/node_modules or /node_modules.\n\n

    \n

    In order to make modules available to the node REPL, it might be useful to\nalso add the /usr/lib/node_modules folder to the $NODE_PATH environment\nvariable. Since the module lookups using node_modules folders are all\nrelative, and based on the real path of the files making the calls to\nrequire(), the packages themselves can be anywhere.\n\n

    \n" - } - ], - "vars": [ - { - "textRaw": "The `module` Object", - "name": "module", - "type": "var", - "desc": "

    In each module, the module free variable is a reference to the object\nrepresenting the current module. For convenience, module.exports is\nalso accessible via the exports module-global. module isn't actually\na global but rather local to each module.\n\n

    \n", - "properties": [ - { - "textRaw": "`exports` {Object} ", - "name": "exports", - "desc": "

    The module.exports object is created by the Module system. Sometimes this is not\nacceptable; many want their module to be an instance of some class. To do this\nassign the desired export object to module.exports. Note that assigning the\ndesired object to exports will simply rebind the local exports variable,\nwhich is probably not what you want to do.\n\n

    \n

    For example suppose we were making a module called a.js\n\n

    \n
    var EventEmitter = require('events').EventEmitter;\n\nmodule.exports = new EventEmitter();\n\n// Do some work, and after some time emit\n// the 'ready' event from the module itself.\nsetTimeout(function() {\n  module.exports.emit('ready');\n}, 1000);
    \n

    Then in another file we could do\n\n

    \n
    var a = require('./a');\na.on('ready', function() {\n  console.log('module a is ready');\n});
    \n

    Note that assignment to module.exports must be done immediately. It cannot be\ndone in any callbacks. This does not work:\n\n

    \n

    x.js:\n\n

    \n
    setTimeout(function() {\n  module.exports = { a: "hello" };\n}, 0);
    \n

    y.js:\n\n

    \n
    var x = require('./x');\nconsole.log(x.a);
    \n", - "modules": [ - { - "textRaw": "exports alias", - "name": "exports_alias", - "desc": "

    The exports variable that is available within a module starts as a reference\nto module.exports. As with any variable, if you assign a new value to it, it\nis no longer bound to the previous value.\n\n

    \n

    To illustrate the behaviour, imagine this hypothetical implementation of\nrequire():\n\n

    \n
    function require(...) {\n  // ...\n  function (module, exports) {\n    // Your module code here\n    exports = some_func;        // re-assigns exports, exports is no longer\n                                // a shortcut, and nothing is exported.\n    module.exports = some_func; // makes your module export 0\n  } (module, module.exports);\n  return module;\n}
    \n

    As a guideline, if the relationship between exports and module.exports\nseems like magic to you, ignore exports and only use module.exports.\n\n

    \n", - "type": "module", - "displayName": "exports alias" - } - ] - }, - { - "textRaw": "`id` {String} ", - "name": "id", - "desc": "

    The identifier for the module. Typically this is the fully resolved\nfilename.\n\n\n

    \n" - }, - { - "textRaw": "`filename` {String} ", - "name": "filename", - "desc": "

    The fully resolved filename to the module.\n\n\n

    \n" - }, - { - "textRaw": "`loaded` {Boolean} ", - "name": "loaded", - "desc": "

    Whether or not the module is done loading, or is in the process of\nloading.\n\n\n

    \n" - }, - { - "textRaw": "`parent` {Module Object} ", - "name": "parent", - "desc": "

    The module that required this one.\n\n\n

    \n" - }, - { - "textRaw": "`children` {Array} ", - "name": "children", - "desc": "

    The module objects required by this one.\n\n\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "module.require(id)", - "type": "method", - "name": "require", - "signatures": [ - { - "return": { - "textRaw": "Return: {Object} `module.exports` from the resolved module ", - "name": "return", - "type": "Object", - "desc": "`module.exports` from the resolved module" - }, - "params": [ - { - "textRaw": "`id` {String} ", - "name": "id", - "type": "String" - } - ] - }, - { - "params": [ - { - "name": "id" - } - ] - } - ], - "desc": "

    The module.require method provides a way to load a module as if\nrequire() was called from the original module.\n\n

    \n

    Note that in order to do this, you must get a reference to the module\nobject. Since require() returns the module.exports, and the module is\ntypically only available within a specific module's code, it must be\nexplicitly exported in order to be used.\n\n\n

    \n" - } - ] - } - ], - "type": "module", - "displayName": "module" - }, - { - "textRaw": "Addons", - "name": "addons", - "desc": "

    Addons are dynamically linked shared objects. They can provide glue to C and\nC++ libraries. The API (at the moment) is rather complex, involving\nknowledge of several libraries:\n\n

    \n
      \n
    • V8 JavaScript, a C++ library. Used for interfacing with JavaScript:\ncreating objects, calling functions, etc. Documented mostly in the\nv8.h header file (deps/v8/include/v8.h in the Node source\ntree), which is also available\nonline.

      \n
    • \n
    • libuv, C event loop library.\nAnytime one needs to wait for a file descriptor to become readable,\nwait for a timer, or wait for a signal to be received one will need\nto interface with libuv. That is, if you perform any I/O, libuv will\nneed to be used.

      \n
    • \n
    • Internal Node libraries. Most importantly is the node::ObjectWrap\nclass which you will likely want to derive from.

      \n
    • \n
    • Others. Look in deps/ for what else is available.

      \n
    • \n
    \n

    Node statically compiles all its dependencies into the executable.\nWhen compiling your module, you don't need to worry about linking to\nany of these libraries.\n\n

    \n

    All of the following examples are available for\ndownload and may be\nused as a starting-point for your own Addon.\n\n

    \n", - "modules": [ - { - "textRaw": "Hello world", - "name": "hello_world", - "desc": "

    To get started let's make a small Addon which is the C++ equivalent of\nthe following JavaScript code:\n\n

    \n
    module.exports.hello = function() { return 'world'; };
    \n

    First we create a file hello.cc:\n\n

    \n
    #include <node.h>\n#include <v8.h>\n\nusing namespace v8;\n\nHandle<Value> Method(const Arguments& args) {\n  HandleScope scope;\n  return scope.Close(String::New("world"));\n}\n\nvoid init(Handle<Object> exports) {\n  exports->Set(String::NewSymbol("hello"),\n      FunctionTemplate::New(Method)->GetFunction());\n}\n\nNODE_MODULE(hello, init)
    \n

    Note that all Node addons must export an initialization function:\n\n

    \n
    void Initialize (Handle<Object> exports);\nNODE_MODULE(module_name, Initialize)
    \n

    There is no semi-colon after NODE_MODULE as it's not a function (see node.h).\n\n

    \n

    The module_name needs to match the filename of the final binary (minus the\n.node suffix).\n\n

    \n

    The source code needs to be built into hello.node, the binary Addon. To\ndo this we create a file called binding.gyp which describes the configuration\nto build your module in a JSON-like format. This file gets compiled by\nnode-gyp.\n\n

    \n
    {\n  "targets": [\n    {\n      "target_name": "hello",\n      "sources": [ "hello.cc" ]\n    }\n  ]\n}
    \n

    The next step is to generate the appropriate project build files for the\ncurrent platform. Use node-gyp configure for that.\n\n

    \n

    Now you will have either a Makefile (on Unix platforms) or a vcxproj file\n(on Windows) in the build/ directory. Next invoke the node-gyp build\ncommand.\n\n

    \n

    Now you have your compiled .node bindings file! The compiled bindings end up\nin build/Release/.\n\n

    \n

    You can now use the binary addon in a Node project hello.js by pointing require to\nthe recently built hello.node module:\n\n

    \n
    var addon = require('./build/Release/hello');\n\nconsole.log(addon.hello()); // 'world'
    \n

    Please see patterns below for further information or\n

    \n

    https://github.com/arturadib/node-qt for an example in production.\n\n\n

    \n", - "type": "module", - "displayName": "Hello world" - }, - { - "textRaw": "Addon patterns", - "name": "addon_patterns", - "desc": "

    Below are some addon patterns to help you get started. Consult the online\nv8 reference for help with the various v8\ncalls, and v8's Embedder's Guide\nfor an explanation of several concepts used such as handles, scopes,\nfunction templates, etc.\n\n

    \n

    In order to use these examples you need to compile them using node-gyp.\nCreate the following binding.gyp file:\n\n

    \n
    {\n  "targets": [\n    {\n      "target_name": "addon",\n      "sources": [ "addon.cc" ]\n    }\n  ]\n}
    \n

    In cases where there is more than one .cc file, simply add the file name to the\nsources array, e.g.:\n\n

    \n
    "sources": ["addon.cc", "myexample.cc"]
    \n

    Now that you have your binding.gyp ready, you can configure and build the\naddon:\n\n

    \n
    $ node-gyp configure build
    \n", - "modules": [ - { - "textRaw": "Function arguments", - "name": "function_arguments", - "desc": "

    The following pattern illustrates how to read arguments from JavaScript\nfunction calls and return a result. This is the main and only needed source\naddon.cc:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n\nusing namespace v8;\n\nHandle<Value> Add(const Arguments& args) {\n  HandleScope scope;\n\n  if (args.Length() < 2) {\n    ThrowException(Exception::TypeError(String::New("Wrong number of arguments")));\n    return scope.Close(Undefined());\n  }\n\n  if (!args[0]->IsNumber() || !args[1]->IsNumber()) {\n    ThrowException(Exception::TypeError(String::New("Wrong arguments")));\n    return scope.Close(Undefined());\n  }\n\n  Local<Number> num = Number::New(args[0]->NumberValue() +\n      args[1]->NumberValue());\n  return scope.Close(num);\n}\n\nvoid Init(Handle<Object> exports) {\n  exports->Set(String::NewSymbol("add"),\n      FunctionTemplate::New(Add)->GetFunction());\n}\n\nNODE_MODULE(addon, Init)
    \n

    You can test it with the following JavaScript snippet:\n\n

    \n
    var addon = require('./build/Release/addon');\n\nconsole.log( 'This should be eight:', addon.add(3,5) );
    \n", - "type": "module", - "displayName": "Function arguments" - }, - { - "textRaw": "Callbacks", - "name": "callbacks", - "desc": "

    You can pass JavaScript functions to a C++ function and execute them from\nthere. Here's addon.cc:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n\nusing namespace v8;\n\nHandle<Value> RunCallback(const Arguments& args) {\n  HandleScope scope;\n\n  Local<Function> cb = Local<Function>::Cast(args[0]);\n  const unsigned argc = 1;\n  Local<Value> argv[argc] = { Local<Value>::New(String::New("hello world")) };\n  cb->Call(Context::GetCurrent()->Global(), argc, argv);\n\n  return scope.Close(Undefined());\n}\n\nvoid Init(Handle<Object> exports, Handle<Object> module) {\n  module->Set(String::NewSymbol("exports"),\n      FunctionTemplate::New(RunCallback)->GetFunction());\n}\n\nNODE_MODULE(addon, Init)
    \n

    Note that this example uses a two-argument form of Init() that receives\nthe full module object as the second argument. This allows the addon\nto completely overwrite exports with a single function instead of\nadding the function as a property of exports.\n\n

    \n

    To test it run the following JavaScript snippet:\n\n

    \n
    var addon = require('./build/Release/addon');\n\naddon(function(msg){\n  console.log(msg); // 'hello world'\n});
    \n", - "type": "module", - "displayName": "Callbacks" - }, - { - "textRaw": "Object factory", - "name": "object_factory", - "desc": "

    You can create and return new objects from within a C++ function with this\naddon.cc pattern, which returns an object with property msg that echoes\nthe string passed to createObject():\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n\nusing namespace v8;\n\nHandle<Value> CreateObject(const Arguments& args) {\n  HandleScope scope;\n\n  Local<Object> obj = Object::New();\n  obj->Set(String::NewSymbol("msg"), args[0]->ToString());\n\n  return scope.Close(obj);\n}\n\nvoid Init(Handle<Object> exports, Handle<Object> module) {\n  module->Set(String::NewSymbol("exports"),\n      FunctionTemplate::New(CreateObject)->GetFunction());\n}\n\nNODE_MODULE(addon, Init)
    \n

    To test it in JavaScript:\n\n

    \n
    var addon = require('./build/Release/addon');\n\nvar obj1 = addon('hello');\nvar obj2 = addon('world');\nconsole.log(obj1.msg+' '+obj2.msg); // 'hello world'
    \n", - "type": "module", - "displayName": "Object factory" - }, - { - "textRaw": "Function factory", - "name": "function_factory", - "desc": "

    This pattern illustrates how to create and return a JavaScript function that\nwraps a C++ function:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n\nusing namespace v8;\n\nHandle<Value> MyFunction(const Arguments& args) {\n  HandleScope scope;\n  return scope.Close(String::New("hello world"));\n}\n\nHandle<Value> CreateFunction(const Arguments& args) {\n  HandleScope scope;\n\n  Local<FunctionTemplate> tpl = FunctionTemplate::New(MyFunction);\n  Local<Function> fn = tpl->GetFunction();\n  fn->SetName(String::NewSymbol("theFunction")); // omit this to make it anonymous\n\n  return scope.Close(fn);\n}\n\nvoid Init(Handle<Object> exports, Handle<Object> module) {\n  module->Set(String::NewSymbol("exports"),\n      FunctionTemplate::New(CreateFunction)->GetFunction());\n}\n\nNODE_MODULE(addon, Init)
    \n

    To test:\n\n

    \n
    var addon = require('./build/Release/addon');\n\nvar fn = addon();\nconsole.log(fn()); // 'hello world'
    \n", - "type": "module", - "displayName": "Function factory" - }, - { - "textRaw": "Wrapping C++ objects", - "name": "wrapping_c++_objects", - "desc": "

    Here we will create a wrapper for a C++ object/class MyObject that can be\ninstantiated in JavaScript through the new operator. First prepare the main\nmodule addon.cc:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nvoid InitAll(Handle<Object> exports) {\n  MyObject::Init(exports);\n}\n\nNODE_MODULE(addon, InitAll)
    \n

    Then in myobject.h make your wrapper inherit from node::ObjectWrap:\n\n

    \n
    #ifndef MYOBJECT_H\n#define MYOBJECT_H\n\n#include <node.h>\n\nclass MyObject : public node::ObjectWrap {\n public:\n  static void Init(v8::Handle<v8::Object> exports);\n\n private:\n  explicit MyObject(double value = 0);\n  ~MyObject();\n\n  static v8::Handle<v8::Value> New(const v8::Arguments& args);\n  static v8::Handle<v8::Value> PlusOne(const v8::Arguments& args);\n  static v8::Persistent<v8::Function> constructor;\n  double value_;\n};\n\n#endif
    \n

    And in myobject.cc implement the various methods that you want to expose.\nHere we expose the method plusOne by adding it to the constructor's\nprototype:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nPersistent<Function> MyObject::constructor;\n\nMyObject::MyObject(double value) : value_(value) {\n}\n\nMyObject::~MyObject() {\n}\n\nvoid MyObject::Init(Handle<Object> exports) {\n  // Prepare constructor template\n  Local<FunctionTemplate> tpl = FunctionTemplate::New(New);\n  tpl->SetClassName(String::NewSymbol("MyObject"));\n  tpl->InstanceTemplate()->SetInternalFieldCount(1);\n  // Prototype\n  tpl->PrototypeTemplate()->Set(String::NewSymbol("plusOne"),\n      FunctionTemplate::New(PlusOne)->GetFunction());\n  constructor = Persistent<Function>::New(tpl->GetFunction());\n  exports->Set(String::NewSymbol("MyObject"), constructor);\n}\n\nHandle<Value> MyObject::New(const Arguments& args) {\n  HandleScope scope;\n\n  if (args.IsConstructCall()) {\n    // Invoked as constructor: `new MyObject(...)`\n    double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue();\n    MyObject* obj = new MyObject(value);\n    obj->Wrap(args.This());\n    return args.This();\n  } else {\n    // Invoked as plain function `MyObject(...)`, turn into construct call.\n    const int argc = 1;\n    Local<Value> argv[argc] = { args[0] };\n    return scope.Close(constructor->NewInstance(argc, argv));\n  }\n}\n\nHandle<Value> MyObject::PlusOne(const Arguments& args) {\n  HandleScope scope;\n\n  MyObject* obj = ObjectWrap::Unwrap<MyObject>(args.This());\n  obj->value_ += 1;\n\n  return scope.Close(Number::New(obj->value_));\n}
    \n

    Test it with:\n\n

    \n
    var addon = require('./build/Release/addon');\n\nvar obj = new addon.MyObject(10);\nconsole.log( obj.plusOne() ); // 11\nconsole.log( obj.plusOne() ); // 12\nconsole.log( obj.plusOne() ); // 13
    \n", - "type": "module", - "displayName": "Wrapping C++ objects" - }, - { - "textRaw": "Factory of wrapped objects", - "name": "factory_of_wrapped_objects", - "desc": "

    This is useful when you want to be able to create native objects without\nexplicitly instantiating them with the new operator in JavaScript, e.g.\n\n

    \n
    var obj = addon.createObject();\n// instead of:\n// var obj = new addon.Object();
    \n

    Let's register our createObject method in addon.cc:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nHandle<Value> CreateObject(const Arguments& args) {\n  HandleScope scope;\n  return scope.Close(MyObject::NewInstance(args));\n}\n\nvoid InitAll(Handle<Object> exports, Handle<Object> module) {\n  MyObject::Init();\n\n  module->Set(String::NewSymbol("exports"),\n      FunctionTemplate::New(CreateObject)->GetFunction());\n}\n\nNODE_MODULE(addon, InitAll)
    \n

    In myobject.h we now introduce the static method NewInstance that takes\ncare of instantiating the object (i.e. it does the job of new in JavaScript):\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#ifndef MYOBJECT_H\n#define MYOBJECT_H\n\n#include <node.h>\n\nclass MyObject : public node::ObjectWrap {\n public:\n  static void Init();\n  static v8::Handle<v8::Value> NewInstance(const v8::Arguments& args);\n\n private:\n  explicit MyObject(double value = 0);\n  ~MyObject();\n\n  static v8::Handle<v8::Value> New(const v8::Arguments& args);\n  static v8::Handle<v8::Value> PlusOne(const v8::Arguments& args);\n  static v8::Persistent<v8::Function> constructor;\n  double value_;\n};\n\n#endif
    \n

    The implementation is similar to the above in myobject.cc:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nPersistent<Function> MyObject::constructor;\n\nMyObject::MyObject(double value) : value_(value) {\n}\n\nMyObject::~MyObject() {\n}\n\nvoid MyObject::Init() {\n  // Prepare constructor template\n  Local<FunctionTemplate> tpl = FunctionTemplate::New(New);\n  tpl->SetClassName(String::NewSymbol("MyObject"));\n  tpl->InstanceTemplate()->SetInternalFieldCount(1);\n  // Prototype\n  tpl->PrototypeTemplate()->Set(String::NewSymbol("plusOne"),\n      FunctionTemplate::New(PlusOne)->GetFunction());\n  constructor = Persistent<Function>::New(tpl->GetFunction());\n}\n\nHandle<Value> MyObject::New(const Arguments& args) {\n  HandleScope scope;\n\n  if (args.IsConstructCall()) {\n    // Invoked as constructor: `new MyObject(...)`\n    double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue();\n    MyObject* obj = new MyObject(value);\n    obj->Wrap(args.This());\n    return args.This();\n  } else {\n    // Invoked as plain function `MyObject(...)`, turn into construct call.\n    const int argc = 1;\n    Local<Value> argv[argc] = { args[0] };\n    return scope.Close(constructor->NewInstance(argc, argv));\n  }\n}\n\nHandle<Value> MyObject::NewInstance(const Arguments& args) {\n  HandleScope scope;\n\n  const unsigned argc = 1;\n  Handle<Value> argv[argc] = { args[0] };\n  Local<Object> instance = constructor->NewInstance(argc, argv);\n\n  return scope.Close(instance);\n}\n\nHandle<Value> MyObject::PlusOne(const Arguments& args) {\n  HandleScope scope;\n\n  MyObject* obj = ObjectWrap::Unwrap<MyObject>(args.This());\n  obj->value_ += 1;\n\n  return scope.Close(Number::New(obj->value_));\n}
    \n

    Test it with:\n\n

    \n
    var createObject = require('./build/Release/addon');\n\nvar obj = createObject(10);\nconsole.log( obj.plusOne() ); // 11\nconsole.log( obj.plusOne() ); // 12\nconsole.log( obj.plusOne() ); // 13\n\nvar obj2 = createObject(20);\nconsole.log( obj2.plusOne() ); // 21\nconsole.log( obj2.plusOne() ); // 22\nconsole.log( obj2.plusOne() ); // 23
    \n", - "type": "module", - "displayName": "Factory of wrapped objects" - }, - { - "textRaw": "Passing wrapped objects around", - "name": "passing_wrapped_objects_around", - "desc": "

    In addition to wrapping and returning C++ objects, you can pass them around\nby unwrapping them with Node's node::ObjectWrap::Unwrap helper function.\nIn the following addon.cc we introduce a function add() that can take on two\nMyObject objects:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nHandle<Value> CreateObject(const Arguments& args) {\n  HandleScope scope;\n  return scope.Close(MyObject::NewInstance(args));\n}\n\nHandle<Value> Add(const Arguments& args) {\n  HandleScope scope;\n\n  MyObject* obj1 = node::ObjectWrap::Unwrap<MyObject>(\n      args[0]->ToObject());\n  MyObject* obj2 = node::ObjectWrap::Unwrap<MyObject>(\n      args[1]->ToObject());\n\n  double sum = obj1->Value() + obj2->Value();\n  return scope.Close(Number::New(sum));\n}\n\nvoid InitAll(Handle<Object> exports) {\n  MyObject::Init();\n\n  exports->Set(String::NewSymbol("createObject"),\n      FunctionTemplate::New(CreateObject)->GetFunction());\n\n  exports->Set(String::NewSymbol("add"),\n      FunctionTemplate::New(Add)->GetFunction());\n}\n\nNODE_MODULE(addon, InitAll)
    \n

    To make things interesting we introduce a public method in myobject.h so we\ncan probe private values after unwrapping the object:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#ifndef MYOBJECT_H\n#define MYOBJECT_H\n\n#include <node.h>\n\nclass MyObject : public node::ObjectWrap {\n public:\n  static void Init();\n  static v8::Handle<v8::Value> NewInstance(const v8::Arguments& args);\n  double Value() const { return value_; }\n\n private:\n  explicit MyObject(double value = 0);\n  ~MyObject();\n\n  static v8::Handle<v8::Value> New(const v8::Arguments& args);\n  static v8::Persistent<v8::Function> constructor;\n  double value_;\n};\n\n#endif
    \n

    The implementation of myobject.cc is similar as before:\n\n

    \n
    #define BUILDING_NODE_EXTENSION\n#include <node.h>\n#include "myobject.h"\n\nusing namespace v8;\n\nPersistent<Function> MyObject::constructor;\n\nMyObject::MyObject(double value) : value_(value) {\n}\n\nMyObject::~MyObject() {\n}\n\nvoid MyObject::Init() {\n  // Prepare constructor template\n  Local<FunctionTemplate> tpl = FunctionTemplate::New(New);\n  tpl->SetClassName(String::NewSymbol("MyObject"));\n  tpl->InstanceTemplate()->SetInternalFieldCount(1);\n  constructor = Persistent<Function>::New(tpl->GetFunction());\n}\n\nHandle<Value> MyObject::New(const Arguments& args) {\n  HandleScope scope;\n\n  if (args.IsConstructCall()) {\n    // Invoked as constructor: `new MyObject(...)`\n    double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue();\n    MyObject* obj = new MyObject(value);\n    obj->Wrap(args.This());\n    return args.This();\n  } else {\n    // Invoked as plain function `MyObject(...)`, turn into construct call.\n    const int argc = 1;\n    Local<Value> argv[argc] = { args[0] };\n    return scope.Close(constructor->NewInstance(argc, argv));\n  }\n}\n\nHandle<Value> MyObject::NewInstance(const Arguments& args) {\n  HandleScope scope;\n\n  const unsigned argc = 1;\n  Handle<Value> argv[argc] = { args[0] };\n  Local<Object> instance = constructor->NewInstance(argc, argv);\n\n  return scope.Close(instance);\n}
    \n

    Test it with:\n\n

    \n
    var addon = require('./build/Release/addon');\n\nvar obj1 = addon.createObject(10);\nvar obj2 = addon.createObject(20);\nvar result = addon.add(obj1, obj2);\n\nconsole.log(result); // 30
    \n", - "type": "module", - "displayName": "Passing wrapped objects around" - } - ], - "type": "module", - "displayName": "Addon patterns" - } - ], - "type": "module", - "displayName": "Addons" - }, - { - "textRaw": "util", - "name": "util", - "stability": 4, - "stabilityText": "API Frozen", - "desc": "

    These functions are in the module 'util'. Use require('util') to access\nthem.\n\n\n

    \n", - "methods": [ - { - "textRaw": "util.format(format, [...])", - "type": "method", - "name": "format", - "desc": "

    Returns a formatted string using the first argument as a printf-like format.\n\n

    \n

    The first argument is a string that contains zero or more placeholders.\nEach placeholder is replaced with the converted value from its corresponding\nargument. Supported placeholders are:\n\n

    \n
      \n
    • %s - String.
    • \n
    • %d - Number (both integer and float).
    • \n
    • %j - JSON.
    • \n
    • % - single percent sign ('%'). This does not consume an argument.
    • \n
    \n

    If the placeholder does not have a corresponding argument, the placeholder is\nnot replaced.\n\n

    \n
    util.format('%s:%s', 'foo'); // 'foo:%s'
    \n

    If there are more arguments than placeholders, the extra arguments are\nconverted to strings with util.inspect() and these strings are concatenated,\ndelimited by a space.\n\n

    \n
    util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'
    \n

    If the first argument is not a format string then util.format() returns\na string that is the concatenation of all its arguments separated by spaces.\nEach argument is converted to a string with util.inspect().\n\n

    \n
    util.format(1, 2, 3); // '1 2 3'
    \n", - "signatures": [ - { - "params": [ - { - "name": "format" - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.debug(string)", - "type": "method", - "name": "debug", - "desc": "

    A synchronous output function. Will block the process and\noutput string immediately to stderr.\n\n

    \n
    require('util').debug('message on stderr');
    \n", - "signatures": [ - { - "params": [ - { - "name": "string" - } - ] - } - ] - }, - { - "textRaw": "util.error([...])", - "type": "method", - "name": "error", - "desc": "

    Same as util.debug() except this will output all arguments immediately to\nstderr.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.puts([...])", - "type": "method", - "name": "puts", - "desc": "

    A synchronous output function. Will block the process and output all arguments\nto stdout with newlines after each argument.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.print([...])", - "type": "method", - "name": "print", - "desc": "

    A synchronous output function. Will block the process, cast each argument to a\nstring then output to stdout. Does not place newlines after each argument.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.log(string)", - "type": "method", - "name": "log", - "desc": "

    Output with timestamp on stdout.\n\n

    \n
    require('util').log('Timestamped message.');
    \n", - "signatures": [ - { - "params": [ - { - "name": "string" - } - ] - } - ] - }, - { - "textRaw": "util.inspect(object, [options])", - "type": "method", - "name": "inspect", - "desc": "

    Return a string representation of object, which is useful for debugging.\n\n

    \n

    An optional options object may be passed that alters certain aspects of the\nformatted string:\n\n

    \n
      \n
    • showHidden - if true then the object's non-enumerable properties will be\nshown too. Defaults to false.

      \n
    • \n
    • depth - tells inspect how many times to recurse while formatting the\nobject. This is useful for inspecting large complicated objects. Defaults to\n2. To make it recurse indefinitely pass null.

      \n
    • \n
    • colors - if true, then the output will be styled with ANSI color codes.\nDefaults to false. Colors are customizable, see below.

      \n
    • \n
    • customInspect - if false, then custom inspect() functions defined on the\nobjects being inspected won't be called. Defaults to true.

      \n
    • \n
    \n

    Example of inspecting all properties of the util object:\n\n

    \n
    var util = require('util');\n\nconsole.log(util.inspect(util, { showHidden: true, depth: null }));
    \n", - "modules": [ - { - "textRaw": "Customizing `util.inspect` colors", - "name": "customizing_`util.inspect`_colors", - "desc": "

    Color output (if enabled) of util.inspect is customizable globally\nvia util.inspect.styles and util.inspect.colors objects.\n\n

    \n

    util.inspect.styles is a map assigning each style a color\nfrom util.inspect.colors.\nHighlighted styles and their default values are:\n number (yellow)\n boolean (yellow)\n string (green)\n date (magenta)\n regexp (red)\n null (bold)\n undefined (grey)\n special - only function at this time (cyan)\n * name (intentionally no styling)\n\n

    \n

    Predefined color codes are: white, grey, black, blue, cyan, \ngreen, magenta, red and yellow.\nThere are also bold, italic, underline and inverse codes.\n\n

    \n

    Objects also may define their own inspect(depth) function which util.inspect()\nwill invoke and use the result of when inspecting the object:\n\n

    \n
    var util = require('util');\n\nvar obj = { name: 'nate' };\nobj.inspect = function(depth) {\n  return '{' + this.name + '}';\n};\n\nutil.inspect(obj);\n  // "{nate}"
    \n", - "type": "module", - "displayName": "Customizing `util.inspect` colors" - } - ], - "signatures": [ - { - "params": [ - { - "name": "object" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.isArray(object)", - "type": "method", - "name": "isArray", - "desc": "

    Returns true if the given "object" is an Array. false otherwise.\n\n

    \n
    var util = require('util');\n\nutil.isArray([])\n  // true\nutil.isArray(new Array)\n  // true\nutil.isArray({})\n  // false
    \n", - "signatures": [ - { - "params": [ - { - "name": "object" - } - ] - } - ] - }, - { - "textRaw": "util.isRegExp(object)", - "type": "method", - "name": "isRegExp", - "desc": "

    Returns true if the given "object" is a RegExp. false otherwise.\n\n

    \n
    var util = require('util');\n\nutil.isRegExp(/some regexp/)\n  // true\nutil.isRegExp(new RegExp('another regexp'))\n  // true\nutil.isRegExp({})\n  // false
    \n", - "signatures": [ - { - "params": [ - { - "name": "object" - } - ] - } - ] - }, - { - "textRaw": "util.isDate(object)", - "type": "method", - "name": "isDate", - "desc": "

    Returns true if the given "object" is a Date. false otherwise.\n\n

    \n
    var util = require('util');\n\nutil.isDate(new Date())\n  // true\nutil.isDate(Date())\n  // false (without 'new' returns a String)\nutil.isDate({})\n  // false
    \n", - "signatures": [ - { - "params": [ - { - "name": "object" - } - ] - } - ] - }, - { - "textRaw": "util.isError(object)", - "type": "method", - "name": "isError", - "desc": "

    Returns true if the given "object" is an Error. false otherwise.\n\n

    \n
    var util = require('util');\n\nutil.isError(new Error())\n  // true\nutil.isError(new TypeError())\n  // true\nutil.isError({ name: 'Error', message: 'an error occurred' })\n  // false
    \n", - "signatures": [ - { - "params": [ - { - "name": "object" - } - ] - } - ] - }, - { - "textRaw": "util.pump(readableStream, writableStream, [callback])", - "type": "method", - "name": "pump", - "stability": 0, - "stabilityText": "Deprecated: Use readableStream.pipe(writableStream)", - "desc": "

    Read the data from readableStream and send it to the writableStream.\nWhen writableStream.write(data) returns false readableStream will be\npaused until the drain event occurs on the writableStream. callback gets\nan error as its only argument and is called when writableStream is closed or\nwhen an error occurs.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "readableStream" - }, - { - "name": "writableStream" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "util.inherits(constructor, superConstructor)", - "type": "method", - "name": "inherits", - "desc": "

    Inherit the prototype methods from one\nconstructor\ninto another. The prototype of constructor will be set to a new\nobject created from superConstructor.\n\n

    \n

    As an additional convenience, superConstructor will be accessible\nthrough the constructor.super_ property.\n\n

    \n
    var util = require("util");\nvar events = require("events");\n\nfunction MyStream() {\n    events.EventEmitter.call(this);\n}\n\nutil.inherits(MyStream, events.EventEmitter);\n\nMyStream.prototype.write = function(data) {\n    this.emit("data", data);\n}\n\nvar stream = new MyStream();\n\nconsole.log(stream instanceof events.EventEmitter); // true\nconsole.log(MyStream.super_ === events.EventEmitter); // true\n\nstream.on("data", function(data) {\n    console.log('Received data: "' + data + '"');\n})\nstream.write("It works!"); // Received data: "It works!"
    \n", - "signatures": [ - { - "params": [ - { - "name": "constructor" - }, - { - "name": "superConstructor" - } - ] - } - ] - } - ], - "type": "module", - "displayName": "util" - }, - { - "textRaw": "Events", - "name": "Events", - "stability": 4, - "stabilityText": "API Frozen", - "type": "module", - "desc": "

    Many objects in Node emit events: a net.Server emits an event each time\na peer connects to it, a fs.readStream emits an event when the file is\nopened. All objects which emit events are instances of events.EventEmitter.\nYou can access this module by doing: require("events");\n\n

    \n

    Typically, event names are represented by a camel-cased string, however,\nthere aren't any strict restrictions on that, as any string will be accepted.\n\n

    \n

    Functions can then be attached to objects, to be executed when an event\nis emitted. These functions are called listeners. Inside a listener\nfunction, this refers to the EventEmitter that the listener was\nattached to.\n\n\n

    \n", - "classes": [ - { - "textRaw": "Class: events.EventEmitter", - "type": "class", - "name": "events.EventEmitter", - "desc": "

    To access the EventEmitter class, require('events').EventEmitter.\n\n

    \n

    When an EventEmitter instance experiences an error, the typical action is\nto emit an 'error' event. Error events are treated as a special case in node.\nIf there is no listener for it, then the default action is to print a stack\ntrace and exit the program.\n\n

    \n

    All EventEmitters emit the event 'newListener' when new listeners are\nadded and 'removeListener' when a listener is removed.\n\n

    \n", - "methods": [ - { - "textRaw": "emitter.addListener(event, listener)", - "type": "method", - "name": "addListener", - "desc": "

    Adds a listener to the end of the listeners array for the specified event.\n\n

    \n
    server.on('connection', function (stream) {\n  console.log('someone connected!');\n});
    \n

    Returns emitter, so calls can be chained.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - }, - { - "name": "listener" - } - ] - }, - { - "params": [ - { - "name": "event" - }, - { - "name": "listener" - } - ] - } - ] - }, - { - "textRaw": "emitter.on(event, listener)", - "type": "method", - "name": "on", - "desc": "

    Adds a listener to the end of the listeners array for the specified event.\n\n

    \n
    server.on('connection', function (stream) {\n  console.log('someone connected!');\n});
    \n

    Returns emitter, so calls can be chained.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - }, - { - "name": "listener" - } - ] - } - ] - }, - { - "textRaw": "emitter.once(event, listener)", - "type": "method", - "name": "once", - "desc": "

    Adds a one time listener for the event. This listener is\ninvoked only the next time the event is fired, after which\nit is removed.\n\n

    \n
    server.once('connection', function (stream) {\n  console.log('Ah, we have our first user!');\n});
    \n

    Returns emitter, so calls can be chained.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - }, - { - "name": "listener" - } - ] - } - ] - }, - { - "textRaw": "emitter.removeListener(event, listener)", - "type": "method", - "name": "removeListener", - "desc": "

    Remove a listener from the listener array for the specified event.\nCaution: changes array indices in the listener array behind the listener.\n\n

    \n
    var callback = function(stream) {\n  console.log('someone connected!');\n};\nserver.on('connection', callback);\n// ...\nserver.removeListener('connection', callback);
    \n

    Returns emitter, so calls can be chained.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - }, - { - "name": "listener" - } - ] - } - ] - }, - { - "textRaw": "emitter.removeAllListeners([event])", - "type": "method", - "name": "removeAllListeners", - "desc": "

    Removes all listeners, or those of the specified event.\n\n

    \n

    Returns emitter, so calls can be chained.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "emitter.setMaxListeners(n)", - "type": "method", - "name": "setMaxListeners", - "desc": "

    By default EventEmitters will print a warning if more than 10 listeners are\nadded for a particular event. This is a useful default which helps finding memory leaks.\nObviously not all Emitters should be limited to 10. This function allows\nthat to be increased. Set to zero for unlimited.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "n" - } - ] - } - ] - }, - { - "textRaw": "emitter.listeners(event)", - "type": "method", - "name": "listeners", - "desc": "

    Returns an array of listeners for the specified event.\n\n

    \n
    server.on('connection', function (stream) {\n  console.log('someone connected!');\n});\nconsole.log(util.inspect(server.listeners('connection'))); // [ [Function] ]
    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - } - ] - } - ] - }, - { - "textRaw": "emitter.emit(event, [arg1], [arg2], [...])", - "type": "method", - "name": "emit", - "desc": "

    Execute each of the listeners in order with the supplied arguments.\n\n

    \n

    Returns true if event had listeners, false otherwise.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "event" - }, - { - "name": "arg1", - "optional": true - }, - { - "name": "arg2", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - } - ], - "classMethods": [ - { - "textRaw": "Class Method: EventEmitter.listenerCount(emitter, event)", - "type": "classMethod", - "name": "listenerCount", - "desc": "

    Return the number of listeners for a given event.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "emitter" - }, - { - "name": "event" - } - ] - } - ] - } - ], - "events": [ - { - "textRaw": "Event: 'newListener'", - "type": "event", - "name": "newListener", - "params": [], - "desc": "

    This event is emitted any time someone adds a new listener. It is unspecified\nif listener is in the list returned by emitter.listeners(event).\n\n\n

    \n" - }, - { - "textRaw": "Event: 'removeListener'", - "type": "event", - "name": "removeListener", - "params": [], - "desc": "

    This event is emitted any time someone removes a listener. It is unspecified\nif listener is in the list returned by emitter.listeners(event).\n\n

    \n" - } - ] - } - ] - }, - { - "textRaw": "Domain", - "name": "domain", - "stability": 2, - "stabilityText": "Unstable", - "desc": "

    Domains provide a way to handle multiple different IO operations as a\nsingle group. If any of the event emitters or callbacks registered to a\ndomain emit an error event, or throw an error, then the domain object\nwill be notified, rather than losing the context of the error in the\nprocess.on('uncaughtException') handler, or causing the program to\nexit immediately with an error code.\n\n

    \n", - "miscs": [ - { - "textRaw": "Warning: Don't Ignore Errors!", - "name": "Warning: Don't Ignore Errors!", - "type": "misc", - "desc": "

    Domain error handlers are not a substitute for closing down your\nprocess when an error occurs.\n\n

    \n

    By the very nature of how throw works in JavaScript, there is almost\nnever any way to safely "pick up where you left off", without leaking\nreferences, or creating some other sort of undefined brittle state.\n\n

    \n

    The safest way to respond to a thrown error is to shut down the\nprocess. Of course, in a normal web server, you might have many\nconnections open, and it is not reasonable to abruptly shut those down\nbecause an error was triggered by someone else.\n\n

    \n

    The better approach is send an error response to the request that\ntriggered the error, while letting the others finish in their normal\ntime, and stop listening for new requests in that worker.\n\n

    \n

    In this way, domain usage goes hand-in-hand with the cluster module,\nsince the master process can fork a new worker when a worker\nencounters an error. For node programs that scale to multiple\nmachines, the terminating proxy or service registry can take note of\nthe failure, and react accordingly.\n\n

    \n

    For example, this is not a good idea:\n\n

    \n
    // XXX WARNING!  BAD IDEA!\n\nvar d = require('domain').create();\nd.on('error', function(er) {\n  // The error won't crash the process, but what it does is worse!\n  // Though we've prevented abrupt process restarting, we are leaking\n  // resources like crazy if this ever happens.\n  // This is no better than process.on('uncaughtException')!\n  console.log('error, but oh well', er.message);\n});\nd.run(function() {\n  require('http').createServer(function(req, res) {\n    handleRequest(req, res);\n  }).listen(PORT);\n});
    \n

    By using the context of a domain, and the resilience of separating our\nprogram into multiple worker processes, we can react more\nappropriately, and handle errors with much greater safety.\n\n

    \n
    // Much better!\n\nvar cluster = require('cluster');\nvar PORT = +process.env.PORT || 1337;\n\nif (cluster.isMaster) {\n  // In real life, you'd probably use more than just 2 workers,\n  // and perhaps not put the master and worker in the same file.\n  //\n  // You can also of course get a bit fancier about logging, and\n  // implement whatever custom logic you need to prevent DoS\n  // attacks and other bad behavior.\n  //\n  // See the options in the cluster documentation.\n  //\n  // The important thing is that the master does very little,\n  // increasing our resilience to unexpected errors.\n\n  cluster.fork();\n  cluster.fork();\n\n  cluster.on('disconnect', function(worker) {\n    console.error('disconnect!');\n    cluster.fork();\n  });\n\n} else {\n  // the worker\n  //\n  // This is where we put our bugs!\n\n  var domain = require('domain');\n\n  // See the cluster documentation for more details about using\n  // worker processes to serve requests.  How it works, caveats, etc.\n\n  var server = require('http').createServer(function(req, res) {\n    var d = domain.create();\n    d.on('error', function(er) {\n      console.error('error', er.stack);\n\n      // Note: we're in dangerous territory!\n      // By definition, something unexpected occurred,\n      // which we probably didn't want.\n      // Anything can happen now!  Be very careful!\n\n      try {\n        // make sure we close down within 30 seconds\n        var killtimer = setTimeout(function() {\n          process.exit(1);\n        }, 30000);\n        // But don't keep the process open just for that!\n        killtimer.unref();\n\n        // stop taking new requests.\n        server.close();\n\n        // Let the master know we're dead.  This will trigger a\n        // 'disconnect' in the cluster master, and then it will fork\n        // a new worker.\n        cluster.worker.disconnect();\n\n        // try to send an error to the request that triggered the problem\n        res.statusCode = 500;\n        res.setHeader('content-type', 'text/plain');\n        res.end('Oops, there was a problem!\\n');\n      } catch (er2) {\n        // oh well, not much we can do at this point.\n        console.error('Error sending 500!', er2.stack);\n      }\n    });\n\n    // Because req and res were created before this domain existed,\n    // we need to explicitly add them.\n    // See the explanation of implicit vs explicit binding below.\n    d.add(req);\n    d.add(res);\n\n    // Now run the handler function in the domain.\n    d.run(function() {\n      handleRequest(req, res);\n    });\n  });\n  server.listen(PORT);\n}\n\n// This part isn't important.  Just an example routing thing.\n// You'd put your fancy application logic here.\nfunction handleRequest(req, res) {\n  switch(req.url) {\n    case '/error':\n      // We do some async stuff, and then...\n      setTimeout(function() {\n        // Whoops!\n        flerb.bark();\n      });\n      break;\n    default:\n      res.end('ok');\n  }\n}
    \n" - }, - { - "textRaw": "Additions to Error objects", - "name": "Additions to Error objects", - "type": "misc", - "desc": "

    Any time an Error object is routed through a domain, a few extra fields\nare added to it.\n\n

    \n
      \n
    • error.domain The domain that first handled the error.
    • \n
    • error.domainEmitter The event emitter that emitted an 'error' event\nwith the error object.
    • \n
    • error.domainBound The callback function which was bound to the\ndomain, and passed an error as its first argument.
    • \n
    • error.domainThrown A boolean indicating whether the error was\nthrown, emitted, or passed to a bound callback function.
    • \n
    \n" - }, - { - "textRaw": "Implicit Binding", - "name": "Implicit Binding", - "type": "misc", - "desc": "

    If domains are in use, then all new EventEmitter objects (including\nStream objects, requests, responses, etc.) will be implicitly bound to\nthe active domain at the time of their creation.\n\n

    \n

    Additionally, callbacks passed to lowlevel event loop requests (such as\nto fs.open, or other callback-taking methods) will automatically be\nbound to the active domain. If they throw, then the domain will catch\nthe error.\n\n

    \n

    In order to prevent excessive memory usage, Domain objects themselves\nare not implicitly added as children of the active domain. If they\nwere, then it would be too easy to prevent request and response objects\nfrom being properly garbage collected.\n\n

    \n

    If you want to nest Domain objects as children of a parent Domain,\nthen you must explicitly add them.\n\n

    \n

    Implicit binding routes thrown errors and 'error' events to the\nDomain's error event, but does not register the EventEmitter on the\nDomain, so domain.dispose() will not shut down the EventEmitter.\nImplicit binding only takes care of thrown errors and 'error' events.\n\n

    \n" - }, - { - "textRaw": "Explicit Binding", - "name": "Explicit Binding", - "type": "misc", - "desc": "

    Sometimes, the domain in use is not the one that ought to be used for a\nspecific event emitter. Or, the event emitter could have been created\nin the context of one domain, but ought to instead be bound to some\nother domain.\n\n

    \n

    For example, there could be one domain in use for an HTTP server, but\nperhaps we would like to have a separate domain to use for each request.\n\n

    \n

    That is possible via explicit binding.\n\n

    \n

    For example:\n\n

    \n
    // create a top-level domain for the server\nvar serverDomain = domain.create();\n\nserverDomain.run(function() {\n  // server is created in the scope of serverDomain\n  http.createServer(function(req, res) {\n    // req and res are also created in the scope of serverDomain\n    // however, we'd prefer to have a separate domain for each request.\n    // create it first thing, and add req and res to it.\n    var reqd = domain.create();\n    reqd.add(req);\n    reqd.add(res);\n    reqd.on('error', function(er) {\n      console.error('Error', er, req.url);\n      try {\n        res.writeHead(500);\n        res.end('Error occurred, sorry.');\n      } catch (er) {\n        console.error('Error sending 500', er, req.url);\n      }\n    });\n  }).listen(1337);\n});
    \n" - } - ], - "methods": [ - { - "textRaw": "domain.create()", - "type": "method", - "name": "create", - "signatures": [ - { - "return": { - "textRaw": "return: {Domain} ", - "name": "return", - "type": "Domain" - }, - "params": [] - }, - { - "params": [] - } - ], - "desc": "

    Returns a new Domain object.\n\n

    \n" - } - ], - "classes": [ - { - "textRaw": "Class: Domain", - "type": "class", - "name": "Domain", - "desc": "

    The Domain class encapsulates the functionality of routing errors and\nuncaught exceptions to the active Domain object.\n\n

    \n

    Domain is a child class of [EventEmitter][]. To handle the errors that it\ncatches, listen to its error event.\n\n

    \n", - "methods": [ - { - "textRaw": "domain.run(fn)", - "type": "method", - "name": "run", - "signatures": [ - { - "params": [ - { - "textRaw": "`fn` {Function} ", - "name": "fn", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "fn" - } - ] - } - ], - "desc": "

    Run the supplied function in the context of the domain, implicitly\nbinding all event emitters, timers, and lowlevel requests that are\ncreated in that context.\n\n

    \n

    This is the most basic way to use a domain.\n\n

    \n

    Example:\n\n

    \n
    var d = domain.create();\nd.on('error', function(er) {\n  console.error('Caught error!', er);\n});\nd.run(function() {\n  process.nextTick(function() {\n    setTimeout(function() { // simulating some various async stuff\n      fs.open('non-existent file', 'r', function(er, fd) {\n        if (er) throw er;\n        // proceed...\n      });\n    }, 100);\n  });\n});
    \n

    In this example, the d.on('error') handler will be triggered, rather\nthan crashing the program.\n\n

    \n" - }, - { - "textRaw": "domain.add(emitter)", - "type": "method", - "name": "add", - "signatures": [ - { - "params": [ - { - "textRaw": "`emitter` {EventEmitter | Timer} emitter or timer to be added to the domain ", - "name": "emitter", - "type": "EventEmitter | Timer", - "desc": "emitter or timer to be added to the domain" - } - ] - }, - { - "params": [ - { - "name": "emitter" - } - ] - } - ], - "desc": "

    Explicitly adds an emitter to the domain. If any event handlers called by\nthe emitter throw an error, or if the emitter emits an error event, it\nwill be routed to the domain's error event, just like with implicit\nbinding.\n\n

    \n

    This also works with timers that are returned from setInterval and\nsetTimeout. If their callback function throws, it will be caught by\nthe domain 'error' handler.\n\n

    \n

    If the Timer or EventEmitter was already bound to a domain, it is removed\nfrom that one, and bound to this one instead.\n\n

    \n" - }, - { - "textRaw": "domain.remove(emitter)", - "type": "method", - "name": "remove", - "signatures": [ - { - "params": [ - { - "textRaw": "`emitter` {EventEmitter | Timer} emitter or timer to be removed from the domain ", - "name": "emitter", - "type": "EventEmitter | Timer", - "desc": "emitter or timer to be removed from the domain" - } - ] - }, - { - "params": [ - { - "name": "emitter" - } - ] - } - ], - "desc": "

    The opposite of domain.add(emitter). Removes domain handling from the\nspecified emitter.\n\n

    \n" - }, - { - "textRaw": "domain.bind(callback)", - "type": "method", - "name": "bind", - "signatures": [ - { - "return": { - "textRaw": "return: {Function} The bound function ", - "name": "return", - "type": "Function", - "desc": "The bound function" - }, - "params": [ - { - "textRaw": "`callback` {Function} The callback function ", - "name": "callback", - "type": "Function", - "desc": "The callback function" - } - ] - }, - { - "params": [ - { - "name": "callback" - } - ] - } - ], - "desc": "

    The returned function will be a wrapper around the supplied callback\nfunction. When the returned function is called, any errors that are\nthrown will be routed to the domain's error event.\n\n

    \n

    Example

    \n
    var d = domain.create();\n\nfunction readSomeFile(filename, cb) {\n  fs.readFile(filename, 'utf8', d.bind(function(er, data) {\n    // if this throws, it will also be passed to the domain\n    return cb(er, data ? JSON.parse(data) : null);\n  }));\n}\n\nd.on('error', function(er) {\n  // an error occurred somewhere.\n  // if we throw it now, it will crash the program\n  // with the normal line number and stack message.\n});
    \n" - }, - { - "textRaw": "domain.intercept(callback)", - "type": "method", - "name": "intercept", - "signatures": [ - { - "return": { - "textRaw": "return: {Function} The intercepted function ", - "name": "return", - "type": "Function", - "desc": "The intercepted function" - }, - "params": [ - { - "textRaw": "`callback` {Function} The callback function ", - "name": "callback", - "type": "Function", - "desc": "The callback function" - } - ] - }, - { - "params": [ - { - "name": "callback" - } - ] - } - ], - "desc": "

    This method is almost identical to domain.bind(callback). However, in\naddition to catching thrown errors, it will also intercept Error\nobjects sent as the first argument to the function.\n\n

    \n

    In this way, the common if (er) return callback(er); pattern can be replaced\nwith a single error handler in a single place.\n\n

    \n

    Example

    \n
    var d = domain.create();\n\nfunction readSomeFile(filename, cb) {\n  fs.readFile(filename, 'utf8', d.intercept(function(data) {\n    // note, the first argument is never passed to the\n    // callback since it is assumed to be the 'Error' argument\n    // and thus intercepted by the domain.\n\n    // if this throws, it will also be passed to the domain\n    // so the error-handling logic can be moved to the 'error'\n    // event on the domain instead of being repeated throughout\n    // the program.\n    return cb(null, JSON.parse(data));\n  }));\n}\n\nd.on('error', function(er) {\n  // an error occurred somewhere.\n  // if we throw it now, it will crash the program\n  // with the normal line number and stack message.\n});
    \n" - }, - { - "textRaw": "domain.enter()", - "type": "method", - "name": "enter", - "desc": "

    The enter method is plumbing used by the run, bind, and intercept\nmethods to set the active domain. It sets domain.active and process.domain\nto the domain, and implicitly pushes the domain onto the domain stack managed\nby the domain module (see domain.exit() for details on the domain stack). The\ncall to enter delimits the beginning of a chain of asynchronous calls and I/O\noperations bound to a domain.\n\n

    \n

    Calling enter changes only the active domain, and does not alter the domain\nitself. Enter and exit can be called an arbitrary number of times on a\nsingle domain.\n\n

    \n

    If the domain on which enter is called has been disposed, enter will return\nwithout setting the domain.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "domain.exit()", - "type": "method", - "name": "exit", - "desc": "

    The exit method exits the current domain, popping it off the domain stack.\nAny time execution is going to switch to the context of a different chain of\nasynchronous calls, it's important to ensure that the current domain is exited.\nThe call to exit delimits either the end of or an interruption to the chain\nof asynchronous calls and I/O operations bound to a domain.\n\n

    \n

    If there are multiple, nested domains bound to the current execution context,\nexit will exit any domains nested within this domain.\n\n

    \n

    Calling exit changes only the active domain, and does not alter the domain\nitself. Enter and exit can be called an arbitrary number of times on a\nsingle domain.\n\n

    \n

    If the domain on which exit is called has been disposed, exit will return\nwithout exiting the domain.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "domain.dispose()", - "type": "method", - "name": "dispose", - "desc": "

    The dispose method destroys a domain, and makes a best effort attempt to\nclean up any and all IO that is associated with the domain. Streams are\naborted, ended, closed, and/or destroyed. Timers are cleared.\nExplicitly bound callbacks are no longer called. Any error events that\nare raised as a result of this are ignored.\n\n

    \n

    The intention of calling dispose is generally to prevent cascading\nerrors when a critical part of the Domain context is found to be in an\nerror state.\n\n

    \n

    Once the domain is disposed the dispose event will emit.\n\n

    \n

    Note that IO might still be performed. However, to the highest degree\npossible, once a domain is disposed, further errors from the emitters in\nthat set will be ignored. So, even if some remaining actions are still\nin flight, Node.js will not communicate further about them.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "properties": [ - { - "textRaw": "`members` {Array} ", - "name": "members", - "desc": "

    An array of timers and event emitters that have been explicitly added\nto the domain.\n\n

    \n" - } - ] - } - ], - "type": "module", - "displayName": "Domain" - }, - { - "textRaw": "Buffer", - "name": "buffer", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    Pure JavaScript is Unicode friendly but not nice to binary data. When\ndealing with TCP streams or the file system, it's necessary to handle octet\nstreams. Node has several strategies for manipulating, creating, and\nconsuming octet streams.\n\n

    \n

    Raw data is stored in instances of the Buffer class. A Buffer is similar\nto an array of integers but corresponds to a raw memory allocation outside\nthe V8 heap. A Buffer cannot be resized.\n\n

    \n

    The Buffer class is a global, making it very rare that one would need\nto ever require('buffer').\n\n

    \n

    Converting between Buffers and JavaScript string objects requires an explicit\nencoding method. Here are the different string encodings.\n\n

    \n
      \n
    • 'ascii' - for 7 bit ASCII data only. This encoding method is very fast, and\nwill strip the high bit if set.

      \n

      Note that when converting from string to buffer, this encoding converts a null\ncharacter ('\\0' or '\\u0000') into 0x20 (character code of a space). If\nyou want to convert a null character into 0x00, you should use 'utf8'.

      \n
    • \n
    • 'utf8' - Multibyte encoded Unicode characters. Many web pages and other\ndocument formats use UTF-8.

      \n
    • \n
    • 'utf16le' - 2 or 4 bytes, little endian encoded Unicode characters.\nSurrogate pairs (U+10000 to U+10FFFF) are supported.

      \n
    • \n
    • 'ucs2' - Alias of 'utf16le'.

      \n
    • \n
    • 'base64' - Base64 string encoding.

      \n
    • \n
    • 'binary' - A way of encoding raw binary data into strings by using only\nthe first 8 bits of each character. This encoding method is deprecated and\nshould be avoided in favor of Buffer objects where possible. This encoding\nwill be removed in future versions of Node.

      \n
    • \n
    • 'hex' - Encode each byte as two hexadecimal characters.

      \n
    • \n
    \n

    A Buffer object can also be used with typed arrays. The buffer object is\ncloned to an ArrayBuffer that is used as the backing store for the typed\narray. The memory of the buffer and the ArrayBuffer is not shared.\n\n

    \n

    NOTE: Node.js v0.8 simply retained a reference to the buffer in array.buffer\ninstead of cloning it.\n\n

    \n

    While more efficient, it introduces subtle incompatibilities with the typed\narrays specification. ArrayBuffer#slice() makes a copy of the slice while\nBuffer#slice() creates a view.\n\n

    \n", - "classes": [ - { - "textRaw": "Class: Buffer", - "type": "class", - "name": "Buffer", - "desc": "

    The Buffer class is a global type for dealing with binary data directly.\nIt can be constructed in a variety of ways.\n\n

    \n", - "classMethods": [ - { - "textRaw": "Class Method: Buffer.isEncoding(encoding)", - "type": "classMethod", - "name": "isEncoding", - "signatures": [ - { - "params": [ - { - "textRaw": "`encoding` {String} The encoding string to test ", - "name": "encoding", - "type": "String", - "desc": "The encoding string to test" - } - ] - }, - { - "params": [ - { - "name": "encoding" - } - ] - } - ], - "desc": "

    Returns true if the encoding is a valid encoding argument, or false\notherwise.\n\n

    \n" - }, - { - "textRaw": "Class Method: Buffer.isBuffer(obj)", - "type": "classMethod", - "name": "isBuffer", - "signatures": [ - { - "return": { - "textRaw": "Return: Boolean ", - "name": "return", - "desc": "Boolean" - }, - "params": [ - { - "textRaw": "`obj` Object ", - "name": "obj", - "desc": "Object" - } - ] - }, - { - "params": [ - { - "name": "obj" - } - ] - } - ], - "desc": "

    Tests if obj is a Buffer.\n\n

    \n" - }, - { - "textRaw": "Class Method: Buffer.byteLength(string, [encoding])", - "type": "classMethod", - "name": "byteLength", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`string` String ", - "name": "string", - "desc": "String" - }, - { - "textRaw": "`encoding` String, Optional, Default: 'utf8' ", - "name": "encoding", - "desc": "String, Optional, Default: 'utf8'", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "string" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ], - "desc": "

    Gives the actual byte length of a string. encoding defaults to 'utf8'.\nThis is not the same as String.prototype.length since that returns the\nnumber of characters in a string.\n\n

    \n

    Example:\n\n

    \n
    str = '\\u00bd + \\u00bc = \\u00be';\n\nconsole.log(str + ": " + str.length + " characters, " +\n  Buffer.byteLength(str, 'utf8') + " bytes");\n\n// ½ + ¼ = ¾: 9 characters, 12 bytes
    \n" - }, - { - "textRaw": "Class Method: Buffer.concat(list, [totalLength])", - "type": "classMethod", - "name": "concat", - "signatures": [ - { - "params": [ - { - "textRaw": "`list` {Array} List of Buffer objects to concat ", - "name": "list", - "type": "Array", - "desc": "List of Buffer objects to concat" - }, - { - "textRaw": "`totalLength` {Number} Total length of the buffers when concatenated ", - "name": "totalLength", - "type": "Number", - "desc": "Total length of the buffers when concatenated", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "list" - }, - { - "name": "totalLength", - "optional": true - } - ] - } - ], - "desc": "

    Returns a buffer which is the result of concatenating all the buffers in\nthe list together.\n\n

    \n

    If the list has no items, or if the totalLength is 0, then it returns a\nzero-length buffer.\n\n

    \n

    If the list has exactly one item, then the first item of the list is\nreturned.\n\n

    \n

    If the list has more than one item, then a new Buffer is created.\n\n

    \n

    If totalLength is not provided, it is read from the buffers in the list.\nHowever, this adds an additional loop to the function, so it is faster\nto provide the length explicitly.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "buf.write(string, [offset], [length], [encoding])", - "type": "method", - "name": "write", - "signatures": [ - { - "params": [ - { - "textRaw": "`string` String - data to be written to buffer ", - "name": "string", - "desc": "String - data to be written to buffer" - }, - { - "textRaw": "`offset` Number, Optional, Default: 0 ", - "name": "offset", - "desc": "Number, Optional, Default: 0", - "optional": true - }, - { - "textRaw": "`length` Number, Optional, Default: `buffer.length - offset` ", - "name": "length", - "desc": "Number, Optional, Default: `buffer.length - offset`", - "optional": true - }, - { - "textRaw": "`encoding` String, Optional, Default: 'utf8' ", - "name": "encoding", - "desc": "String, Optional, Default: 'utf8'", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "string" - }, - { - "name": "offset", - "optional": true - }, - { - "name": "length", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ], - "desc": "

    Writes string to the buffer at offset using the given encoding.\noffset defaults to 0, encoding defaults to 'utf8'. length is\nthe number of bytes to write. Returns number of octets written. If buffer did\nnot contain enough space to fit the entire string, it will write a partial\namount of the string. length defaults to buffer.length - offset.\nThe method will not write partial characters.\n\n

    \n
    buf = new Buffer(256);\nlen = buf.write('\\u00bd + \\u00bc = \\u00be', 0);\nconsole.log(len + " bytes: " + buf.toString('utf8', 0, len));
    \n

    The number of characters written (which may be different than the number of\nbytes written) is set in Buffer._charsWritten and will be overwritten the\nnext time buf.write() is called.\n\n\n

    \n" - }, - { - "textRaw": "buf.toString([encoding], [start], [end])", - "type": "method", - "name": "toString", - "signatures": [ - { - "params": [ - { - "textRaw": "`encoding` String, Optional, Default: 'utf8' ", - "name": "encoding", - "desc": "String, Optional, Default: 'utf8'", - "optional": true - }, - { - "textRaw": "`start` Number, Optional, Default: 0 ", - "name": "start", - "desc": "Number, Optional, Default: 0", - "optional": true - }, - { - "textRaw": "`end` Number, Optional, Default: `buffer.length` ", - "name": "end", - "desc": "Number, Optional, Default: `buffer.length`", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "encoding", - "optional": true - }, - { - "name": "start", - "optional": true - }, - { - "name": "end", - "optional": true - } - ] - } - ], - "desc": "

    Decodes and returns a string from buffer data encoded with encoding\n(defaults to 'utf8') beginning at start (defaults to 0) and ending at\nend (defaults to buffer.length).\n\n

    \n

    See buffer.write() example, above.\n\n\n

    \n" - }, - { - "textRaw": "buf.toJSON()", - "type": "method", - "name": "toJSON", - "desc": "

    Returns a JSON-representation of the Buffer instance, which is identical to the\noutput for JSON Arrays. JSON.stringify implicitly calls this function when\nstringifying a Buffer instance.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer('test');\nvar json = JSON.stringify(buf);\n\nconsole.log(json);\n// '[116,101,115,116]'\n\nvar copy = new Buffer(JSON.parse(json));\n\nconsole.log(copy);\n// <Buffer 74 65 73 74>
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "buf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd])", - "type": "method", - "name": "copy", - "signatures": [ - { - "params": [ - { - "textRaw": "`targetBuffer` Buffer object - Buffer to copy into ", - "name": "targetBuffer", - "desc": "Buffer object - Buffer to copy into" - }, - { - "textRaw": "`targetStart` Number, Optional, Default: 0 ", - "name": "targetStart", - "desc": "Number, Optional, Default: 0", - "optional": true - }, - { - "textRaw": "`sourceStart` Number, Optional, Default: 0 ", - "name": "sourceStart", - "desc": "Number, Optional, Default: 0", - "optional": true - }, - { - "textRaw": "`sourceEnd` Number, Optional, Default: `buffer.length` ", - "name": "sourceEnd", - "desc": "Number, Optional, Default: `buffer.length`", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "targetBuffer" - }, - { - "name": "targetStart", - "optional": true - }, - { - "name": "sourceStart", - "optional": true - }, - { - "name": "sourceEnd", - "optional": true - } - ] - } - ], - "desc": "

    Does copy between buffers. The source and target regions can be overlapped.\ntargetStart and sourceStart default to 0.\nsourceEnd defaults to buffer.length.\n\n

    \n

    All values passed that are undefined/NaN or are out of bounds are set equal\nto their respective defaults.\n\n

    \n

    Example: build two Buffers, then copy buf1 from byte 16 through byte 19\ninto buf2, starting at the 8th byte in buf2.\n\n

    \n
    buf1 = new Buffer(26);\nbuf2 = new Buffer(26);\n\nfor (var i = 0 ; i < 26 ; i++) {\n  buf1[i] = i + 97; // 97 is ASCII a\n  buf2[i] = 33; // ASCII !\n}\n\nbuf1.copy(buf2, 8, 16, 20);\nconsole.log(buf2.toString('ascii', 0, 25));\n\n// !!!!!!!!qrst!!!!!!!!!!!!!
    \n" - }, - { - "textRaw": "buf.slice([start], [end])", - "type": "method", - "name": "slice", - "signatures": [ - { - "params": [ - { - "textRaw": "`start` Number, Optional, Default: 0 ", - "name": "start", - "desc": "Number, Optional, Default: 0", - "optional": true - }, - { - "textRaw": "`end` Number, Optional, Default: `buffer.length` ", - "name": "end", - "desc": "Number, Optional, Default: `buffer.length`", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "start", - "optional": true - }, - { - "name": "end", - "optional": true - } - ] - } - ], - "desc": "

    Returns a new buffer which references the same memory as the old, but offset\nand cropped by the start (defaults to 0) and end (defaults to\nbuffer.length) indexes. Negative indexes start from the end of the buffer.\n\n

    \n

    Modifying the new buffer slice will modify memory in the original buffer!\n\n

    \n

    Example: build a Buffer with the ASCII alphabet, take a slice, then modify one\nbyte from the original Buffer.\n\n

    \n
    var buf1 = new Buffer(26);\n\nfor (var i = 0 ; i < 26 ; i++) {\n  buf1[i] = i + 97; // 97 is ASCII a\n}\n\nvar buf2 = buf1.slice(0, 3);\nconsole.log(buf2.toString('ascii', 0, buf2.length));\nbuf1[0] = 33;\nconsole.log(buf2.toString('ascii', 0, buf2.length));\n\n// abc\n// !bc
    \n" - }, - { - "textRaw": "buf.readUInt8(offset, [noAssert])", - "type": "method", - "name": "readUInt8", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads an unsigned 8 bit integer from the buffer at the specified offset.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x3;\nbuf[1] = 0x4;\nbuf[2] = 0x23;\nbuf[3] = 0x42;\n\nfor (ii = 0; ii < buf.length; ii++) {\n  console.log(buf.readUInt8(ii));\n}\n\n// 0x3\n// 0x4\n// 0x23\n// 0x42
    \n" - }, - { - "textRaw": "buf.readUInt16LE(offset, [noAssert])", - "type": "method", - "name": "readUInt16LE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads an unsigned 16 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x3;\nbuf[1] = 0x4;\nbuf[2] = 0x23;\nbuf[3] = 0x42;\n\nconsole.log(buf.readUInt16BE(0));\nconsole.log(buf.readUInt16LE(0));\nconsole.log(buf.readUInt16BE(1));\nconsole.log(buf.readUInt16LE(1));\nconsole.log(buf.readUInt16BE(2));\nconsole.log(buf.readUInt16LE(2));\n\n// 0x0304\n// 0x0403\n// 0x0423\n// 0x2304\n// 0x2342\n// 0x4223
    \n" - }, - { - "textRaw": "buf.readUInt16BE(offset, [noAssert])", - "type": "method", - "name": "readUInt16BE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads an unsigned 16 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x3;\nbuf[1] = 0x4;\nbuf[2] = 0x23;\nbuf[3] = 0x42;\n\nconsole.log(buf.readUInt16BE(0));\nconsole.log(buf.readUInt16LE(0));\nconsole.log(buf.readUInt16BE(1));\nconsole.log(buf.readUInt16LE(1));\nconsole.log(buf.readUInt16BE(2));\nconsole.log(buf.readUInt16LE(2));\n\n// 0x0304\n// 0x0403\n// 0x0423\n// 0x2304\n// 0x2342\n// 0x4223
    \n" - }, - { - "textRaw": "buf.readUInt32LE(offset, [noAssert])", - "type": "method", - "name": "readUInt32LE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads an unsigned 32 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x3;\nbuf[1] = 0x4;\nbuf[2] = 0x23;\nbuf[3] = 0x42;\n\nconsole.log(buf.readUInt32BE(0));\nconsole.log(buf.readUInt32LE(0));\n\n// 0x03042342\n// 0x42230403
    \n" - }, - { - "textRaw": "buf.readUInt32BE(offset, [noAssert])", - "type": "method", - "name": "readUInt32BE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads an unsigned 32 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x3;\nbuf[1] = 0x4;\nbuf[2] = 0x23;\nbuf[3] = 0x42;\n\nconsole.log(buf.readUInt32BE(0));\nconsole.log(buf.readUInt32LE(0));\n\n// 0x03042342\n// 0x42230403
    \n" - }, - { - "textRaw": "buf.readInt8(offset, [noAssert])", - "type": "method", - "name": "readInt8", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a signed 8 bit integer from the buffer at the specified offset.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Works as buffer.readUInt8, except buffer contents are treated as two's\ncomplement signed values.\n\n

    \n" - }, - { - "textRaw": "buf.readInt16LE(offset, [noAssert])", - "type": "method", - "name": "readInt16LE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a signed 16 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Works as buffer.readUInt16*, except buffer contents are treated as two's\ncomplement signed values.\n\n

    \n" - }, - { - "textRaw": "buf.readInt16BE(offset, [noAssert])", - "type": "method", - "name": "readInt16BE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a signed 16 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Works as buffer.readUInt16*, except buffer contents are treated as two's\ncomplement signed values.\n\n

    \n" - }, - { - "textRaw": "buf.readInt32LE(offset, [noAssert])", - "type": "method", - "name": "readInt32LE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a signed 32 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Works as buffer.readUInt32*, except buffer contents are treated as two's\ncomplement signed values.\n\n

    \n" - }, - { - "textRaw": "buf.readInt32BE(offset, [noAssert])", - "type": "method", - "name": "readInt32BE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a signed 32 bit integer from the buffer at the specified offset with\nspecified endian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Works as buffer.readUInt32*, except buffer contents are treated as two's\ncomplement signed values.\n\n

    \n" - }, - { - "textRaw": "buf.readFloatLE(offset, [noAssert])", - "type": "method", - "name": "readFloatLE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a 32 bit float from the buffer at the specified offset with specified\nendian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x00;\nbuf[1] = 0x00;\nbuf[2] = 0x80;\nbuf[3] = 0x3f;\n\nconsole.log(buf.readFloatLE(0));\n\n// 0x01
    \n" - }, - { - "textRaw": "buf.readFloatBE(offset, [noAssert])", - "type": "method", - "name": "readFloatBE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a 32 bit float from the buffer at the specified offset with specified\nendian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\n\nbuf[0] = 0x00;\nbuf[1] = 0x00;\nbuf[2] = 0x80;\nbuf[3] = 0x3f;\n\nconsole.log(buf.readFloatLE(0));\n\n// 0x01
    \n" - }, - { - "textRaw": "buf.readDoubleLE(offset, [noAssert])", - "type": "method", - "name": "readDoubleLE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a 64 bit double from the buffer at the specified offset with specified\nendian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(8);\n\nbuf[0] = 0x55;\nbuf[1] = 0x55;\nbuf[2] = 0x55;\nbuf[3] = 0x55;\nbuf[4] = 0x55;\nbuf[5] = 0x55;\nbuf[6] = 0xd5;\nbuf[7] = 0x3f;\n\nconsole.log(buf.readDoubleLE(0));\n\n// 0.3333333333333333
    \n" - }, - { - "textRaw": "buf.readDoubleBE(offset, [noAssert])", - "type": "method", - "name": "readDoubleBE", - "signatures": [ - { - "return": { - "textRaw": "Return: Number ", - "name": "return", - "desc": "Number" - }, - "params": [ - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Reads a 64 bit double from the buffer at the specified offset with specified\nendian format.\n\n

    \n

    Set noAssert to true to skip validation of offset. This means that offset\nmay be beyond the end of the buffer. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(8);\n\nbuf[0] = 0x55;\nbuf[1] = 0x55;\nbuf[2] = 0x55;\nbuf[3] = 0x55;\nbuf[4] = 0x55;\nbuf[5] = 0x55;\nbuf[6] = 0xd5;\nbuf[7] = 0x3f;\n\nconsole.log(buf.readDoubleLE(0));\n\n// 0.3333333333333333
    \n" - }, - { - "textRaw": "buf.writeUInt8(value, offset, [noAssert])", - "type": "method", - "name": "writeUInt8", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset. Note, value must be a\nvalid unsigned 8 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeUInt8(0x3, 0);\nbuf.writeUInt8(0x4, 1);\nbuf.writeUInt8(0x23, 2);\nbuf.writeUInt8(0x42, 3);\n\nconsole.log(buf);\n\n// <Buffer 03 04 23 42>
    \n" - }, - { - "textRaw": "buf.writeUInt16LE(value, offset, [noAssert])", - "type": "method", - "name": "writeUInt16LE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid unsigned 16 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeUInt16BE(0xdead, 0);\nbuf.writeUInt16BE(0xbeef, 2);\n\nconsole.log(buf);\n\nbuf.writeUInt16LE(0xdead, 0);\nbuf.writeUInt16LE(0xbeef, 2);\n\nconsole.log(buf);\n\n// <Buffer de ad be ef>\n// <Buffer ad de ef be>
    \n" - }, - { - "textRaw": "buf.writeUInt16BE(value, offset, [noAssert])", - "type": "method", - "name": "writeUInt16BE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid unsigned 16 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeUInt16BE(0xdead, 0);\nbuf.writeUInt16BE(0xbeef, 2);\n\nconsole.log(buf);\n\nbuf.writeUInt16LE(0xdead, 0);\nbuf.writeUInt16LE(0xbeef, 2);\n\nconsole.log(buf);\n\n// <Buffer de ad be ef>\n// <Buffer ad de ef be>
    \n" - }, - { - "textRaw": "buf.writeUInt32LE(value, offset, [noAssert])", - "type": "method", - "name": "writeUInt32LE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid unsigned 32 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeUInt32BE(0xfeedface, 0);\n\nconsole.log(buf);\n\nbuf.writeUInt32LE(0xfeedface, 0);\n\nconsole.log(buf);\n\n// <Buffer fe ed fa ce>\n// <Buffer ce fa ed fe>
    \n" - }, - { - "textRaw": "buf.writeUInt32BE(value, offset, [noAssert])", - "type": "method", - "name": "writeUInt32BE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid unsigned 32 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeUInt32BE(0xfeedface, 0);\n\nconsole.log(buf);\n\nbuf.writeUInt32LE(0xfeedface, 0);\n\nconsole.log(buf);\n\n// <Buffer fe ed fa ce>\n// <Buffer ce fa ed fe>
    \n" - }, - { - "textRaw": "buf.writeInt8(value, offset, [noAssert])", - "type": "method", - "name": "writeInt8", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset. Note, value must be a\nvalid signed 8 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Works as buffer.writeUInt8, except value is written out as a two's complement\nsigned integer into buffer.\n\n

    \n" - }, - { - "textRaw": "buf.writeInt16LE(value, offset, [noAssert])", - "type": "method", - "name": "writeInt16LE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid signed 16 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Works as buffer.writeUInt16*, except value is written out as a two's\ncomplement signed integer into buffer.\n\n

    \n" - }, - { - "textRaw": "buf.writeInt16BE(value, offset, [noAssert])", - "type": "method", - "name": "writeInt16BE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid signed 16 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Works as buffer.writeUInt16*, except value is written out as a two's\ncomplement signed integer into buffer.\n\n

    \n" - }, - { - "textRaw": "buf.writeInt32LE(value, offset, [noAssert])", - "type": "method", - "name": "writeInt32LE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid signed 32 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Works as buffer.writeUInt32*, except value is written out as a two's\ncomplement signed integer into buffer.\n\n

    \n" - }, - { - "textRaw": "buf.writeInt32BE(value, offset, [noAssert])", - "type": "method", - "name": "writeInt32BE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid signed 32 bit integer.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Works as buffer.writeUInt32*, except value is written out as a two's\ncomplement signed integer into buffer.\n\n

    \n" - }, - { - "textRaw": "buf.writeFloatLE(value, offset, [noAssert])", - "type": "method", - "name": "writeFloatLE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, behavior is unspecified if value is not a 32 bit float.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeFloatBE(0xcafebabe, 0);\n\nconsole.log(buf);\n\nbuf.writeFloatLE(0xcafebabe, 0);\n\nconsole.log(buf);\n\n// <Buffer 4f 4a fe bb>\n// <Buffer bb fe 4a 4f>
    \n" - }, - { - "textRaw": "buf.writeFloatBE(value, offset, [noAssert])", - "type": "method", - "name": "writeFloatBE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, behavior is unspecified if value is not a 32 bit float.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(4);\nbuf.writeFloatBE(0xcafebabe, 0);\n\nconsole.log(buf);\n\nbuf.writeFloatLE(0xcafebabe, 0);\n\nconsole.log(buf);\n\n// <Buffer 4f 4a fe bb>\n// <Buffer bb fe 4a 4f>
    \n" - }, - { - "textRaw": "buf.writeDoubleLE(value, offset, [noAssert])", - "type": "method", - "name": "writeDoubleLE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid 64 bit double.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(8);\nbuf.writeDoubleBE(0xdeadbeefcafebabe, 0);\n\nconsole.log(buf);\n\nbuf.writeDoubleLE(0xdeadbeefcafebabe, 0);\n\nconsole.log(buf);\n\n// <Buffer 43 eb d5 b7 dd f9 5f d7>\n// <Buffer d7 5f f9 dd b7 d5 eb 43>
    \n" - }, - { - "textRaw": "buf.writeDoubleBE(value, offset, [noAssert])", - "type": "method", - "name": "writeDoubleBE", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` Number ", - "name": "value", - "desc": "Number" - }, - { - "textRaw": "`offset` Number ", - "name": "offset", - "desc": "Number" - }, - { - "textRaw": "`noAssert` Boolean, Optional, Default: false ", - "name": "noAssert", - "desc": "Boolean, Optional, Default: false", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset" - }, - { - "name": "noAssert", - "optional": true - } - ] - } - ], - "desc": "

    Writes value to the buffer at the specified offset with specified endian\nformat. Note, value must be a valid 64 bit double.\n\n

    \n

    Set noAssert to true to skip validation of value and offset. This means\nthat value may be too large for the specific function and offset may be\nbeyond the end of the buffer leading to the values being silently dropped. This\nshould not be used unless you are certain of correctness. Defaults to false.\n\n

    \n

    Example:\n\n

    \n
    var buf = new Buffer(8);\nbuf.writeDoubleBE(0xdeadbeefcafebabe, 0);\n\nconsole.log(buf);\n\nbuf.writeDoubleLE(0xdeadbeefcafebabe, 0);\n\nconsole.log(buf);\n\n// <Buffer 43 eb d5 b7 dd f9 5f d7>\n// <Buffer d7 5f f9 dd b7 d5 eb 43>
    \n" - }, - { - "textRaw": "buf.fill(value, [offset], [end])", - "type": "method", - "name": "fill", - "signatures": [ - { - "params": [ - { - "textRaw": "`value` ", - "name": "value" - }, - { - "textRaw": "`offset` Number, Optional ", - "name": "offset", - "optional": true, - "desc": "Number" - }, - { - "textRaw": "`end` Number, Optional ", - "name": "end", - "optional": true, - "desc": "Number" - } - ] - }, - { - "params": [ - { - "name": "value" - }, - { - "name": "offset", - "optional": true - }, - { - "name": "end", - "optional": true - } - ] - } - ], - "desc": "

    Fills the buffer with the specified value. If the offset (defaults to 0)\nand end (defaults to buffer.length) are not given it will fill the entire\nbuffer.\n\n

    \n
    var b = new Buffer(50);\nb.fill("h");
    \n" - } - ], - "properties": [ - { - "textRaw": "buf[index]", - "name": "[index]", - "desc": "

    Get and set the octet at index. The values refer to individual bytes,\nso the legal range is between 0x00 and 0xFF hex or 0 and 255.\n\n

    \n

    Example: copy an ASCII string into a buffer, one byte at a time:\n\n

    \n
    str = "node.js";\nbuf = new Buffer(str.length);\n\nfor (var i = 0; i < str.length ; i++) {\n  buf[i] = str.charCodeAt(i);\n}\n\nconsole.log(buf);\n\n// node.js
    \n" - }, - { - "textRaw": "`length` Number ", - "name": "length", - "desc": "

    The size of the buffer in bytes. Note that this is not necessarily the size\nof the contents. length refers to the amount of memory allocated for the\nbuffer object. It does not change when the contents of the buffer are changed.\n\n

    \n
    buf = new Buffer(1234);\n\nconsole.log(buf.length);\nbuf.write("some string", 0, "ascii");\nconsole.log(buf.length);\n\n// 1234\n// 1234
    \n", - "shortDesc": "Number" - } - ], - "signatures": [ - { - "params": [ - { - "textRaw": "`size` Number ", - "name": "size", - "desc": "Number" - } - ], - "desc": "

    Allocates a new buffer of size octets.\n\n

    \n" - }, - { - "params": [ - { - "name": "size" - } - ], - "desc": "

    Allocates a new buffer of size octets.\n\n

    \n" - }, - { - "params": [ - { - "textRaw": "`array` Array ", - "name": "array", - "desc": "Array" - } - ], - "desc": "

    Allocates a new buffer using an array of octets.\n\n

    \n" - }, - { - "params": [ - { - "name": "array" - } - ], - "desc": "

    Allocates a new buffer using an array of octets.\n\n

    \n" - }, - { - "params": [ - { - "textRaw": "`str` String - string to encode. ", - "name": "str", - "desc": "String - string to encode." - }, - { - "textRaw": "`encoding` String - encoding to use, Optional. ", - "name": "encoding", - "desc": "String - encoding to use, Optional.", - "optional": true - } - ], - "desc": "

    Allocates a new buffer containing the given str.\nencoding defaults to 'utf8'.\n\n

    \n" - }, - { - "params": [ - { - "name": "str" - }, - { - "name": "encoding", - "optional": true - } - ], - "desc": "

    Allocates a new buffer containing the given str.\nencoding defaults to 'utf8'.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: SlowBuffer", - "type": "class", - "name": "SlowBuffer", - "desc": "

    This class is primarily for internal use. JavaScript programs should\nuse Buffer instead of using SlowBuffer.\n\n

    \n

    In order to avoid the overhead of allocating many C++ Buffer objects for\nsmall blocks of memory in the lifetime of a server, Node allocates memory\nin 8Kb (8192 byte) chunks. If a buffer is smaller than this size, then it\nwill be backed by a parent SlowBuffer object. If it is larger than this,\nthen Node will allocate a SlowBuffer slab for it directly.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "`INSPECT_MAX_BYTES` Number, Default: 50 ", - "name": "INSPECT_MAX_BYTES", - "desc": "

    How many bytes will be returned when buffer.inspect() is called. This can\nbe overridden by user modules.\n\n

    \n

    Note that this is a property on the buffer module returned by\nrequire('buffer'), not on the Buffer global, or a buffer instance.\n\n

    \n", - "shortDesc": "Number, Default: 50" - } - ], - "type": "module", - "displayName": "Buffer" - }, - { - "textRaw": "Stream", - "name": "stream", - "stability": 2, - "stabilityText": "Unstable", - "desc": "

    A stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP\nserver is a stream, as is\n[stdout][]. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\n

    \n

    You can load the Stream base classes by doing require('stream').\nThere are base classes provided for [Readable][] streams, [Writable][]\nstreams, [Duplex][] streams, and [Transform][] streams.\n\n

    \n

    This document is split up into 3 sections. The first explains the\nparts of the API that you need to be aware of to use streams in your\nprograms. If you never implement a streaming API yourself, you can\nstop there.\n\n

    \n

    The second section explains the parts of the API that you need to use\nif you implement your own custom streams yourself. The API is\ndesigned to make this easy for you to do.\n\n

    \n

    The third section goes into more depth about how streams work,\nincluding some of the internal mechanisms and functions that you\nshould probably not modify unless you definitely know what you are\ndoing.\n\n\n

    \n", - "classes": [ - { - "textRaw": "Class: stream.Readable", - "type": "class", - "name": "stream.Readable", - "desc": "

    The Readable stream interface is the abstraction for a source of\ndata that you are reading from. In other words, data comes out of a\nReadable stream.\n\n

    \n

    A Readable stream will not start emitting data until you indicate that\nyou are ready to receive it.\n\n

    \n

    Readable streams have two "modes": a flowing mode and a non-flowing\nmode. When in flowing mode, data is read from the underlying system\nand provided to your program as fast as possible. In non-flowing\nmode, you must explicitly call stream.read() to get chunks of data\nout.\n\n

    \n

    Examples of readable streams include:\n\n

    \n\n", - "events": [ - { - "textRaw": "Event: 'readable'", - "type": "event", - "name": "readable", - "desc": "

    When a chunk of data can be read from the stream, it will emit a\n'readable' event.\n\n

    \n

    In some cases, listening for a 'readable' event will cause some data\nto be read into the internal buffer from the underlying system, if it\nhadn't already.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('readable', function() {\n  // there is some data to read now\n})
    \n

    Once the internal buffer is drained, a readable event will fire\nagain when more data is available.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'data'", - "type": "event", - "name": "data", - "params": [], - "desc": "

    If you attach a data event listener, then it will switch the stream\ninto flowing mode, and data will be passed to your handler as soon as\nit is available.\n\n

    \n

    If you just want to get all the data out of the stream as fast as\npossible, this is the best way to do so.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n})
    \n" - }, - { - "textRaw": "Event: 'end'", - "type": "event", - "name": "end", - "desc": "

    This event fires when no more data will be provided.\n\n

    \n

    Note that the end event will not fire unless the data is\ncompletely consumed. This can be done by switching into flowing mode,\nor by calling read() repeatedly until you get to the end.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n})\nreadable.on('end', function() {\n  console.log('there will be no more data.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    Emitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "desc": "

    Emitted if there was an error receiving data.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "readable.read([size])", - "type": "method", - "name": "read", - "signatures": [ - { - "return": { - "textRaw": "Return {String | Buffer | null} ", - "name": "return", - "type": "String | Buffer | null" - }, - "params": [ - { - "textRaw": "`size` {Number} Optional argument to specify how much data to read. ", - "name": "size", - "type": "Number", - "desc": "Optional argument to specify how much data to read.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "size", - "optional": true - } - ] - } - ], - "desc": "

    The read() method pulls some data out of the internal buffer and\nreturns it. If there is no data available, then it will return\nnull.\n\n

    \n

    If you pass in a size argument, then it will return that many\nbytes. If size bytes are not available, then it will return null.\n\n

    \n

    If you do not specify a size argument, then it will return all the\ndata in the internal buffer.\n\n

    \n

    This method should only be called in non-flowing mode. In\nflowing-mode, this method is called automatically until the internal\nbuffer is drained.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('readable', function() {\n  var chunk;\n  while (null !== (chunk = readable.read())) {\n    console.log('got %d bytes of data', chunk.length);\n  }\n});
    \n" - }, - { - "textRaw": "readable.setEncoding(encoding)", - "type": "method", - "name": "setEncoding", - "signatures": [ - { - "params": [ - { - "textRaw": "`encoding` {String} The encoding to use. ", - "name": "encoding", - "type": "String", - "desc": "The encoding to use." - } - ] - }, - { - "params": [ - { - "name": "encoding" - } - ] - } - ], - "desc": "

    Call this function to cause the stream to return strings of the\nspecified encoding instead of Buffer objects. For example, if you do\nreadable.setEncoding('utf8'), then the output data will be\ninterpreted as UTF-8 data, and returned as strings. If you do\nreadable.setEncoding('hex'), then the data will be encoded in\nhexadecimal string format.\n\n

    \n

    This properly handles multi-byte characters that would otherwise be\npotentially mangled if you simply pulled the Buffers directly and\ncalled buf.toString(encoding) on them. If you want to read the data\nas strings, always use this method.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.setEncoding('utf8');\nreadable.on('data', function(chunk) {\n  assert.equal(typeof chunk, 'string');\n  console.log('got %d characters of string data', chunk.length);\n})
    \n" - }, - { - "textRaw": "readable.resume()", - "type": "method", - "name": "resume", - "desc": "

    This method will cause the readable stream to resume emitting data\nevents.\n\n

    \n

    This method will switch the stream into flowing-mode. If you do not\nwant to consume the data from a stream, but you do want to get to\nits end event, you can call readable.resume() to open the flow of\ndata.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.resume();\nreadable.on('end', function(chunk) {\n  console.log('got to the end, but did not read anything');\n})
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "readable.pause()", - "type": "method", - "name": "pause", - "desc": "

    This method will cause a stream in flowing-mode to stop emitting\ndata events. Any data that becomes available will remain in the\ninternal buffer.\n\n

    \n

    This method is only relevant in flowing mode. When called on a\nnon-flowing stream, it will switch into flowing mode, but remain\npaused.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n  readable.pause();\n  console.log('there will be no more data for 1 second');\n  setTimeout(function() {\n    console.log('now data will start flowing again');\n    readable.resume();\n  }, 1000);\n})
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "readable.pipe(destination, [options])", - "type": "method", - "name": "pipe", - "signatures": [ - { - "params": [ - { - "textRaw": "`destination` {[Writable][] Stream} The destination for writing data ", - "name": "destination", - "type": "[Writable][] Stream", - "desc": "The destination for writing data" - }, - { - "textRaw": "`options` {Object} Pipe options ", - "options": [ - { - "textRaw": "`end` {Boolean} End the writer when the reader ends. Default = `true` ", - "name": "end", - "type": "Boolean", - "desc": "End the writer when the reader ends. Default = `true`" - } - ], - "name": "options", - "type": "Object", - "desc": "Pipe options", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "destination" - }, - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    This method pulls all the data out of a readable stream, and writes it\nto the supplied destination, automatically managing the flow so that\nthe destination is not overwhelmed by a fast readable stream.\n\n

    \n

    Multiple destinations can be piped to safely.\n\n

    \n
    var readable = getReadableStreamSomehow();\nvar writable = fs.createWriteStream('file.txt');\n// All the data from readable goes into 'file.txt'\nreadable.pipe(writable);
    \n

    This function returns the destination stream, so you can set up pipe\nchains like so:\n\n

    \n
    var r = fs.createReadStream('file.txt');\nvar z = zlib.createGzip();\nvar w = fs.createWriteStream('file.txt.gz');\nr.pipe(z).pipe(w);
    \n

    For example, emulating the Unix cat command:\n\n

    \n
    process.stdin.pipe(process.stdout);
    \n

    By default [end()][] is called on the destination when the source stream\nemits end, so that destination is no longer writable. Pass { end:\nfalse } as options to keep the destination stream open.\n\n

    \n

    This keeps writer open so that "Goodbye" can be written at the\nend.\n\n

    \n
    reader.pipe(writer, { end: false });\nreader.on('end', function() {\n  writer.end('Goodbye\\n');\n});
    \n

    Note that process.stderr and process.stdout are never closed until\nthe process exits, regardless of the specified options.\n\n

    \n" - }, - { - "textRaw": "readable.unpipe([destination])", - "type": "method", - "name": "unpipe", - "signatures": [ - { - "params": [ - { - "textRaw": "`destination` {[Writable][] Stream} Optional specific stream to unpipe ", - "name": "destination", - "type": "[Writable][] Stream", - "desc": "Optional specific stream to unpipe", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "destination", - "optional": true - } - ] - } - ], - "desc": "

    This method will remove the hooks set up for a previous pipe() call.\n\n

    \n

    If the destination is not specified, then all pipes are removed.\n\n

    \n

    If the destination is specified, but no pipe is set up for it, then\nthis is a no-op.\n\n

    \n
    var readable = getReadableStreamSomehow();\nvar writable = fs.createWriteStream('file.txt');\n// All the data from readable goes into 'file.txt',\n// but only for the first second\nreadable.pipe(writable);\nsetTimeout(function() {\n  console.log('stop writing to file.txt');\n  readable.unpipe(writable);\n  console.log('manually close the file stream');\n  writable.end();\n}, 1000);
    \n" - }, - { - "textRaw": "readable.unshift(chunk)", - "type": "method", - "name": "unshift", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {Buffer | String} Chunk of data to unshift onto the read queue ", - "name": "chunk", - "type": "Buffer | String", - "desc": "Chunk of data to unshift onto the read queue" - } - ] - }, - { - "params": [ - { - "name": "chunk" - } - ] - } - ], - "desc": "

    This is useful in certain cases where a stream is being consumed by a\nparser, which needs to "un-consume" some data that it has\noptimistically pulled out of the source, so that the stream can be\npassed on to some other party.\n\n

    \n

    If you find that you must often call stream.unshift(chunk) in your\nprograms, consider implementing a [Transform][] stream instead. (See API\nfor Stream Implementors, below.)\n\n

    \n
    // Pull off a header delimited by \\n\\n\n// use unshift() if we get too much\n// Call the callback with (error, header, stream)\nvar StringDecoder = require('string_decoder').StringDecoder;\nfunction parseHeader(stream, callback) {\n  stream.on('error', callback);\n  stream.on('readable', onReadable);\n  var decoder = new StringDecoder('utf8');\n  var header = '';\n  function onReadable() {\n    var chunk;\n    while (null !== (chunk = stream.read())) {\n      var str = decoder.write(chunk);\n      if (str.match(/\\n\\n/)) {\n        // found the header boundary\n        var split = str.split(/\\n\\n/);\n        header += split.shift();\n        var remaining = split.join('\\n\\n');\n        var buf = new Buffer(remaining, 'utf8');\n        if (buf.length)\n          stream.unshift(buf);\n        stream.removeListener('error', callback);\n        stream.removeListener('readable', onReadable);\n        // now the body of the message can be read from the stream.\n        callback(null, header, stream);\n      } else {\n        // still reading the header.\n        header += str;\n      }\n    }\n  }\n}
    \n" - }, - { - "textRaw": "readable.wrap(stream)", - "type": "method", - "name": "wrap", - "signatures": [ - { - "params": [ - { - "textRaw": "`stream` {Stream} An \"old style\" readable stream ", - "name": "stream", - "type": "Stream", - "desc": "An \"old style\" readable stream" - } - ] - }, - { - "params": [ - { - "name": "stream" - } - ] - } - ], - "desc": "

    Versions of Node prior to v0.10 had streams that did not implement the\nentire Streams API as it is today. (See "Compatibility" below for\nmore information.)\n\n

    \n

    If you are using an older Node library that emits 'data' events and\nhas a pause() method that is advisory only, then you can use the\nwrap() method to create a [Readable][] stream that uses the old stream\nas its data source.\n\n

    \n

    You will very rarely ever need to call this function, but it exists\nas a convenience for interacting with old Node programs and libraries.\n\n

    \n

    For example:\n\n

    \n
    var OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n  myReader.read(); // etc.\n});
    \n" - } - ] - }, - { - "textRaw": "Class: stream.Writable", - "type": "class", - "name": "stream.Writable", - "desc": "

    The Writable stream interface is an abstraction for a destination\nthat you are writing data to.\n\n

    \n

    Examples of writable streams include:\n\n

    \n\n", - "methods": [ - { - "textRaw": "writable.write(chunk, [encoding], [callback])", - "type": "method", - "name": "write", - "signatures": [ - { - "return": { - "textRaw": "Returns: {Boolean} True if the data was handled completely. ", - "name": "return", - "type": "Boolean", - "desc": "True if the data was handled completely." - }, - "params": [ - { - "textRaw": "`chunk` {String | Buffer} The data to write ", - "name": "chunk", - "type": "String | Buffer", - "desc": "The data to write" - }, - { - "textRaw": "`encoding` {String} The encoding, if `chunk` is a String ", - "name": "encoding", - "type": "String", - "desc": "The encoding, if `chunk` is a String", - "optional": true - }, - { - "textRaw": "`callback` {Function} Callback for when this chunk of data is flushed ", - "name": "callback", - "type": "Function", - "desc": "Callback for when this chunk of data is flushed", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    This method writes some data to the underlying system, and calls the\nsupplied callback once the data has been fully handled.\n\n

    \n

    The return value indicates if you should continue writing right now.\nIf the data had to be buffered internally, then it will return\nfalse. Otherwise, it will return true.\n\n

    \n

    This return value is strictly advisory. You MAY continue to write,\neven if it returns false. However, writes will be buffered in\nmemory, so it is best not to do this excessively. Instead, wait for\nthe drain event before writing more data.\n\n

    \n" - }, - { - "textRaw": "writable.end([chunk], [encoding], [callback])", - "type": "method", - "name": "end", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {String | Buffer} Optional data to write ", - "name": "chunk", - "type": "String | Buffer", - "desc": "Optional data to write", - "optional": true - }, - { - "textRaw": "`encoding` {String} The encoding, if `chunk` is a String ", - "name": "encoding", - "type": "String", - "desc": "The encoding, if `chunk` is a String", - "optional": true - }, - { - "textRaw": "`callback` {Function} Optional callback for when the stream is finished ", - "name": "callback", - "type": "Function", - "desc": "Optional callback for when the stream is finished", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk", - "optional": true - }, - { - "name": "encoding", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    Call this method when no more data will be written to the stream. If\nsupplied, the callback is attached as a listener on the finish event.\n\n

    \n

    Calling [write()][] after calling [end()][] will raise an error.\n\n

    \n
    // write 'hello, ' and then end with 'world!'\nhttp.createServer(function (req, res) {\n  res.write('hello, ');\n  res.end('world!');\n  // writing more now is not allowed!\n});
    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'drain'", - "type": "event", - "name": "drain", - "desc": "

    If a [writable.write(chunk)][] call returns false, then the drain\nevent will indicate when it is appropriate to begin writing more data\nto the stream.\n\n

    \n
    // Write the data to the supplied writable stream 1MM times.\n// Be attentive to back-pressure.\nfunction writeOneMillionTimes(writer, data, encoding, callback) {\n  var i = 1000000;\n  write();\n  function write() {\n    var ok = true;\n    do {\n      i -= 1;\n      if (i === 0) {\n        // last time!\n        writer.write(data, encoding, callback);\n      } else {\n        // see if we should continue, or wait\n        // don't pass the callback, because we're not done yet.\n        ok = writer.write(data, encoding);\n      }\n    } while (i > 0 && ok);\n    if (i > 0) {\n      // had to stop early!\n      // write some more once it drains\n      writer.once('drain', write);\n    }\n  }\n}
    \n", - "params": [] - }, - { - "textRaw": "Event: 'finish'", - "type": "event", - "name": "finish", - "desc": "

    When the [end()][] method has been called, and all data has been flushed\nto the underlying system, this event is emitted.\n\n

    \n
    var writer = getWritableStreamSomehow();\nfor (var i = 0; i < 100; i ++) {\n  writer.write('hello, #' + i + '!\\n');\n}\nwriter.end('this is the end\\n');\nwrite.on('finish', function() {\n  console.error('all writes are now complete.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'pipe'", - "type": "event", - "name": "pipe", - "params": [], - "desc": "

    This is emitted whenever the pipe() method is called on a readable\nstream, adding this writable to its set of destinations.\n\n

    \n
    var writer = getWritableStreamSomehow();\nvar reader = getReadableStreamSomehow();\nwriter.on('pipe', function(src) {\n  console.error('something is piping into the writer');\n  assert.equal(src, reader);\n});\nreader.pipe(writer);
    \n" - }, - { - "textRaw": "Event: 'unpipe'", - "type": "event", - "name": "unpipe", - "params": [], - "desc": "

    This is emitted whenever the [unpipe()][] method is called on a\nreadable stream, removing this writable from its set of destinations.\n\n

    \n
    var writer = getWritableStreamSomehow();\nvar reader = getReadableStreamSomehow();\nwriter.on('unpipe', function(src) {\n  console.error('something has stopped piping into the writer');\n  assert.equal(src, reader);\n});\nreader.pipe(writer);\nreader.unpipe(writer);
    \n" - } - ] - }, - { - "textRaw": "Class: stream.Duplex", - "type": "class", - "name": "stream.Duplex", - "desc": "

    Duplex streams are streams that implement both the [Readable][] and\n[Writable][] interfaces. See above for usage.\n\n

    \n

    Examples of Duplex streams include:\n\n

    \n
      \n
    • [tcp sockets][]
    • \n
    • [zlib streams][]
    • \n
    • [crypto streams][]
    • \n
    \n" - }, - { - "textRaw": "Class: stream.Transform", - "type": "class", - "name": "stream.Transform", - "desc": "

    Transform streams are [Duplex][] streams where the output is in some way\ncomputed from the input. They implement both the [Readable][] and\n[Writable][] interfaces. See above for usage.\n\n

    \n

    Examples of Transform streams include:\n\n

    \n
      \n
    • [zlib streams][]
    • \n
    • [crypto streams][]
    • \n
    \n" - } - ], - "miscs": [ - { - "textRaw": "API for Stream Consumers", - "name": "API for Stream Consumers", - "type": "misc", - "desc": "

    Streams can be either [Readable][], [Writable][], or both ([Duplex][]).\n\n

    \n

    All streams are EventEmitters, but they also have other custom methods\nand properties depending on whether they are Readable, Writable, or\nDuplex.\n\n

    \n

    If a stream is both Readable and Writable, then it implements all of\nthe methods and events below. So, a [Duplex][] or [Transform][] stream is\nfully described by this API, though their implementation may be\nsomewhat different.\n\n

    \n

    It is not necessary to implement Stream interfaces in order to consume\nstreams in your programs. If you are implementing streaming\ninterfaces in your own program, please also refer to\n[API for Stream Implementors][] below.\n\n

    \n

    Almost all Node programs, no matter how simple, use Streams in some\nway. Here is an example of using Streams in a Node program:\n\n

    \n
    var http = require('http');\n\nvar server = http.createServer(function (req, res) {\n  // req is an http.IncomingMessage, which is a Readable Stream\n  // res is an http.ServerResponse, which is a Writable Stream\n\n  var body = '';\n  // we want to get the data as utf8 strings\n  // If you don't set an encoding, then you'll get Buffer objects\n  req.setEncoding('utf8');\n\n  // Readable streams emit 'data' events once a listener is added\n  req.on('data', function (chunk) {\n    body += chunk;\n  })\n\n  // the end event tells you that you have entire body\n  req.on('end', function () {\n    try {\n      var data = JSON.parse(body);\n    } catch (er) {\n      // uh oh!  bad json!\n      res.statusCode = 400;\n      return res.end('error: ' + er.message);\n    }\n\n    // write back something interesting to the user:\n    res.write(typeof data);\n    res.end();\n  })\n})\n\nserver.listen(1337);\n\n// $ curl localhost:1337 -d '{}'\n// object\n// $ curl localhost:1337 -d '"foo"'\n// string\n// $ curl localhost:1337 -d 'not json'\n// error: Unexpected token o
    \n", - "classes": [ - { - "textRaw": "Class: stream.Readable", - "type": "class", - "name": "stream.Readable", - "desc": "

    The Readable stream interface is the abstraction for a source of\ndata that you are reading from. In other words, data comes out of a\nReadable stream.\n\n

    \n

    A Readable stream will not start emitting data until you indicate that\nyou are ready to receive it.\n\n

    \n

    Readable streams have two "modes": a flowing mode and a non-flowing\nmode. When in flowing mode, data is read from the underlying system\nand provided to your program as fast as possible. In non-flowing\nmode, you must explicitly call stream.read() to get chunks of data\nout.\n\n

    \n

    Examples of readable streams include:\n\n

    \n\n", - "events": [ - { - "textRaw": "Event: 'readable'", - "type": "event", - "name": "readable", - "desc": "

    When a chunk of data can be read from the stream, it will emit a\n'readable' event.\n\n

    \n

    In some cases, listening for a 'readable' event will cause some data\nto be read into the internal buffer from the underlying system, if it\nhadn't already.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('readable', function() {\n  // there is some data to read now\n})
    \n

    Once the internal buffer is drained, a readable event will fire\nagain when more data is available.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'data'", - "type": "event", - "name": "data", - "params": [], - "desc": "

    If you attach a data event listener, then it will switch the stream\ninto flowing mode, and data will be passed to your handler as soon as\nit is available.\n\n

    \n

    If you just want to get all the data out of the stream as fast as\npossible, this is the best way to do so.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n})
    \n" - }, - { - "textRaw": "Event: 'end'", - "type": "event", - "name": "end", - "desc": "

    This event fires when no more data will be provided.\n\n

    \n

    Note that the end event will not fire unless the data is\ncompletely consumed. This can be done by switching into flowing mode,\nor by calling read() repeatedly until you get to the end.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n})\nreadable.on('end', function() {\n  console.log('there will be no more data.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    Emitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "desc": "

    Emitted if there was an error receiving data.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "readable.read([size])", - "type": "method", - "name": "read", - "signatures": [ - { - "return": { - "textRaw": "Return {String | Buffer | null} ", - "name": "return", - "type": "String | Buffer | null" - }, - "params": [ - { - "textRaw": "`size` {Number} Optional argument to specify how much data to read. ", - "name": "size", - "type": "Number", - "desc": "Optional argument to specify how much data to read.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "size", - "optional": true - } - ] - } - ], - "desc": "

    The read() method pulls some data out of the internal buffer and\nreturns it. If there is no data available, then it will return\nnull.\n\n

    \n

    If you pass in a size argument, then it will return that many\nbytes. If size bytes are not available, then it will return null.\n\n

    \n

    If you do not specify a size argument, then it will return all the\ndata in the internal buffer.\n\n

    \n

    This method should only be called in non-flowing mode. In\nflowing-mode, this method is called automatically until the internal\nbuffer is drained.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('readable', function() {\n  var chunk;\n  while (null !== (chunk = readable.read())) {\n    console.log('got %d bytes of data', chunk.length);\n  }\n});
    \n" - }, - { - "textRaw": "readable.setEncoding(encoding)", - "type": "method", - "name": "setEncoding", - "signatures": [ - { - "params": [ - { - "textRaw": "`encoding` {String} The encoding to use. ", - "name": "encoding", - "type": "String", - "desc": "The encoding to use." - } - ] - }, - { - "params": [ - { - "name": "encoding" - } - ] - } - ], - "desc": "

    Call this function to cause the stream to return strings of the\nspecified encoding instead of Buffer objects. For example, if you do\nreadable.setEncoding('utf8'), then the output data will be\ninterpreted as UTF-8 data, and returned as strings. If you do\nreadable.setEncoding('hex'), then the data will be encoded in\nhexadecimal string format.\n\n

    \n

    This properly handles multi-byte characters that would otherwise be\npotentially mangled if you simply pulled the Buffers directly and\ncalled buf.toString(encoding) on them. If you want to read the data\nas strings, always use this method.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.setEncoding('utf8');\nreadable.on('data', function(chunk) {\n  assert.equal(typeof chunk, 'string');\n  console.log('got %d characters of string data', chunk.length);\n})
    \n" - }, - { - "textRaw": "readable.resume()", - "type": "method", - "name": "resume", - "desc": "

    This method will cause the readable stream to resume emitting data\nevents.\n\n

    \n

    This method will switch the stream into flowing-mode. If you do not\nwant to consume the data from a stream, but you do want to get to\nits end event, you can call readable.resume() to open the flow of\ndata.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.resume();\nreadable.on('end', function(chunk) {\n  console.log('got to the end, but did not read anything');\n})
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "readable.pause()", - "type": "method", - "name": "pause", - "desc": "

    This method will cause a stream in flowing-mode to stop emitting\ndata events. Any data that becomes available will remain in the\ninternal buffer.\n\n

    \n

    This method is only relevant in flowing mode. When called on a\nnon-flowing stream, it will switch into flowing mode, but remain\npaused.\n\n

    \n
    var readable = getReadableStreamSomehow();\nreadable.on('data', function(chunk) {\n  console.log('got %d bytes of data', chunk.length);\n  readable.pause();\n  console.log('there will be no more data for 1 second');\n  setTimeout(function() {\n    console.log('now data will start flowing again');\n    readable.resume();\n  }, 1000);\n})
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "readable.pipe(destination, [options])", - "type": "method", - "name": "pipe", - "signatures": [ - { - "params": [ - { - "textRaw": "`destination` {[Writable][] Stream} The destination for writing data ", - "name": "destination", - "type": "[Writable][] Stream", - "desc": "The destination for writing data" - }, - { - "textRaw": "`options` {Object} Pipe options ", - "options": [ - { - "textRaw": "`end` {Boolean} End the writer when the reader ends. Default = `true` ", - "name": "end", - "type": "Boolean", - "desc": "End the writer when the reader ends. Default = `true`" - } - ], - "name": "options", - "type": "Object", - "desc": "Pipe options", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "destination" - }, - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    This method pulls all the data out of a readable stream, and writes it\nto the supplied destination, automatically managing the flow so that\nthe destination is not overwhelmed by a fast readable stream.\n\n

    \n

    Multiple destinations can be piped to safely.\n\n

    \n
    var readable = getReadableStreamSomehow();\nvar writable = fs.createWriteStream('file.txt');\n// All the data from readable goes into 'file.txt'\nreadable.pipe(writable);
    \n

    This function returns the destination stream, so you can set up pipe\nchains like so:\n\n

    \n
    var r = fs.createReadStream('file.txt');\nvar z = zlib.createGzip();\nvar w = fs.createWriteStream('file.txt.gz');\nr.pipe(z).pipe(w);
    \n

    For example, emulating the Unix cat command:\n\n

    \n
    process.stdin.pipe(process.stdout);
    \n

    By default [end()][] is called on the destination when the source stream\nemits end, so that destination is no longer writable. Pass { end:\nfalse } as options to keep the destination stream open.\n\n

    \n

    This keeps writer open so that "Goodbye" can be written at the\nend.\n\n

    \n
    reader.pipe(writer, { end: false });\nreader.on('end', function() {\n  writer.end('Goodbye\\n');\n});
    \n

    Note that process.stderr and process.stdout are never closed until\nthe process exits, regardless of the specified options.\n\n

    \n" - }, - { - "textRaw": "readable.unpipe([destination])", - "type": "method", - "name": "unpipe", - "signatures": [ - { - "params": [ - { - "textRaw": "`destination` {[Writable][] Stream} Optional specific stream to unpipe ", - "name": "destination", - "type": "[Writable][] Stream", - "desc": "Optional specific stream to unpipe", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "destination", - "optional": true - } - ] - } - ], - "desc": "

    This method will remove the hooks set up for a previous pipe() call.\n\n

    \n

    If the destination is not specified, then all pipes are removed.\n\n

    \n

    If the destination is specified, but no pipe is set up for it, then\nthis is a no-op.\n\n

    \n
    var readable = getReadableStreamSomehow();\nvar writable = fs.createWriteStream('file.txt');\n// All the data from readable goes into 'file.txt',\n// but only for the first second\nreadable.pipe(writable);\nsetTimeout(function() {\n  console.log('stop writing to file.txt');\n  readable.unpipe(writable);\n  console.log('manually close the file stream');\n  writable.end();\n}, 1000);
    \n" - }, - { - "textRaw": "readable.unshift(chunk)", - "type": "method", - "name": "unshift", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {Buffer | String} Chunk of data to unshift onto the read queue ", - "name": "chunk", - "type": "Buffer | String", - "desc": "Chunk of data to unshift onto the read queue" - } - ] - }, - { - "params": [ - { - "name": "chunk" - } - ] - } - ], - "desc": "

    This is useful in certain cases where a stream is being consumed by a\nparser, which needs to "un-consume" some data that it has\noptimistically pulled out of the source, so that the stream can be\npassed on to some other party.\n\n

    \n

    If you find that you must often call stream.unshift(chunk) in your\nprograms, consider implementing a [Transform][] stream instead. (See API\nfor Stream Implementors, below.)\n\n

    \n
    // Pull off a header delimited by \\n\\n\n// use unshift() if we get too much\n// Call the callback with (error, header, stream)\nvar StringDecoder = require('string_decoder').StringDecoder;\nfunction parseHeader(stream, callback) {\n  stream.on('error', callback);\n  stream.on('readable', onReadable);\n  var decoder = new StringDecoder('utf8');\n  var header = '';\n  function onReadable() {\n    var chunk;\n    while (null !== (chunk = stream.read())) {\n      var str = decoder.write(chunk);\n      if (str.match(/\\n\\n/)) {\n        // found the header boundary\n        var split = str.split(/\\n\\n/);\n        header += split.shift();\n        var remaining = split.join('\\n\\n');\n        var buf = new Buffer(remaining, 'utf8');\n        if (buf.length)\n          stream.unshift(buf);\n        stream.removeListener('error', callback);\n        stream.removeListener('readable', onReadable);\n        // now the body of the message can be read from the stream.\n        callback(null, header, stream);\n      } else {\n        // still reading the header.\n        header += str;\n      }\n    }\n  }\n}
    \n" - }, - { - "textRaw": "readable.wrap(stream)", - "type": "method", - "name": "wrap", - "signatures": [ - { - "params": [ - { - "textRaw": "`stream` {Stream} An \"old style\" readable stream ", - "name": "stream", - "type": "Stream", - "desc": "An \"old style\" readable stream" - } - ] - }, - { - "params": [ - { - "name": "stream" - } - ] - } - ], - "desc": "

    Versions of Node prior to v0.10 had streams that did not implement the\nentire Streams API as it is today. (See "Compatibility" below for\nmore information.)\n\n

    \n

    If you are using an older Node library that emits 'data' events and\nhas a pause() method that is advisory only, then you can use the\nwrap() method to create a [Readable][] stream that uses the old stream\nas its data source.\n\n

    \n

    You will very rarely ever need to call this function, but it exists\nas a convenience for interacting with old Node programs and libraries.\n\n

    \n

    For example:\n\n

    \n
    var OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n  myReader.read(); // etc.\n});
    \n" - } - ] - }, - { - "textRaw": "Class: stream.Writable", - "type": "class", - "name": "stream.Writable", - "desc": "

    The Writable stream interface is an abstraction for a destination\nthat you are writing data to.\n\n

    \n

    Examples of writable streams include:\n\n

    \n\n", - "methods": [ - { - "textRaw": "writable.write(chunk, [encoding], [callback])", - "type": "method", - "name": "write", - "signatures": [ - { - "return": { - "textRaw": "Returns: {Boolean} True if the data was handled completely. ", - "name": "return", - "type": "Boolean", - "desc": "True if the data was handled completely." - }, - "params": [ - { - "textRaw": "`chunk` {String | Buffer} The data to write ", - "name": "chunk", - "type": "String | Buffer", - "desc": "The data to write" - }, - { - "textRaw": "`encoding` {String} The encoding, if `chunk` is a String ", - "name": "encoding", - "type": "String", - "desc": "The encoding, if `chunk` is a String", - "optional": true - }, - { - "textRaw": "`callback` {Function} Callback for when this chunk of data is flushed ", - "name": "callback", - "type": "Function", - "desc": "Callback for when this chunk of data is flushed", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    This method writes some data to the underlying system, and calls the\nsupplied callback once the data has been fully handled.\n\n

    \n

    The return value indicates if you should continue writing right now.\nIf the data had to be buffered internally, then it will return\nfalse. Otherwise, it will return true.\n\n

    \n

    This return value is strictly advisory. You MAY continue to write,\neven if it returns false. However, writes will be buffered in\nmemory, so it is best not to do this excessively. Instead, wait for\nthe drain event before writing more data.\n\n

    \n" - }, - { - "textRaw": "writable.end([chunk], [encoding], [callback])", - "type": "method", - "name": "end", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {String | Buffer} Optional data to write ", - "name": "chunk", - "type": "String | Buffer", - "desc": "Optional data to write", - "optional": true - }, - { - "textRaw": "`encoding` {String} The encoding, if `chunk` is a String ", - "name": "encoding", - "type": "String", - "desc": "The encoding, if `chunk` is a String", - "optional": true - }, - { - "textRaw": "`callback` {Function} Optional callback for when the stream is finished ", - "name": "callback", - "type": "Function", - "desc": "Optional callback for when the stream is finished", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk", - "optional": true - }, - { - "name": "encoding", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    Call this method when no more data will be written to the stream. If\nsupplied, the callback is attached as a listener on the finish event.\n\n

    \n

    Calling [write()][] after calling [end()][] will raise an error.\n\n

    \n
    // write 'hello, ' and then end with 'world!'\nhttp.createServer(function (req, res) {\n  res.write('hello, ');\n  res.end('world!');\n  // writing more now is not allowed!\n});
    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'drain'", - "type": "event", - "name": "drain", - "desc": "

    If a [writable.write(chunk)][] call returns false, then the drain\nevent will indicate when it is appropriate to begin writing more data\nto the stream.\n\n

    \n
    // Write the data to the supplied writable stream 1MM times.\n// Be attentive to back-pressure.\nfunction writeOneMillionTimes(writer, data, encoding, callback) {\n  var i = 1000000;\n  write();\n  function write() {\n    var ok = true;\n    do {\n      i -= 1;\n      if (i === 0) {\n        // last time!\n        writer.write(data, encoding, callback);\n      } else {\n        // see if we should continue, or wait\n        // don't pass the callback, because we're not done yet.\n        ok = writer.write(data, encoding);\n      }\n    } while (i > 0 && ok);\n    if (i > 0) {\n      // had to stop early!\n      // write some more once it drains\n      writer.once('drain', write);\n    }\n  }\n}
    \n", - "params": [] - }, - { - "textRaw": "Event: 'finish'", - "type": "event", - "name": "finish", - "desc": "

    When the [end()][] method has been called, and all data has been flushed\nto the underlying system, this event is emitted.\n\n

    \n
    var writer = getWritableStreamSomehow();\nfor (var i = 0; i < 100; i ++) {\n  writer.write('hello, #' + i + '!\\n');\n}\nwriter.end('this is the end\\n');\nwrite.on('finish', function() {\n  console.error('all writes are now complete.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'pipe'", - "type": "event", - "name": "pipe", - "params": [], - "desc": "

    This is emitted whenever the pipe() method is called on a readable\nstream, adding this writable to its set of destinations.\n\n

    \n
    var writer = getWritableStreamSomehow();\nvar reader = getReadableStreamSomehow();\nwriter.on('pipe', function(src) {\n  console.error('something is piping into the writer');\n  assert.equal(src, reader);\n});\nreader.pipe(writer);
    \n" - }, - { - "textRaw": "Event: 'unpipe'", - "type": "event", - "name": "unpipe", - "params": [], - "desc": "

    This is emitted whenever the [unpipe()][] method is called on a\nreadable stream, removing this writable from its set of destinations.\n\n

    \n
    var writer = getWritableStreamSomehow();\nvar reader = getReadableStreamSomehow();\nwriter.on('unpipe', function(src) {\n  console.error('something has stopped piping into the writer');\n  assert.equal(src, reader);\n});\nreader.pipe(writer);\nreader.unpipe(writer);
    \n" - } - ] - }, - { - "textRaw": "Class: stream.Duplex", - "type": "class", - "name": "stream.Duplex", - "desc": "

    Duplex streams are streams that implement both the [Readable][] and\n[Writable][] interfaces. See above for usage.\n\n

    \n

    Examples of Duplex streams include:\n\n

    \n
      \n
    • [tcp sockets][]
    • \n
    • [zlib streams][]
    • \n
    • [crypto streams][]
    • \n
    \n" - }, - { - "textRaw": "Class: stream.Transform", - "type": "class", - "name": "stream.Transform", - "desc": "

    Transform streams are [Duplex][] streams where the output is in some way\ncomputed from the input. They implement both the [Readable][] and\n[Writable][] interfaces. See above for usage.\n\n

    \n

    Examples of Transform streams include:\n\n

    \n
      \n
    • [zlib streams][]
    • \n
    • [crypto streams][]
    • \n
    \n" - } - ] - }, - { - "textRaw": "API for Stream Implementors", - "name": "API for Stream Implementors", - "type": "misc", - "desc": "

    To implement any sort of stream, the pattern is the same:\n\n

    \n
      \n
    1. Extend the appropriate parent class in your own subclass. (The\n[util.inherits][] method is particularly helpful for this.)
    2. \n
    3. Call the appropriate parent class constructor in your constructor,\nto be sure that the internal mechanisms are set up properly.
    4. \n
    5. Implement one or more specific methods, as detailed below.
    6. \n
    \n

    The class to extend and the method(s) to implement depend on the sort\nof stream class you are writing:\n\n

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n

    Use-case

    \n
    \n

    Class

    \n
    \n

    Method(s) to implement

    \n
    \n

    Reading only

    \n
    \n

    Readable

    \n
    \n

    [_read][]

    \n
    \n

    Writing only

    \n
    \n

    Writable

    \n
    \n

    [_write][]

    \n
    \n

    Reading and writing

    \n
    \n

    Duplex

    \n
    \n

    [_read][], [_write][]

    \n
    \n

    Operate on written data, then read the result

    \n
    \n

    Transform

    \n
    \n

    _transform, _flush

    \n
    \n\n

    In your implementation code, it is very important to never call the\nmethods described in [API for Stream Consumers][] above. Otherwise, you\ncan potentially cause adverse side effects in programs that consume\nyour streaming interfaces.\n\n

    \n", - "examples": [ - { - "textRaw": "Class: stream.Readable", - "type": "example", - "name": "stream.Readable", - "desc": "

    stream.Readable is an abstract class designed to be extended with an\nunderlying implementation of the [_read(size)][] method.\n\n

    \n

    Please see above under [API for Stream Consumers][] for how to consume\nstreams in your programs. What follows is an explanation of how to\nimplement Readable streams in your programs.\n\n

    \n

    Example: A Counting Stream

    \n

    This is a basic example of a Readable stream. It emits the numerals\nfrom 1 to 1,000,000 in ascending order, and then ends.\n\n

    \n
    var Readable = require('stream').Readable;\nvar util = require('util');\nutil.inherits(Counter, Readable);\n\nfunction Counter(opt) {\n  Readable.call(this, opt);\n  this._max = 1000000;\n  this._index = 1;\n}\n\nCounter.prototype._read = function() {\n  var i = this._index++;\n  if (i > this._max)\n    this.push(null);\n  else {\n    var str = '' + i;\n    var buf = new Buffer(str, 'ascii');\n    this.push(buf);\n  }\n};
    \n

    Example: SimpleProtocol v1 (Sub-optimal)

    \n

    This is similar to the parseHeader function described above, but\nimplemented as a custom stream. Also, note that this implementation\ndoes not convert the incoming data to a string.\n\n

    \n

    However, this would be better implemented as a [Transform][] stream. See\nbelow for a better implementation.\n\n

    \n
    // A parser for a simple data protocol.\n// The "header" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// NOTE: This can be done more simply as a Transform stream!\n// Using Readable directly for this is sub-optimal.  See the\n// alternative example below under the Transform section.\n\nvar Readable = require('stream').Readable;\nvar util = require('util');\n\nutil.inherits(SimpleProtocol, Readable);\n\nfunction SimpleProtocol(source, options) {\n  if (!(this instanceof SimpleProtocol))\n    return new SimpleProtocol(options);\n\n  Readable.call(this, options);\n  this._inBody = false;\n  this._sawFirstCr = false;\n\n  // source is a readable stream, such as a socket or file\n  this._source = source;\n\n  var self = this;\n  source.on('end', function() {\n    self.push(null);\n  });\n\n  // give it a kick whenever the source is readable\n  // read(0) will not consume any bytes\n  source.on('readable', function() {\n    self.read(0);\n  });\n\n  this._rawHeader = [];\n  this.header = null;\n}\n\nSimpleProtocol.prototype._read = function(n) {\n  if (!this._inBody) {\n    var chunk = this._source.read();\n\n    // if the source doesn't have data, we don't have data yet.\n    if (chunk === null)\n      return this.push('');\n\n    // check if the chunk has a \\n\\n\n    var split = -1;\n    for (var i = 0; i < chunk.length; i++) {\n      if (chunk[i] === 10) { // '\\n'\n        if (this._sawFirstCr) {\n          split = i;\n          break;\n        } else {\n          this._sawFirstCr = true;\n        }\n      } else {\n        this._sawFirstCr = false;\n      }\n    }\n\n    if (split === -1) {\n      // still waiting for the \\n\\n\n      // stash the chunk, and try again.\n      this._rawHeader.push(chunk);\n      this.push('');\n    } else {\n      this._inBody = true;\n      var h = chunk.slice(0, split);\n      this._rawHeader.push(h);\n      var header = Buffer.concat(this._rawHeader).toString();\n      try {\n        this.header = JSON.parse(header);\n      } catch (er) {\n        this.emit('error', new Error('invalid simple protocol data'));\n        return;\n      }\n      // now, because we got some extra data, unshift the rest\n      // back into the read queue so that our consumer will see it.\n      var b = chunk.slice(split);\n      this.unshift(b);\n\n      // and let them know that we are done parsing the header.\n      this.emit('header', this.header);\n    }\n  } else {\n    // from there on, just provide the data to our consumer.\n    // careful not to push(null), since that would indicate EOF.\n    var chunk = this._source.read();\n    if (chunk) this.push(chunk);\n  }\n};\n\n// Usage:\n// var parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.
    \n", - "methods": [ - { - "textRaw": "new stream.Readable([options])", - "type": "method", - "name": "Readable", - "signatures": [ - { - "params": [ - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`highWaterMark` {Number} The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default=16kb ", - "name": "highWaterMark", - "type": "Number", - "desc": "The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default=16kb" - }, - { - "textRaw": "`encoding` {String} If specified, then buffers will be decoded to strings using the specified encoding. Default=null ", - "name": "encoding", - "type": "String", - "desc": "If specified, then buffers will be decoded to strings using the specified encoding. Default=null" - }, - { - "textRaw": "`objectMode` {Boolean} Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false ", - "name": "objectMode", - "type": "Boolean", - "desc": "Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false" - } - ], - "name": "options", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    In classes that extend the Readable class, make sure to call the\nReadable constructor so that the buffering settings can be properly\ninitialized.\n\n

    \n" - }, - { - "textRaw": "readable.\\_read(size)", - "type": "method", - "name": "\\_read", - "signatures": [ - { - "params": [ - { - "textRaw": "`size` {Number} Number of bytes to read asynchronously ", - "name": "size", - "type": "Number", - "desc": "Number of bytes to read asynchronously" - } - ] - }, - { - "params": [ - { - "name": "size" - } - ] - } - ], - "desc": "

    Note: Implement this function, but do NOT call it directly.\n\n

    \n

    This function should NOT be called directly. It should be implemented\nby child classes, and only called by the internal Readable class\nmethods.\n\n

    \n

    All Readable stream implementations must provide a _read method to\nfetch data from the underlying resource.\n\n

    \n

    This method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you are expected to override this method in\nyour own extension classes.\n\n

    \n

    When data is available, put it into the read queue by calling\nreadable.push(chunk). If push returns false, then you should stop\nreading. When _read is called again, you should start pushing more\ndata.\n\n

    \n

    The size argument is advisory. Implementations where a "read" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to "wait" until\nsize bytes are available before calling [stream.push(chunk)][].\n\n

    \n" - }, - { - "textRaw": "readable.push(chunk, [encoding])", - "type": "method", - "name": "push", - "signatures": [ - { - "return": { - "textRaw": "return {Boolean} Whether or not more pushes should be performed ", - "name": "return", - "type": "Boolean", - "desc": "Whether or not more pushes should be performed" - }, - "params": [ - { - "textRaw": "`chunk` {Buffer | null | String} Chunk of data to push into the read queue ", - "name": "chunk", - "type": "Buffer | null | String", - "desc": "Chunk of data to push into the read queue" - }, - { - "textRaw": "`encoding` {String} Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'` ", - "name": "encoding", - "type": "String", - "desc": "Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'`", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ], - "desc": "

    Note: This function should be called by Readable implementors, NOT\nby consumers of Readable streams.\n\n

    \n

    The _read() function will not be called again until at least one\npush(chunk) call is made.\n\n

    \n

    The Readable class works by putting data into a read queue to be\npulled out later by calling the read() method when the 'readable'\nevent fires.\n\n

    \n

    The push() method will explicitly insert some data into the read\nqueue. If it is called with null then it will signal the end of the\ndata (EOF).\n\n

    \n

    This API is designed to be as flexible as possible. For example,\nyou may be wrapping a lower-level source which has some sort of\npause/resume mechanism, and a data callback. In those cases, you\ncould wrap the low-level source object by doing something like this:\n\n

    \n
    // source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nutil.inherits(SourceWrapper, Readable);\n\nfunction SourceWrapper(options) {\n  Readable.call(this, options);\n\n  this._source = getLowlevelSourceObject();\n  var self = this;\n\n  // Every time there's data, we push it into the internal buffer.\n  this._source.ondata = function(chunk) {\n    // if push() returns false, then we need to stop reading from source\n    if (!self.push(chunk))\n      self._source.readStop();\n  };\n\n  // When the source ends, we push the EOF-signalling `null` chunk\n  this._source.onend = function() {\n    self.push(null);\n  };\n}\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nSourceWrapper.prototype._read = function(size) {\n  this._source.readStart();\n};
    \n" - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: stream.Writable", - "type": "class", - "name": "stream.Writable", - "desc": "

    stream.Writable is an abstract class designed to be extended with an\nunderlying implementation of the [_write(chunk, encoding, callback)][] method.\n\n

    \n

    Please see above under [API for Stream Consumers][] for how to consume\nwritable streams in your programs. What follows is an explanation of\nhow to implement Writable streams in your programs.\n\n

    \n", - "methods": [ - { - "textRaw": "new stream.Writable([options])", - "type": "method", - "name": "Writable", - "signatures": [ - { - "params": [ - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`highWaterMark` {Number} Buffer level when [`write()`][] starts returning false. Default=16kb ", - "name": "highWaterMark", - "type": "Number", - "desc": "Buffer level when [`write()`][] starts returning false. Default=16kb" - }, - { - "textRaw": "`decodeStrings` {Boolean} Whether or not to decode strings into Buffers before passing them to [`_write()`][]. Default=true ", - "name": "decodeStrings", - "type": "Boolean", - "desc": "Whether or not to decode strings into Buffers before passing them to [`_write()`][]. Default=true" - } - ], - "name": "options", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    In classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n

    \n" - }, - { - "textRaw": "writable.\\_write(chunk, encoding, callback)", - "type": "method", - "name": "\\_write", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {Buffer | String} The chunk to be written. Will always be a buffer unless the `decodeStrings` option was set to `false`. ", - "name": "chunk", - "type": "Buffer | String", - "desc": "The chunk to be written. Will always be a buffer unless the `decodeStrings` option was set to `false`." - }, - { - "textRaw": "`encoding` {String} If the chunk is a string, then this is the encoding type. Ignore chunk is a buffer. Note that chunk will **always** be a buffer unless the `decodeStrings` option is explicitly set to `false`. ", - "name": "encoding", - "type": "String", - "desc": "If the chunk is a string, then this is the encoding type. Ignore chunk is a buffer. Note that chunk will **always** be a buffer unless the `decodeStrings` option is explicitly set to `false`." - }, - { - "textRaw": "`callback` {Function} Call this function (optionally with an error argument) when you are done processing the supplied chunk. ", - "name": "callback", - "type": "Function", - "desc": "Call this function (optionally with an error argument) when you are done processing the supplied chunk." - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    All Writable stream implementations must provide a [_write()][]\nmethod to send data to the underlying resource.\n\n

    \n

    Note: This function MUST NOT be called directly. It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\n

    \n

    Call the callback using the standard callback(error) pattern to\nsignal that the write completed successfully or with an error.\n\n

    \n

    If the decodeStrings flag is set in the constructor options, then\nchunk may be a string rather than a Buffer, and encoding will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the decodeStrings\noption to false, then you can safely ignore the encoding argument,\nand assume that chunk will always be a Buffer.\n\n

    \n

    This method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you are expected to override this method in\nyour own extension classes.\n\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: stream.Duplex", - "type": "class", - "name": "stream.Duplex", - "desc": "

    A "duplex" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\n

    \n

    Note that stream.Duplex is an abstract class designed to be extended\nwith an underlying implementation of the _read(size) and\n[_write(chunk, encoding, callback)][] methods as you would with a\nReadable or Writable stream class.\n\n

    \n

    Since JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n_read(n) method as well as the lowlevel\n[_write(chunk, encoding, callback)][] method on extension duplex classes.\n\n

    \n", - "methods": [ - { - "textRaw": "new stream.Duplex(options)", - "type": "method", - "name": "Duplex", - "signatures": [ - { - "params": [ - { - "textRaw": "`options` {Object} Passed to both Writable and Readable constructors. Also has the following fields: ", - "options": [ - { - "textRaw": "`allowHalfOpen` {Boolean} Default=true. If set to `false`, then the stream will automatically end the readable side when the writable side ends and vice versa. ", - "name": "allowHalfOpen", - "type": "Boolean", - "desc": "Default=true. If set to `false`, then the stream will automatically end the readable side when the writable side ends and vice versa." - } - ], - "name": "options", - "type": "Object", - "desc": "Passed to both Writable and Readable constructors. Also has the following fields:" - } - ] - }, - { - "params": [ - { - "name": "options" - } - ] - } - ], - "desc": "

    In classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: stream.Transform", - "type": "class", - "name": "stream.Transform", - "desc": "

    A "transform" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a [zlib][] stream or a\n[crypto][] stream.\n\n

    \n

    There is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will produce output\nthat is either much smaller or much larger than its input.\n\n

    \n

    Rather than implement the [_read()][] and [_write()][] methods, Transform\nclasses must implement the _transform() method, and may optionally\nalso implement the _flush() method. (See below.)\n\n

    \n", - "methods": [ - { - "textRaw": "new stream.Transform([options])", - "type": "method", - "name": "Transform", - "signatures": [ - { - "params": [ - { - "textRaw": "`options` {Object} Passed to both Writable and Readable constructors. ", - "name": "options", - "type": "Object", - "desc": "Passed to both Writable and Readable constructors.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    In classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n

    \n" - }, - { - "textRaw": "transform.\\_transform(chunk, encoding, callback)", - "type": "method", - "name": "\\_transform", - "signatures": [ - { - "params": [ - { - "textRaw": "`chunk` {Buffer | String} The chunk to be transformed. Will always be a buffer unless the `decodeStrings` option was set to `false`. ", - "name": "chunk", - "type": "Buffer | String", - "desc": "The chunk to be transformed. Will always be a buffer unless the `decodeStrings` option was set to `false`." - }, - { - "textRaw": "`encoding` {String} If the chunk is a string, then this is the encoding type. (Ignore if `decodeStrings` chunk is a buffer.) ", - "name": "encoding", - "type": "String", - "desc": "If the chunk is a string, then this is the encoding type. (Ignore if `decodeStrings` chunk is a buffer.)" - }, - { - "textRaw": "`callback` {Function} Call this function (optionally with an error argument) when you are done processing the supplied chunk. ", - "name": "callback", - "type": "Function", - "desc": "Call this function (optionally with an error argument) when you are done processing the supplied chunk." - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Note: This function MUST NOT be called directly. It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\n

    \n

    All Transform stream implementations must provide a _transform\nmethod to accept input and produce output.\n\n

    \n

    _transform should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\n

    \n

    Call transform.push(outputChunk) 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\n

    \n

    Call the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\n

    \n

    This method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you are expected to override this method in\nyour own extension classes.\n\n

    \n" - }, - { - "textRaw": "transform.\\_flush(callback)", - "type": "method", - "name": "\\_flush", - "signatures": [ - { - "params": [ - { - "textRaw": "`callback` {Function} Call this function (optionally with an error argument) when you are done flushing any remaining data. ", - "name": "callback", - "type": "Function", - "desc": "Call this function (optionally with an error argument) when you are done flushing any remaining data." - } - ] - }, - { - "params": [ - { - "name": "callback" - } - ] - } - ], - "desc": "

    Note: This function MUST NOT be called directly. It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\n

    \n

    In some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a Zlib compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\n

    \n

    In those cases, you can implement a _flush method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting end to signal the end of the readable side. Just\nlike with _transform, call transform.push(chunk) zero or more\ntimes, as appropriate, and call callback when the flush operation is\ncomplete.\n\n

    \n

    This method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you are expected to override this method in\nyour own extension classes.\n\n

    \n

    Example: SimpleProtocol parser v2

    \n

    The example above of a simple protocol parser can be implemented\nsimply by using the higher level [Transform][] stream class, similar to\nthe parseHeader and SimpleProtocol v1 examples above.\n\n

    \n

    In this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n

    \n
    var util = require('util');\nvar Transform = require('stream').Transform;\nutil.inherits(SimpleProtocol, Transform);\n\nfunction SimpleProtocol(options) {\n  if (!(this instanceof SimpleProtocol))\n    return new SimpleProtocol(options);\n\n  Transform.call(this, options);\n  this._inBody = false;\n  this._sawFirstCr = false;\n  this._rawHeader = [];\n  this.header = null;\n}\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n  if (!this._inBody) {\n    // check if the chunk has a \\n\\n\n    var split = -1;\n    for (var i = 0; i < chunk.length; i++) {\n      if (chunk[i] === 10) { // '\\n'\n        if (this._sawFirstCr) {\n          split = i;\n          break;\n        } else {\n          this._sawFirstCr = true;\n        }\n      } else {\n        this._sawFirstCr = false;\n      }\n    }\n\n    if (split === -1) {\n      // still waiting for the \\n\\n\n      // stash the chunk, and try again.\n      this._rawHeader.push(chunk);\n    } else {\n      this._inBody = true;\n      var h = chunk.slice(0, split);\n      this._rawHeader.push(h);\n      var header = Buffer.concat(this._rawHeader).toString();\n      try {\n        this.header = JSON.parse(header);\n      } catch (er) {\n        this.emit('error', new Error('invalid simple protocol data'));\n        return;\n      }\n      // and let them know that we are done parsing the header.\n      this.emit('header', this.header);\n\n      // now, because we got some extra data, emit this first.\n      this.push(chunk.slice(split));\n    }\n  } else {\n    // from there on, just provide the data to our consumer as-is.\n    this.push(chunk);\n  }\n  done();\n};\n\n// Usage:\n// var parser = new SimpleProtocol();\n// source.pipe(parser)\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.
    \n" - } - ] - }, - { - "textRaw": "Class: stream.PassThrough", - "type": "class", - "name": "stream.PassThrough", - "desc": "

    This is a trivial implementation of a [Transform][] stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy as a building block for novel sorts of streams.\n\n\n

    \n" - } - ] - }, - { - "textRaw": "Streams: Under the Hood", - "name": "Streams: Under the Hood", - "type": "misc", - "miscs": [ - { - "textRaw": "Buffering", - "name": "Buffering", - "type": "misc", - "desc": "

    Both Writable and Readable streams will buffer data on an internal\nobject called _writableState.buffer or _readableState.buffer,\nrespectively.\n\n

    \n

    The amount of data that will potentially be buffered depends on the\nhighWaterMark option which is passed into the constructor.\n\n

    \n

    Buffering in Readable streams happens when the implementation calls\n[stream.push(chunk)][]. If the consumer of the Stream does not call\nstream.read(), then the data will sit in the internal queue until it\nis consumed.\n\n

    \n

    Buffering in Writable streams happens when the user calls\n[stream.write(chunk)][] repeatedly, even when write() returns false.\n\n

    \n

    The purpose of streams, especially with the pipe() method, is to\nlimit the buffering of data to acceptable levels, so that sources and\ndestinations of varying speed will not overwhelm the available memory.\n\n

    \n" - }, - { - "textRaw": "`stream.read(0)`", - "name": "`stream.read(0)`", - "desc": "

    There are some cases where you want to trigger a refresh of the\nunderlying readable stream mechanisms, without actually consuming any\ndata. In that case, you can call stream.read(0), which will always\nreturn null.\n\n

    \n

    If the internal read buffer is below the highWaterMark, and the\nstream is not currently reading, then calling read(0) will trigger\na low-level _read call.\n\n

    \n

    There is almost never a need to do this. However, you will see some\ncases in Node's internals where this is done, particularly in the\nReadable stream class internals.\n\n

    \n", - "type": "misc", - "displayName": "`stream.read(0)`" - }, - { - "textRaw": "`stream.push('')`", - "name": "`stream.push('')`", - "desc": "

    Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an\ninteresting side effect. Because it is a call to\n[stream.push()][], it will end the reading process. However, it\ndoes not add any data to the readable buffer, so there's nothing for\na user to consume.\n\n

    \n

    Very rarely, there are cases where you have no data to provide now,\nbut the consumer of your stream (or, perhaps, another bit of your own\ncode) will know when to check again, by calling stream.read(0). In\nthose cases, you may call stream.push('').\n\n

    \n

    So far, the only use case for this functionality is in the\n[tls.CryptoStream][] class, which is deprecated in Node v0.12. If you\nfind that you have to use stream.push(''), please consider another\napproach, because it almost certainly indicates that something is\nhorribly wrong.\n\n

    \n", - "type": "misc", - "displayName": "`stream.push('')`" - }, - { - "textRaw": "Compatibility with Older Node Versions", - "name": "Compatibility with Older Node Versions", - "type": "misc", - "desc": "

    In versions of Node prior to v0.10, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n

    \n
      \n
    • Rather than waiting for you to call the read() method, 'data'\nevents would start emitting immediately. If you needed to do some\nI/O to decide how to handle data, then you had to store the chunks\nin some kind of buffer so that they would not be lost.
    • \n
    • The pause() method was advisory, rather than guaranteed. This\nmeant that you still had to be prepared to receive 'data' events\neven when the stream was in a paused state.
    • \n
    \n

    In Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into "flowing mode" when a 'data' event handler is added, or\nwhen the pause() or resume() methods are called. The effect is\nthat, even if you are not using the new read() method and\n'readable' event, you no longer have to worry about losing 'data'\nchunks.\n\n

    \n

    Most programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n

    \n
      \n
    • No 'data' event handler is added.
    • \n
    • The pause() and resume() methods are never called.
    • \n
    \n

    For example, consider the following code:\n\n

    \n
    // WARNING!  BROKEN!\nnet.createServer(function(socket) {\n\n  // we add an 'end' method, but never consume the data\n  socket.on('end', function() {\n    // It will never get here.\n    socket.end('I got your message (but didnt read it)\\n');\n  });\n\n}).listen(1337);
    \n

    In versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\n

    \n

    The workaround in this situation is to call the resume() method to\ntrigger "old mode" behavior:\n\n

    \n
    // Workaround\nnet.createServer(function(socket) {\n\n  socket.on('end', function() {\n    socket.end('I got your message (but didnt read it)\\n');\n  });\n\n  // start the flow of data, discarding it.\n  socket.resume();\n\n}).listen(1337);
    \n

    In addition to new Readable streams switching into flowing-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the wrap()\nmethod.\n\n\n

    \n" - }, - { - "textRaw": "Object Mode", - "name": "Object Mode", - "type": "misc", - "desc": "

    Normally, Streams operate on Strings and Buffers exclusively.\n\n

    \n

    Streams that are in object mode can emit generic JavaScript values\nother than Buffers and Strings.\n\n

    \n

    A Readable stream in object mode will always return a single item from\na call to stream.read(size), regardless of what the size argument\nis.\n\n

    \n

    A Writable stream in object mode will always ignore the encoding\nargument to stream.write(data, encoding).\n\n

    \n

    The special value null still retains its special value for object\nmode streams. That is, for object mode readable streams, null as a\nreturn value from stream.read() indicates that there is no more\ndata, and [stream.push(null)][] will signal the end of stream data\n(EOF).\n\n

    \n

    No streams in Node core are object mode streams. This pattern is only\nused by userland streaming libraries.\n\n

    \n

    You should set objectMode in your stream child class constructor on\nthe options object. Setting objectMode mid-stream is not safe.\n\n

    \n" - }, - { - "textRaw": "State Objects", - "name": "state_objects", - "desc": "

    [Readable][] streams have a member object called _readableState.\n[Writable][] streams have a member object called _writableState.\n[Duplex][] streams have both.\n\n

    \n

    These objects should generally not be modified in child classes.\nHowever, if you have a Duplex or Transform stream that should be in\nobjectMode on the readable side, and not in objectMode on the\nwritable side, then you may do this in the constructor by setting the\nflag explicitly on the appropriate state object.\n\n

    \n
    var util = require('util');\nvar StringDecoder = require('string_decoder').StringDecoder;\nvar Transform = require('stream').Transform;\nutil.inherits(JSONParseStream, Transform);\n\n// Gets \\n-delimited JSON string data, and emits the parsed objects\nfunction JSONParseStream(options) {\n  if (!(this instanceof JSONParseStream))\n    return new JSONParseStream(options);\n\n  Transform.call(this, options);\n  this._writableState.objectMode = false;\n  this._readableState.objectMode = true;\n  this._buffer = '';\n  this._decoder = new StringDecoder('utf8');\n}\n\nJSONParseStream.prototype._transform = function(chunk, encoding, cb) {\n  this._buffer += this._decoder.write(chunk);\n  // split on newlines\n  var lines = this._buffer.split(/\\r?\\n/);\n  // keep the last partial line buffered\n  this._buffer = lines.pop();\n  for (var l = 0; l < lines.length; l++) {\n    var line = lines[l];\n    try {\n      var obj = JSON.parse(line);\n    } catch (er) {\n      this.emit('error', er);\n      return;\n    }\n    // push the parsed object out to the readable consumer\n    this.push(obj);\n  }\n  cb();\n};\n\nJSONParseStream.prototype._flush = function(cb) {\n  // Just handle any leftover\n  var rem = this._buffer.trim();\n  if (rem) {\n    try {\n      var obj = JSON.parse(rem);\n    } catch (er) {\n      this.emit('error', er);\n      return;\n    }\n    // push the parsed object out to the readable consumer\n    this.push(obj);\n  }\n  cb();\n};
    \n

    The state objects contain other useful information for debugging the\nstate of streams in your programs. It is safe to look at them, but\nbeyond setting option flags in the constructor, it is not safe to\nmodify them.\n\n\n

    \n", - "type": "misc", - "displayName": "State Objects" - } - ] - } - ], - "examples": [ - { - "textRaw": "Class: stream.Readable", - "type": "example", - "name": "stream.Readable", - "desc": "

    stream.Readable is an abstract class designed to be extended with an\nunderlying implementation of the [_read(size)][] method.\n\n

    \n

    Please see above under [API for Stream Consumers][] for how to consume\nstreams in your programs. What follows is an explanation of how to\nimplement Readable streams in your programs.\n\n

    \n

    Example: A Counting Stream

    \n

    This is a basic example of a Readable stream. It emits the numerals\nfrom 1 to 1,000,000 in ascending order, and then ends.\n\n

    \n
    var Readable = require('stream').Readable;\nvar util = require('util');\nutil.inherits(Counter, Readable);\n\nfunction Counter(opt) {\n  Readable.call(this, opt);\n  this._max = 1000000;\n  this._index = 1;\n}\n\nCounter.prototype._read = function() {\n  var i = this._index++;\n  if (i > this._max)\n    this.push(null);\n  else {\n    var str = '' + i;\n    var buf = new Buffer(str, 'ascii');\n    this.push(buf);\n  }\n};
    \n

    Example: SimpleProtocol v1 (Sub-optimal)

    \n

    This is similar to the parseHeader function described above, but\nimplemented as a custom stream. Also, note that this implementation\ndoes not convert the incoming data to a string.\n\n

    \n

    However, this would be better implemented as a [Transform][] stream. See\nbelow for a better implementation.\n\n

    \n
    // A parser for a simple data protocol.\n// The "header" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// NOTE: This can be done more simply as a Transform stream!\n// Using Readable directly for this is sub-optimal.  See the\n// alternative example below under the Transform section.\n\nvar Readable = require('stream').Readable;\nvar util = require('util');\n\nutil.inherits(SimpleProtocol, Readable);\n\nfunction SimpleProtocol(source, options) {\n  if (!(this instanceof SimpleProtocol))\n    return new SimpleProtocol(options);\n\n  Readable.call(this, options);\n  this._inBody = false;\n  this._sawFirstCr = false;\n\n  // source is a readable stream, such as a socket or file\n  this._source = source;\n\n  var self = this;\n  source.on('end', function() {\n    self.push(null);\n  });\n\n  // give it a kick whenever the source is readable\n  // read(0) will not consume any bytes\n  source.on('readable', function() {\n    self.read(0);\n  });\n\n  this._rawHeader = [];\n  this.header = null;\n}\n\nSimpleProtocol.prototype._read = function(n) {\n  if (!this._inBody) {\n    var chunk = this._source.read();\n\n    // if the source doesn't have data, we don't have data yet.\n    if (chunk === null)\n      return this.push('');\n\n    // check if the chunk has a \\n\\n\n    var split = -1;\n    for (var i = 0; i < chunk.length; i++) {\n      if (chunk[i] === 10) { // '\\n'\n        if (this._sawFirstCr) {\n          split = i;\n          break;\n        } else {\n          this._sawFirstCr = true;\n        }\n      } else {\n        this._sawFirstCr = false;\n      }\n    }\n\n    if (split === -1) {\n      // still waiting for the \\n\\n\n      // stash the chunk, and try again.\n      this._rawHeader.push(chunk);\n      this.push('');\n    } else {\n      this._inBody = true;\n      var h = chunk.slice(0, split);\n      this._rawHeader.push(h);\n      var header = Buffer.concat(this._rawHeader).toString();\n      try {\n        this.header = JSON.parse(header);\n      } catch (er) {\n        this.emit('error', new Error('invalid simple protocol data'));\n        return;\n      }\n      // now, because we got some extra data, unshift the rest\n      // back into the read queue so that our consumer will see it.\n      var b = chunk.slice(split);\n      this.unshift(b);\n\n      // and let them know that we are done parsing the header.\n      this.emit('header', this.header);\n    }\n  } else {\n    // from there on, just provide the data to our consumer.\n    // careful not to push(null), since that would indicate EOF.\n    var chunk = this._source.read();\n    if (chunk) this.push(chunk);\n  }\n};\n\n// Usage:\n// var parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.
    \n", - "methods": [ - { - "textRaw": "new stream.Readable([options])", - "type": "method", - "name": "Readable", - "signatures": [ - { - "params": [ - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`highWaterMark` {Number} The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default=16kb ", - "name": "highWaterMark", - "type": "Number", - "desc": "The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default=16kb" - }, - { - "textRaw": "`encoding` {String} If specified, then buffers will be decoded to strings using the specified encoding. Default=null ", - "name": "encoding", - "type": "String", - "desc": "If specified, then buffers will be decoded to strings using the specified encoding. Default=null" - }, - { - "textRaw": "`objectMode` {Boolean} Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false ", - "name": "objectMode", - "type": "Boolean", - "desc": "Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default=false" - } - ], - "name": "options", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    In classes that extend the Readable class, make sure to call the\nReadable constructor so that the buffering settings can be properly\ninitialized.\n\n

    \n" - }, - { - "textRaw": "readable.\\_read(size)", - "type": "method", - "name": "\\_read", - "signatures": [ - { - "params": [ - { - "textRaw": "`size` {Number} Number of bytes to read asynchronously ", - "name": "size", - "type": "Number", - "desc": "Number of bytes to read asynchronously" - } - ] - }, - { - "params": [ - { - "name": "size" - } - ] - } - ], - "desc": "

    Note: Implement this function, but do NOT call it directly.\n\n

    \n

    This function should NOT be called directly. It should be implemented\nby child classes, and only called by the internal Readable class\nmethods.\n\n

    \n

    All Readable stream implementations must provide a _read method to\nfetch data from the underlying resource.\n\n

    \n

    This method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you are expected to override this method in\nyour own extension classes.\n\n

    \n

    When data is available, put it into the read queue by calling\nreadable.push(chunk). If push returns false, then you should stop\nreading. When _read is called again, you should start pushing more\ndata.\n\n

    \n

    The size argument is advisory. Implementations where a "read" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to "wait" until\nsize bytes are available before calling [stream.push(chunk)][].\n\n

    \n" - }, - { - "textRaw": "readable.push(chunk, [encoding])", - "type": "method", - "name": "push", - "signatures": [ - { - "return": { - "textRaw": "return {Boolean} Whether or not more pushes should be performed ", - "name": "return", - "type": "Boolean", - "desc": "Whether or not more pushes should be performed" - }, - "params": [ - { - "textRaw": "`chunk` {Buffer | null | String} Chunk of data to push into the read queue ", - "name": "chunk", - "type": "Buffer | null | String", - "desc": "Chunk of data to push into the read queue" - }, - { - "textRaw": "`encoding` {String} Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'` ", - "name": "encoding", - "type": "String", - "desc": "Encoding of String chunks. Must be a valid Buffer encoding, such as `'utf8'` or `'ascii'`", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ], - "desc": "

    Note: This function should be called by Readable implementors, NOT\nby consumers of Readable streams.\n\n

    \n

    The _read() function will not be called again until at least one\npush(chunk) call is made.\n\n

    \n

    The Readable class works by putting data into a read queue to be\npulled out later by calling the read() method when the 'readable'\nevent fires.\n\n

    \n

    The push() method will explicitly insert some data into the read\nqueue. If it is called with null then it will signal the end of the\ndata (EOF).\n\n

    \n

    This API is designed to be as flexible as possible. For example,\nyou may be wrapping a lower-level source which has some sort of\npause/resume mechanism, and a data callback. In those cases, you\ncould wrap the low-level source object by doing something like this:\n\n

    \n
    // source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nutil.inherits(SourceWrapper, Readable);\n\nfunction SourceWrapper(options) {\n  Readable.call(this, options);\n\n  this._source = getLowlevelSourceObject();\n  var self = this;\n\n  // Every time there's data, we push it into the internal buffer.\n  this._source.ondata = function(chunk) {\n    // if push() returns false, then we need to stop reading from source\n    if (!self.push(chunk))\n      self._source.readStop();\n  };\n\n  // When the source ends, we push the EOF-signalling `null` chunk\n  this._source.onend = function() {\n    self.push(null);\n  };\n}\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nSourceWrapper.prototype._read = function(size) {\n  this._source.readStart();\n};
    \n" - } - ] - } - ], - "type": "module", - "displayName": "Stream" - }, - { - "textRaw": "Crypto", - "name": "crypto", - "desc": "
    Stability: 2 - Unstable; API changes are being discussed for\nfuture versions.  Breaking changes will be minimized.  See below.
    \n

    Use require('crypto') to access this module.\n\n

    \n

    The crypto module offers a way of encapsulating secure credentials to be\nused as part of a secure HTTPS net or http connection.\n\n

    \n

    It also offers a set of wrappers for OpenSSL's hash, hmac, cipher,\ndecipher, sign and verify methods.\n\n\n

    \n", - "methods": [ - { - "textRaw": "crypto.getCiphers()", - "type": "method", - "name": "getCiphers", - "desc": "

    Returns an array with the names of the supported ciphers.\n\n

    \n

    Example:\n\n

    \n
    var ciphers = crypto.getCiphers();\nconsole.log(ciphers); // ['AES-128-CBC', 'AES-128-CBC-HMAC-SHA1', ...]
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "crypto.getHashes()", - "type": "method", - "name": "getHashes", - "desc": "

    Returns an array with the names of the supported hash algorithms.\n\n

    \n

    Example:\n\n

    \n
    var hashes = crypto.getHashes();\nconsole.log(hashes); // ['sha', 'sha1', 'sha1WithRSAEncryption', ...]
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "crypto.createCredentials(details)", - "type": "method", - "name": "createCredentials", - "desc": "

    Creates a credentials object, with the optional details being a\ndictionary with keys:\n\n

    \n
      \n
    • pfx : A string or buffer holding the PFX or PKCS12 encoded private\nkey, certificate and CA certificates
    • \n
    • key : A string holding the PEM encoded private key
    • \n
    • passphrase : A string of passphrase for the private key or pfx
    • \n
    • cert : A string holding the PEM encoded certificate
    • \n
    • ca : Either a string or list of strings of PEM encoded CA\ncertificates to trust.
    • \n
    • crl : Either a string or list of strings of PEM encoded CRLs\n(Certificate Revocation List)
    • \n
    • ciphers: A string describing the ciphers to use or exclude.\nConsult\nhttp://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT\nfor details on the format.
    • \n
    \n

    If no 'ca' details are given, then node.js will use the default\npublicly trusted list of CAs as given in\n

    \n

    http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "details" - } - ] - } - ] - }, - { - "textRaw": "crypto.createHash(algorithm)", - "type": "method", - "name": "createHash", - "desc": "

    Creates and returns a hash object, a cryptographic hash with the given\nalgorithm which can be used to generate hash digests.\n\n

    \n

    algorithm is dependent on the available algorithms supported by the\nversion of OpenSSL on the platform. Examples are 'sha1', 'md5',\n'sha256', 'sha512', etc. On recent releases, openssl\nlist-message-digest-algorithms will display the available digest\nalgorithms.\n\n

    \n

    Example: this program that takes the sha1 sum of a file\n\n

    \n
    var filename = process.argv[2];\nvar crypto = require('crypto');\nvar fs = require('fs');\n\nvar shasum = crypto.createHash('sha1');\n\nvar s = fs.ReadStream(filename);\ns.on('data', function(d) {\n  shasum.update(d);\n});\n\ns.on('end', function() {\n  var d = shasum.digest('hex');\n  console.log(d + '  ' + filename);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - } - ] - } - ] - }, - { - "textRaw": "crypto.createHmac(algorithm, key)", - "type": "method", - "name": "createHmac", - "desc": "

    Creates and returns a hmac object, a cryptographic hmac with the given\nalgorithm and key.\n\n

    \n

    It is a stream that is both readable and writable. The\nwritten data is used to compute the hmac. Once the writable side of\nthe stream is ended, use the read() method to get the computed\ndigest. The legacy update and digest methods are also supported.\n\n

    \n

    algorithm is dependent on the available algorithms supported by\nOpenSSL - see createHash above. key is the hmac key to be used.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - }, - { - "name": "key" - } - ] - } - ] - }, - { - "textRaw": "crypto.createCipher(algorithm, password)", - "type": "method", - "name": "createCipher", - "desc": "

    Creates and returns a cipher object, with the given algorithm and\npassword.\n\n

    \n

    algorithm is dependent on OpenSSL, examples are 'aes192', etc. On\nrecent releases, openssl list-cipher-algorithms will display the\navailable cipher algorithms. password is used to derive key and IV,\nwhich must be a 'binary' encoded string or a buffer.\n\n

    \n

    It is a stream that is both readable and writable. The\nwritten data is used to compute the hash. Once the writable side of\nthe stream is ended, use the read() method to get the computed hash\ndigest. The legacy update and digest methods are also supported.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - }, - { - "name": "password" - } - ] - } - ] - }, - { - "textRaw": "crypto.createCipheriv(algorithm, key, iv)", - "type": "method", - "name": "createCipheriv", - "desc": "

    Creates and returns a cipher object, with the given algorithm, key and\niv.\n\n

    \n

    algorithm is the same as the argument to createCipher(). key is\nthe raw key used by the algorithm. iv is an initialization\nvector.\n\n

    \n

    key and iv must be 'binary' encoded strings or\nbuffers.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - }, - { - "name": "key" - }, - { - "name": "iv" - } - ] - } - ] - }, - { - "textRaw": "crypto.createDecipher(algorithm, password)", - "type": "method", - "name": "createDecipher", - "desc": "

    Creates and returns a decipher object, with the given algorithm and\nkey. This is the mirror of the [createCipher()][] above.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - }, - { - "name": "password" - } - ] - } - ] - }, - { - "textRaw": "crypto.createDecipheriv(algorithm, key, iv)", - "type": "method", - "name": "createDecipheriv", - "desc": "

    Creates and returns a decipher object, with the given algorithm, key\nand iv. This is the mirror of the [createCipheriv()][] above.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - }, - { - "name": "key" - }, - { - "name": "iv" - } - ] - } - ] - }, - { - "textRaw": "crypto.createSign(algorithm)", - "type": "method", - "name": "createSign", - "desc": "

    Creates and returns a signing object, with the given algorithm. On\nrecent OpenSSL releases, openssl list-public-key-algorithms will\ndisplay the available signing algorithms. Examples are 'RSA-SHA256'.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - } - ] - } - ] - }, - { - "textRaw": "crypto.createVerify(algorithm)", - "type": "method", - "name": "createVerify", - "desc": "

    Creates and returns a verification object, with the given algorithm.\nThis is the mirror of the signing object above.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "algorithm" - } - ] - } - ] - }, - { - "textRaw": "crypto.createDiffieHellman(prime_length)", - "type": "method", - "name": "createDiffieHellman", - "desc": "

    Creates a Diffie-Hellman key exchange object and generates a prime of\nthe given bit length. The generator used is 2.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "prime_length" - } - ] - } - ] - }, - { - "textRaw": "crypto.createDiffieHellman(prime, [encoding])", - "type": "method", - "name": "createDiffieHellman", - "desc": "

    Creates a Diffie-Hellman key exchange object using the supplied prime.\nThe generator used is 2. Encoding can be 'binary', 'hex', or\n'base64'. If no encoding is specified, then a buffer is expected.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "prime" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "crypto.getDiffieHellman(group_name)", - "type": "method", - "name": "getDiffieHellman", - "desc": "

    Creates a predefined Diffie-Hellman key exchange object. The\nsupported groups are: 'modp1', 'modp2', 'modp5' (defined in [RFC\n2412][]) and 'modp14', 'modp15', 'modp16', 'modp17',\n'modp18' (defined in [RFC 3526][]). The returned object mimics the\ninterface of objects created by [crypto.createDiffieHellman()][]\nabove, but will not allow to change the keys (with\n[diffieHellman.setPublicKey()][] for example). The advantage of using\nthis routine is that the parties don't have to generate nor exchange\ngroup modulus beforehand, saving both processor and communication\ntime.\n\n

    \n

    Example (obtaining a shared secret):\n\n

    \n
    var crypto = require('crypto');\nvar alice = crypto.getDiffieHellman('modp5');\nvar bob = crypto.getDiffieHellman('modp5');\n\nalice.generateKeys();\nbob.generateKeys();\n\nvar alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex');\nvar bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex');\n\n/* alice_secret and bob_secret should be the same */\nconsole.log(alice_secret == bob_secret);
    \n", - "signatures": [ - { - "params": [ - { - "name": "group_name" - } - ] - } - ] - }, - { - "textRaw": "crypto.pbkdf2(password, salt, iterations, keylen, callback)", - "type": "method", - "name": "pbkdf2", - "desc": "

    Asynchronous PBKDF2 applies pseudorandom function HMAC-SHA1 to derive\na key of given length from the given password, salt and iterations.\nThe callback gets two arguments (err, derivedKey).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "password" - }, - { - "name": "salt" - }, - { - "name": "iterations" - }, - { - "name": "keylen" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "crypto.pbkdf2Sync(password, salt, iterations, keylen)", - "type": "method", - "name": "pbkdf2Sync", - "desc": "

    Synchronous PBKDF2 function. Returns derivedKey or throws error.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "password" - }, - { - "name": "salt" - }, - { - "name": "iterations" - }, - { - "name": "keylen" - } - ] - } - ] - }, - { - "textRaw": "crypto.randomBytes(size, [callback])", - "type": "method", - "name": "randomBytes", - "desc": "

    Generates cryptographically strong pseudo-random data. Usage:\n\n

    \n
    // async\ncrypto.randomBytes(256, function(ex, buf) {\n  if (ex) throw ex;\n  console.log('Have %d bytes of random data: %s', buf.length, buf);\n});\n\n// sync\ntry {\n  var buf = crypto.randomBytes(256);\n  console.log('Have %d bytes of random data: %s', buf.length, buf);\n} catch (ex) {\n  // handle error\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "size" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "crypto.pseudoRandomBytes(size, [callback])", - "type": "method", - "name": "pseudoRandomBytes", - "desc": "

    Generates non-cryptographically strong pseudo-random data. The data\nreturned will be unique if it is sufficiently long, but is not\nnecessarily unpredictable. For this reason, the output of this\nfunction should never be used where unpredictability is important,\nsuch as in the generation of encryption keys.\n\n

    \n

    Usage is otherwise identical to crypto.randomBytes.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "size" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: Hash", - "type": "class", - "name": "Hash", - "desc": "

    The class for creating hash digests of data.\n\n

    \n

    It is a stream that is both readable and writable. The\nwritten data is used to compute the hash. Once the writable side of\nthe stream is ended, use the read() method to get the computed hash\ndigest. The legacy update and digest methods are also supported.\n\n

    \n

    Returned by crypto.createHash.\n\n

    \n", - "methods": [ - { - "textRaw": "hash.update(data, [input_encoding])", - "type": "method", - "name": "update", - "desc": "

    Updates the hash content with the given data, the encoding of which\nis given in input_encoding and can be 'utf8', 'ascii' or\n'binary'. If no encoding is provided, then a buffer is expected.\nIf data is a Buffer then input_encoding is ignored.\n\n

    \n

    This can be called many times with new data as it is streamed.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - }, - { - "name": "input_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "hash.digest([encoding])", - "type": "method", - "name": "digest", - "desc": "

    Calculates the digest of all of the passed data to be hashed. The\nencoding can be 'hex', 'binary' or 'base64'. If no encoding\nis provided, then a buffer is returned.\n\n

    \n

    Note: hash object can not be used after digest() method has been\ncalled.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: Hmac", - "type": "class", - "name": "Hmac", - "desc": "

    Class for creating cryptographic hmac content.\n\n

    \n

    Returned by crypto.createHmac.\n\n

    \n", - "methods": [ - { - "textRaw": "hmac.update(data)", - "type": "method", - "name": "update", - "desc": "

    Update the hmac content with the given data. This can be called\nmany times with new data as it is streamed.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - } - ] - } - ] - }, - { - "textRaw": "hmac.digest([encoding])", - "type": "method", - "name": "digest", - "desc": "

    Calculates the digest of all of the passed data to the hmac. The\nencoding can be 'hex', 'binary' or 'base64'. If no encoding\nis provided, then a buffer is returned.\n\n

    \n

    Note: hmac object can not be used after digest() method has been\ncalled.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: Cipher", - "type": "class", - "name": "Cipher", - "desc": "

    Class for encrypting data.\n\n

    \n

    Returned by crypto.createCipher and crypto.createCipheriv.\n\n

    \n

    Cipher objects are streams that are both readable and\nwritable. The written plain text data is used to produce the\nencrypted data on the readable side. The legacy update and final\nmethods are also supported.\n\n

    \n", - "methods": [ - { - "textRaw": "cipher.update(data, [input_encoding], [output_encoding])", - "type": "method", - "name": "update", - "desc": "

    Updates the cipher with data, the encoding of which is given in\ninput_encoding and can be 'utf8', 'ascii' or 'binary'. If no\nencoding is provided, then a buffer is expected.\nIf data is a Buffer then input_encoding is ignored.\n\n

    \n

    The output_encoding specifies the output format of the enciphered\ndata, and can be 'binary', 'base64' or 'hex'. If no encoding is\nprovided, then a buffer is returned.\n\n

    \n

    Returns the enciphered contents, and can be called many times with new\ndata as it is streamed.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - }, - { - "name": "input_encoding", - "optional": true - }, - { - "name": "output_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "cipher.final([output_encoding])", - "type": "method", - "name": "final", - "desc": "

    Returns any remaining enciphered contents, with output_encoding\nbeing one of: 'binary', 'base64' or 'hex'. If no encoding is\nprovided, then a buffer is returned.\n\n

    \n

    Note: cipher object can not be used after final() method has been\ncalled.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "output_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "cipher.setAutoPadding(auto_padding=true)", - "type": "method", - "name": "setAutoPadding", - "desc": "

    You can disable automatic padding of the input data to block size. If\nauto_padding is false, the length of the entire input data must be a\nmultiple of the cipher's block size or final will fail. Useful for\nnon-standard padding, e.g. using 0x0 instead of PKCS padding. You\nmust call this before cipher.final.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "auto_padding", - "default": "true" - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: Decipher", - "type": "class", - "name": "Decipher", - "desc": "

    Class for decrypting data.\n\n

    \n

    Returned by crypto.createDecipher and crypto.createDecipheriv.\n\n

    \n

    Decipher objects are streams that are both readable and\nwritable. The written enciphered data is used to produce the\nplain-text data on the the readable side. The legacy update and\nfinal methods are also supported.\n\n

    \n", - "methods": [ - { - "textRaw": "decipher.update(data, [input_encoding], [output_encoding])", - "type": "method", - "name": "update", - "desc": "

    Updates the decipher with data, which is encoded in 'binary',\n'base64' or 'hex'. If no encoding is provided, then a buffer is\nexpected.\nIf data is a Buffer then input_encoding is ignored.\n\n

    \n

    The output_decoding specifies in what format to return the\ndeciphered plaintext: 'binary', 'ascii' or 'utf8'. If no\nencoding is provided, then a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - }, - { - "name": "input_encoding", - "optional": true - }, - { - "name": "output_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "decipher.final([output_encoding])", - "type": "method", - "name": "final", - "desc": "

    Returns any remaining plaintext which is deciphered, with\noutput_encoding being one of: 'binary', 'ascii' or 'utf8'. If\nno encoding is provided, then a buffer is returned.\n\n

    \n

    Note: decipher object can not be used after final() method has been\ncalled.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "output_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "decipher.setAutoPadding(auto_padding=true)", - "type": "method", - "name": "setAutoPadding", - "desc": "

    You can disable auto padding if the data has been encrypted without\nstandard block padding to prevent decipher.final from checking and\nremoving it. Can only work if the input data's length is a multiple of\nthe ciphers block size. You must call this before streaming data to\ndecipher.update.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "auto_padding", - "default": "true" - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: Sign", - "type": "class", - "name": "Sign", - "desc": "

    Class for generating signatures.\n\n

    \n

    Returned by crypto.createSign.\n\n

    \n

    Sign objects are writable streams. The written data is\nused to generate the signature. Once all of the data has been\nwritten, the sign method will return the signature. The legacy\nupdate method is also supported.\n\n

    \n", - "methods": [ - { - "textRaw": "sign.update(data)", - "type": "method", - "name": "update", - "desc": "

    Updates the sign object with data. This can be called many times\nwith new data as it is streamed.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - } - ] - } - ] - }, - { - "textRaw": "sign.sign(private_key, [output_format])", - "type": "method", - "name": "sign", - "desc": "

    Calculates the signature on all the updated data passed through the\nsign. private_key is a string containing the PEM encoded private\nkey for signing.\n\n

    \n

    Returns the signature in output_format which can be 'binary',\n'hex' or 'base64'. If no encoding is provided, then a buffer is\nreturned.\n\n

    \n

    Note: sign object can not be used after sign() method has been\ncalled.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "private_key" - }, - { - "name": "output_format", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: Verify", - "type": "class", - "name": "Verify", - "desc": "

    Class for verifying signatures.\n\n

    \n

    Returned by crypto.createVerify.\n\n

    \n

    Verify objects are writable streams. The written data\nis used to validate against the supplied signature. Once all of the\ndata has been written, the verify method will return true if the\nsupplied signature is valid. The legacy update method is also\nsupported.\n\n

    \n", - "methods": [ - { - "textRaw": "verifier.update(data)", - "type": "method", - "name": "update", - "desc": "

    Updates the verifier object with data. This can be called many times\nwith new data as it is streamed.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - } - ] - } - ] - }, - { - "textRaw": "verifier.verify(object, signature, [signature_format])", - "type": "method", - "name": "verify", - "desc": "

    Verifies the signed data by using the object and signature.\nobject is a string containing a PEM encoded object, which can be\none of RSA public key, DSA public key, or X.509 certificate.\nsignature is the previously calculated signature for the data, in\nthe signature_format which can be 'binary', 'hex' or 'base64'.\nIf no encoding is specified, then a buffer is expected.\n\n

    \n

    Returns true or false depending on the validity of the signature for\nthe data and public key.\n\n

    \n

    Note: verifier object can not be used after verify() method has been\ncalled.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "object" - }, - { - "name": "signature" - }, - { - "name": "signature_format", - "optional": true - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: DiffieHellman", - "type": "class", - "name": "DiffieHellman", - "desc": "

    The class for creating Diffie-Hellman key exchanges.\n\n

    \n

    Returned by crypto.createDiffieHellman.\n\n

    \n", - "methods": [ - { - "textRaw": "diffieHellman.generateKeys([encoding])", - "type": "method", - "name": "generateKeys", - "desc": "

    Generates private and public Diffie-Hellman key values, and returns\nthe public key in the specified encoding. This key should be\ntransferred to the other party. Encoding can be 'binary', 'hex',\nor 'base64'. If no encoding is provided, then a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.computeSecret(other_public_key, [input_encoding], [output_encoding])", - "type": "method", - "name": "computeSecret", - "desc": "

    Computes the shared secret using other_public_key as the other\nparty's public key and returns the computed shared secret. Supplied\nkey is interpreted using specified input_encoding, and secret is\nencoded using specified output_encoding. Encodings can be\n'binary', 'hex', or 'base64'. If the input encoding is not\nprovided, then a buffer is expected.\n\n

    \n

    If no output encoding is given, then a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "other_public_key" - }, - { - "name": "input_encoding", - "optional": true - }, - { - "name": "output_encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.getPrime([encoding])", - "type": "method", - "name": "getPrime", - "desc": "

    Returns the Diffie-Hellman prime in the specified encoding, which can\nbe 'binary', 'hex', or 'base64'. If no encoding is provided,\nthen a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.getGenerator([encoding])", - "type": "method", - "name": "getGenerator", - "desc": "

    Returns the Diffie-Hellman prime in the specified encoding, which can\nbe 'binary', 'hex', or 'base64'. If no encoding is provided,\nthen a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.getPublicKey([encoding])", - "type": "method", - "name": "getPublicKey", - "desc": "

    Returns the Diffie-Hellman public key in the specified encoding, which\ncan be 'binary', 'hex', or 'base64'. If no encoding is provided,\nthen a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.getPrivateKey([encoding])", - "type": "method", - "name": "getPrivateKey", - "desc": "

    Returns the Diffie-Hellman private key in the specified encoding,\nwhich can be 'binary', 'hex', or 'base64'. If no encoding is\nprovided, then a buffer is returned.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.setPublicKey(public_key, [encoding])", - "type": "method", - "name": "setPublicKey", - "desc": "

    Sets the Diffie-Hellman public key. Key encoding can be 'binary',\n'hex' or 'base64'. If no encoding is provided, then a buffer is\nexpected.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "public_key" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "diffieHellman.setPrivateKey(private_key, [encoding])", - "type": "method", - "name": "setPrivateKey", - "desc": "

    Sets the Diffie-Hellman private key. Key encoding can be 'binary',\n'hex' or 'base64'. If no encoding is provided, then a buffer is\nexpected.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "private_key" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "crypto.DEFAULT_ENCODING", - "name": "DEFAULT_ENCODING", - "desc": "

    The default encoding to use for functions that can take either strings\nor buffers. The default value is 'buffer', which makes it default\nto using Buffer objects. This is here to make the crypto module more\neasily compatible with legacy programs that expected 'binary' to be\nthe default encoding.\n\n

    \n

    Note that new programs will probably expect buffers, so only use this\nas a temporary measure.\n\n

    \n" - } - ], - "modules": [ - { - "textRaw": "Recent API Changes", - "name": "recent_api_changes", - "desc": "

    The Crypto module was added to Node before there was the concept of a\nunified Stream API, and before there were Buffer objects for handling\nbinary data.\n\n

    \n

    As such, the streaming classes don't have the typical methods found on\nother Node classes, and many methods accepted and returned\nBinary-encoded strings by default rather than Buffers. This was\nchanged to use Buffers by default instead.\n\n

    \n

    This is a breaking change for some use cases, but not all.\n\n

    \n

    For example, if you currently use the default arguments to the Sign\nclass, and then pass the results to the Verify class, without ever\ninspecting the data, then it will continue to work as before. Where\nyou once got a binary string and then presented the binary string to\nthe Verify object, you'll now get a Buffer, and present the Buffer to\nthe Verify object.\n\n

    \n

    However, if you were doing things with the string data that will not\nwork properly on Buffers (such as, concatenating them, storing in\ndatabases, etc.), or you are passing binary strings to the crypto\nfunctions without an encoding argument, then you will need to start\nproviding encoding arguments to specify which encoding you'd like to\nuse. To switch to the previous style of using binary strings by\ndefault, set the crypto.DEFAULT_ENCODING field to 'binary'. Note\nthat new programs will probably expect buffers, so only use this as a\ntemporary measure.\n\n\n

    \n", - "type": "module", - "displayName": "Recent API Changes" - } - ], - "type": "module", - "displayName": "Crypto" - }, - { - "textRaw": "TLS (SSL)", - "name": "tls_(ssl)", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    Use require('tls') to access this module.\n\n

    \n

    The tls module uses OpenSSL to provide Transport Layer Security and/or\nSecure Socket Layer: encrypted stream communication.\n\n

    \n

    TLS/SSL is a public/private key infrastructure. Each client and each\nserver must have a private key. A private key is created like this\n\n

    \n
    openssl genrsa -out ryans-key.pem 1024
    \n

    All severs and some clients need to have a certificate. Certificates are public\nkeys signed by a Certificate Authority or self-signed. The first step to\ngetting a certificate is to create a "Certificate Signing Request" (CSR)\nfile. This is done with:\n\n

    \n
    openssl req -new -key ryans-key.pem -out ryans-csr.pem
    \n

    To create a self-signed certificate with the CSR, do this:\n\n

    \n
    openssl x509 -req -in ryans-csr.pem -signkey ryans-key.pem -out ryans-cert.pem
    \n

    Alternatively you can send the CSR to a Certificate Authority for signing.\n\n

    \n

    (TODO: docs on creating a CA, for now interested users should just look at\ntest/fixtures/keys/Makefile in the Node source code)\n\n

    \n

    To create .pfx or .p12, do this:\n\n

    \n
    openssl pkcs12 -export -in agent5-cert.pem -inkey agent5-key.pem \\\n    -certfile ca-cert.pem -out agent5.pfx
    \n
      \n
    • in: certificate
    • \n
    • inkey: private key
    • \n
    • certfile: all CA certs concatenated in one file like\ncat ca1-cert.pem ca2-cert.pem > ca-cert.pem
    • \n
    \n", - "miscs": [ - { - "textRaw": "Client-initiated renegotiation attack mitigation", - "name": "Client-initiated renegotiation attack mitigation", - "type": "misc", - "desc": "

    The TLS protocol lets the client renegotiate certain aspects of the TLS session.\nUnfortunately, session renegotiation requires a disproportional amount of\nserver-side resources, which makes it a potential vector for denial-of-service\nattacks.\n\n

    \n

    To mitigate this, renegotiations are limited to three times every 10 minutes. An\nerror is emitted on the [CleartextStream][] instance when the threshold is\nexceeded. The limits are configurable:\n\n

    \n
      \n
    • tls.CLIENT_RENEG_LIMIT: renegotiation limit, default is 3.

      \n
    • \n
    • tls.CLIENT_RENEG_WINDOW: renegotiation window in seconds, default is\n10 minutes.

      \n
    • \n
    \n

    Don't change the defaults unless you know what you are doing.\n\n

    \n

    To test your server, connect to it with openssl s_client -connect address:port\nand tap R<CR> (that's the letter R followed by a carriage return) a few\ntimes.\n\n\n

    \n" - }, - { - "textRaw": "NPN and SNI", - "name": "NPN and SNI", - "type": "misc", - "desc": "

    NPN (Next Protocol Negotiation) and SNI (Server Name Indication) are TLS\nhandshake extensions allowing you:\n\n

    \n
      \n
    • NPN - to use one TLS server for multiple protocols (HTTP, SPDY)
    • \n
    • SNI - to use one TLS server for multiple hostnames with different SSL\ncertificates.
    • \n
    \n" - } - ], - "methods": [ - { - "textRaw": "tls.getCiphers()", - "type": "method", - "name": "getCiphers", - "desc": "

    Returns an array with the names of the supported SSL ciphers.\n\n

    \n

    Example:\n\n

    \n
    var ciphers = tls.getCiphers();\nconsole.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "tls.createServer(options, [secureConnectionListener])", - "type": "method", - "name": "createServer", - "desc": "

    Creates a new [tls.Server][]. The connectionListener argument is\nautomatically set as a listener for the [secureConnection][] event. The\noptions object has these possibilities:\n\n

    \n
      \n
    • pfx: A string or Buffer containing the private key, certificate and\nCA certs of the server in PFX or PKCS12 format. (Mutually exclusive with\nthe key, cert and ca options.)

      \n
    • \n
    • key: A string or Buffer containing the private key of the server in\nPEM format. (Required)

      \n
    • \n
    • passphrase: A string of passphrase for the private key or pfx.

      \n
    • \n
    • cert: A string or Buffer containing the certificate key of the server in\nPEM format. (Required)

      \n
    • \n
    • ca: An array of strings or Buffers of trusted certificates in PEM\nformat. If this is omitted several well known "root" CAs will be used,\nlike VeriSign. These are used to authorize connections.

      \n
    • \n
    • crl : Either a string or list of strings of PEM encoded CRLs (Certificate\nRevocation List)

      \n
    • \n
    • ciphers: A string describing the ciphers to use or exclude.

      \n

      To mitigate [BEAST attacks] it is recommended that you use this option in\nconjunction with the honorCipherOrder option described below to\nprioritize the non-CBC cipher.

      \n

      Defaults to AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH.\nConsult the [OpenSSL cipher list format documentation] for details on the\nformat. ECDH (Elliptic Curve Diffie-Hellman) ciphers are not yet supported.

      \n
    • \n
    \n
    `AES128-GCM-SHA256` is used when node.js is linked against OpenSSL 1.0.1\nor newer and the client speaks TLS 1.2, RC4 is used as a secure fallback.\n\n**NOTE**: Previous revisions of this section suggested `AES256-SHA` as an\nacceptable cipher. Unfortunately, `AES256-SHA` is a CBC cipher and therefore\nsusceptible to BEAST attacks. Do *not* use it.
    \n
      \n
    • handshakeTimeout: Abort the connection if the SSL/TLS handshake does not\nfinish in this many milliseconds. The default is 120 seconds.

      \n

      A 'clientError' is emitted on the tls.Server object whenever a handshake\ntimes out.

      \n
    • \n
    • honorCipherOrder : When choosing a cipher, use the server's preferences\ninstead of the client preferences.

      \n

      Note that if SSLv2 is used, the server will send its list of preferences\nto the client, and the client chooses the cipher.

      \n

      Although, this option is disabled by default, it is recommended that you\nuse this option in conjunction with the ciphers option to mitigate\nBEAST attacks.

      \n
    • \n
    • requestCert: If true the server will request a certificate from\nclients that connect and attempt to verify that certificate. Default:\nfalse.

      \n
    • \n
    • rejectUnauthorized: If true the server will reject any connection\nwhich is not authorized with the list of supplied CAs. This option only\nhas an effect if requestCert is true. Default: false.

      \n
    • \n
    • NPNProtocols: An array or Buffer of possible NPN protocols. (Protocols\nshould be ordered by their priority).

      \n
    • \n
    • SNICallback: A function that will be called if client supports SNI TLS\nextension. Only one argument will be passed to it: servername. And\nSNICallback should return SecureContext instance.\n(You can use crypto.createCredentials(...).context to get proper\nSecureContext). If SNICallback wasn't provided - default callback with\nhigh-level API will be used (see below).

      \n
    • \n
    • sessionIdContext: A string containing a opaque identifier for session\nresumption. If requestCert is true, the default is MD5 hash value\ngenerated from command-line. Otherwise, the default is not provided.

      \n
    • \n
    • secureProtocol: The SSL method to use, e.g. SSLv3_method to force\nSSL version 3. The possible values depend on your installation of\nOpenSSL and are defined in the constant [SSL_METHODS][].

      \n
    • \n
    \n

    Here is a simple example echo server:\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  key: fs.readFileSync('server-key.pem'),\n  cert: fs.readFileSync('server-cert.pem'),\n\n  // This is necessary only if using the client certificate authentication.\n  requestCert: true,\n\n  // This is necessary only if the client uses the self-signed certificate.\n  ca: [ fs.readFileSync('client-cert.pem') ]\n};\n\nvar server = tls.createServer(options, function(cleartextStream) {\n  console.log('server connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  cleartextStream.write("welcome!\\n");\n  cleartextStream.setEncoding('utf8');\n  cleartextStream.pipe(cleartextStream);\n});\nserver.listen(8000, function() {\n  console.log('server bound');\n});
    \n

    Or\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  pfx: fs.readFileSync('server.pfx'),\n\n  // This is necessary only if using the client certificate authentication.\n  requestCert: true,\n\n};\n\nvar server = tls.createServer(options, function(cleartextStream) {\n  console.log('server connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  cleartextStream.write("welcome!\\n");\n  cleartextStream.setEncoding('utf8');\n  cleartextStream.pipe(cleartextStream);\n});\nserver.listen(8000, function() {\n  console.log('server bound');\n});
    \n

    You can test this server by connecting to it with openssl s_client:\n\n\n

    \n
    openssl s_client -connect 127.0.0.1:8000
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "secureConnectionListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "tls.connect(options, [callback])", - "type": "method", - "name": "connect", - "desc": "

    Creates a new client connection to the given port and host (old API) or\noptions.port and options.host. (If host is omitted, it defaults to\nlocalhost.) options should be an object which specifies:\n\n

    \n
      \n
    • host: Host the client should connect to

      \n
    • \n
    • port: Port the client should connect to

      \n
    • \n
    • socket: Establish secure connection on a given socket rather than\ncreating a new socket. If this option is specified, host and port\nare ignored.

      \n
    • \n
    • pfx: A string or Buffer containing the private key, certificate and\nCA certs of the server in PFX or PKCS12 format.

      \n
    • \n
    • key: A string or Buffer containing the private key of the client in\nPEM format.

      \n
    • \n
    • passphrase: A string of passphrase for the private key or pfx.

      \n
    • \n
    • cert: A string or Buffer containing the certificate key of the client in\nPEM format.

      \n
    • \n
    • ca: An array of strings or Buffers of trusted certificates in PEM\nformat. If this is omitted several well known "root" CAs will be used,\nlike VeriSign. These are used to authorize connections.

      \n
    • \n
    • rejectUnauthorized: If true, the server certificate is verified against\nthe list of supplied CAs. An 'error' event is emitted if verification\nfails. Default: true.

      \n
    • \n
    • NPNProtocols: An array of strings or Buffers containing supported NPN\nprotocols. Buffers should have following format: 0x05hello0x05world,\nwhere first byte is next protocol name's length. (Passing array should\nusually be much simpler: ['hello', 'world'].)

      \n
    • \n
    • servername: Servername for SNI (Server Name Indication) TLS extension.

      \n
    • \n
    • secureProtocol: The SSL method to use, e.g. SSLv3_method to force\nSSL version 3. The possible values depend on your installation of\nOpenSSL and are defined in the constant [SSL_METHODS][].

      \n
    • \n
    \n

    The callback parameter will be added as a listener for the\n['secureConnect'][] event.\n\n

    \n

    tls.connect() returns a [CleartextStream][] object.\n\n

    \n

    Here is an example of a client of echo server as described previously:\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  // These are necessary only if using the client certificate authentication\n  key: fs.readFileSync('client-key.pem'),\n  cert: fs.readFileSync('client-cert.pem'),\n\n  // This is necessary only if the server uses the self-signed certificate\n  ca: [ fs.readFileSync('server-cert.pem') ]\n};\n\nvar cleartextStream = tls.connect(8000, options, function() {\n  console.log('client connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  process.stdin.pipe(cleartextStream);\n  process.stdin.resume();\n});\ncleartextStream.setEncoding('utf8');\ncleartextStream.on('data', function(data) {\n  console.log(data);\n});\ncleartextStream.on('end', function() {\n  server.close();\n});
    \n

    Or\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  pfx: fs.readFileSync('client.pfx')\n};\n\nvar cleartextStream = tls.connect(8000, options, function() {\n  console.log('client connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  process.stdin.pipe(cleartextStream);\n  process.stdin.resume();\n});\ncleartextStream.setEncoding('utf8');\ncleartextStream.on('data', function(data) {\n  console.log(data);\n});\ncleartextStream.on('end', function() {\n  server.close();\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "tls.connect(port, [host], [options], [callback])", - "type": "method", - "name": "connect", - "desc": "

    Creates a new client connection to the given port and host (old API) or\noptions.port and options.host. (If host is omitted, it defaults to\nlocalhost.) options should be an object which specifies:\n\n

    \n
      \n
    • host: Host the client should connect to

      \n
    • \n
    • port: Port the client should connect to

      \n
    • \n
    • socket: Establish secure connection on a given socket rather than\ncreating a new socket. If this option is specified, host and port\nare ignored.

      \n
    • \n
    • pfx: A string or Buffer containing the private key, certificate and\nCA certs of the server in PFX or PKCS12 format.

      \n
    • \n
    • key: A string or Buffer containing the private key of the client in\nPEM format.

      \n
    • \n
    • passphrase: A string of passphrase for the private key or pfx.

      \n
    • \n
    • cert: A string or Buffer containing the certificate key of the client in\nPEM format.

      \n
    • \n
    • ca: An array of strings or Buffers of trusted certificates in PEM\nformat. If this is omitted several well known "root" CAs will be used,\nlike VeriSign. These are used to authorize connections.

      \n
    • \n
    • rejectUnauthorized: If true, the server certificate is verified against\nthe list of supplied CAs. An 'error' event is emitted if verification\nfails. Default: true.

      \n
    • \n
    • NPNProtocols: An array of strings or Buffers containing supported NPN\nprotocols. Buffers should have following format: 0x05hello0x05world,\nwhere first byte is next protocol name's length. (Passing array should\nusually be much simpler: ['hello', 'world'].)

      \n
    • \n
    • servername: Servername for SNI (Server Name Indication) TLS extension.

      \n
    • \n
    • secureProtocol: The SSL method to use, e.g. SSLv3_method to force\nSSL version 3. The possible values depend on your installation of\nOpenSSL and are defined in the constant [SSL_METHODS][].

      \n
    • \n
    \n

    The callback parameter will be added as a listener for the\n['secureConnect'][] event.\n\n

    \n

    tls.connect() returns a [CleartextStream][] object.\n\n

    \n

    Here is an example of a client of echo server as described previously:\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  // These are necessary only if using the client certificate authentication\n  key: fs.readFileSync('client-key.pem'),\n  cert: fs.readFileSync('client-cert.pem'),\n\n  // This is necessary only if the server uses the self-signed certificate\n  ca: [ fs.readFileSync('server-cert.pem') ]\n};\n\nvar cleartextStream = tls.connect(8000, options, function() {\n  console.log('client connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  process.stdin.pipe(cleartextStream);\n  process.stdin.resume();\n});\ncleartextStream.setEncoding('utf8');\ncleartextStream.on('data', function(data) {\n  console.log(data);\n});\ncleartextStream.on('end', function() {\n  server.close();\n});
    \n

    Or\n\n

    \n
    var tls = require('tls');\nvar fs = require('fs');\n\nvar options = {\n  pfx: fs.readFileSync('client.pfx')\n};\n\nvar cleartextStream = tls.connect(8000, options, function() {\n  console.log('client connected',\n              cleartextStream.authorized ? 'authorized' : 'unauthorized');\n  process.stdin.pipe(cleartextStream);\n  process.stdin.resume();\n});\ncleartextStream.setEncoding('utf8');\ncleartextStream.on('data', function(data) {\n  console.log(data);\n});\ncleartextStream.on('end', function() {\n  server.close();\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "tls.createSecurePair([credentials], [isServer], [requestCert], [rejectUnauthorized])", - "type": "method", - "name": "createSecurePair", - "desc": "

    Creates a new secure pair object with two streams, one of which reads/writes\nencrypted data, and one reads/writes cleartext data.\nGenerally the encrypted one is piped to/from an incoming encrypted data stream,\nand the cleartext one is used as a replacement for the initial encrypted stream.\n\n

    \n
      \n
    • credentials: A credentials object from crypto.createCredentials( ... )

      \n
    • \n
    • isServer: A boolean indicating whether this tls connection should be\nopened as a server or a client.

      \n
    • \n
    • requestCert: A boolean indicating whether a server should request a\ncertificate from a connecting client. Only applies to server connections.

      \n
    • \n
    • rejectUnauthorized: A boolean indicating whether a server should\nautomatically reject clients with invalid certificates. Only applies to\nservers with requestCert enabled.

      \n
    • \n
    \n

    tls.createSecurePair() returns a SecurePair object with [cleartext][] and\nencrypted stream properties.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "credentials", - "optional": true - }, - { - "name": "isServer", - "optional": true - }, - { - "name": "requestCert", - "optional": true - }, - { - "name": "rejectUnauthorized", - "optional": true - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "tls.SLAB_BUFFER_SIZE", - "name": "SLAB_BUFFER_SIZE", - "desc": "

    Size of slab buffer used by all tls servers and clients.\nDefault: 10 * 1024 * 1024.\n\n\n

    \n

    Don't change the defaults unless you know what you are doing.\n\n\n

    \n" - } - ], - "classes": [ - { - "textRaw": "Class: SecurePair", - "type": "class", - "name": "SecurePair", - "desc": "

    Returned by tls.createSecurePair.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'secure'", - "type": "event", - "name": "secure", - "desc": "

    The event is emitted from the SecurePair once the pair has successfully\nestablished a secure connection.\n\n

    \n

    Similarly to the checking for the server 'secureConnection' event,\npair.cleartext.authorized should be checked to confirm whether the certificate\nused properly authorized.\n\n

    \n", - "params": [] - } - ] - }, - { - "textRaw": "Class: tls.Server", - "type": "class", - "name": "tls.Server", - "desc": "

    This class is a subclass of net.Server and has the same methods on it.\nInstead of accepting just raw TCP connections, this accepts encrypted\nconnections using TLS or SSL.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'secureConnection'", - "type": "event", - "name": "secureConnection", - "desc": "

    function (cleartextStream) {}\n\n

    \n

    This event is emitted after a new connection has been successfully\nhandshaked. The argument is a instance of [CleartextStream][]. It has all the\ncommon stream methods and events.\n\n

    \n

    cleartextStream.authorized is a boolean value which indicates if the\nclient has verified by one of the supplied certificate authorities for the\nserver. If cleartextStream.authorized is false, then\ncleartextStream.authorizationError is set to describe how authorization\nfailed. Implied but worth mentioning: depending on the settings of the TLS\nserver, you unauthorized connections may be accepted.\ncleartextStream.npnProtocol is a string containing selected NPN protocol.\ncleartextStream.servername is a string containing servername requested with\nSNI.\n\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'clientError'", - "type": "event", - "name": "clientError", - "desc": "

    function (exception, securePair) { }\n\n

    \n

    When a client connection emits an 'error' event before secure connection is\nestablished - it will be forwarded here.\n\n

    \n

    securePair is the tls.SecurePair that the error originated from.\n\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'newSession'", - "type": "event", - "name": "newSession", - "desc": "

    function (sessionId, sessionData) { }\n\n

    \n

    Emitted on creation of TLS session. May be used to store sessions in external\nstorage.\n\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'resumeSession'", - "type": "event", - "name": "resumeSession", - "desc": "

    function (sessionId, callback) { }\n\n

    \n

    Emitted when client wants to resume previous TLS session. Event listener may\nperform lookup in external storage using given sessionId, and invoke\ncallback(null, sessionData) once finished. If session can't be resumed\n(i.e. doesn't exist in storage) one may call callback(null, null). Calling\ncallback(err) will terminate incoming connection and destroy socket.\n\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "server.listen(port, [host], [callback])", - "type": "method", - "name": "listen", - "desc": "

    Begin accepting connections on the specified port and host. If the\nhost is omitted, the server will accept connections directed to any\nIPv4 address (INADDR_ANY).\n\n

    \n

    This function is asynchronous. The last parameter callback will be called\nwhen the server has been bound.\n\n

    \n

    See net.Server for more information.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.close()", - "type": "method", - "name": "close", - "desc": "

    Stops the server from accepting new connections. This function is\nasynchronous, the server is finally closed when the server emits a 'close'\nevent.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "server.address()", - "type": "method", - "name": "address", - "desc": "

    Returns the bound address, the address family name and port of the\nserver as reported by the operating system. See [net.Server.address()][] for\nmore information.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "server.addContext(hostname, credentials)", - "type": "method", - "name": "addContext", - "desc": "

    Add secure context that will be used if client request's SNI hostname is\nmatching passed hostname (wildcards can be used). credentials can contain\nkey, cert and ca.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "hostname" - }, - { - "name": "credentials" - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "server.maxConnections", - "name": "maxConnections", - "desc": "

    Set this property to reject connections when the server's connection count\ngets high.\n\n

    \n" - }, - { - "textRaw": "server.connections", - "name": "connections", - "desc": "

    The number of concurrent connections on the server.\n\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: CryptoStream", - "type": "class", - "name": "CryptoStream", - "desc": "

    This is an encrypted stream.\n\n

    \n", - "properties": [ - { - "textRaw": "cryptoStream.bytesWritten", - "name": "bytesWritten", - "desc": "

    A proxy to the underlying socket's bytesWritten accessor, this will return\nthe total bytes written to the socket, including the TLS overhead.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: tls.CleartextStream", - "type": "class", - "name": "tls.CleartextStream", - "desc": "

    This is a stream on top of the Encrypted stream that makes it possible to\nread/write an encrypted data as a cleartext data.\n\n

    \n

    This instance implements a duplex [Stream][] interfaces. It has all the\ncommon stream methods and events.\n\n

    \n

    A ClearTextStream is the clear member of a SecurePair object.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'secureConnect'", - "type": "event", - "name": "secureConnect", - "desc": "

    This event is emitted after a new connection has been successfully handshaked. \nThe listener will be called no matter if the server's certificate was\nauthorized or not. It is up to the user to test cleartextStream.authorized\nto see if the server certificate was signed by one of the specified CAs.\nIf cleartextStream.authorized === false then the error can be found in\ncleartextStream.authorizationError. Also if NPN was used - you can check\ncleartextStream.npnProtocol for negotiated protocol.\n\n

    \n", - "params": [] - } - ], - "properties": [ - { - "textRaw": "cleartextStream.authorized", - "name": "authorized", - "desc": "

    A boolean that is true if the peer certificate was signed by one of the\nspecified CAs, otherwise false\n\n

    \n" - }, - { - "textRaw": "cleartextStream.authorizationError", - "name": "authorizationError", - "desc": "

    The reason why the peer's certificate has not been verified. This property\nbecomes available only when cleartextStream.authorized === false.\n\n

    \n" - }, - { - "textRaw": "cleartextStream.remoteAddress", - "name": "remoteAddress", - "desc": "

    The string representation of the remote IP address. For example,\n'74.125.127.100' or '2001:4860:a005::68'.\n\n

    \n" - }, - { - "textRaw": "cleartextStream.remotePort", - "name": "remotePort", - "desc": "

    The numeric representation of the remote port. For example, 443.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "cleartextStream.getPeerCertificate()", - "type": "method", - "name": "getPeerCertificate", - "desc": "

    Returns an object representing the peer's certificate. The returned object has\nsome properties corresponding to the field of the certificate.\n\n

    \n

    Example:\n\n

    \n
    { subject: \n   { C: 'UK',\n     ST: 'Acknack Ltd',\n     L: 'Rhys Jones',\n     O: 'node.js',\n     OU: 'Test TLS Certificate',\n     CN: 'localhost' },\n  issuer: \n   { C: 'UK',\n     ST: 'Acknack Ltd',\n     L: 'Rhys Jones',\n     O: 'node.js',\n     OU: 'Test TLS Certificate',\n     CN: 'localhost' },\n  valid_from: 'Nov 11 09:52:22 2009 GMT',\n  valid_to: 'Nov  6 09:52:22 2029 GMT',\n  fingerprint: '2A:7A:C2:DD:E5:F9:CC:53:72:35:99:7A:02:5A:71:38:52:EC:8A:DF' }
    \n

    If the peer does not provide a certificate, it returns null or an empty\nobject.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "cleartextStream.getCipher()", - "type": "method", - "name": "getCipher", - "desc": "

    Returns an object representing the cipher name and the SSL/TLS\nprotocol version of the current connection.\n\n

    \n

    Example:\n{ name: 'AES256-SHA', version: 'TLSv1/SSLv3' }\n\n

    \n

    See SSL_CIPHER_get_name() and SSL_CIPHER_get_version() in\nhttp://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_CIPHERS for more\ninformation.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "cleartextStream.address()", - "type": "method", - "name": "address", - "desc": "

    Returns the bound address, the address family name and port of the\nunderlying socket as reported by the operating system. Returns an\nobject with three properties, e.g.\n{ port: 12346, family: 'IPv4', address: '127.0.0.1' }\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "TLS (SSL)" - }, - { - "textRaw": "StringDecoder", - "name": "stringdecoder", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    To use this module, do require('string_decoder'). StringDecoder decodes a\nbuffer to a string. It is a simple interface to buffer.toString() but provides\nadditional support for utf8.\n\n

    \n
    var StringDecoder = require('string_decoder').StringDecoder;\nvar decoder = new StringDecoder('utf8');\n\nvar cent = new Buffer([0xC2, 0xA2]);\nconsole.log(decoder.write(cent));\n\nvar euro = new Buffer([0xE2, 0x82, 0xAC]);\nconsole.log(decoder.write(euro));
    \n", - "classes": [ - { - "textRaw": "Class: StringDecoder", - "type": "class", - "name": "StringDecoder", - "desc": "

    Accepts a single argument, encoding which defaults to utf8.\n\n

    \n", - "methods": [ - { - "textRaw": "decoder.write(buffer)", - "type": "method", - "name": "write", - "desc": "

    Returns a decoded string.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buffer" - } - ] - } - ] - }, - { - "textRaw": "decoder.end()", - "type": "method", - "name": "end", - "desc": "

    Returns any trailing bytes that were left in the buffer.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "StringDecoder" - }, - { - "textRaw": "File System", - "name": "fs", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    File I/O is provided by simple wrappers around standard POSIX functions. To\nuse this module do require('fs'). All the methods have asynchronous and\nsynchronous forms.\n\n

    \n

    The asynchronous form always take a completion callback as its last argument.\nThe arguments passed to the completion callback depend on the method, but the\nfirst argument is always reserved for an exception. If the operation was\ncompleted successfully, then the first argument will be null or undefined.\n\n

    \n

    When using the synchronous form any exceptions are immediately thrown.\nYou can use try/catch to handle exceptions or allow them to bubble up.\n\n

    \n

    Here is an example of the asynchronous version:\n\n

    \n
    var fs = require('fs');\n\nfs.unlink('/tmp/hello', function (err) {\n  if (err) throw err;\n  console.log('successfully deleted /tmp/hello');\n});
    \n

    Here is the synchronous version:\n\n

    \n
    var fs = require('fs');\n\nfs.unlinkSync('/tmp/hello')\nconsole.log('successfully deleted /tmp/hello');
    \n

    With the asynchronous methods there is no guaranteed ordering. So the\nfollowing is prone to error:\n\n

    \n
    fs.rename('/tmp/hello', '/tmp/world', function (err) {\n  if (err) throw err;\n  console.log('renamed complete');\n});\nfs.stat('/tmp/world', function (err, stats) {\n  if (err) throw err;\n  console.log('stats: ' + JSON.stringify(stats));\n});
    \n

    It could be that fs.stat is executed before fs.rename.\nThe correct way to do this is to chain the callbacks.\n\n

    \n
    fs.rename('/tmp/hello', '/tmp/world', function (err) {\n  if (err) throw err;\n  fs.stat('/tmp/world', function (err, stats) {\n    if (err) throw err;\n    console.log('stats: ' + JSON.stringify(stats));\n  });\n});
    \n

    In busy processes, the programmer is strongly encouraged to use the\nasynchronous versions of these calls. The synchronous versions will block\nthe entire process until they complete--halting all connections.\n\n

    \n

    Relative path to filename can be used, remember however that this path will be\nrelative to process.cwd().\n\n

    \n

    Most fs functions let you omit the callback argument. If you do, a default\ncallback is used that ignores errors, but prints a deprecation\nwarning.\n\n

    \n

    IMPORTANT: Omitting the callback is deprecated. v0.12 will throw the\nerrors as exceptions.\n\n\n

    \n", - "methods": [ - { - "textRaw": "fs.rename(oldPath, newPath, callback)", - "type": "method", - "name": "rename", - "desc": "

    Asynchronous rename(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "oldPath" - }, - { - "name": "newPath" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.renameSync(oldPath, newPath)", - "type": "method", - "name": "renameSync", - "desc": "

    Synchronous rename(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "oldPath" - }, - { - "name": "newPath" - } - ] - } - ] - }, - { - "textRaw": "fs.ftruncate(fd, len, callback)", - "type": "method", - "name": "ftruncate", - "desc": "

    Asynchronous ftruncate(2). No arguments other than a possible exception are\ngiven to the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "len" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.ftruncateSync(fd, len)", - "type": "method", - "name": "ftruncateSync", - "desc": "

    Synchronous ftruncate(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "len" - } - ] - } - ] - }, - { - "textRaw": "fs.truncate(path, len, callback)", - "type": "method", - "name": "truncate", - "desc": "

    Asynchronous truncate(2). No arguments other than a possible exception are\ngiven to the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "len" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.truncateSync(path, len)", - "type": "method", - "name": "truncateSync", - "desc": "

    Synchronous truncate(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "len" - } - ] - } - ] - }, - { - "textRaw": "fs.chown(path, uid, gid, callback)", - "type": "method", - "name": "chown", - "desc": "

    Asynchronous chown(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "uid" - }, - { - "name": "gid" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.chownSync(path, uid, gid)", - "type": "method", - "name": "chownSync", - "desc": "

    Synchronous chown(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "uid" - }, - { - "name": "gid" - } - ] - } - ] - }, - { - "textRaw": "fs.fchown(fd, uid, gid, callback)", - "type": "method", - "name": "fchown", - "desc": "

    Asynchronous fchown(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "uid" - }, - { - "name": "gid" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.fchownSync(fd, uid, gid)", - "type": "method", - "name": "fchownSync", - "desc": "

    Synchronous fchown(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "uid" - }, - { - "name": "gid" - } - ] - } - ] - }, - { - "textRaw": "fs.lchown(path, uid, gid, callback)", - "type": "method", - "name": "lchown", - "desc": "

    Asynchronous lchown(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "uid" - }, - { - "name": "gid" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.lchownSync(path, uid, gid)", - "type": "method", - "name": "lchownSync", - "desc": "

    Synchronous lchown(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "uid" - }, - { - "name": "gid" - } - ] - } - ] - }, - { - "textRaw": "fs.chmod(path, mode, callback)", - "type": "method", - "name": "chmod", - "desc": "

    Asynchronous chmod(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.chmodSync(path, mode)", - "type": "method", - "name": "chmodSync", - "desc": "

    Synchronous chmod(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode" - } - ] - } - ] - }, - { - "textRaw": "fs.fchmod(fd, mode, callback)", - "type": "method", - "name": "fchmod", - "desc": "

    Asynchronous fchmod(2). No arguments other than a possible exception\nare given to the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "mode" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.fchmodSync(fd, mode)", - "type": "method", - "name": "fchmodSync", - "desc": "

    Synchronous fchmod(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "mode" - } - ] - } - ] - }, - { - "textRaw": "fs.lchmod(path, mode, callback)", - "type": "method", - "name": "lchmod", - "desc": "

    Asynchronous lchmod(2). No arguments other than a possible exception\nare given to the completion callback.\n\n

    \n

    Only available on Mac OS X.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.lchmodSync(path, mode)", - "type": "method", - "name": "lchmodSync", - "desc": "

    Synchronous lchmod(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode" - } - ] - } - ] - }, - { - "textRaw": "fs.stat(path, callback)", - "type": "method", - "name": "stat", - "desc": "

    Asynchronous stat(2). The callback gets two arguments (err, stats) where\nstats is a fs.Stats object. See the fs.Stats\nsection below for more information.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.lstat(path, callback)", - "type": "method", - "name": "lstat", - "desc": "

    Asynchronous lstat(2). The callback gets two arguments (err, stats) where\nstats is a fs.Stats object. lstat() is identical to stat(), except that if\npath is a symbolic link, then the link itself is stat-ed, not the file that it\nrefers to.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.fstat(fd, callback)", - "type": "method", - "name": "fstat", - "desc": "

    Asynchronous fstat(2). The callback gets two arguments (err, stats) where\nstats is a fs.Stats object. fstat() is identical to stat(), except that\nthe file to be stat-ed is specified by the file descriptor fd.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.statSync(path)", - "type": "method", - "name": "statSync", - "desc": "

    Synchronous stat(2). Returns an instance of fs.Stats.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.lstatSync(path)", - "type": "method", - "name": "lstatSync", - "desc": "

    Synchronous lstat(2). Returns an instance of fs.Stats.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.fstatSync(fd)", - "type": "method", - "name": "fstatSync", - "desc": "

    Synchronous fstat(2). Returns an instance of fs.Stats.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - } - ] - } - ] - }, - { - "textRaw": "fs.link(srcpath, dstpath, callback)", - "type": "method", - "name": "link", - "desc": "

    Asynchronous link(2). No arguments other than a possible exception are given to\nthe completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "srcpath" - }, - { - "name": "dstpath" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.linkSync(srcpath, dstpath)", - "type": "method", - "name": "linkSync", - "desc": "

    Synchronous link(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "srcpath" - }, - { - "name": "dstpath" - } - ] - } - ] - }, - { - "textRaw": "fs.symlink(srcpath, dstpath, [type], callback)", - "type": "method", - "name": "symlink", - "desc": "

    Asynchronous symlink(2). No arguments other than a possible exception are given\nto the completion callback.\nThe type argument can be set to 'dir', 'file', or 'junction' (default\nis 'file') and is only available on Windows (ignored on other platforms).\nNote that Windows junction points require the destination path to be absolute. When using\n'junction', the destination argument will automatically be normalized to absolute path.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "srcpath" - }, - { - "name": "dstpath" - }, - { - "name": "type", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.symlinkSync(srcpath, dstpath, [type])", - "type": "method", - "name": "symlinkSync", - "desc": "

    Synchronous symlink(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "srcpath" - }, - { - "name": "dstpath" - }, - { - "name": "type", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.readlink(path, callback)", - "type": "method", - "name": "readlink", - "desc": "

    Asynchronous readlink(2). The callback gets two arguments (err,\nlinkString).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.readlinkSync(path)", - "type": "method", - "name": "readlinkSync", - "desc": "

    Synchronous readlink(2). Returns the symbolic link's string value.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.realpath(path, [cache], callback)", - "type": "method", - "name": "realpath", - "desc": "

    Asynchronous realpath(2). The callback gets two arguments (err,\nresolvedPath). May use process.cwd to resolve relative paths. cache is an\nobject literal of mapped paths that can be used to force a specific path\nresolution or avoid additional fs.stat calls for known real paths.\n\n

    \n

    Example:\n\n

    \n
    var cache = {'/etc':'/private/etc'};\nfs.realpath('/etc/passwd', cache, function (err, resolvedPath) {\n  if (err) throw err;\n  console.log(resolvedPath);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "cache", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.realpathSync(path, [cache])", - "type": "method", - "name": "realpathSync", - "desc": "

    Synchronous realpath(2). Returns the resolved path.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "cache", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.unlink(path, callback)", - "type": "method", - "name": "unlink", - "desc": "

    Asynchronous unlink(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.unlinkSync(path)", - "type": "method", - "name": "unlinkSync", - "desc": "

    Synchronous unlink(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.rmdir(path, callback)", - "type": "method", - "name": "rmdir", - "desc": "

    Asynchronous rmdir(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.rmdirSync(path)", - "type": "method", - "name": "rmdirSync", - "desc": "

    Synchronous rmdir(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.mkdir(path, [mode], callback)", - "type": "method", - "name": "mkdir", - "desc": "

    Asynchronous mkdir(2). No arguments other than a possible exception are given\nto the completion callback. mode defaults to 0777.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.mkdirSync(path, [mode])", - "type": "method", - "name": "mkdirSync", - "desc": "

    Synchronous mkdir(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "mode", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.readdir(path, callback)", - "type": "method", - "name": "readdir", - "desc": "

    Asynchronous readdir(3). Reads the contents of a directory.\nThe callback gets two arguments (err, files) where files is an array of\nthe names of the files in the directory excluding '.' and '..'.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.readdirSync(path)", - "type": "method", - "name": "readdirSync", - "desc": "

    Synchronous readdir(3). Returns an array of filenames excluding '.' and\n'..'.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.close(fd, callback)", - "type": "method", - "name": "close", - "desc": "

    Asynchronous close(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.closeSync(fd)", - "type": "method", - "name": "closeSync", - "desc": "

    Synchronous close(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - } - ] - } - ] - }, - { - "textRaw": "fs.open(path, flags, [mode], callback)", - "type": "method", - "name": "open", - "desc": "

    Asynchronous file open. See open(2). flags can be:\n\n

    \n
      \n
    • 'r' - Open file for reading.\nAn exception occurs if the file does not exist.

      \n
    • \n
    • 'r+' - Open file for reading and writing.\nAn exception occurs if the file does not exist.

      \n
    • \n
    • 'rs' - Open file for reading in synchronous mode. Instructs the operating\nsystem to bypass the local file system cache.

      \n

      This is primarily useful for opening files on NFS mounts as it allows you to\nskip the potentially stale local cache. It has a very real impact on I/O\nperformance so don't use this flag unless you need it.

      \n

      Note that this doesn't turn fs.open() into a synchronous blocking call.\nIf that's what you want then you should be using fs.openSync()

      \n
    • \n
    • 'rs+' - Open file for reading and writing, telling the OS to open it\nsynchronously. See notes for 'rs' about using this with caution.

      \n
    • \n
    • 'w' - Open file for writing.\nThe file is created (if it does not exist) or truncated (if it exists).

      \n
    • \n
    • 'wx' - Like 'w' but fails if path exists.

      \n
    • \n
    • 'w+' - Open file for reading and writing.\nThe file is created (if it does not exist) or truncated (if it exists).

      \n
    • \n
    • 'wx+' - Like 'w+' but fails if path exists.

      \n
    • \n
    • 'a' - Open file for appending.\nThe file is created if it does not exist.

      \n
    • \n
    • 'ax' - Like 'a' but fails if path exists.

      \n
    • \n
    • 'a+' - Open file for reading and appending.\nThe file is created if it does not exist.

      \n
    • \n
    • 'ax+' - Like 'a+' but fails if path exists.

      \n
    • \n
    \n

    mode sets the file mode (permission and sticky bits), but only if the file was\ncreated. It defaults to 0666, readable and writeable.\n\n

    \n

    The callback gets two arguments (err, fd).\n\n

    \n

    The exclusive flag 'x' (O_EXCL flag in open(2)) ensures that path is newly\ncreated. On POSIX systems, path is considered to exist even if it is a symlink\nto a non-existent file. The exclusive flag may or may not work with network file\nsystems.\n\n

    \n

    On Linux, positional writes don't work when the file is opened in append mode.\nThe kernel ignores the position argument and always appends the data to\nthe end of the file.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "flags" - }, - { - "name": "mode", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.openSync(path, flags, [mode])", - "type": "method", - "name": "openSync", - "desc": "

    Synchronous version of fs.open().\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "flags" - }, - { - "name": "mode", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.utimes(path, atime, mtime, callback)", - "type": "method", - "name": "utimes", - "desc": "

    Change file timestamps of the file referenced by the supplied path.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "atime" - }, - { - "name": "mtime" - } - ] - }, - { - "params": [ - { - "name": "path" - }, - { - "name": "atime" - }, - { - "name": "mtime" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.utimesSync(path, atime, mtime)", - "type": "method", - "name": "utimesSync", - "desc": "

    Change file timestamps of the file referenced by the supplied path.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "atime" - }, - { - "name": "mtime" - } - ] - } - ] - }, - { - "textRaw": "fs.futimes(fd, atime, mtime, callback)", - "type": "method", - "name": "futimes", - "desc": "

    Change the file timestamps of a file referenced by the supplied file\ndescriptor.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "atime" - }, - { - "name": "mtime" - } - ] - }, - { - "params": [ - { - "name": "fd" - }, - { - "name": "atime" - }, - { - "name": "mtime" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.futimesSync(fd, atime, mtime)", - "type": "method", - "name": "futimesSync", - "desc": "

    Change the file timestamps of a file referenced by the supplied file\ndescriptor.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "atime" - }, - { - "name": "mtime" - } - ] - } - ] - }, - { - "textRaw": "fs.fsync(fd, callback)", - "type": "method", - "name": "fsync", - "desc": "

    Asynchronous fsync(2). No arguments other than a possible exception are given\nto the completion callback.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.fsyncSync(fd)", - "type": "method", - "name": "fsyncSync", - "desc": "

    Synchronous fsync(2).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - } - ] - } - ] - }, - { - "textRaw": "fs.write(fd, buffer, offset, length, position, callback)", - "type": "method", - "name": "write", - "desc": "

    Write buffer to the file specified by fd.\n\n

    \n

    offset and length determine the part of the buffer to be written.\n\n

    \n

    position refers to the offset from the beginning of the file where this data\nshould be written. If position is null, the data will be written at the\ncurrent position.\nSee pwrite(2).\n\n

    \n

    The callback will be given three arguments (err, written, buffer) where written\nspecifies how many bytes were written from buffer.\n\n

    \n

    Note that it is unsafe to use fs.write multiple times on the same file\nwithout waiting for the callback. For this scenario,\nfs.createWriteStream is strongly recommended.\n\n

    \n

    On Linux, positional writes don't work when the file is opened in append mode.\nThe kernel ignores the position argument and always appends the data to\nthe end of the file.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "buffer" - }, - { - "name": "offset" - }, - { - "name": "length" - }, - { - "name": "position" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.writeSync(fd, buffer, offset, length, position)", - "type": "method", - "name": "writeSync", - "desc": "

    Synchronous version of fs.write(). Returns the number of bytes written.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "buffer" - }, - { - "name": "offset" - }, - { - "name": "length" - }, - { - "name": "position" - } - ] - } - ] - }, - { - "textRaw": "fs.read(fd, buffer, offset, length, position, callback)", - "type": "method", - "name": "read", - "desc": "

    Read data from the file specified by fd.\n\n

    \n

    buffer is the buffer that the data will be written to.\n\n

    \n

    offset is the offset in the buffer to start writing at.\n\n

    \n

    length is an integer specifying the number of bytes to read.\n\n

    \n

    position is an integer specifying where to begin reading from in the file.\nIf position is null, data will be read from the current file position.\n\n

    \n

    The callback is given the three arguments, (err, bytesRead, buffer).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "buffer" - }, - { - "name": "offset" - }, - { - "name": "length" - }, - { - "name": "position" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.readSync(fd, buffer, offset, length, position)", - "type": "method", - "name": "readSync", - "desc": "

    Synchronous version of fs.read. Returns the number of bytesRead.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - }, - { - "name": "buffer" - }, - { - "name": "offset" - }, - { - "name": "length" - }, - { - "name": "position" - } - ] - } - ] - }, - { - "textRaw": "fs.readFile(filename, [options], callback)", - "type": "method", - "name": "readFile", - "signatures": [ - { - "params": [ - { - "textRaw": "`filename` {String} ", - "name": "filename", - "type": "String" - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`encoding` {String | Null} default = `null` ", - "name": "encoding", - "type": "String | Null", - "desc": "default = `null`" - }, - { - "textRaw": "`flag` {String} default = `'r'` ", - "name": "flag", - "type": "String", - "desc": "default = `'r'`" - } - ], - "name": "options", - "type": "Object", - "optional": true - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "filename" - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Asynchronously reads the entire contents of a file. Example:\n\n

    \n
    fs.readFile('/etc/passwd', function (err, data) {\n  if (err) throw err;\n  console.log(data);\n});
    \n

    The callback is passed two arguments (err, data), where data is the\ncontents of the file.\n\n

    \n

    If no encoding is specified, then the raw buffer is returned.\n\n\n

    \n" - }, - { - "textRaw": "fs.readFileSync(filename, [options])", - "type": "method", - "name": "readFileSync", - "desc": "

    Synchronous version of fs.readFile. Returns the contents of the filename.\n\n

    \n

    If the encoding option is specified then this function returns a\nstring. Otherwise it returns a buffer.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.writeFile(filename, data, [options], callback)", - "type": "method", - "name": "writeFile", - "signatures": [ - { - "params": [ - { - "textRaw": "`filename` {String} ", - "name": "filename", - "type": "String" - }, - { - "textRaw": "`data` {String | Buffer} ", - "name": "data", - "type": "String | Buffer" - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`encoding` {String | Null} default = `'utf8'` ", - "name": "encoding", - "type": "String | Null", - "desc": "default = `'utf8'`" - }, - { - "textRaw": "`mode` {Number} default = `438` (aka `0666` in Octal) ", - "name": "mode", - "type": "Number", - "desc": "default = `438` (aka `0666` in Octal)" - }, - { - "textRaw": "`flag` {String} default = `'w'` ", - "name": "flag", - "type": "String", - "desc": "default = `'w'`" - } - ], - "name": "options", - "type": "Object", - "optional": true - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "filename" - }, - { - "name": "data" - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Asynchronously writes data to a file, replacing the file if it already exists.\ndata can be a string or a buffer.\n\n

    \n

    The encoding option is ignored if data is a buffer. It defaults\nto 'utf8'.\n\n

    \n

    Example:\n\n

    \n
    fs.writeFile('message.txt', 'Hello Node', function (err) {\n  if (err) throw err;\n  console.log('It\\'s saved!');\n});
    \n" - }, - { - "textRaw": "fs.writeFileSync(filename, data, [options])", - "type": "method", - "name": "writeFileSync", - "desc": "

    The synchronous version of fs.writeFile.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "data" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.appendFile(filename, data, [options], callback)", - "type": "method", - "name": "appendFile", - "signatures": [ - { - "params": [ - { - "textRaw": "`filename` {String} ", - "name": "filename", - "type": "String" - }, - { - "textRaw": "`data` {String | Buffer} ", - "name": "data", - "type": "String | Buffer" - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`encoding` {String | Null} default = `'utf8'` ", - "name": "encoding", - "type": "String | Null", - "desc": "default = `'utf8'`" - }, - { - "textRaw": "`mode` {Number} default = `438` (aka `0666` in Octal) ", - "name": "mode", - "type": "Number", - "desc": "default = `438` (aka `0666` in Octal)" - }, - { - "textRaw": "`flag` {String} default = `'a'` ", - "name": "flag", - "type": "String", - "desc": "default = `'a'`" - } - ], - "name": "options", - "type": "Object", - "optional": true - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "filename" - }, - { - "name": "data" - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Asynchronously append data to a file, creating the file if it not yet exists.\ndata can be a string or a buffer.\n\n

    \n

    Example:\n\n

    \n
    fs.appendFile('message.txt', 'data to append', function (err) {\n  if (err) throw err;\n  console.log('The "data to append" was appended to file!');\n});
    \n" - }, - { - "textRaw": "fs.appendFileSync(filename, data, [options])", - "type": "method", - "name": "appendFileSync", - "desc": "

    The synchronous version of fs.appendFile.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "data" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.watchFile(filename, [options], listener)", - "type": "method", - "name": "watchFile", - "stability": 2, - "stabilityText": "Unstable. Use fs.watch instead, if possible.", - "desc": "

    Watch for changes on filename. The callback listener will be called each\ntime the file is accessed.\n\n

    \n

    The second argument is optional. The options if provided should be an object\ncontaining two members a boolean, persistent, and interval. persistent\nindicates whether the process should continue to run as long as files are\nbeing watched. interval indicates how often the target should be polled,\nin milliseconds. The default is { persistent: true, interval: 5007 }.\n\n

    \n

    The listener gets two arguments the current stat object and the previous\nstat object:\n\n

    \n
    fs.watchFile('message.text', function (curr, prev) {\n  console.log('the current mtime is: ' + curr.mtime);\n  console.log('the previous mtime was: ' + prev.mtime);\n});
    \n

    These stat objects are instances of fs.Stat.\n\n

    \n

    If you want to be notified when the file was modified, not just accessed\nyou need to compare curr.mtime and prev.mtime.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "options", - "optional": true - }, - { - "name": "listener" - } - ] - } - ] - }, - { - "textRaw": "fs.unwatchFile(filename, [listener])", - "type": "method", - "name": "unwatchFile", - "stability": 2, - "stabilityText": "Unstable. Use fs.watch instead, if possible.", - "desc": "

    Stop watching for changes on filename. If listener is specified, only that\nparticular listener is removed. Otherwise, all listeners are removed and you\nhave effectively stopped watching filename.\n\n

    \n

    Calling fs.unwatchFile() with a filename that is not being watched is a\nno-op, not an error.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "listener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.watch(filename, [options], [listener])", - "type": "method", - "name": "watch", - "stability": 2, - "stabilityText": "Unstable.", - "desc": "

    Watch for changes on filename, where filename is either a file or a\ndirectory. The returned object is a fs.FSWatcher.\n\n

    \n

    The second argument is optional. The options if provided should be an object\ncontaining a boolean member persistent, which indicates whether the process\nshould continue to run as long as files are being watched. The default is\n{ persistent: true }.\n\n

    \n

    The listener callback gets two arguments (event, filename). event is either\n'rename' or 'change', and filename is the name of the file which triggered\nthe event.\n\n

    \n", - "miscs": [ - { - "textRaw": "Caveats", - "name": "Caveats", - "type": "misc", - "desc": "

    The fs.watch API is not 100% consistent across platforms, and is\nunavailable in some situations.\n\n

    \n", - "miscs": [ - { - "textRaw": "Availability", - "name": "Availability", - "type": "misc", - "desc": "

    This feature depends on the underlying operating system providing a way\nto be notified of filesystem changes.\n\n

    \n
      \n
    • On Linux systems, this uses inotify.
    • \n
    • On BSD systems (including OS X), this uses kqueue.
    • \n
    • On SunOS systems (including Solaris and SmartOS), this uses event ports.
    • \n
    • On Windows systems, this feature depends on ReadDirectoryChangesW.
    • \n
    \n

    If the underlying functionality is not available for some reason, then\nfs.watch will not be able to function. For example, watching files or\ndirectories on network file systems (NFS, SMB, etc.) often doesn't work\nreliably or at all.\n\n

    \n

    You can still use fs.watchFile, which uses stat polling, but it is slower and\nless reliable.\n\n

    \n" - }, - { - "textRaw": "Filename Argument", - "name": "Filename Argument", - "type": "misc", - "desc": "

    Providing filename argument in the callback is not supported\non every platform (currently it's only supported on Linux and Windows). Even\non supported platforms filename is not always guaranteed to be provided.\nTherefore, don't assume that filename argument is always provided in the\ncallback, and have some fallback logic if it is null.\n\n

    \n
    fs.watch('somedir', function (event, filename) {\n  console.log('event is: ' + event);\n  if (filename) {\n    console.log('filename provided: ' + filename);\n  } else {\n    console.log('filename not provided');\n  }\n});
    \n" - } - ] - } - ], - "signatures": [ - { - "params": [ - { - "name": "filename" - }, - { - "name": "options", - "optional": true - }, - { - "name": "listener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.exists(path, callback)", - "type": "method", - "name": "exists", - "desc": "

    Test whether or not the given path exists by checking with the file system.\nThen call the callback argument with either true or false. Example:\n\n

    \n
    fs.exists('/etc/passwd', function (exists) {\n  util.debug(exists ? "it's there" : "no passwd!");\n});
    \n

    fs.exists() is an anachronism and exists only for historical reasons.\nThere should almost never be a reason to use it in your own code.\n\n

    \n

    In particular, checking if a file exists before opening it is an anti-pattern\nthat leaves you vulnerable to race conditions: another process may remove the\nfile between the calls to fs.exists() and fs.open(). Just open the file\nand handle the error when it's not there.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "fs.existsSync(path)", - "type": "method", - "name": "existsSync", - "desc": "

    Synchronous version of fs.exists.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - } - ] - } - ] - }, - { - "textRaw": "fs.createReadStream(path, [options])", - "type": "method", - "name": "createReadStream", - "desc": "

    Returns a new ReadStream object (See Readable Stream).\n\n

    \n

    options is an object with the following defaults:\n\n

    \n
    { flags: 'r',\n  encoding: null,\n  fd: null,\n  mode: 0666,\n  autoClose: true\n}
    \n

    options can include start and end values to read a range of bytes from\nthe file instead of the entire file. Both start and end are inclusive and\nstart at 0. The encoding can be 'utf8', 'ascii', or 'base64'.\n\n

    \n

    If autoClose is false, then the file descriptor won't be closed, even if\nthere's an error. It is your responsiblity to close it and make sure\nthere's no file descriptor leak. If autoClose is set to true (default\nbehavior), on error or end the file descriptor will be closed\nautomatically.\n\n

    \n

    An example to read the last 10 bytes of a file which is 100 bytes long:\n\n

    \n
    fs.createReadStream('sample.txt', {start: 90, end: 99});
    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "fs.createWriteStream(path, [options])", - "type": "method", - "name": "createWriteStream", - "desc": "

    Returns a new WriteStream object (See Writable Stream).\n\n

    \n

    options is an object with the following defaults:\n\n

    \n
    { flags: 'w',\n  encoding: null,\n  mode: 0666 }
    \n

    options may also include a start option to allow writing data at\nsome position past the beginning of the file. Modifying a file rather\nthan replacing it may require a flags mode of r+ rather than the\ndefault mode w.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "options", - "optional": true - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: fs.Stats", - "type": "class", - "name": "fs.Stats", - "desc": "

    Objects returned from fs.stat(), fs.lstat() and fs.fstat() and their\nsynchronous counterparts are of this type.\n\n

    \n
      \n
    • stats.isFile()
    • \n
    • stats.isDirectory()
    • \n
    • stats.isBlockDevice()
    • \n
    • stats.isCharacterDevice()
    • \n
    • stats.isSymbolicLink() (only valid with fs.lstat())
    • \n
    • stats.isFIFO()
    • \n
    • stats.isSocket()
    • \n
    \n

    For a regular file util.inspect(stats) would return a string very\nsimilar to this:\n\n

    \n
    { dev: 2114,\n  ino: 48064969,\n  mode: 33188,\n  nlink: 1,\n  uid: 85,\n  gid: 100,\n  rdev: 0,\n  size: 527,\n  blksize: 4096,\n  blocks: 8,\n  atime: Mon, 10 Oct 2011 23:24:11 GMT,\n  mtime: Mon, 10 Oct 2011 23:24:11 GMT,\n  ctime: Mon, 10 Oct 2011 23:24:11 GMT }
    \n

    Please note that atime, mtime and ctime are instances\nof [Date][MDN-Date] object and to compare the values of\nthese objects you should use appropriate methods. For most\ngeneral uses [getTime()][MDN-Date-getTime] will return\nthe number of milliseconds elapsed since 1 January 1970\n00:00:00 UTC and this integer should be sufficient for\nany comparison, however there additional methods which can\nbe used for displaying fuzzy information. More details can\nbe found in the [MDN JavaScript Reference][MDN-Date] page.\n\n

    \n" - }, - { - "textRaw": "Class: fs.ReadStream", - "type": "class", - "name": "fs.ReadStream", - "desc": "

    ReadStream is a Readable Stream.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'open'", - "type": "event", - "name": "open", - "params": [], - "desc": "

    Emitted when the ReadStream's file is opened.\n\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: fs.WriteStream", - "type": "class", - "name": "fs.WriteStream", - "desc": "

    WriteStream is a Writable Stream.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'open'", - "type": "event", - "name": "open", - "params": [], - "desc": "

    Emitted when the WriteStream's file is opened.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "file.bytesWritten", - "name": "bytesWritten", - "desc": "

    The number of bytes written so far. Does not include data that is still queued\nfor writing.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: fs.FSWatcher", - "type": "class", - "name": "fs.FSWatcher", - "desc": "

    Objects returned from fs.watch() are of this type.\n\n

    \n", - "methods": [ - { - "textRaw": "watcher.close()", - "type": "method", - "name": "close", - "desc": "

    Stop watching for changes on the given fs.FSWatcher.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "events": [ - { - "textRaw": "Event: 'change'", - "type": "event", - "name": "change", - "params": [], - "desc": "

    Emitted when something changes in a watched directory or file.\nSee more details in fs.watch.\n\n

    \n" - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "params": [], - "desc": "

    Emitted when an error occurs.\n\n

    \n" - } - ] - } - ], - "type": "module", - "displayName": "fs" - }, - { - "textRaw": "Path", - "name": "path", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    This module contains utilities for handling and transforming file\npaths. Almost all these methods perform only string transformations.\nThe file system is not consulted to check whether paths are valid.\n\n

    \n

    Use require('path') to use this module. The following methods are provided:\n\n

    \n", - "methods": [ - { - "textRaw": "path.normalize(p)", - "type": "method", - "name": "normalize", - "desc": "

    Normalize a string path, taking care of '..' and '.' parts.\n\n

    \n

    When multiple slashes are found, they're replaced by a single one;\nwhen the path contains a trailing slash, it is preserved.\nOn Windows backslashes are used.\n\n

    \n

    Example:\n\n

    \n
    path.normalize('/foo/bar//baz/asdf/quux/..')\n// returns\n'/foo/bar/baz/asdf'
    \n", - "signatures": [ - { - "params": [ - { - "name": "p" - } - ] - } - ] - }, - { - "textRaw": "path.join([path1], [path2], [...])", - "type": "method", - "name": "join", - "desc": "

    Join all arguments together and normalize the resulting path.\n\n

    \n

    Arguments must be strings. In v0.8, non-string arguments were\nsilently ignored. In v0.10 and up, an exception is thrown.\n\n

    \n

    Example:\n\n

    \n
    path.join('/foo', 'bar', 'baz/asdf', 'quux', '..')\n// returns\n'/foo/bar/baz/asdf'\n\npath.join('foo', {}, 'bar')\n// throws exception\nTypeError: Arguments to path.join must be strings
    \n", - "signatures": [ - { - "params": [ - { - "name": "path1", - "optional": true - }, - { - "name": "path2", - "optional": true - }, - { - "name": "...", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "path.resolve([from ...], to)", - "type": "method", - "name": "resolve", - "desc": "

    Resolves to to an absolute path.\n\n

    \n

    If to isn't already absolute from arguments are prepended in right to left\norder, until an absolute path is found. If after using all from paths still\nno absolute path is found, the current working directory is used as well. The\nresulting path is normalized, and trailing slashes are removed unless the path\ngets resolved to the root directory. Non-string arguments are ignored.\n\n

    \n

    Another way to think of it is as a sequence of cd commands in a shell.\n\n

    \n
    path.resolve('foo/bar', '/tmp/file/', '..', 'a/../subfile')
    \n

    Is similar to:\n\n

    \n
    cd foo/bar\ncd /tmp/file/\ncd ..\ncd a/../subfile\npwd
    \n

    The difference is that the different paths don't need to exist and may also be\nfiles.\n\n

    \n

    Examples:\n\n

    \n
    path.resolve('/foo/bar', './baz')\n// returns\n'/foo/bar/baz'\n\npath.resolve('/foo/bar', '/tmp/file/')\n// returns\n'/tmp/file'\n\npath.resolve('wwwroot', 'static_files/png/', '../gif/image.gif')\n// if currently in /home/myself/node, it returns\n'/home/myself/node/wwwroot/static_files/gif/image.gif'
    \n", - "signatures": [ - { - "params": [ - { - "name": "from ...", - "optional": true - }, - { - "name": "to" - } - ] - } - ] - }, - { - "textRaw": "path.relative(from, to)", - "type": "method", - "name": "relative", - "desc": "

    Solve the relative path from from to to.\n\n

    \n

    At times we have two absolute paths, and we need to derive the relative\npath from one to the other. This is actually the reverse transform of\npath.resolve, which means we see that:\n\n

    \n
    path.resolve(from, path.relative(from, to)) == path.resolve(to)
    \n

    Examples:\n\n

    \n
    path.relative('C:\\\\orandea\\\\test\\\\aaa', 'C:\\\\orandea\\\\impl\\\\bbb')\n// returns\n'..\\\\..\\\\impl\\\\bbb'\n\npath.relative('/data/orandea/test/aaa', '/data/orandea/impl/bbb')\n// returns\n'../../impl/bbb'
    \n", - "signatures": [ - { - "params": [ - { - "name": "from" - }, - { - "name": "to" - } - ] - } - ] - }, - { - "textRaw": "path.dirname(p)", - "type": "method", - "name": "dirname", - "desc": "

    Return the directory name of a path. Similar to the Unix dirname command.\n\n

    \n

    Example:\n\n

    \n
    path.dirname('/foo/bar/baz/asdf/quux')\n// returns\n'/foo/bar/baz/asdf'
    \n", - "signatures": [ - { - "params": [ - { - "name": "p" - } - ] - } - ] - }, - { - "textRaw": "path.basename(p, [ext])", - "type": "method", - "name": "basename", - "desc": "

    Return the last portion of a path. Similar to the Unix basename command.\n\n

    \n

    Example:\n\n

    \n
    path.basename('/foo/bar/baz/asdf/quux.html')\n// returns\n'quux.html'\n\npath.basename('/foo/bar/baz/asdf/quux.html', '.html')\n// returns\n'quux'
    \n", - "signatures": [ - { - "params": [ - { - "name": "p" - }, - { - "name": "ext", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "path.extname(p)", - "type": "method", - "name": "extname", - "desc": "

    Return the extension of the path, from the last '.' to end of string\nin the last portion of the path. If there is no '.' in the last portion\nof the path or the first character of it is '.', then it returns\nan empty string. Examples:\n\n

    \n
    path.extname('index.html')\n// returns\n'.html'\n\npath.extname('index.')\n// returns\n'.'\n\npath.extname('index')\n// returns\n''
    \n", - "signatures": [ - { - "params": [ - { - "name": "p" - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "path.sep", - "name": "sep", - "desc": "

    The platform-specific file separator. '\\\\' or '/'.\n\n

    \n

    An example on *nix:\n\n

    \n
    'foo/bar/baz'.split(path.sep)\n// returns\n['foo', 'bar', 'baz']
    \n

    An example on Windows:\n\n

    \n
    'foo\\\\bar\\\\baz'.split(path.sep)\n// returns\n['foo', 'bar', 'baz']
    \n" - }, - { - "textRaw": "path.delimiter", - "name": "delimiter", - "desc": "

    The platform-specific path delimiter, ; or ':'.\n\n

    \n

    An example on *nix:\n\n

    \n
    console.log(process.env.PATH)\n// '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin'\n\nprocess.env.PATH.split(path.delimiter)\n// returns\n['/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin']
    \n

    An example on Windows:\n\n

    \n
    console.log(process.env.PATH)\n// 'C:\\Windows\\system32;C:\\Windows;C:\\Program Files\\nodejs\\'\n\nprocess.env.PATH.split(path.delimiter)\n// returns\n['C:\\Windows\\system32', 'C:\\Windows', 'C:\\Program Files\\nodejs\\']
    \n" - } - ], - "type": "module", - "displayName": "Path" - }, - { - "textRaw": "net", - "name": "net", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    The net module provides you with an asynchronous network wrapper. It contains\nmethods for creating both servers and clients (called streams). You can include\nthis module with require('net');\n\n

    \n", - "methods": [ - { - "textRaw": "net.createServer([options], [connectionListener])", - "type": "method", - "name": "createServer", - "desc": "

    Creates a new TCP server. The connectionListener argument is\nautomatically set as a listener for the ['connection'][] event.\n\n

    \n

    options is an object with the following defaults:\n\n

    \n
    { allowHalfOpen: false\n}
    \n

    If allowHalfOpen is true, then the socket won't automatically send a FIN\npacket when the other end of the socket sends a FIN packet. The socket becomes\nnon-readable, but still writable. You should call the end() method explicitly.\nSee ['end'][] event for more information.\n\n

    \n

    Here is an example of an echo server which listens for connections\non port 8124:\n\n

    \n
    var net = require('net');\nvar server = net.createServer(function(c) { //'connection' listener\n  console.log('server connected');\n  c.on('end', function() {\n    console.log('server disconnected');\n  });\n  c.write('hello\\r\\n');\n  c.pipe(c);\n});\nserver.listen(8124, function() { //'listening' listener\n  console.log('server bound');\n});
    \n

    Test this by using telnet:\n\n

    \n
    telnet localhost 8124
    \n

    To listen on the socket /tmp/echo.sock the third line from the last would\njust be changed to\n\n

    \n
    server.listen('/tmp/echo.sock', function() { //'listening' listener
    \n

    Use nc to connect to a UNIX domain socket server:\n\n

    \n
    nc -U /tmp/echo.sock
    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - }, - { - "name": "connectionListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.connect(options, [connectionListener])", - "type": "method", - "name": "connect", - "desc": "

    Constructs a new socket object and opens the socket to the given location.\nWhen the socket is established, the ['connect'][] event will be emitted.\n\n

    \n

    For TCP sockets, options argument should be an object which specifies:\n\n

    \n
      \n
    • port: Port the client should connect to (Required).

      \n
    • \n
    • host: Host the client should connect to. Defaults to 'localhost'.

      \n
    • \n
    • localAddress: Local interface to bind to for network connections.

      \n
    • \n
    \n

    For UNIX domain sockets, options argument should be an object which specifies:\n\n

    \n
      \n
    • path: Path the client should connect to (Required).
    • \n
    \n

    Common options are:\n\n

    \n
      \n
    • allowHalfOpen: if true, the socket won't automatically send\na FIN packet when the other end of the socket sends a FIN packet.\nDefaults to false. See ['end'][] event for more information.
    • \n
    \n

    The connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n

    Here is an example of a client of echo server as described previously:\n\n

    \n
    var net = require('net');\nvar client = net.connect({port: 8124},\n    function() { //'connect' listener\n  console.log('client connected');\n  client.write('world!\\r\\n');\n});\nclient.on('data', function(data) {\n  console.log(data.toString());\n  client.end();\n});\nclient.on('end', function() {\n  console.log('client disconnected');\n});
    \n

    To connect on the socket /tmp/echo.sock the second line would just be\nchanged to\n\n

    \n
    var client = net.connect({path: '/tmp/echo.sock'},
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "connectionListener", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "options" - }, - { - "name": "connectionListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.createConnection(options, [connectionListener])", - "type": "method", - "name": "createConnection", - "desc": "

    Constructs a new socket object and opens the socket to the given location.\nWhen the socket is established, the ['connect'][] event will be emitted.\n\n

    \n

    For TCP sockets, options argument should be an object which specifies:\n\n

    \n
      \n
    • port: Port the client should connect to (Required).

      \n
    • \n
    • host: Host the client should connect to. Defaults to 'localhost'.

      \n
    • \n
    • localAddress: Local interface to bind to for network connections.

      \n
    • \n
    \n

    For UNIX domain sockets, options argument should be an object which specifies:\n\n

    \n
      \n
    • path: Path the client should connect to (Required).
    • \n
    \n

    Common options are:\n\n

    \n
      \n
    • allowHalfOpen: if true, the socket won't automatically send\na FIN packet when the other end of the socket sends a FIN packet.\nDefaults to false. See ['end'][] event for more information.
    • \n
    \n

    The connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n

    Here is an example of a client of echo server as described previously:\n\n

    \n
    var net = require('net');\nvar client = net.connect({port: 8124},\n    function() { //'connect' listener\n  console.log('client connected');\n  client.write('world!\\r\\n');\n});\nclient.on('data', function(data) {\n  console.log(data.toString());\n  client.end();\n});\nclient.on('end', function() {\n  console.log('client disconnected');\n});
    \n

    To connect on the socket /tmp/echo.sock the second line would just be\nchanged to\n\n

    \n
    var client = net.connect({path: '/tmp/echo.sock'},
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "connectionListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.connect(port, [host], [connectListener])", - "type": "method", - "name": "connect", - "desc": "

    Creates a TCP connection to port on host. If host is omitted,\n'localhost' will be assumed.\nThe connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "connectListener", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.createConnection(port, [host], [connectListener])", - "type": "method", - "name": "createConnection", - "desc": "

    Creates a TCP connection to port on host. If host is omitted,\n'localhost' will be assumed.\nThe connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.connect(path, [connectListener])", - "type": "method", - "name": "connect", - "desc": "

    Creates unix socket connection to path.\nThe connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "connectListener", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "path" - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.createConnection(path, [connectListener])", - "type": "method", - "name": "createConnection", - "desc": "

    Creates unix socket connection to path.\nThe connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "net.isIP(input)", - "type": "method", - "name": "isIP", - "desc": "

    Tests if input is an IP address. Returns 0 for invalid strings,\nreturns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "input" - } - ] - } - ] - }, - { - "textRaw": "net.isIPv4(input)", - "type": "method", - "name": "isIPv4", - "desc": "

    Returns true if input is a version 4 IP address, otherwise returns false.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "input" - } - ] - } - ] - }, - { - "textRaw": "net.isIPv6(input)", - "type": "method", - "name": "isIPv6", - "desc": "

    Returns true if input is a version 6 IP address, otherwise returns false.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "input" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: net.Server", - "type": "class", - "name": "net.Server", - "desc": "

    This class is used to create a TCP or UNIX server.\n\n

    \n", - "methods": [ - { - "textRaw": "server.listen(port, [host], [backlog], [callback])", - "type": "method", - "name": "listen", - "desc": "

    Begin accepting connections on the specified port and host. If the\nhost is omitted, the server will accept connections directed to any\nIPv4 address (INADDR_ANY). A port value of zero will assign a random port.\n\n

    \n

    Backlog is the maximum length of the queue of pending connections.\nThe actual length will be determined by your OS through sysctl settings such as\ntcp_max_syn_backlog and somaxconn on linux. The default value of this\nparameter is 511 (not 512).\n\n

    \n

    This function is asynchronous. When the server has been bound,\n['listening'][] event will be emitted. The last parameter callback\nwill be added as an listener for the ['listening'][] event.\n\n

    \n

    One issue some users run into is getting EADDRINUSE errors. This means that\nanother server is already running on the requested port. One way of handling this\nwould be to wait a second and then try again. This can be done with\n\n

    \n
    server.on('error', function (e) {\n  if (e.code == 'EADDRINUSE') {\n    console.log('Address in use, retrying...');\n    setTimeout(function () {\n      server.close();\n      server.listen(PORT, HOST);\n    }, 1000);\n  }\n});
    \n

    (Note: All sockets in Node set SO_REUSEADDR already)\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "backlog", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(path, [callback])", - "type": "method", - "name": "listen", - "desc": "

    Start a UNIX socket server listening for connections on the given path.\n\n

    \n

    This function is asynchronous. When the server has been bound,\n['listening'][] event will be emitted. The last parameter callback\nwill be added as an listener for the ['listening'][] event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(handle, [callback])", - "type": "method", - "name": "listen", - "signatures": [ - { - "params": [ - { - "textRaw": "`handle` {Object} ", - "name": "handle", - "type": "Object" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "handle" - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    The handle object can be set to either a server or socket (anything\nwith an underlying _handle member), or a {fd: <n>} object.\n\n

    \n

    This will cause the server to accept connections on the specified\nhandle, but it is presumed that the file descriptor or handle has\nalready been bound to a port or domain socket.\n\n

    \n

    Listening on a file descriptor is not supported on Windows.\n\n

    \n

    This function is asynchronous. When the server has been bound,\n'listening' event will be emitted.\nthe last parameter callback will be added as an listener for the\n'listening' event.\n\n

    \n" - }, - { - "textRaw": "server.close([callback])", - "type": "method", - "name": "close", - "desc": "

    Stops the server from accepting new connections and keeps existing\nconnections. This function is asynchronous, the server is finally\nclosed when all connections are ended and the server emits a 'close'\nevent. Optionally, you can pass a callback to listen for the 'close'\nevent.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.address()", - "type": "method", - "name": "address", - "desc": "

    Returns the bound address, the address family name and port of the server\nas reported by the operating system.\nUseful to find which port was assigned when giving getting an OS-assigned address.\nReturns an object with three properties, e.g.\n{ port: 12346, family: 'IPv4', address: '127.0.0.1' }\n\n

    \n

    Example:\n\n

    \n
    var server = net.createServer(function (socket) {\n  socket.end("goodbye\\n");\n});\n\n// grab a random port.\nserver.listen(function() {\n  address = server.address();\n  console.log("opened server on %j", address);\n});
    \n

    Don't call server.address() until the 'listening' event has been emitted.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "server.unref()", - "type": "method", - "name": "unref", - "desc": "

    Calling unref on a server will allow the program to exit if this is the only\nactive server in the event system. If the server is already unrefd calling\nunref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "server.ref()", - "type": "method", - "name": "ref", - "desc": "

    Opposite of unref, calling ref on a previously unrefd server will not\nlet the program exit if it's the only server left (the default behavior). If\nthe server is refd calling ref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "server.getConnections(callback)", - "type": "method", - "name": "getConnections", - "desc": "

    Asynchronously get the number of concurrent connections on the server. Works\nwhen sockets were sent to forks.\n\n

    \n

    Callback should take two arguments err and count.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "server.maxConnections", - "name": "maxConnections", - "desc": "

    Set this property to reject connections when the server's connection count gets\nhigh.\n\n

    \n

    It is not recommended to use this option once a socket has been sent to a child\nwith child_process.fork().\n\n

    \n" - }, - { - "textRaw": "server.connections", - "name": "connections", - "desc": "

    This function is deprecated; please use [server.getConnections()][] instead.\nThe number of concurrent connections on the server.\n\n

    \n

    This becomes null when sending a socket to a child with\nchild_process.fork(). To poll forks and get current number of active\nconnections use asynchronous server.getConnections instead.\n\n

    \n

    net.Server is an [EventEmitter][] with the following events:\n\n

    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'listening'", - "type": "event", - "name": "listening", - "desc": "

    Emitted when the server has been bound after calling server.listen.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connection'", - "type": "event", - "name": "connection", - "params": [], - "desc": "

    Emitted when a new connection is made. socket is an instance of\nnet.Socket.\n\n

    \n" - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    Emitted when the server closes. Note that if connections exist, this\nevent is not emitted until all connections are ended.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "params": [], - "desc": "

    Emitted when an error occurs. The 'close' event will be called directly\nfollowing this event. See example in discussion of server.listen.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: net.Socket", - "type": "class", - "name": "net.Socket", - "desc": "

    This object is an abstraction of a TCP or UNIX socket. net.Socket\ninstances implement a duplex Stream interface. They can be created by the\nuser and used as a client (with connect()) or they can be created by Node\nand passed to the user through the 'connection' event of a server.\n\n

    \n", - "methods": [ - { - "textRaw": "new net.Socket([options])", - "type": "method", - "name": "Socket", - "desc": "

    Construct a new socket object.\n\n

    \n

    options is an object with the following defaults:\n\n

    \n
    { fd: null\n  type: null\n  allowHalfOpen: false\n}
    \n

    fd allows you to specify the existing file descriptor of socket. type\nspecified underlying protocol. It can be 'tcp4', 'tcp6', or 'unix'.\nAbout allowHalfOpen, refer to createServer() and 'end' event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.connect(port, [host], [connectListener])", - "type": "method", - "name": "connect", - "desc": "

    Opens the connection for a given socket. If port and host are given,\nthen the socket will be opened as a TCP socket, if host is omitted,\nlocalhost will be assumed. If a path is given, the socket will be\nopened as a unix socket to that path.\n\n

    \n

    Normally this method is not needed, as net.createConnection opens the\nsocket. Use this only if you are implementing a custom Socket.\n\n

    \n

    This function is asynchronous. When the ['connect'][] event is emitted the\nsocket is established. If there is a problem connecting, the 'connect' event\nwill not be emitted, the 'error' event will be emitted with the exception.\n\n

    \n

    The connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "connectListener", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "port" - }, - { - "name": "host", - "optional": true - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.connect(path, [connectListener])", - "type": "method", - "name": "connect", - "desc": "

    Opens the connection for a given socket. If port and host are given,\nthen the socket will be opened as a TCP socket, if host is omitted,\nlocalhost will be assumed. If a path is given, the socket will be\nopened as a unix socket to that path.\n\n

    \n

    Normally this method is not needed, as net.createConnection opens the\nsocket. Use this only if you are implementing a custom Socket.\n\n

    \n

    This function is asynchronous. When the ['connect'][] event is emitted the\nsocket is established. If there is a problem connecting, the 'connect' event\nwill not be emitted, the 'error' event will be emitted with the exception.\n\n

    \n

    The connectListener parameter will be added as an listener for the\n['connect'][] event.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "connectListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.setEncoding([encoding])", - "type": "method", - "name": "setEncoding", - "desc": "

    Set the encoding for the socket as a Readable Stream. See\n[stream.setEncoding()][] for more information.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.write(data, [encoding], [callback])", - "type": "method", - "name": "write", - "desc": "

    Sends data on the socket. The second parameter specifies the encoding in the\ncase of a string--it defaults to UTF8 encoding.\n\n

    \n

    Returns true if the entire data was flushed successfully to the kernel\nbuffer. Returns false if all or part of the data was queued in user memory.\n'drain' will be emitted when the buffer is again free.\n\n

    \n

    The optional callback parameter will be executed when the data is finally\nwritten out - this may not be immediately.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - }, - { - "name": "encoding", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.end([data], [encoding])", - "type": "method", - "name": "end", - "desc": "

    Half-closes the socket. i.e., it sends a FIN packet. It is possible the\nserver will still send some data.\n\n

    \n

    If data is specified, it is equivalent to calling\nsocket.write(data, encoding) followed by socket.end().\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.destroy()", - "type": "method", - "name": "destroy", - "desc": "

    Ensures that no more I/O activity happens on this socket. Only necessary in\ncase of errors (parse error or so).\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.pause()", - "type": "method", - "name": "pause", - "desc": "

    Pauses the reading of data. That is, 'data' events will not be emitted.\nUseful to throttle back an upload.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.resume()", - "type": "method", - "name": "resume", - "desc": "

    Resumes reading after a call to pause().\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.setTimeout(timeout, [callback])", - "type": "method", - "name": "setTimeout", - "desc": "

    Sets the socket to timeout after timeout milliseconds of inactivity on\nthe socket. By default net.Socket do not have a timeout.\n\n

    \n

    When an idle timeout is triggered the socket will receive a 'timeout'\nevent but the connection will not be severed. The user must manually end()\nor destroy() the socket.\n\n

    \n

    If timeout is 0, then the existing idle timeout is disabled.\n\n

    \n

    The optional callback parameter will be added as a one time listener for the\n'timeout' event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "timeout" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.setNoDelay([noDelay])", - "type": "method", - "name": "setNoDelay", - "desc": "

    Disables the Nagle algorithm. By default TCP connections use the Nagle\nalgorithm, they buffer data before sending it off. Setting true for\nnoDelay will immediately fire off data each time socket.write() is called.\nnoDelay defaults to true.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "noDelay", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.setKeepAlive([enable], [initialDelay])", - "type": "method", - "name": "setKeepAlive", - "desc": "

    Enable/disable keep-alive functionality, and optionally set the initial\ndelay before the first keepalive probe is sent on an idle socket.\nenable defaults to false.\n\n

    \n

    Set initialDelay (in milliseconds) to set the delay between the last\ndata packet received and the first keepalive probe. Setting 0 for\ninitialDelay will leave the value unchanged from the default\n(or previous) setting. Defaults to 0.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "enable", - "optional": true - }, - { - "name": "initialDelay", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "socket.address()", - "type": "method", - "name": "address", - "desc": "

    Returns the bound address, the address family name and port of the\nsocket as reported by the operating system. Returns an object with\nthree properties, e.g.\n{ port: 12346, family: 'IPv4', address: '127.0.0.1' }\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.unref()", - "type": "method", - "name": "unref", - "desc": "

    Calling unref on a socket will allow the program to exit if this is the only\nactive socket in the event system. If the socket is already unrefd calling\nunref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.ref()", - "type": "method", - "name": "ref", - "desc": "

    Opposite of unref, calling ref on a previously unrefd socket will not\nlet the program exit if it's the only socket left (the default behavior). If\nthe socket is refd calling ref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "properties": [ - { - "textRaw": "socket.bufferSize", - "name": "bufferSize", - "desc": "

    net.Socket has the property that socket.write() always works. This is to\nhelp users get up and running quickly. The computer cannot always keep up\nwith the amount of data that is written to a socket - the network connection\nsimply might be too slow. Node will internally queue up the data written to a\nsocket and send it out over the wire when it is possible. (Internally it is\npolling on the socket's file descriptor for being writable).\n\n

    \n

    The consequence of this internal buffering is that memory may grow. This\nproperty shows the number of characters currently buffered to be written.\n(Number of characters is approximately equal to the number of bytes to be\nwritten, but the buffer may contain strings, and the strings are lazily\nencoded, so the exact number of bytes is not known.)\n\n

    \n

    Users who experience large or growing bufferSize should attempt to\n"throttle" the data flows in their program with pause() and resume().\n\n\n

    \n" - }, - { - "textRaw": "socket.remoteAddress", - "name": "remoteAddress", - "desc": "

    The string representation of the remote IP address. For example,\n'74.125.127.100' or '2001:4860:a005::68'.\n\n

    \n" - }, - { - "textRaw": "socket.remotePort", - "name": "remotePort", - "desc": "

    The numeric representation of the remote port. For example,\n80 or 21.\n\n

    \n" - }, - { - "textRaw": "socket.localAddress", - "name": "localAddress", - "desc": "

    The string representation of the local IP address the remote client is\nconnecting on. For example, if you are listening on '0.0.0.0' and the\nclient connects on '192.168.1.1', the value would be '192.168.1.1'.\n\n

    \n" - }, - { - "textRaw": "socket.localPort", - "name": "localPort", - "desc": "

    The numeric representation of the local port. For example,\n80 or 21.\n\n

    \n" - }, - { - "textRaw": "socket.bytesRead", - "name": "bytesRead", - "desc": "

    The amount of received bytes.\n\n

    \n" - }, - { - "textRaw": "socket.bytesWritten", - "name": "bytesWritten", - "desc": "

    The amount of bytes sent.\n\n\n

    \n

    net.Socket instances are [EventEmitter][] with the following events:\n\n

    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'connect'", - "type": "event", - "name": "connect", - "desc": "

    Emitted when a socket connection is successfully established.\nSee connect().\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'data'", - "type": "event", - "name": "data", - "params": [], - "desc": "

    Emitted when data is received. The argument data will be a Buffer or\nString. Encoding of data is set by socket.setEncoding().\n(See the [Readable Stream][] section for more information.)\n\n

    \n

    Note that the data will be lost if there is no listener when a Socket\nemits a 'data' event.\n\n

    \n" - }, - { - "textRaw": "Event: 'end'", - "type": "event", - "name": "end", - "desc": "

    Emitted when the other end of the socket sends a FIN packet.\n\n

    \n

    By default (allowHalfOpen == false) the socket will destroy its file\ndescriptor once it has written out its pending write queue. However, by\nsetting allowHalfOpen == true the socket will not automatically end()\nits side allowing the user to write arbitrary amounts of data, with the\ncaveat that the user is required to end() their side now.\n\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'timeout'", - "type": "event", - "name": "timeout", - "desc": "

    Emitted if the socket times out from inactivity. This is only to notify that\nthe socket has been idle. The user must manually close the connection.\n\n

    \n

    See also: socket.setTimeout()\n\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'drain'", - "type": "event", - "name": "drain", - "desc": "

    Emitted when the write buffer becomes empty. Can be used to throttle uploads.\n\n

    \n

    See also: the return values of socket.write()\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "params": [], - "desc": "

    Emitted when an error occurs. The 'close' event will be called directly\nfollowing this event.\n\n

    \n" - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "params": [], - "desc": "

    Emitted once the socket is fully closed. The argument had_error is a boolean\nwhich says if the socket was closed due to a transmission error.\n\n

    \n" - } - ] - } - ], - "type": "module", - "displayName": "net" - }, - { - "textRaw": "UDP / Datagram Sockets", - "name": "dgram", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    Datagram sockets are available through require('dgram').\n\n

    \n

    Important note: the behavior of dgram.Socket#bind() has changed in v0.10\nand is always asynchronous now. If you have code that looks like this:\n\n

    \n
    var s = dgram.createSocket('udp4');\ns.bind(1234);\ns.addMembership('224.0.0.114');
    \n

    You have to change it to this:\n\n

    \n
    var s = dgram.createSocket('udp4');\ns.bind(1234, function() {\n  s.addMembership('224.0.0.114');\n});
    \n", - "methods": [ - { - "textRaw": "dgram.createSocket(type, [callback])", - "type": "method", - "name": "createSocket", - "signatures": [ - { - "return": { - "textRaw": "Returns: Socket object ", - "name": "return", - "desc": "Socket object" - }, - "params": [ - { - "textRaw": "`type` String. Either 'udp4' or 'udp6' ", - "name": "type", - "desc": "String. Either 'udp4' or 'udp6'" - }, - { - "textRaw": "`callback` Function. Attached as a listener to `message` events. Optional ", - "name": "callback", - "optional": true, - "desc": "Function. Attached as a listener to `message` events." - } - ] - }, - { - "params": [ - { - "name": "type" - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    Creates a datagram Socket of the specified types. Valid types are udp4\nand udp6.\n\n

    \n

    Takes an optional callback which is added as a listener for message events.\n\n

    \n

    Call socket.bind if you want to receive datagrams. socket.bind() will bind\nto the "all interfaces" address on a random port (it does the right thing for\nboth udp4 and udp6 sockets). You can then retrieve the address and port\nwith socket.address().address and socket.address().port.\n\n

    \n" - } - ], - "classes": [ - { - "textRaw": "Class: dgram.Socket", - "type": "class", - "name": "dgram.Socket", - "desc": "

    The dgram Socket class encapsulates the datagram functionality. It\nshould be created via dgram.createSocket(type, [callback]).\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'message'", - "type": "event", - "name": "message", - "params": [], - "desc": "

    Emitted when a new datagram is available on a socket. msg is a Buffer and rinfo is\nan object with the sender's address information and the number of bytes in the datagram.\n\n

    \n" - }, - { - "textRaw": "Event: 'listening'", - "type": "event", - "name": "listening", - "desc": "

    Emitted when a socket starts listening for datagrams. This happens as soon as UDP sockets\nare created.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    Emitted when a socket is closed with close(). No new message events will be emitted\non this socket.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "params": [], - "desc": "

    Emitted when an error occurs.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "socket.send(buf, offset, length, port, address, [callback])", - "type": "method", - "name": "send", - "signatures": [ - { - "params": [ - { - "textRaw": "`buf` Buffer object. Message to be sent ", - "name": "buf", - "desc": "Buffer object. Message to be sent" - }, - { - "textRaw": "`offset` Integer. Offset in the buffer where the message starts. ", - "name": "offset", - "desc": "Integer. Offset in the buffer where the message starts." - }, - { - "textRaw": "`length` Integer. Number of bytes in the message. ", - "name": "length", - "desc": "Integer. Number of bytes in the message." - }, - { - "textRaw": "`port` Integer. Destination port. ", - "name": "port", - "desc": "Integer. Destination port." - }, - { - "textRaw": "`address` String. Destination hostname or IP address. ", - "name": "address", - "desc": "String. Destination hostname or IP address." - }, - { - "textRaw": "`callback` Function. Called when the message has been sent. Optional. ", - "name": "callback", - "desc": "Function. Called when the message has been sent. Optional.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "buf" - }, - { - "name": "offset" - }, - { - "name": "length" - }, - { - "name": "port" - }, - { - "name": "address" - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    For UDP sockets, the destination port and address must be specified. A string\nmay be supplied for the address parameter, and it will be resolved with DNS.\n\n

    \n

    If the address is omitted or is an empty string, '0.0.0.0' or '::0' is used\ninstead. Depending on the network configuration, those defaults may or may not\nwork; it's best to be explicit about the destination address.\n\n

    \n

    If the socket has not been previously bound with a call to bind, it gets\nassigned a random port number and is bound to the "all interfaces" address\n('0.0.0.0' for udp4 sockets, '::0' for udp6 sockets.)\n\n

    \n

    An optional callback may be specified to detect DNS errors or for determining\nwhen it's safe to reuse the buf object. Note that DNS lookups delay the time\nto send for at least one tick. The only way to know for sure that the datagram\nhas been sent is by using a callback.\n\n

    \n

    Example of sending a UDP packet to a random port on localhost;\n\n

    \n
    var dgram = require('dgram');\nvar message = new Buffer("Some bytes");\nvar client = dgram.createSocket("udp4");\nclient.send(message, 0, message.length, 41234, "localhost", function(err, bytes) {\n  client.close();\n});
    \n

    A Note about UDP datagram size\n\n

    \n

    The maximum size of an IPv4/v6 datagram depends on the MTU (Maximum Transmission Unit)\nand on the Payload Length field size.\n\n

    \n
      \n
    • The Payload Length field is 16 bits wide, which means that a normal payload\ncannot be larger than 64K octets including internet header and data\n(65,507 bytes = 65,535 − 8 bytes UDP header − 20 bytes IP header);\nthis is generally true for loopback interfaces, but such long datagrams\nare impractical for most hosts and networks.

      \n
    • \n
    • The MTU is the largest size a given link layer technology can support for datagrams.\nFor any link, IPv4 mandates a minimum MTU of 68 octets, while the recommended MTU\nfor IPv4 is 576 (typically recommended as the MTU for dial-up type applications),\nwhether they arrive whole or in fragments.

      \n

      For IPv6, the minimum MTU is 1280 octets, however, the mandatory minimum\nfragment reassembly buffer size is 1500 octets.\nThe value of 68 octets is very small, since most current link layer technologies have\na minimum MTU of 1500 (like Ethernet).

      \n
    • \n
    \n

    Note that it's impossible to know in advance the MTU of each link through which\na packet might travel, and that generally sending a datagram greater than\nthe (receiver) MTU won't work (the packet gets silently dropped, without\ninforming the source that the data did not reach its intended recipient).\n\n

    \n" - }, - { - "textRaw": "socket.bind(port, [address], [callback])", - "type": "method", - "name": "bind", - "signatures": [ - { - "params": [ - { - "textRaw": "`port` Integer ", - "name": "port", - "desc": "Integer" - }, - { - "textRaw": "`address` String, Optional ", - "name": "address", - "optional": true, - "desc": "String" - }, - { - "textRaw": "`callback` Function with no parameters, Optional. Callback when binding is done. ", - "name": "callback", - "desc": "Function with no parameters, Optional. Callback when binding is done.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "port" - }, - { - "name": "address", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    For UDP sockets, listen for datagrams on a named port and optional\naddress. If address is not specified, the OS will try to listen on\nall addresses. After binding is done, a "listening" event is emitted\nand the callback(if specified) is called. Specifying both a\n"listening" event listener and callback is not harmful but not very\nuseful.\n\n

    \n

    A bound datagram socket keeps the node process running to receive\ndatagrams.\n\n

    \n

    If binding fails, an "error" event is generated. In rare case (e.g.\nbinding a closed socket), an Error may be thrown by this method.\n\n

    \n

    Example of a UDP server listening on port 41234:\n\n

    \n
    var dgram = require("dgram");\n\nvar server = dgram.createSocket("udp4");\n\nserver.on("error", function (err) {\n  console.log("server error:\\n" + err.stack);\n  server.close();\n});\n\nserver.on("message", function (msg, rinfo) {\n  console.log("server got: " + msg + " from " +\n    rinfo.address + ":" + rinfo.port);\n});\n\nserver.on("listening", function () {\n  var address = server.address();\n  console.log("server listening " +\n      address.address + ":" + address.port);\n});\n\nserver.bind(41234);\n// server listening 0.0.0.0:41234
    \n" - }, - { - "textRaw": "socket.close()", - "type": "method", - "name": "close", - "desc": "

    Close the underlying socket and stop listening for data on it.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.address()", - "type": "method", - "name": "address", - "desc": "

    Returns an object containing the address information for a socket. For UDP sockets,\nthis object will contain address , family and port.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.setBroadcast(flag)", - "type": "method", - "name": "setBroadcast", - "signatures": [ - { - "params": [ - { - "textRaw": "`flag` Boolean ", - "name": "flag", - "desc": "Boolean" - } - ] - }, - { - "params": [ - { - "name": "flag" - } - ] - } - ], - "desc": "

    Sets or clears the SO_BROADCAST socket option. When this option is set, UDP packets\nmay be sent to a local interface's broadcast address.\n\n

    \n" - }, - { - "textRaw": "socket.setTTL(ttl)", - "type": "method", - "name": "setTTL", - "signatures": [ - { - "params": [ - { - "textRaw": "`ttl` Integer ", - "name": "ttl", - "desc": "Integer" - } - ] - }, - { - "params": [ - { - "name": "ttl" - } - ] - } - ], - "desc": "

    Sets the IP_TTL socket option. TTL stands for "Time to Live," but in this context it\nspecifies the number of IP hops that a packet is allowed to go through. Each router or\ngateway that forwards a packet decrements the TTL. If the TTL is decremented to 0 by a\nrouter, it will not be forwarded. Changing TTL values is typically done for network\nprobes or when multicasting.\n\n

    \n

    The argument to setTTL() is a number of hops between 1 and 255. The default on most\nsystems is 64.\n\n

    \n" - }, - { - "textRaw": "socket.setMulticastTTL(ttl)", - "type": "method", - "name": "setMulticastTTL", - "signatures": [ - { - "params": [ - { - "textRaw": "`ttl` Integer ", - "name": "ttl", - "desc": "Integer" - } - ] - }, - { - "params": [ - { - "name": "ttl" - } - ] - } - ], - "desc": "

    Sets the IP_MULTICAST_TTL socket option. TTL stands for "Time to Live," but in this\ncontext it specifies the number of IP hops that a packet is allowed to go through,\nspecifically for multicast traffic. Each router or gateway that forwards a packet\ndecrements the TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.\n\n

    \n

    The argument to setMulticastTTL() is a number of hops between 0 and 255. The default on most\nsystems is 1.\n\n

    \n" - }, - { - "textRaw": "socket.setMulticastLoopback(flag)", - "type": "method", - "name": "setMulticastLoopback", - "signatures": [ - { - "params": [ - { - "textRaw": "`flag` Boolean ", - "name": "flag", - "desc": "Boolean" - } - ] - }, - { - "params": [ - { - "name": "flag" - } - ] - } - ], - "desc": "

    Sets or clears the IP_MULTICAST_LOOP socket option. When this option is set, multicast\npackets will also be received on the local interface.\n\n

    \n" - }, - { - "textRaw": "socket.addMembership(multicastAddress, [multicastInterface])", - "type": "method", - "name": "addMembership", - "signatures": [ - { - "params": [ - { - "textRaw": "`multicastAddress` String ", - "name": "multicastAddress", - "desc": "String" - }, - { - "textRaw": "`multicastInterface` String, Optional ", - "name": "multicastInterface", - "optional": true, - "desc": "String" - } - ] - }, - { - "params": [ - { - "name": "multicastAddress" - }, - { - "name": "multicastInterface", - "optional": true - } - ] - } - ], - "desc": "

    Tells the kernel to join a multicast group with IP_ADD_MEMBERSHIP socket option.\n\n

    \n

    If multicastInterface is not specified, the OS will try to add membership to all valid\ninterfaces.\n\n

    \n" - }, - { - "textRaw": "socket.dropMembership(multicastAddress, [multicastInterface])", - "type": "method", - "name": "dropMembership", - "signatures": [ - { - "params": [ - { - "textRaw": "`multicastAddress` String ", - "name": "multicastAddress", - "desc": "String" - }, - { - "textRaw": "`multicastInterface` String, Optional ", - "name": "multicastInterface", - "optional": true, - "desc": "String" - } - ] - }, - { - "params": [ - { - "name": "multicastAddress" - }, - { - "name": "multicastInterface", - "optional": true - } - ] - } - ], - "desc": "

    Opposite of addMembership - tells the kernel to leave a multicast group with\nIP_DROP_MEMBERSHIP socket option. This is automatically called by the kernel\nwhen the socket is closed or process terminates, so most apps will never need to call\nthis.\n\n

    \n

    If multicastInterface is not specified, the OS will try to drop membership to all valid\ninterfaces.\n\n

    \n" - }, - { - "textRaw": "socket.unref()", - "type": "method", - "name": "unref", - "desc": "

    Calling unref on a socket will allow the program to exit if this is the only\nactive socket in the event system. If the socket is already unrefd calling\nunref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "socket.ref()", - "type": "method", - "name": "ref", - "desc": "

    Opposite of unref, calling ref on a previously unrefd socket will not\nlet the program exit if it's the only socket left (the default behavior). If\nthe socket is refd calling ref again will have no effect.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "dgram" - }, - { - "textRaw": "DNS", - "name": "dns", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    Use require('dns') to access this module. All methods in the dns module\nuse C-Ares except for dns.lookup which uses getaddrinfo(3) in a thread\npool. C-Ares is much faster than getaddrinfo but the system resolver is\nmore constant with how other programs operate. When a user does\nnet.connect(80, 'google.com') or http.get({ host: 'google.com' }) the\ndns.lookup method is used. Users who need to do a large number of lookups\nquickly should use the methods that go through C-Ares.\n\n

    \n

    Here is an example which resolves 'www.google.com' then reverse\nresolves the IP addresses which are returned.\n\n

    \n
    var dns = require('dns');\n\ndns.resolve4('www.google.com', function (err, addresses) {\n  if (err) throw err;\n\n  console.log('addresses: ' + JSON.stringify(addresses));\n\n  addresses.forEach(function (a) {\n    dns.reverse(a, function (err, domains) {\n      if (err) {\n        throw err;\n      }\n\n      console.log('reverse for ' + a + ': ' + JSON.stringify(domains));\n    });\n  });\n});
    \n", - "methods": [ - { - "textRaw": "dns.lookup(domain, [family], callback)", - "type": "method", - "name": "lookup", - "desc": "

    Resolves a domain (e.g. 'google.com') into the first found A (IPv4) or\nAAAA (IPv6) record.\nThe family can be the integer 4 or 6. Defaults to null that indicates\nboth Ip v4 and v6 address family.\n\n

    \n

    The callback has arguments (err, address, family). The address argument\nis a string representation of a IP v4 or v6 address. The family argument\nis either the integer 4 or 6 and denotes the family of address (not\nnecessarily the value initially passed to lookup).\n\n

    \n

    On error, err is an Error object, where err.code is the error code.\nKeep in mind that err.code will be set to 'ENOENT' not only when\nthe domain does not exist but also when the lookup fails in other ways\nsuch as no available file descriptors.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "family", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolve(domain, [rrtype], callback)", - "type": "method", - "name": "resolve", - "desc": "

    Resolves a domain (e.g. 'google.com') into an array of the record types\nspecified by rrtype. Valid rrtypes are 'A' (IPV4 addresses, default),\n'AAAA' (IPV6 addresses), 'MX' (mail exchange records), 'TXT' (text\nrecords), 'SRV' (SRV records), 'PTR' (used for reverse IP lookups),\n'NS' (name server records) and 'CNAME' (canonical name records).\n\n

    \n

    The callback has arguments (err, addresses). The type of each item\nin addresses is determined by the record type, and described in the\ndocumentation for the corresponding lookup methods below.\n\n

    \n

    On error, err is an Error object, where err.code is\none of the error codes listed below.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "rrtype", - "optional": true - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolve4(domain, callback)", - "type": "method", - "name": "resolve4", - "desc": "

    The same as dns.resolve(), but only for IPv4 queries (A records).\naddresses is an array of IPv4 addresses (e.g.\n['74.125.79.104', '74.125.79.105', '74.125.79.106']).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolve6(domain, callback)", - "type": "method", - "name": "resolve6", - "desc": "

    The same as dns.resolve4() except for IPv6 queries (an AAAA query).\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolveMx(domain, callback)", - "type": "method", - "name": "resolveMx", - "desc": "

    The same as dns.resolve(), but only for mail exchange queries (MX records).\n\n

    \n

    addresses is an array of MX records, each with a priority and an exchange\nattribute (e.g. [{'priority': 10, 'exchange': 'mx.example.com'},...]).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolveTxt(domain, callback)", - "type": "method", - "name": "resolveTxt", - "desc": "

    The same as dns.resolve(), but only for text queries (TXT records).\naddresses is an array of the text records available for domain (e.g.,\n['v=spf1 ip4:0.0.0.0 ~all']).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolveSrv(domain, callback)", - "type": "method", - "name": "resolveSrv", - "desc": "

    The same as dns.resolve(), but only for service records (SRV records).\naddresses is an array of the SRV records available for domain. Properties\nof SRV records are priority, weight, port, and name (e.g.,\n[{'priority': 10, {'weight': 5, 'port': 21223, 'name': 'service.example.com'}, ...]).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolveNs(domain, callback)", - "type": "method", - "name": "resolveNs", - "desc": "

    The same as dns.resolve(), but only for name server records (NS records).\naddresses is an array of the name server records available for domain\n(e.g., ['ns1.example.com', 'ns2.example.com']).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.resolveCname(domain, callback)", - "type": "method", - "name": "resolveCname", - "desc": "

    The same as dns.resolve(), but only for canonical name records (CNAME\nrecords). addresses is an array of the canonical name records available for\ndomain (e.g., ['bar.example.com']).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "dns.reverse(ip, callback)", - "type": "method", - "name": "reverse", - "desc": "

    Reverse resolves an ip address to an array of domain names.\n\n

    \n

    The callback has arguments (err, domains).\n\n

    \n

    On error, err is an Error object, where err.code is\none of the error codes listed below.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "ip" - }, - { - "name": "callback" - } - ] - } - ] - } - ], - "modules": [ - { - "textRaw": "Error codes", - "name": "error_codes", - "desc": "

    Each DNS query can return one of the following error codes:\n\n

    \n
      \n
    • dns.NODATA: DNS server returned answer with no data.
    • \n
    • dns.FORMERR: DNS server claims query was misformatted.
    • \n
    • dns.SERVFAIL: DNS server returned general failure.
    • \n
    • dns.NOTFOUND: Domain name not found.
    • \n
    • dns.NOTIMP: DNS server does not implement requested operation.
    • \n
    • dns.REFUSED: DNS server refused query.
    • \n
    • dns.BADQUERY: Misformatted DNS query.
    • \n
    • dns.BADNAME: Misformatted domain name.
    • \n
    • dns.BADFAMILY: Unsupported address family.
    • \n
    • dns.BADRESP: Misformatted DNS reply.
    • \n
    • dns.CONNREFUSED: Could not contact DNS servers.
    • \n
    • dns.TIMEOUT: Timeout while contacting DNS servers.
    • \n
    • dns.EOF: End of file.
    • \n
    • dns.FILE: Error reading file.
    • \n
    • dns.NOMEM: Out of memory.
    • \n
    • dns.DESTRUCTION: Channel is being destroyed.
    • \n
    • dns.BADSTR: Misformatted string.
    • \n
    • dns.BADFLAGS: Illegal flags specified.
    • \n
    • dns.NONAME: Given hostname is not numeric.
    • \n
    • dns.BADHINTS: Illegal hints flags specified.
    • \n
    • dns.NOTINITIALIZED: c-ares library initialization not yet performed.
    • \n
    • dns.LOADIPHLPAPI: Error loading iphlpapi.dll.
    • \n
    • dns.ADDRGETNETWORKPARAMS: Could not find GetNetworkParams function.
    • \n
    • dns.CANCELLED: DNS query cancelled.
    • \n
    \n", - "type": "module", - "displayName": "Error codes" - } - ], - "type": "module", - "displayName": "DNS" - }, - { - "textRaw": "HTTP", - "name": "http", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    To use the HTTP server and client one must require('http').\n\n

    \n

    The HTTP interfaces in Node are designed to support many features\nof the protocol which have been traditionally difficult to use.\nIn particular, large, possibly chunk-encoded, messages. The interface is\ncareful to never buffer entire requests or responses--the\nuser is able to stream data.\n\n

    \n

    HTTP message headers are represented by an object like this:\n\n

    \n
    { 'content-length': '123',\n  'content-type': 'text/plain',\n  'connection': 'keep-alive',\n  'accept': '*/*' }
    \n

    Keys are lowercased. Values are not modified.\n\n

    \n

    In order to support the full spectrum of possible HTTP applications, Node's\nHTTP API is very low-level. It deals with stream handling and message\nparsing only. It parses a message into headers and body but it does not\nparse the actual headers or the body.\n\n\n

    \n", - "properties": [ - { - "textRaw": "`STATUS_CODES` {Object} ", - "name": "STATUS_CODES", - "desc": "

    A collection of all the standard HTTP response status codes, and the\nshort description of each. For example, http.STATUS_CODES[404] === 'Not\nFound'.\n\n

    \n" - }, - { - "textRaw": "http.globalAgent", - "name": "globalAgent", - "desc": "

    Global instance of Agent which is used as the default for all http client\nrequests.\n\n\n

    \n" - }, - { - "textRaw": "http.IncomingMessage", - "name": "IncomingMessage", - "desc": "

    An IncomingMessage object is created by [http.Server][] or\n[http.ClientRequest][] and passed as the first argument to the 'request'\nand 'response' event respectively. It may be used to access response status,\nheaders and data.\n\n

    \n

    It implements the [Readable Stream][] interface, as well as the\nfollowing additional events, methods, and properties.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Indicates that the underlaying connection was closed.\nJust like 'end', this event occurs only once per response.\n\n

    \n", - "params": [] - } - ], - "properties": [ - { - "textRaw": "message.httpVersion", - "name": "httpVersion", - "desc": "

    In case of server request, the HTTP version sent by the client. In the case of\nclient response, the HTTP version of the connected-to server.\nProbably either '1.1' or '1.0'.\n\n

    \n

    Also response.httpVersionMajor is the first integer and\nresponse.httpVersionMinor is the second.\n\n

    \n" - }, - { - "textRaw": "message.headers", - "name": "headers", - "desc": "

    The request/response headers object.\n\n

    \n

    Read only map of header names and values. Header names are lower-cased.\nExample:\n\n

    \n
    // Prints something like:\n//\n// { 'user-agent': 'curl/7.22.0',\n//   host: '127.0.0.1:8000',\n//   accept: '*/*' }\nconsole.log(request.headers);
    \n" - }, - { - "textRaw": "message.trailers", - "name": "trailers", - "desc": "

    The request/response trailers object. Only populated after the 'end' event.\n\n

    \n" - }, - { - "textRaw": "message.method", - "name": "method", - "desc": "

    Only valid for request obtained from [http.Server][].\n\n

    \n

    The request method as a string. Read only. Example:\n'GET', 'DELETE'.\n\n

    \n" - }, - { - "textRaw": "message.url", - "name": "url", - "desc": "

    Only valid for request obtained from [http.Server][].\n\n

    \n

    Request URL string. This contains only the URL that is\npresent in the actual HTTP request. If the request is:\n\n

    \n
    GET /status?name=ryan HTTP/1.1\\r\\n\nAccept: text/plain\\r\\n\n\\r\\n
    \n

    Then request.url will be:\n\n

    \n
    '/status?name=ryan'
    \n

    If you would like to parse the URL into its parts, you can use\nrequire('url').parse(request.url). Example:\n\n

    \n
    node> require('url').parse('/status?name=ryan')\n{ href: '/status?name=ryan',\n  search: '?name=ryan',\n  query: 'name=ryan',\n  pathname: '/status' }
    \n

    If you would like to extract the params from the query string,\nyou can use the require('querystring').parse function, or pass\ntrue as the second argument to require('url').parse. Example:\n\n

    \n
    node> require('url').parse('/status?name=ryan', true)\n{ href: '/status?name=ryan',\n  search: '?name=ryan',\n  query: { name: 'ryan' },\n  pathname: '/status' }
    \n" - }, - { - "textRaw": "message.statusCode", - "name": "statusCode", - "desc": "

    Only valid for response obtained from http.ClientRequest.\n\n

    \n

    The 3-digit HTTP response status code. E.G. 404.\n\n

    \n" - }, - { - "textRaw": "message.socket", - "name": "socket", - "desc": "

    The net.Socket object associated with the connection.\n\n

    \n

    With HTTPS support, use request.connection.verifyPeer() and\nrequest.connection.getPeerCertificate() to obtain the client's\nauthentication details.\n\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "message.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Calls message.connection.setTimeout(msecs, callback).\n\n

    \n" - } - ] - } - ], - "methods": [ - { - "textRaw": "http.createServer([requestListener])", - "type": "method", - "name": "createServer", - "desc": "

    Returns a new web server object.\n\n

    \n

    The requestListener is a function which is automatically\nadded to the 'request' event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "requestListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "http.createClient([port], [host])", - "type": "method", - "name": "createClient", - "desc": "

    This function is deprecated; please use [http.request()][] instead.\nConstructs a new HTTP client. port and host refer to the server to be\nconnected to.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port", - "optional": true - }, - { - "name": "host", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "http.request(options, callback)", - "type": "method", - "name": "request", - "desc": "

    Node maintains several connections per server to make HTTP requests.\nThis function allows one to transparently issue requests.\n\n

    \n

    options can be an object or a string. If options is a string, it is\nautomatically parsed with [url.parse()][].\n\n

    \n

    Options:\n\n

    \n
      \n
    • host: A domain name or IP address of the server to issue the request to.\nDefaults to 'localhost'.
    • \n
    • hostname: To support url.parse() hostname is preferred over host
    • \n
    • port: Port of remote server. Defaults to 80.
    • \n
    • localAddress: Local interface to bind for network connections.
    • \n
    • socketPath: Unix Domain Socket (use one of host:port or socketPath)
    • \n
    • method: A string specifying the HTTP request method. Defaults to 'GET'.
    • \n
    • path: Request path. Defaults to '/'. Should include query string if any.\nE.G. '/index.html?page=12'
    • \n
    • headers: An object containing request headers.
    • \n
    • auth: Basic authentication i.e. 'user:password' to compute an\nAuthorization header.
    • \n
    • agent: Controls [Agent][] behavior. When an Agent is used request will\ndefault to Connection: keep-alive. Possible values:
        \n
      • undefined (default): use [global Agent][] for this host and port.
      • \n
      • Agent object: explicitly use the passed in Agent.
      • \n
      • false: opts out of connection pooling with an Agent, defaults request to\nConnection: close.
      • \n
      \n
    • \n
    \n

    http.request() returns an instance of the [http.ClientRequest][]\nclass. The ClientRequest instance is a writable stream. If one needs to\nupload a file with a POST request, then write to the ClientRequest object.\n\n

    \n

    Example:\n\n

    \n
    var options = {\n  hostname: 'www.google.com',\n  port: 80,\n  path: '/upload',\n  method: 'POST'\n};\n\nvar req = http.request(options, function(res) {\n  console.log('STATUS: ' + res.statusCode);\n  console.log('HEADERS: ' + JSON.stringify(res.headers));\n  res.setEncoding('utf8');\n  res.on('data', function (chunk) {\n    console.log('BODY: ' + chunk);\n  });\n});\n\nreq.on('error', function(e) {\n  console.log('problem with request: ' + e.message);\n});\n\n// write data to request body\nreq.write('data\\n');\nreq.write('data\\n');\nreq.end();
    \n

    Note that in the example req.end() was called. With http.request() one\nmust always call req.end() to signify that you're done with the request -\neven if there is no data being written to the request body.\n\n

    \n

    If any error is encountered during the request (be that with DNS resolution,\nTCP level errors, or actual HTTP parse errors) an 'error' event is emitted\non the returned request object.\n\n

    \n

    There are a few special headers that should be noted.\n\n

    \n
      \n
    • Sending a 'Connection: keep-alive' will notify Node that the connection to\nthe server should be persisted until the next request.

      \n
    • \n
    • Sending a 'Content-length' header will disable the default chunked encoding.

      \n
    • \n
    • Sending an 'Expect' header will immediately send the request headers.\nUsually, when sending 'Expect: 100-continue', you should both set a timeout\nand listen for the continue event. See RFC2616 Section 8.2.3 for more\ninformation.

      \n
    • \n
    • Sending an Authorization header will override using the auth option\nto compute basic authentication.

      \n
    • \n
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "http.get(options, callback)", - "type": "method", - "name": "get", - "desc": "

    Since most requests are GET requests without bodies, Node provides this\nconvenience method. The only difference between this method and http.request()\nis that it sets the method to GET and calls req.end() automatically.\n\n

    \n

    Example:\n\n

    \n
    http.get("http://www.google.com/index.html", function(res) {\n  console.log("Got response: " + res.statusCode);\n}).on('error', function(e) {\n  console.log("Got error: " + e.message);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: http.Server", - "type": "class", - "name": "http.Server", - "desc": "

    This is an [EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'request'", - "type": "event", - "name": "request", - "desc": "

    function (request, response) { }\n\n

    \n

    Emitted each time there is a request. Note that there may be multiple requests\nper connection (in the case of keep-alive connections).\n request is an instance of [http.IncomingMessage][] and response is\nan instance of [http.ServerResponse][].\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connection'", - "type": "event", - "name": "connection", - "desc": "

    function (socket) { }\n\n

    \n

    When a new TCP stream is established. socket is an object of type\n net.Socket. Usually users will not want to access this event. In\n particular, the socket will not emit readable events because of how\n the protocol parser attaches to the socket. The socket can also be\n accessed at request.connection.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Emitted when the server closes.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'checkContinue'", - "type": "event", - "name": "checkContinue", - "desc": "

    function (request, response) { }\n\n

    \n

    Emitted each time a request with an http Expect: 100-continue is received.\nIf this event isn't listened for, the server will automatically respond\nwith a 100 Continue as appropriate.\n\n

    \n

    Handling this event involves calling [response.writeContinue()][] if the client\nshould continue to send the request body, or generating an appropriate HTTP\nresponse (e.g., 400 Bad Request) if the client should not continue to send the\nrequest body.\n\n

    \n

    Note that when this event is emitted and handled, the request event will\nnot be emitted.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connect'", - "type": "event", - "name": "connect", - "desc": "

    function (request, socket, head) { }\n\n

    \n

    Emitted each time a client requests a http CONNECT method. If this event isn't\nlistened for, then clients requesting a CONNECT method will have their\nconnections closed.\n\n

    \n
      \n
    • request is the arguments for the http request, as it is in the request\nevent.
    • \n
    • socket is the network socket between the server and client.
    • \n
    • head is an instance of Buffer, the first packet of the tunneling stream,\nthis may be empty.
    • \n
    \n

    After this event is emitted, the request's socket will not have a data\nevent listener, meaning you will need to bind to it in order to handle data\nsent to the server on that socket.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'upgrade'", - "type": "event", - "name": "upgrade", - "desc": "

    function (request, socket, head) { }\n\n

    \n

    Emitted each time a client requests a http upgrade. If this event isn't\nlistened for, then clients requesting an upgrade will have their connections\nclosed.\n\n

    \n
      \n
    • request is the arguments for the http request, as it is in the request\nevent.
    • \n
    • socket is the network socket between the server and client.
    • \n
    • head is an instance of Buffer, the first packet of the upgraded stream,\nthis may be empty.
    • \n
    \n

    After this event is emitted, the request's socket will not have a data\nevent listener, meaning you will need to bind to it in order to handle data\nsent to the server on that socket.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'clientError'", - "type": "event", - "name": "clientError", - "desc": "

    function (exception, socket) { }\n\n

    \n

    If a client connection emits an 'error' event - it will forwarded here.\n\n

    \n

    socket is the net.Socket object that the error originated from.\n\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "server.listen(port, [hostname], [backlog], [callback])", - "type": "method", - "name": "listen", - "desc": "

    Begin accepting connections on the specified port and hostname. If the\nhostname is omitted, the server will accept connections directed to any\nIPv4 address (INADDR_ANY).\n\n

    \n

    To listen to a unix socket, supply a filename instead of port and hostname.\n\n

    \n

    Backlog is the maximum length of the queue of pending connections.\nThe actual length will be determined by your OS through sysctl settings such as\ntcp_max_syn_backlog and somaxconn on linux. The default value of this\nparameter is 511 (not 512).\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the ['listening'][] event. See also [net.Server.listen(port)][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "hostname", - "optional": true - }, - { - "name": "backlog", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(path, [callback])", - "type": "method", - "name": "listen", - "desc": "

    Start a UNIX socket server listening for connections on the given path.\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the ['listening'][] event. See also [net.Server.listen(path)][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(handle, [callback])", - "type": "method", - "name": "listen", - "signatures": [ - { - "params": [ - { - "textRaw": "`handle` {Object} ", - "name": "handle", - "type": "Object" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "handle" - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    The handle object can be set to either a server or socket (anything\nwith an underlying _handle member), or a {fd: <n>} object.\n\n

    \n

    This will cause the server to accept connections on the specified\nhandle, but it is presumed that the file descriptor or handle has\nalready been bound to a port or domain socket.\n\n

    \n

    Listening on a file descriptor is not supported on Windows.\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the 'listening' event.\nSee also net.Server.listen().\n\n

    \n" - }, - { - "textRaw": "server.close([callback])", - "type": "method", - "name": "close", - "desc": "

    Stops the server from accepting new connections. See [net.Server.close()][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Sets the timeout value for sockets, and emits a 'timeout' event on\nthe Server object, passing the socket as an argument, if a timeout\noccurs.\n\n

    \n

    If there is a 'timeout' event listener on the Server object, then it\nwill be called with the timed-out socket as an argument.\n\n

    \n

    By default, the Server's timeout value is 2 minutes, and sockets are\ndestroyed automatically if they time out. However, if you assign a\ncallback to the Server's 'timeout' event, then you are responsible\nfor handling socket timeouts.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "server.maxHeadersCount", - "name": "maxHeadersCount", - "desc": "

    Limits maximum incoming headers count, equal to 1000 by default. If set to 0 -\nno limit will be applied.\n\n

    \n" - }, - { - "textRaw": "`timeout` {Number} Default = 120000 (2 minutes) ", - "name": "timeout", - "desc": "

    The number of milliseconds of inactivity before a socket is presumed\nto have timed out.\n\n

    \n

    Note that the socket timeout logic is set up on connection, so\nchanging this value only affects new connections to the server, not\nany existing connections.\n\n

    \n

    Set to 0 to disable any kind of automatic timeout behavior on incoming\nconnections.\n\n

    \n", - "shortDesc": "Default = 120000 (2 minutes)" - } - ] - }, - { - "textRaw": "Class: http.ServerResponse", - "type": "class", - "name": "http.ServerResponse", - "desc": "

    This object is created internally by a HTTP server--not by the user. It is\npassed as the second parameter to the 'request' event.\n\n

    \n

    The response implements the [Writable Stream][] interface. This is an\n[EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Indicates that the underlying connection was terminated before\n[response.end()][] was called or able to flush.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "response.writeContinue()", - "type": "method", - "name": "writeContinue", - "desc": "

    Sends a HTTP/1.1 100 Continue message to the client, indicating that\nthe request body should be sent. See the ['checkContinue'][] event on Server.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "response.writeHead(statusCode, [reasonPhrase], [headers])", - "type": "method", - "name": "writeHead", - "desc": "

    Sends a response header to the request. The status code is a 3-digit HTTP\nstatus code, like 404. The last argument, headers, are the response headers.\nOptionally one can give a human-readable reasonPhrase as the second\nargument.\n\n

    \n

    Example:\n\n

    \n
    var body = 'hello world';\nresponse.writeHead(200, {\n  'Content-Length': body.length,\n  'Content-Type': 'text/plain' });
    \n

    This method must only be called once on a message and it must\nbe called before [response.end()][] is called.\n\n

    \n

    If you call [response.write()][] or [response.end()][] before calling this, the\nimplicit/mutable headers will be calculated and call this function for you.\n\n

    \n

    Note: that Content-Length is given in bytes not characters. The above example\nworks because the string 'hello world' contains only single byte characters.\nIf the body contains higher coded characters then Buffer.byteLength()\nshould be used to determine the number of bytes in a given encoding.\nAnd Node does not check whether Content-Length and the length of the body\nwhich has been transmitted are equal or not.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "statusCode" - }, - { - "name": "reasonPhrase", - "optional": true - }, - { - "name": "headers", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "response.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Sets the Socket's timeout value to msecs. If a callback is\nprovided, then it is added as a listener on the 'timeout' event on\nthe response object.\n\n

    \n

    If no 'timeout' listener is added to the request, the response, or\nthe server, then sockets are destroyed when they time out. If you\nassign a handler on the request, the response, or the server's\n'timeout' events, then it is your responsibility to handle timed out\nsockets.\n\n

    \n" - }, - { - "textRaw": "response.setHeader(name, value)", - "type": "method", - "name": "setHeader", - "desc": "

    Sets a single header value for implicit headers. If this header already exists\nin the to-be-sent headers, its value will be replaced. Use an array of strings\nhere if you need to send multiple headers with the same name.\n\n

    \n

    Example:\n\n

    \n
    response.setHeader("Content-Type", "text/html");
    \n

    or\n\n

    \n
    response.setHeader("Set-Cookie", ["type=ninja", "language=javascript"]);
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - }, - { - "name": "value" - } - ] - } - ] - }, - { - "textRaw": "response.getHeader(name)", - "type": "method", - "name": "getHeader", - "desc": "

    Reads out a header that's already been queued but not sent to the client. Note\nthat the name is case insensitive. This can only be called before headers get\nimplicitly flushed.\n\n

    \n

    Example:\n\n

    \n
    var contentType = response.getHeader('content-type');
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - } - ] - } - ] - }, - { - "textRaw": "response.removeHeader(name)", - "type": "method", - "name": "removeHeader", - "desc": "

    Removes a header that's queued for implicit sending.\n\n

    \n

    Example:\n\n

    \n
    response.removeHeader("Content-Encoding");
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - } - ] - } - ] - }, - { - "textRaw": "response.write(chunk, [encoding])", - "type": "method", - "name": "write", - "desc": "

    If this method is called and [response.writeHead()][] has not been called,\nit will switch to implicit header mode and flush the implicit headers.\n\n

    \n

    This sends a chunk of the response body. This method may\nbe called multiple times to provide successive parts of the body.\n\n

    \n

    chunk can be a string or a buffer. If chunk is a string,\nthe second parameter specifies how to encode it into a byte stream.\nBy default the encoding is 'utf8'.\n\n

    \n

    Note: This is the raw HTTP body and has nothing to do with\nhigher-level multi-part body encodings that may be used.\n\n

    \n

    The first time response.write() is called, it will send the buffered\nheader information and the first body to the client. The second time\nresponse.write() is called, Node assumes you're going to be streaming\ndata, and sends that separately. That is, the response is buffered up to the\nfirst chunk of body.\n\n

    \n

    Returns true if the entire data was flushed successfully to the kernel\nbuffer. Returns false if all or part of the data was queued in user memory.\n'drain' will be emitted when the buffer is again free.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "response.addTrailers(headers)", - "type": "method", - "name": "addTrailers", - "desc": "

    This method adds HTTP trailing headers (a header but at the end of the\nmessage) to the response.\n\n

    \n

    Trailers will only be emitted if chunked encoding is used for the\nresponse; if it is not (e.g., if the request was HTTP/1.0), they will\nbe silently discarded.\n\n

    \n

    Note that HTTP requires the Trailer header to be sent if you intend to\nemit trailers, with a list of the header fields in its value. E.g.,\n\n

    \n
    response.writeHead(200, { 'Content-Type': 'text/plain',\n                          'Trailer': 'Content-MD5' });\nresponse.write(fileData);\nresponse.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"});\nresponse.end();
    \n", - "signatures": [ - { - "params": [ - { - "name": "headers" - } - ] - } - ] - }, - { - "textRaw": "response.end([data], [encoding])", - "type": "method", - "name": "end", - "desc": "

    This method signals to the server that all of the response headers and body\nhave been sent; that server should consider this message complete.\nThe method, response.end(), MUST be called on each\nresponse.\n\n

    \n

    If data is specified, it is equivalent to calling response.write(data, encoding)\nfollowed by response.end().\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "response.statusCode", - "name": "statusCode", - "desc": "

    When using implicit headers (not calling [response.writeHead()][] explicitly),\nthis property controls the status code that will be sent to the client when\nthe headers get flushed.\n\n

    \n

    Example:\n\n

    \n
    response.statusCode = 404;
    \n

    After response header was sent to the client, this property indicates the\nstatus code which was sent out.\n\n

    \n" - }, - { - "textRaw": "response.headersSent", - "name": "headersSent", - "desc": "

    Boolean (read-only). True if headers were sent, false otherwise.\n\n

    \n" - }, - { - "textRaw": "response.sendDate", - "name": "sendDate", - "desc": "

    When true, the Date header will be automatically generated and sent in\nthe response if it is not already present in the headers. Defaults to true.\n\n

    \n

    This should only be disabled for testing; HTTP requires the Date header\nin responses.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: http.Agent", - "type": "class", - "name": "http.Agent", - "desc": "

    In node 0.5.3+ there is a new implementation of the HTTP Agent which is used\nfor pooling sockets used in HTTP client requests.\n\n

    \n

    Previously, a single agent instance helped pool for a single host+port. The\ncurrent implementation now holds sockets for any number of hosts.\n\n

    \n

    The current HTTP Agent also defaults client requests to using\nConnection:keep-alive. If no pending HTTP requests are waiting on a socket\nto become free the socket is closed. This means that node's pool has the\nbenefit of keep-alive when under load but still does not require developers\nto manually close the HTTP clients using keep-alive.\n\n

    \n

    Sockets are removed from the agent's pool when the socket emits either a\n"close" event or a special "agentRemove" event. This means that if you intend\nto keep one HTTP request open for a long time and don't want it to stay in the\npool you can do something along the lines of:\n\n

    \n
    http.get(options, function(res) {\n  // Do stuff\n}).on("socket", function (socket) {\n  socket.emit("agentRemove");\n});
    \n

    Alternatively, you could just opt out of pooling entirely using agent:false:\n\n

    \n
    http.get({hostname:'localhost', port:80, path:'/', agent:false}, function (res) {\n  // Do stuff\n})
    \n", - "properties": [ - { - "textRaw": "agent.maxSockets", - "name": "maxSockets", - "desc": "

    By default set to 5. Determines how many concurrent sockets the agent can have\nopen per host.\n\n

    \n" - }, - { - "textRaw": "agent.sockets", - "name": "sockets", - "desc": "

    An object which contains arrays of sockets currently in use by the Agent. Do not\nmodify.\n\n

    \n" - }, - { - "textRaw": "agent.requests", - "name": "requests", - "desc": "

    An object which contains queues of requests that have not yet been assigned to\nsockets. Do not modify.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: http.ClientRequest", - "type": "class", - "name": "http.ClientRequest", - "desc": "

    This object is created internally and returned from http.request(). It\nrepresents an in-progress request whose header has already been queued. The\nheader is still mutable using the setHeader(name, value), getHeader(name),\nremoveHeader(name) API. The actual header will be sent along with the first\ndata chunk or when closing the connection.\n\n

    \n

    To get the response, add a listener for 'response' to the request object.\n'response' will be emitted from the request object when the response\nheaders have been received. The 'response' event is executed with one\nargument which is an instance of [http.IncomingMessage][].\n\n

    \n

    During the 'response' event, one can add listeners to the\nresponse object; particularly to listen for the 'data' event.\n\n

    \n

    If no 'response' handler is added, then the response will be\nentirely discarded. However, if you add a 'response' event handler,\nthen you must consume the data from the response object, either by\ncalling response.read() whenever there is a 'readable' event, or\nby adding a 'data' handler, or by calling the .resume() method.\nUntil the data is consumed, the 'end' event will not fire. Also, until\nthe data is read it will consume memory that can eventually lead to a\n'process out of memory' error.\n\n

    \n

    Note: Node does not check whether Content-Length and the length of the body\nwhich has been transmitted are equal or not.\n\n

    \n

    The request implements the [Writable Stream][] interface. This is an\n[EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event 'response'", - "type": "event", - "name": "response", - "desc": "

    function (response) { }\n\n

    \n

    Emitted when a response is received to this request. This event is emitted only\nonce. The response argument will be an instance of [http.IncomingMessage][].\n\n

    \n

    Options:\n\n

    \n
      \n
    • host: A domain name or IP address of the server to issue the request to.
    • \n
    • port: Port of remote server.
    • \n
    • socketPath: Unix Domain Socket (use one of host:port or socketPath)
    • \n
    \n", - "params": [] - }, - { - "textRaw": "Event: 'socket'", - "type": "event", - "name": "socket", - "desc": "

    function (socket) { }\n\n

    \n

    Emitted after a socket is assigned to this request.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connect'", - "type": "event", - "name": "connect", - "desc": "

    function (response, socket, head) { }\n\n

    \n

    Emitted each time a server responds to a request with a CONNECT method. If this\nevent isn't being listened for, clients receiving a CONNECT method will have\ntheir connections closed.\n\n

    \n

    A client server pair that show you how to listen for the connect event.\n\n

    \n
    var http = require('http');\nvar net = require('net');\nvar url = require('url');\n\n// Create an HTTP tunneling proxy\nvar proxy = http.createServer(function (req, res) {\n  res.writeHead(200, {'Content-Type': 'text/plain'});\n  res.end('okay');\n});\nproxy.on('connect', function(req, cltSocket, head) {\n  // connect to an origin server\n  var srvUrl = url.parse('http://' + req.url);\n  var srvSocket = net.connect(srvUrl.port, srvUrl.hostname, function() {\n    cltSocket.write('HTTP/1.1 200 Connection Established\\r\\n' +\n                    'Proxy-agent: Node-Proxy\\r\\n' +\n                    '\\r\\n');\n    srvSocket.write(head);\n    srvSocket.pipe(cltSocket);\n    cltSocket.pipe(srvSocket);\n  });\n});\n\n// now that proxy is running\nproxy.listen(1337, '127.0.0.1', function() {\n\n  // make a request to a tunneling proxy\n  var options = {\n    port: 1337,\n    hostname: '127.0.0.1',\n    method: 'CONNECT',\n    path: 'www.google.com:80'\n  };\n\n  var req = http.request(options);\n  req.end();\n\n  req.on('connect', function(res, socket, head) {\n    console.log('got connected!');\n\n    // make a request over an HTTP tunnel\n    socket.write('GET / HTTP/1.1\\r\\n' +\n                 'Host: www.google.com:80\\r\\n' +\n                 'Connection: close\\r\\n' +\n                 '\\r\\n');\n    socket.on('data', function(chunk) {\n      console.log(chunk.toString());\n    });\n    socket.on('end', function() {\n      proxy.close();\n    });\n  });\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'upgrade'", - "type": "event", - "name": "upgrade", - "desc": "

    function (response, socket, head) { }\n\n

    \n

    Emitted each time a server responds to a request with an upgrade. If this\nevent isn't being listened for, clients receiving an upgrade header will have\ntheir connections closed.\n\n

    \n

    A client server pair that show you how to listen for the upgrade event.\n\n

    \n
    var http = require('http');\n\n// Create an HTTP server\nvar srv = http.createServer(function (req, res) {\n  res.writeHead(200, {'Content-Type': 'text/plain'});\n  res.end('okay');\n});\nsrv.on('upgrade', function(req, socket, head) {\n  socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\\r\\n' +\n               'Upgrade: WebSocket\\r\\n' +\n               'Connection: Upgrade\\r\\n' +\n               '\\r\\n');\n\n  socket.pipe(socket); // echo back\n});\n\n// now that server is running\nsrv.listen(1337, '127.0.0.1', function() {\n\n  // make a request\n  var options = {\n    port: 1337,\n    hostname: '127.0.0.1',\n    headers: {\n      'Connection': 'Upgrade',\n      'Upgrade': 'websocket'\n    }\n  };\n\n  var req = http.request(options);\n  req.end();\n\n  req.on('upgrade', function(res, socket, upgradeHead) {\n    console.log('got upgraded!');\n    socket.end();\n    process.exit(0);\n  });\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'continue'", - "type": "event", - "name": "continue", - "desc": "

    function () { }\n\n

    \n

    Emitted when the server sends a '100 Continue' HTTP response, usually because\nthe request contained 'Expect: 100-continue'. This is an instruction that\nthe client should send the request body.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "request.write(chunk, [encoding])", - "type": "method", - "name": "write", - "desc": "

    Sends a chunk of the body. By calling this method\nmany times, the user can stream a request body to a\nserver--in that case it is suggested to use the\n['Transfer-Encoding', 'chunked'] header line when\ncreating the request.\n\n

    \n

    The chunk argument should be a [Buffer][] or a string.\n\n

    \n

    The encoding argument is optional and only applies when chunk is a string.\nDefaults to 'utf8'.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.end([data], [encoding])", - "type": "method", - "name": "end", - "desc": "

    Finishes sending the request. If any parts of the body are\nunsent, it will flush them to the stream. If the request is\nchunked, this will send the terminating '0\\r\\n\\r\\n'.\n\n

    \n

    If data is specified, it is equivalent to calling\nrequest.write(data, encoding) followed by request.end().\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.abort()", - "type": "method", - "name": "abort", - "desc": "

    Aborts a request. (New since v0.3.8.)\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "request.setTimeout(timeout, [callback])", - "type": "method", - "name": "setTimeout", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setTimeout()][] will be called.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "timeout" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.setNoDelay([noDelay])", - "type": "method", - "name": "setNoDelay", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setNoDelay()][] will be called.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "noDelay", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.setSocketKeepAlive([enable], [initialDelay])", - "type": "method", - "name": "setSocketKeepAlive", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setKeepAlive()][] will be called.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "enable", - "optional": true - }, - { - "name": "initialDelay", - "optional": true - } - ] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "HTTP" - }, - { - "textRaw": "HTTPS", - "name": "https", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    HTTPS is the HTTP protocol over TLS/SSL. In Node this is implemented as a\nseparate module.\n\n

    \n", - "classes": [ - { - "textRaw": "Class: https.Server", - "type": "class", - "name": "https.Server", - "desc": "

    This class is a subclass of tls.Server and emits events same as\nhttp.Server. See http.Server for more information.\n\n

    \n" - }, - { - "textRaw": "Class: https.Agent", - "type": "class", - "name": "https.Agent", - "desc": "

    An Agent object for HTTPS similar to [http.Agent][]. See [https.request()][]\nfor more information.\n\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "https.createServer(options, [requestListener])", - "type": "method", - "name": "createServer", - "desc": "

    Returns a new HTTPS web server object. The options is similar to\n[tls.createServer()][]. The requestListener is a function which is\nautomatically added to the 'request' event.\n\n

    \n

    Example:\n\n

    \n
    // curl -k https://localhost:8000/\nvar https = require('https');\nvar fs = require('fs');\n\nvar options = {\n  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')\n};\n\nhttps.createServer(options, function (req, res) {\n  res.writeHead(200);\n  res.end("hello world\\n");\n}).listen(8000);
    \n

    Or\n\n

    \n
    var https = require('https');\nvar fs = require('fs');\n\nvar options = {\n  pfx: fs.readFileSync('server.pfx')\n};\n\nhttps.createServer(options, function (req, res) {\n  res.writeHead(200);\n  res.end("hello world\\n");\n}).listen(8000);
    \n", - "methods": [ - { - "textRaw": "server.listen(path, [callback])", - "type": "method", - "name": "listen", - "desc": "

    See [http.listen()][] for details.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "handle" - }, - { - "name": "callback", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "path" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(handle, [callback])", - "type": "method", - "name": "listen", - "desc": "

    See [http.listen()][] for details.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "handle" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.close([callback])", - "type": "method", - "name": "close", - "desc": "

    See [http.close()][] for details.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback", - "optional": true - } - ] - } - ] - } - ], - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "requestListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "https.request(options, callback)", - "type": "method", - "name": "request", - "desc": "

    Makes a request to a secure web server.\n\n

    \n

    options can be an object or a string. If options is a string, it is\nautomatically parsed with url.parse().\n\n

    \n

    All options from [http.request()][] are valid.\n\n

    \n

    Example:\n\n

    \n
    var https = require('https');\n\nvar options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET'\n};\n\nvar req = https.request(options, function(res) {\n  console.log("statusCode: ", res.statusCode);\n  console.log("headers: ", res.headers);\n\n  res.on('data', function(d) {\n    process.stdout.write(d);\n  });\n});\nreq.end();\n\nreq.on('error', function(e) {\n  console.error(e);\n});
    \n

    The options argument has the following options\n\n

    \n
      \n
    • host: A domain name or IP address of the server to issue the request to.\nDefaults to 'localhost'.
    • \n
    • hostname: To support url.parse() hostname is preferred over host
    • \n
    • port: Port of remote server. Defaults to 443.
    • \n
    • method: A string specifying the HTTP request method. Defaults to 'GET'.
    • \n
    • path: Request path. Defaults to '/'. Should include query string if any.\nE.G. '/index.html?page=12'
    • \n
    • headers: An object containing request headers.
    • \n
    • auth: Basic authentication i.e. 'user:password' to compute an\nAuthorization header.
    • \n
    • agent: Controls [Agent][] behavior. When an Agent is used request will\ndefault to Connection: keep-alive. Possible values:
        \n
      • undefined (default): use [globalAgent][] for this host and port.
      • \n
      • Agent object: explicitly use the passed in Agent.
      • \n
      • false: opts out of connection pooling with an Agent, defaults request to\nConnection: close.
      • \n
      \n
    • \n
    \n

    The following options from [tls.connect()][] can also be specified. However, a\n[globalAgent][] silently ignores these.\n\n

    \n
      \n
    • pfx: Certificate, Private key and CA certificates to use for SSL. Default null.
    • \n
    • key: Private key to use for SSL. Default null.
    • \n
    • passphrase: A string of passphrase for the private key or pfx. Default null.
    • \n
    • cert: Public x509 certificate to use. Default null.
    • \n
    • ca: An authority certificate or array of authority certificates to check\nthe remote host against.
    • \n
    • ciphers: A string describing the ciphers to use or exclude. Consult\nhttp://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT for\ndetails on the format.
    • \n
    • rejectUnauthorized: If true, the server certificate is verified against\nthe list of supplied CAs. An 'error' event is emitted if verification\nfails. Verification happens at the connection level, before the HTTP\nrequest is sent. Default true.
    • \n
    • secureProtocol: The SSL method to use, e.g. SSLv3_method to force\nSSL version 3. The possible values depend on your installation of\nOpenSSL and are defined in the constant [SSL_METHODS][].
    • \n
    \n

    In order to specify these options, use a custom Agent.\n\n

    \n

    Example:\n\n

    \n
    var options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')\n};\noptions.agent = new https.Agent(options);\n\nvar req = https.request(options, function(res) {\n  ...\n}
    \n

    Or does not use an Agent.\n\n

    \n

    Example:\n\n

    \n
    var options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),\n  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),\n  agent: false\n};\n\nvar req = https.request(options, function(res) {\n  ...\n}
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "https.get(options, callback)", - "type": "method", - "name": "get", - "desc": "

    Like http.get() but for HTTPS.\n\n

    \n

    options can be an object or a string. If options is a string, it is\nautomatically parsed with url.parse().\n\n

    \n

    Example:\n\n

    \n
    var https = require('https');\n\nhttps.get('https://encrypted.google.com/', function(res) {\n  console.log("statusCode: ", res.statusCode);\n  console.log("headers: ", res.headers);\n\n  res.on('data', function(d) {\n    process.stdout.write(d);\n  });\n\n}).on('error', function(e) {\n  console.error(e);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "https.globalAgent", - "name": "globalAgent", - "desc": "

    Global instance of [https.Agent][] for all HTTPS client requests.\n\n

    \n" - } - ], - "type": "module", - "displayName": "HTTPS" - }, - { - "textRaw": "URL", - "name": "url", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    This module has utilities for URL resolution and parsing.\nCall require('url') to use it.\n\n

    \n

    Parsed URL objects have some or all of the following fields, depending on\nwhether or not they exist in the URL string. Any parts that are not in the URL\nstring will not be in the parsed object. Examples are shown for the URL\n\n

    \n

    'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'\n\n

    \n
      \n
    • href: The full URL that was originally parsed. Both the protocol and host are lowercased.

      \n

      Example: 'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'

      \n
    • \n
    • protocol: The request protocol, lowercased.

      \n

      Example: 'http:'

      \n
    • \n
    • host: The full lowercased host portion of the URL, including port\ninformation.

      \n

      Example: 'host.com:8080'

      \n
    • \n
    • auth: The authentication information portion of a URL.

      \n

      Example: 'user:pass'

      \n
    • \n
    • hostname: Just the lowercased hostname portion of the host.

      \n

      Example: 'host.com'

      \n
    • \n
    • port: The port number portion of the host.

      \n

      Example: '8080'

      \n
    • \n
    • pathname: The path section of the URL, that comes after the host and\nbefore the query, including the initial slash if present.

      \n

      Example: '/p/a/t/h'

      \n
    • \n
    • search: The 'query string' portion of the URL, including the leading\nquestion mark.

      \n

      Example: '?query=string'

      \n
    • \n
    • path: Concatenation of pathname and search.

      \n

      Example: '/p/a/t/h?query=string'

      \n
    • \n
    • query: Either the 'params' portion of the query string, or a\nquerystring-parsed object.

      \n

      Example: 'query=string' or {'query':'string'}

      \n
    • \n
    • hash: The 'fragment' portion of the URL including the pound-sign.

      \n

      Example: '#hash'

      \n
    • \n
    \n

    The following methods are provided by the URL module:\n\n

    \n", - "methods": [ - { - "textRaw": "url.parse(urlStr, [parseQueryString], [slashesDenoteHost])", - "type": "method", - "name": "parse", - "desc": "

    Take a URL string, and return an object.\n\n

    \n

    Pass true as the second argument to also parse\nthe query string using the querystring module.\nDefaults to false.\n\n

    \n

    Pass true as the third argument to treat //foo/bar as\n{ host: 'foo', pathname: '/bar' } rather than\n{ pathname: '//foo/bar' }. Defaults to false.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "urlStr" - }, - { - "name": "parseQueryString", - "optional": true - }, - { - "name": "slashesDenoteHost", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "url.format(urlObj)", - "type": "method", - "name": "format", - "desc": "

    Take a parsed URL object, and return a formatted URL string.\n\n

    \n
      \n
    • href will be ignored.
    • \n
    • protocolis treated the same with or without the trailing : (colon).
        \n
      • The protocols http, https, ftp, gopher, file will be\npostfixed with :// (colon-slash-slash).
      • \n
      • All other protocols mailto, xmpp, aim, sftp, foo, etc will\nbe postfixed with : (colon)
      • \n
      \n
    • \n
    • auth will be used if present.
    • \n
    • hostname will only be used if host is absent.
    • \n
    • port will only be used if host is absent.
    • \n
    • host will be used in place of hostname and port
    • \n
    • pathname is treated the same with or without the leading / (slash)
    • \n
    • search will be used in place of query
    • \n
    • query (object; see querystring) will only be used if search is absent.
    • \n
    • search is treated the same with or without the leading ? (question mark)
    • \n
    • hash is treated the same with or without the leading # (pound sign, anchor)
    • \n
    \n", - "signatures": [ - { - "params": [ - { - "name": "urlObj" - } - ] - } - ] - }, - { - "textRaw": "url.resolve(from, to)", - "type": "method", - "name": "resolve", - "desc": "

    Take a base URL, and a href URL, and resolve them as a browser would for\nan anchor tag. Examples:\n\n

    \n
    url.resolve('/one/two/three', 'four')         // '/one/two/four'\nurl.resolve('http://example.com/', '/one')    // 'http://example.com/one'\nurl.resolve('http://example.com/one', '/two') // 'http://example.com/two'
    \n", - "signatures": [ - { - "params": [ - { - "name": "from" - }, - { - "name": "to" - } - ] - } - ] - } - ], - "type": "module", - "displayName": "URL" - }, - { - "textRaw": "Query String", - "name": "querystring", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    This module provides utilities for dealing with query strings.\nIt provides the following methods:\n\n

    \n", - "methods": [ - { - "textRaw": "querystring.stringify(obj, [sep], [eq])", - "type": "method", - "name": "stringify", - "desc": "

    Serialize an object to a query string.\nOptionally override the default separator ('&') and assignment ('=')\ncharacters.\n\n

    \n

    Example:\n\n

    \n
    querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })\n// returns\n'foo=bar&baz=qux&baz=quux&corge='\n\nquerystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':')\n// returns\n'foo:bar;baz:qux'
    \n", - "signatures": [ - { - "params": [ - { - "name": "obj" - }, - { - "name": "sep", - "optional": true - }, - { - "name": "eq", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "querystring.parse(str, [sep], [eq], [options])", - "type": "method", - "name": "parse", - "desc": "

    Deserialize a query string to an object.\nOptionally override the default separator ('&') and assignment ('=')\ncharacters.\n\n

    \n

    Options object may contain maxKeys property (equal to 1000 by default), it'll\nbe used to limit processed keys. Set it to 0 to remove key count limitation.\n\n

    \n

    Example:\n\n

    \n
    querystring.parse('foo=bar&baz=qux&baz=quux&corge')\n// returns\n{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
    \n", - "signatures": [ - { - "params": [ - { - "name": "str" - }, - { - "name": "sep", - "optional": true - }, - { - "name": "eq", - "optional": true - }, - { - "name": "options", - "optional": true - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "querystring.escape", - "name": "escape", - "desc": "

    The escape function used by querystring.stringify,\nprovided so that it could be overridden if necessary.\n\n

    \n" - }, - { - "textRaw": "querystring.unescape", - "name": "unescape", - "desc": "

    The unescape function used by querystring.parse,\nprovided so that it could be overridden if necessary.\n\n

    \n" - } - ], - "type": "module", - "displayName": "querystring" - }, - { - "textRaw": "punycode", - "name": "punycode", - "stability": 2, - "stabilityText": "Unstable", - "desc": "

    Punycode.js is bundled with Node.js v0.6.2+. Use\nrequire('punycode') to access it. (To use it with other Node.js versions,\nuse npm to install the punycode module first.)\n\n

    \n", - "methods": [ - { - "textRaw": "punycode.decode(string)", - "type": "method", - "name": "decode", - "desc": "

    Converts a Punycode string of ASCII code points to a string of Unicode code\npoints.\n\n

    \n
    // decode domain name parts\npunycode.decode('maana-pta'); // 'mañana'\npunycode.decode('--dqo34k'); // '☃-⌘'
    \n", - "signatures": [ - { - "params": [ - { - "name": "string" - } - ] - } - ] - }, - { - "textRaw": "punycode.encode(string)", - "type": "method", - "name": "encode", - "desc": "

    Converts a string of Unicode code points to a Punycode string of ASCII code\npoints.\n\n

    \n
    // encode domain name parts\npunycode.encode('mañana'); // 'maana-pta'\npunycode.encode('☃-⌘'); // '--dqo34k'
    \n", - "signatures": [ - { - "params": [ - { - "name": "string" - } - ] - } - ] - }, - { - "textRaw": "punycode.toUnicode(domain)", - "type": "method", - "name": "toUnicode", - "desc": "

    Converts a Punycode string representing a domain name to Unicode. Only the\nPunycoded parts of the domain name will be converted, i.e. it doesn't matter if\nyou call it on a string that has already been converted to Unicode.\n\n

    \n
    // decode domain names\npunycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'\npunycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - } - ] - } - ] - }, - { - "textRaw": "punycode.toASCII(domain)", - "type": "method", - "name": "toASCII", - "desc": "

    Converts a Unicode string representing a domain name to Punycode. Only the\nnon-ASCII parts of the domain name will be converted, i.e. it doesn't matter if\nyou call it with a domain that's already in ASCII.\n\n

    \n
    // encode domain names\npunycode.toASCII('mañana.com'); // 'xn--maana-pta.com'\npunycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
    \n", - "signatures": [ - { - "params": [ - { - "name": "domain" - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "punycode.ucs2", - "name": "ucs2", - "modules": [ - { - "textRaw": "punycode.ucs2.decode(string)", - "name": "punycode.ucs2.decode(string)", - "desc": "

    Creates an array containing the decimal code points of each Unicode character\nin the string. While JavaScript uses UCS-2\ninternally, this function\nwill convert a pair of surrogate halves (each of which UCS-2 exposes as\nseparate characters) into a single code point, matching UTF-16.\n\n

    \n
    punycode.ucs2.decode('abc'); // [97, 98, 99]\n// surrogate pair for U+1D306 tetragram for centre:\npunycode.ucs2.decode('\\uD834\\uDF06'); // [0x1D306]
    \n", - "type": "module", - "displayName": "punycode.ucs2.decode(string)" - }, - { - "textRaw": "punycode.ucs2.encode(codePoints)", - "name": "punycode.ucs2.encode(codepoints)", - "desc": "

    Creates a string based on an array of decimal code points.\n\n

    \n
    punycode.ucs2.encode([97, 98, 99]); // 'abc'\npunycode.ucs2.encode([0x1D306]); // '\\uD834\\uDF06'
    \n", - "type": "module", - "displayName": "punycode.ucs2.encode(codePoints)" - } - ] - }, - { - "textRaw": "punycode.version", - "name": "version", - "desc": "

    A string representing the current Punycode.js version number.\n\n

    \n" - } - ], - "type": "module", - "displayName": "punycode" - }, - { - "textRaw": "Readline", - "name": "readline", - "stability": 2, - "stabilityText": "Unstable", - "desc": "

    To use this module, do require('readline'). Readline allows reading of a\nstream (such as process.stdin) on a line-by-line basis.\n\n

    \n

    Note that once you've invoked this module, your node program will not\nterminate until you've closed the interface. Here's how to allow your\nprogram to gracefully exit:\n\n

    \n
    var readline = require('readline');\n\nvar rl = readline.createInterface({\n  input: process.stdin,\n  output: process.stdout\n});\n\nrl.question("What do you think of node.js? ", function(answer) {\n  // TODO: Log the answer in a database\n  console.log("Thank you for your valuable feedback:", answer);\n\n  rl.close();\n});
    \n", - "methods": [ - { - "textRaw": "readline.createInterface(options)", - "type": "method", - "name": "createInterface", - "desc": "

    Creates a readline Interface instance. Accepts an "options" Object that takes\nthe following values:\n\n

    \n
      \n
    • input - the readable stream to listen to (Required).

      \n
    • \n
    • output - the writable stream to write readline data to (Required).

      \n
    • \n
    • completer - an optional function that is used for Tab autocompletion. See\nbelow for an example of using this.

      \n
    • \n
    • terminal - pass true if the input and output streams should be\ntreated like a TTY, and have ANSI/VT100 escape codes written to it.\nDefaults to checking isTTY on the output stream upon instantiation.

      \n
    • \n
    \n

    The completer function is given a the current line entered by the user, and\nis supposed to return an Array with 2 entries:\n\n

    \n
      \n
    1. An Array with matching entries for the completion.

      \n
    2. \n
    3. The substring that was used for the matching.

      \n
    4. \n
    \n

    Which ends up looking something like:\n[[substr1, substr2, ...], originalsubstring].\n\n

    \n

    Example:\n\n

    \n
    function completer(line) {\n  var completions = '.help .error .exit .quit .q'.split(' ')\n  var hits = completions.filter(function(c) { return c.indexOf(line) == 0 })\n  // show all completions if none found\n  return [hits.length ? hits : completions, line]\n}
    \n

    Also completer can be run in async mode if it accepts two arguments:\n\n

    \n
    function completer(linePartial, callback) {\n  callback(null, [['123'], linePartial]);\n}
    \n

    createInterface is commonly used with process.stdin and\nprocess.stdout in order to accept user input:\n\n

    \n
    var readline = require('readline');\nvar rl = readline.createInterface({\n  input: process.stdin,\n  output: process.stdout\n});
    \n

    Once you have a readline instance, you most commonly listen for the\n"line" event.\n\n

    \n

    If terminal is true for this instance then the output stream will get\nthe best compatibility if it defines an output.columns property, and fires\na "resize" event on the output if/when the columns ever change\n(process.stdout does this automatically when it is a TTY).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: Interface", - "type": "class", - "name": "Interface", - "desc": "

    The class that represents a readline interface with an input and output\nstream.\n\n

    \n", - "methods": [ - { - "textRaw": "rl.setPrompt(prompt, length)", - "type": "method", - "name": "setPrompt", - "desc": "

    Sets the prompt, for example when you run node on the command line, you see\n> , which is node's prompt.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "prompt" - }, - { - "name": "length" - } - ] - } - ] - }, - { - "textRaw": "rl.prompt([preserveCursor])", - "type": "method", - "name": "prompt", - "desc": "

    Readies readline for input from the user, putting the current setPrompt\noptions on a new line, giving the user a new spot to write. Set preserveCursor\nto true to prevent the cursor placement being reset to 0.\n\n

    \n

    This will also resume the input stream used with createInterface if it has\nbeen paused.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "preserveCursor", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "rl.question(query, callback)", - "type": "method", - "name": "question", - "desc": "

    Prepends the prompt with query and invokes callback with the user's\nresponse. Displays the query to the user, and then invokes callback\nwith the user's response after it has been typed.\n\n

    \n

    This will also resume the input stream used with createInterface if\nit has been paused.\n\n

    \n

    Example usage:\n\n

    \n
    interface.question('What is your favorite food?', function(answer) {\n  console.log('Oh, so your favorite food is ' + answer);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "query" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "rl.pause()", - "type": "method", - "name": "pause", - "desc": "

    Pauses the readline input stream, allowing it to be resumed later if needed.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "rl.resume()", - "type": "method", - "name": "resume", - "desc": "

    Resumes the readline input stream.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "rl.close()", - "type": "method", - "name": "close", - "desc": "

    Closes the Interface instance, relinquishing control on the input and\noutput streams. The "close" event will also be emitted.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "rl.write(data, [key])", - "type": "method", - "name": "write", - "desc": "

    Writes data to output stream. key is an object literal to represent a key\nsequence; available if the terminal is a TTY.\n\n

    \n

    This will also resume the input stream if it has been paused.\n\n

    \n

    Example:\n\n

    \n
    rl.write('Delete me!');\n// Simulate ctrl+u to delete the line written previously\nrl.write(null, {ctrl: true, name: 'u'});
    \n", - "signatures": [ - { - "params": [ - { - "name": "data" - }, - { - "name": "key", - "optional": true - } - ] - } - ] - } - ] - } - ], - "modules": [ - { - "textRaw": "Events", - "name": "events", - "events": [ - { - "textRaw": "Event: 'line'", - "type": "event", - "name": "line", - "desc": "

    function (line) {}\n\n

    \n

    Emitted whenever the input stream receives a \\n, usually received when the\nuser hits enter, or return. This is a good hook to listen for user input.\n\n

    \n

    Example of listening for line:\n\n

    \n
    rl.on('line', function (cmd) {\n  console.log('You just typed: '+cmd);\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'pause'", - "type": "event", - "name": "pause", - "desc": "

    function () {}\n\n

    \n

    Emitted whenever the input stream is paused.\n\n

    \n

    Also emitted whenever the input stream is not paused and receives the\nSIGCONT event. (See events SIGTSTP and SIGCONT)\n\n

    \n

    Example of listening for pause:\n\n

    \n
    rl.on('pause', function() {\n  console.log('Readline paused.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'resume'", - "type": "event", - "name": "resume", - "desc": "

    function () {}\n\n

    \n

    Emitted whenever the input stream is resumed.\n\n

    \n

    Example of listening for resume:\n\n

    \n
    rl.on('resume', function() {\n  console.log('Readline resumed.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () {}\n\n

    \n

    Emitted when close() is called.\n\n

    \n

    Also emitted when the input stream receives its "end" event. The Interface\ninstance should be considered "finished" once this is emitted. For example, when\nthe input stream receives ^D, respectively known as EOT.\n\n

    \n

    This event is also called if there is no SIGINT event listener present when\nthe input stream receives a ^C, respectively known as SIGINT.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'SIGINT'", - "type": "event", - "name": "SIGINT", - "desc": "

    function () {}\n\n

    \n

    Emitted whenever the input stream receives a ^C, respectively known as\nSIGINT. If there is no SIGINT event listener present when the input\nstream receives a SIGINT, pause will be triggered.\n\n

    \n

    Example of listening for SIGINT:\n\n

    \n
    rl.on('SIGINT', function() {\n  rl.question('Are you sure you want to exit?', function(answer) {\n    if (answer.match(/^y(es)?$/i)) rl.pause();\n  });\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'SIGTSTP'", - "type": "event", - "name": "SIGTSTP", - "desc": "

    function () {}\n\n

    \n

    This does not work on Windows.\n\n

    \n

    Emitted whenever the input stream receives a ^Z, respectively known as\nSIGTSTP. If there is no SIGTSTP event listener present when the input\nstream receives a SIGTSTP, the program will be sent to the background.\n\n

    \n

    When the program is resumed with fg, the pause and SIGCONT events will be\nemitted. You can use either to resume the stream.\n\n

    \n

    The pause and SIGCONT events will not be triggered if the stream was paused\nbefore the program was sent to the background.\n\n

    \n

    Example of listening for SIGTSTP:\n\n

    \n
    rl.on('SIGTSTP', function() {\n  // This will override SIGTSTP and prevent the program from going to the\n  // background.\n  console.log('Caught SIGTSTP.');\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'SIGCONT'", - "type": "event", - "name": "SIGCONT", - "desc": "

    function () {}\n\n

    \n

    This does not work on Windows.\n\n

    \n

    Emitted whenever the input stream is sent to the background with ^Z,\nrespectively known as SIGTSTP, and then continued with fg(1). This event\nonly emits if the stream was not paused before sending the program to the\nbackground.\n\n

    \n

    Example of listening for SIGCONT:\n\n

    \n
    rl.on('SIGCONT', function() {\n  // `prompt` will automatically resume the stream\n  rl.prompt();\n});
    \n

    Example: Tiny CLI

    \n

    Here's an example of how to use all these together to craft a tiny command\nline interface:\n\n

    \n
    var readline = require('readline'),\n    rl = readline.createInterface(process.stdin, process.stdout);\n\nrl.setPrompt('OHAI> ');\nrl.prompt();\n\nrl.on('line', function(line) {\n  switch(line.trim()) {\n    case 'hello':\n      console.log('world!');\n      break;\n    default:\n      console.log('Say what? I might have heard `' + line.trim() + '`');\n      break;\n  }\n  rl.prompt();\n}).on('close', function() {\n  console.log('Have a great day!');\n  process.exit(0);\n});
    \n", - "params": [] - } - ], - "type": "module", - "displayName": "Events" - } - ], - "type": "module", - "displayName": "Readline" - }, - { - "textRaw": "REPL", - "name": "repl", - "desc": "

    A Read-Eval-Print-Loop (REPL) is available both as a standalone program and\neasily includable in other programs. The REPL provides a way to interactively\nrun JavaScript and see the results. It can be used for debugging, testing, or\njust trying things out.\n\n

    \n

    By executing node without any arguments from the command-line you will be\ndropped into the REPL. It has simplistic emacs line-editing.\n\n

    \n
    mjr:~$ node\nType '.help' for options.\n> a = [ 1, 2, 3];\n[ 1, 2, 3 ]\n> a.forEach(function (v) {\n...   console.log(v);\n...   });\n1\n2\n3
    \n

    For advanced line-editors, start node with the environmental variable\nNODE_NO_READLINE=1. This will start the main and debugger REPL in canonical\nterminal settings which will allow you to use with rlwrap.\n\n

    \n

    For example, you could add this to your bashrc file:\n\n

    \n
    alias node="env NODE_NO_READLINE=1 rlwrap node"
    \n", - "methods": [ - { - "textRaw": "repl.start(options)", - "type": "method", - "name": "start", - "desc": "

    Returns and starts a REPLServer instance. Accepts an "options" Object that\ntakes the following values:\n\n

    \n
      \n
    • prompt - the prompt and stream for all I/O. Defaults to > .

      \n
    • \n
    • input - the readable stream to listen to. Defaults to process.stdin.

      \n
    • \n
    • output - the writable stream to write readline data to. Defaults to\nprocess.stdout.

      \n
    • \n
    • terminal - pass true if the stream should be treated like a TTY, and\nhave ANSI/VT100 escape codes written to it. Defaults to checking isTTY\non the output stream upon instantiation.

      \n
    • \n
    • eval - function that will be used to eval each given line. Defaults to\nan async wrapper for eval(). See below for an example of a custom eval.

      \n
    • \n
    • useColors - a boolean which specifies whether or not the writer function\nshould output colors. If a different writer function is set then this does\nnothing. Defaults to the repl's terminal value.

      \n
    • \n
    • useGlobal - if set to true, then the repl will use the global object,\ninstead of running scripts in a separate context. Defaults to false.

      \n
    • \n
    • ignoreUndefined - if set to true, then the repl will not output the\nreturn value of command if it's undefined. Defaults to false.

      \n
    • \n
    • writer - the function to invoke for each command that gets evaluated which\nreturns the formatting (including coloring) to display. Defaults to\nutil.inspect.

      \n
    • \n
    \n

    You can use your own eval function if it has following signature:\n\n

    \n
    function eval(cmd, context, filename, callback) {\n  callback(null, result);\n}
    \n

    Multiple REPLs may be started against the same running instance of node. Each\nwill share the same global object but will have unique I/O.\n\n

    \n

    Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket:\n\n

    \n
    var net = require("net"),\n    repl = require("repl");\n\nconnections = 0;\n\nrepl.start({\n  prompt: "node via stdin> ",\n  input: process.stdin,\n  output: process.stdout\n});\n\nnet.createServer(function (socket) {\n  connections += 1;\n  repl.start({\n    prompt: "node via Unix socket> ",\n    input: socket,\n    output: socket\n  }).on('exit', function() {\n    socket.end();\n  })\n}).listen("/tmp/node-repl-sock");\n\nnet.createServer(function (socket) {\n  connections += 1;\n  repl.start({\n    prompt: "node via TCP socket> ",\n    input: socket,\n    output: socket\n  }).on('exit', function() {\n    socket.end();\n  });\n}).listen(5001);
    \n

    Running this program from the command line will start a REPL on stdin. Other\nREPL clients may connect through the Unix socket or TCP socket. telnet is useful\nfor connecting to TCP sockets, and socat can be used to connect to both Unix and\nTCP sockets.\n\n

    \n

    By starting a REPL from a Unix socket-based server instead of stdin, you can\nconnect to a long-running node process without restarting it.\n\n

    \n

    For an example of running a "full-featured" (terminal) REPL over\na net.Server and net.Socket instance, see: https://gist.github.com/2209310\n\n

    \n

    For an example of running a REPL instance over curl(1),\nsee: https://gist.github.com/2053342\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "desc": "

    function () {}\n\n

    \n

    Emitted when the user exits the REPL in any of the defined ways. Namely, typing\n.exit at the repl, pressing Ctrl+C twice to signal SIGINT, or pressing Ctrl+D\nto signal "end" on the input stream.\n\n

    \n

    Example of listening for exit:\n\n

    \n
    r.on('exit', function () {\n  console.log('Got "exit" event from repl!');\n  process.exit();\n});
    \n", - "params": [] - } - ], - "signatures": [ - { - "params": [ - { - "name": "options" - } - ] - } - ] - } - ], - "miscs": [ - { - "textRaw": "REPL Features", - "name": "REPL Features", - "type": "misc", - "desc": "

    Inside the REPL, Control+D will exit. Multi-line expressions can be input.\nTab completion is supported for both global and local variables.\n\n

    \n

    The special variable _ (underscore) contains the result of the last expression.\n\n

    \n
    > [ "a", "b", "c" ]\n[ 'a', 'b', 'c' ]\n> _.length\n3\n> _ += 1\n4
    \n

    The REPL provides access to any variables in the global scope. You can expose\na variable to the REPL explicitly by assigning it to the context object\nassociated with each REPLServer. For example:\n\n

    \n
    // repl_test.js\nvar repl = require("repl"),\n    msg = "message";\n\nrepl.start("> ").context.m = msg;
    \n

    Things in the context object appear as local within the REPL:\n\n

    \n
    mjr:~$ node repl_test.js\n> m\n'message'
    \n

    There are a few special REPL commands:\n\n

    \n
      \n
    • .break - While inputting a multi-line expression, sometimes you get lost\nor just don't care about completing it. .break will start over.
    • \n
    • .clear - Resets the context object to an empty object and clears any\nmulti-line expression.
    • \n
    • .exit - Close the I/O stream, which will cause the REPL to exit.
    • \n
    • .help - Show this list of special commands.
    • \n
    • .save - Save the current REPL session to a file
      \n

      .save ./file/to/save.js

      \n
      \n
    • \n
    • .load - Load a file into the current REPL session.
      \n

      .load ./file/to/load.js

      \n
      \n
    • \n
    \n

    The following key combinations in the REPL have these special effects:\n\n

    \n
      \n
    • <ctrl>C - Similar to the .break keyword. Terminates the current\ncommand. Press twice on a blank line to forcibly exit.
    • \n
    • <ctrl>D - Similar to the .exit keyword.
    • \n
    \n" - } - ], - "type": "module", - "displayName": "REPL" - }, - { - "textRaw": "Executing JavaScript", - "name": "vm", - "stability": 2, - "stabilityText": "Unstable. See Caveats, below.", - "desc": "

    You can access this module with:\n\n

    \n
    var vm = require('vm');
    \n

    JavaScript code can be compiled and run immediately or compiled, saved, and run later.\n\n

    \n", - "modules": [ - { - "textRaw": "Caveats", - "name": "caveats", - "desc": "

    The vm module has many known issues and edge cases. If you run into\nissues or unexpected behavior, please consult the open issues on\nGitHub.\nSome of the biggest problems are described below.\n\n

    \n", - "modules": [ - { - "textRaw": "Sandboxes", - "name": "sandboxes", - "desc": "

    The sandbox argument to vm.runInNewContext and vm.createContext,\nalong with the initSandbox argument to vm.createContext, do not\nbehave as one might normally expect and their behavior varies\nbetween different versions of Node.\n\n

    \n

    The key issue to be aware of is that V8 provides no way to directly\ncontrol the global object used within a context. As a result, while\nproperties of your sandbox object will be available in the context,\nany properties from the prototypes of the sandbox may not be\navailable. Furthermore, the this expression within the global scope\nof the context evaluates to the empty object ({}) instead of to\nyour sandbox.\n\n

    \n

    Your sandbox's properties are also not shared directly with the script.\nInstead, the properties of the sandbox are copied into the context at\nthe beginning of execution, and then after execution, the properties\nare copied back out in an attempt to propagate any changes.\n\n

    \n", - "type": "module", - "displayName": "Sandboxes" - }, - { - "textRaw": "Globals", - "name": "globals", - "desc": "

    Properties of the global object, like Array and String, have\ndifferent values inside of a context. This means that common\nexpressions like [] instanceof Array or\nObject.getPrototypeOf([]) === Array.prototype may not produce\nexpected results when used inside of scripts evaluated via the vm module.\n\n

    \n

    Some of these problems have known workarounds listed in the issues for\nvm on GitHub. for example, Array.isArray works around\nthe example problem with Array.\n\n

    \n", - "type": "module", - "displayName": "Globals" - } - ], - "type": "module", - "displayName": "Caveats" - } - ], - "methods": [ - { - "textRaw": "vm.runInThisContext(code, [filename])", - "type": "method", - "name": "runInThisContext", - "desc": "

    vm.runInThisContext() compiles code, runs it and returns the result. Running\ncode does not have access to local scope. filename is optional, it's used only\nin stack traces.\n\n

    \n

    Example of using vm.runInThisContext and eval to run the same code:\n\n

    \n
    var localVar = 123,\n    usingscript, evaled,\n    vm = require('vm');\n\nusingscript = vm.runInThisContext('localVar = 1;',\n  'myfile.vm');\nconsole.log('localVar: ' + localVar + ', usingscript: ' +\n  usingscript);\nevaled = eval('localVar = 1;');\nconsole.log('localVar: ' + localVar + ', evaled: ' +\n  evaled);\n\n// localVar: 123, usingscript: 1\n// localVar: 1, evaled: 1
    \n

    vm.runInThisContext does not have access to the local scope, so localVar is unchanged.\neval does have access to the local scope, so localVar is changed.\n\n

    \n

    In case of syntax error in code, vm.runInThisContext emits the syntax error to stderr\nand throws an exception.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code" - }, - { - "name": "filename", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "vm.runInNewContext(code, [sandbox], [filename])", - "type": "method", - "name": "runInNewContext", - "desc": "

    vm.runInNewContext compiles code, then runs it in sandbox and returns the\nresult. Running code does not have access to local scope. The object sandbox\nwill be used as the global object for code.\nsandbox and filename are optional, filename is only used in stack traces.\n\n

    \n

    Example: compile and execute code that increments a global variable and sets a new one.\nThese globals are contained in the sandbox.\n\n

    \n
    var util = require('util'),\n    vm = require('vm'),\n    sandbox = {\n      animal: 'cat',\n      count: 2\n    };\n\nvm.runInNewContext('count += 1; name = "kitty"', sandbox, 'myfile.vm');\nconsole.log(util.inspect(sandbox));\n\n// { animal: 'cat', count: 3, name: 'kitty' }
    \n

    Note that running untrusted code is a tricky business requiring great care. To prevent accidental\nglobal variable leakage, vm.runInNewContext is quite useful, but safely running untrusted code\nrequires a separate process.\n\n

    \n

    In case of syntax error in code, vm.runInNewContext emits the syntax error to stderr\nand throws an exception.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code" - }, - { - "name": "sandbox", - "optional": true - }, - { - "name": "filename", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "vm.runInContext(code, context, [filename])", - "type": "method", - "name": "runInContext", - "desc": "

    vm.runInContext compiles code, then runs it in context and returns the\nresult. A (V8) context comprises a global object, together with a set of\nbuilt-in objects and functions. Running code does not have access to local scope\nand the global object held within context will be used as the global object\nfor code.\nfilename is optional, it's used only in stack traces.\n\n

    \n

    Example: compile and execute code in a existing context.\n\n

    \n
    var util = require('util'),\n    vm = require('vm'),\n    initSandbox = {\n      animal: 'cat',\n      count: 2\n    },\n    context = vm.createContext(initSandbox);\n\nvm.runInContext('count += 1; name = "CATT"', context, 'myfile.vm');\nconsole.log(util.inspect(context));\n\n// { animal: 'cat', count: 3, name: 'CATT' }
    \n

    Note that createContext will perform a shallow clone of the supplied sandbox object in order to\ninitialize the global object of the freshly constructed context.\n\n

    \n

    Note that running untrusted code is a tricky business requiring great care. To prevent accidental\nglobal variable leakage, vm.runInContext is quite useful, but safely running untrusted code\nrequires a separate process.\n\n

    \n

    In case of syntax error in code, vm.runInContext emits the syntax error to stderr\nand throws an exception.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code" - }, - { - "name": "context" - }, - { - "name": "filename", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "vm.createContext([initSandbox])", - "type": "method", - "name": "createContext", - "desc": "

    vm.createContext creates a new context which is suitable for use as the 2nd argument of a subsequent\ncall to vm.runInContext. A (V8) context comprises a global object together with a set of\nbuild-in objects and functions. The optional argument initSandbox will be shallow-copied\nto seed the initial contents of the global object used by the context.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "initSandbox", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "vm.createScript(code, [filename])", - "type": "method", - "name": "createScript", - "desc": "

    createScript compiles code but does not run it. Instead, it returns a\nvm.Script object representing this compiled code. This script can be run\nlater many times using methods below. The returned script is not bound to any\nglobal object. It is bound before each run, just for that run. filename is\noptional, it's only used in stack traces.\n\n

    \n

    In case of syntax error in code, createScript prints the syntax error to stderr\nand throws an exception.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "code" - }, - { - "name": "filename", - "optional": true - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: Script", - "type": "class", - "name": "Script", - "desc": "

    A class for running scripts. Returned by vm.createScript.\n\n

    \n", - "methods": [ - { - "textRaw": "script.runInThisContext()", - "type": "method", - "name": "runInThisContext", - "desc": "

    Similar to vm.runInThisContext but a method of a precompiled Script object.\nscript.runInThisContext runs the code of script and returns the result.\nRunning code does not have access to local scope, but does have access to the global object\n(v8: in actual context).\n\n

    \n

    Example of using script.runInThisContext to compile code once and run it multiple times:\n\n

    \n
    var vm = require('vm');\n\nglobalVar = 0;\n\nvar script = vm.createScript('globalVar += 1', 'myfile.vm');\n\nfor (var i = 0; i < 1000 ; i += 1) {\n  script.runInThisContext();\n}\n\nconsole.log(globalVar);\n\n// 1000
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "script.runInNewContext([sandbox])", - "type": "method", - "name": "runInNewContext", - "desc": "

    Similar to vm.runInNewContext a method of a precompiled Script object.\nscript.runInNewContext runs the code of script with sandbox as the global object and returns the result.\nRunning code does not have access to local scope. sandbox is optional.\n\n

    \n

    Example: compile code that increments a global variable and sets one, then execute this code multiple times.\nThese globals are contained in the sandbox.\n\n

    \n
    var util = require('util'),\n    vm = require('vm'),\n    sandbox = {\n      animal: 'cat',\n      count: 2\n    };\n\nvar script = vm.createScript('count += 1; name = "kitty"', 'myfile.vm');\n\nfor (var i = 0; i < 10 ; i += 1) {\n  script.runInNewContext(sandbox);\n}\n\nconsole.log(util.inspect(sandbox));\n\n// { animal: 'cat', count: 12, name: 'kitty' }
    \n

    Note that running untrusted code is a tricky business requiring great care. To prevent accidental\nglobal variable leakage, script.runInNewContext is quite useful, but safely running untrusted code\nrequires a separate process.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "sandbox", - "optional": true - } - ] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "vm" - }, - { - "textRaw": "Child Process", - "name": "child_process", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    Node provides a tri-directional popen(3) facility through the\nchild_process module.\n\n

    \n

    It is possible to stream data through a child's stdin, stdout, and\nstderr in a fully non-blocking way. (Note that some programs use\nline-buffered I/O internally. That doesn't affect node.js but it means\ndata you send to the child process is not immediately consumed.)\n\n

    \n

    To create a child process use require('child_process').spawn() or\nrequire('child_process').fork(). The semantics of each are slightly\ndifferent, and explained below.\n\n

    \n", - "classes": [ - { - "textRaw": "Class: ChildProcess", - "type": "class", - "name": "ChildProcess", - "desc": "

    ChildProcess is an [EventEmitter][].\n\n

    \n

    Child processes always have three streams associated with them. child.stdin,\nchild.stdout, and child.stderr. These may be shared with the stdio\nstreams of the parent process, or they may be separate stream objects\nwhich can be piped to and from.\n\n

    \n

    The ChildProcess class is not intended to be used directly. Use the\nspawn() or fork() methods to create a Child Process instance.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "params": [], - "desc": "

    Emitted when:\n\n

    \n
      \n
    1. The process could not be spawned, or
    2. \n
    3. The process could not be killed, or
    4. \n
    5. Sending a message to the child process failed for whatever reason.
    6. \n
    \n

    See also ChildProcess#kill() and\nChildProcess#send().\n\n

    \n" - }, - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "params": [], - "desc": "

    This event is emitted after the child process ends. If the process terminated\nnormally, code is the final exit code of the process, otherwise null. If\nthe process terminated due to receipt of a signal, signal is the string name\nof the signal, otherwise null.\n\n

    \n

    Note that the child process stdio streams might still be open.\n\n

    \n

    Also, note that node establishes signal handlers for 'SIGINT' and 'SIGTERM',\nso it will not terminate due to receipt of those signals, it will exit.\n\n

    \n

    See waitpid(2).\n\n

    \n" - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "params": [], - "desc": "

    This event is emitted when the stdio streams of a child process have all\nterminated. This is distinct from 'exit', since multiple processes\nmight share the same stdio streams.\n\n

    \n" - }, - { - "textRaw": "Event: 'disconnect'", - "type": "event", - "name": "disconnect", - "desc": "

    This event is emitted after calling the .disconnect() method in the parent\nor in the child. After disconnecting it is no longer possible to send messages,\nand the .connected property is false.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'message'", - "type": "event", - "name": "message", - "params": [], - "desc": "

    Messages send by .send(message, [sendHandle]) are obtained using the\nmessage event.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "`stdin` {Stream object} ", - "name": "stdin", - "desc": "

    A Writable Stream that represents the child process's stdin.\nClosing this stream via end() often causes the child process to terminate.\n\n

    \n

    If the child stdio streams are shared with the parent, then this will\nnot be set.\n\n

    \n" - }, - { - "textRaw": "`stdout` {Stream object} ", - "name": "stdout", - "desc": "

    A Readable Stream that represents the child process's stdout.\n\n

    \n

    If the child stdio streams are shared with the parent, then this will\nnot be set.\n\n

    \n" - }, - { - "textRaw": "`stderr` {Stream object} ", - "name": "stderr", - "desc": "

    A Readable Stream that represents the child process's stderr.\n\n

    \n

    If the child stdio streams are shared with the parent, then this will\nnot be set.\n\n

    \n" - }, - { - "textRaw": "`pid` {Integer} ", - "name": "pid", - "desc": "

    The PID of the child process.\n\n

    \n

    Example:\n\n

    \n
    var spawn = require('child_process').spawn,\n    grep  = spawn('grep', ['ssh']);\n\nconsole.log('Spawned child pid: ' + grep.pid);\ngrep.stdin.end();
    \n" - }, - { - "textRaw": "`connected` {Boolean} Set to false after `.disconnect' is called ", - "name": "connected", - "desc": "

    If .connected is false, it is no longer possible to send messages.\n\n

    \n", - "shortDesc": "Set to false after `.disconnect' is called" - } - ], - "methods": [ - { - "textRaw": "child.kill([signal])", - "type": "method", - "name": "kill", - "signatures": [ - { - "params": [ - { - "textRaw": "`signal` {String} ", - "name": "signal", - "type": "String", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "signal", - "optional": true - } - ] - } - ], - "desc": "

    Send a signal to the child process. If no argument is given, the process will\nbe sent 'SIGTERM'. See signal(7) for a list of available signals.\n\n

    \n
    var spawn = require('child_process').spawn,\n    grep  = spawn('grep', ['ssh']);\n\ngrep.on('close', function (code, signal) {\n  console.log('child process terminated due to receipt of signal '+signal);\n});\n\n// send SIGHUP to process\ngrep.kill('SIGHUP');
    \n

    May emit an 'error' event when the signal cannot be delivered. Sending a\nsignal to a child process that has already exited is not an error but may\nhave unforeseen consequences: if the PID (the process ID) has been reassigned\nto another process, the signal will be delivered to that process instead.\nWhat happens next is anyone's guess.\n\n

    \n

    Note that while the function is called kill, the signal delivered to the\nchild process may not actually kill it. kill really just sends a signal\nto a process.\n\n

    \n

    See kill(2)\n\n

    \n" - }, - { - "textRaw": "child.send(message, [sendHandle])", - "type": "method", - "name": "send", - "signatures": [ - { - "params": [ - { - "textRaw": "`message` {Object} ", - "name": "message", - "type": "Object" - }, - { - "textRaw": "`sendHandle` {Handle object} ", - "name": "sendHandle", - "type": "Handle object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "message" - }, - { - "name": "sendHandle", - "optional": true - } - ] - } - ], - "desc": "

    When using child_process.fork() you can write to the child using\nchild.send(message, [sendHandle]) and messages are received by\na 'message' event on the child.\n\n

    \n

    For example:\n\n

    \n
    var cp = require('child_process');\n\nvar n = cp.fork(__dirname + '/sub.js');\n\nn.on('message', function(m) {\n  console.log('PARENT got message:', m);\n});\n\nn.send({ hello: 'world' });
    \n

    And then the child script, 'sub.js' might look like this:\n\n

    \n
    process.on('message', function(m) {\n  console.log('CHILD got message:', m);\n});\n\nprocess.send({ foo: 'bar' });
    \n

    In the child the process object will have a send() method, and process\nwill emit objects each time it receives a message on its channel.\n\n

    \n

    There is a special case when sending a {cmd: 'NODE_foo'} message. All messages\ncontaining a NODE_ prefix in its cmd property will not be emitted in\nthe message event, since they are internal messages used by node core.\nMessages containing the prefix are emitted in the internalMessage event, you\nshould by all means avoid using this feature, it is subject to change without notice.\n\n

    \n

    The sendHandle option to child.send() is for sending a TCP server or\nsocket object to another process. The child will receive the object as its\nsecond argument to the message event.\n\n

    \n

    Emits an 'error' event if the message cannot be sent, for example because\nthe child process has already exited.\n\n

    \n

    Example: sending server object

    \n

    Here is an example of sending a server:\n\n

    \n
    var child = require('child_process').fork('child.js');\n\n// Open up the server object and send the handle.\nvar server = require('net').createServer();\nserver.on('connection', function (socket) {\n  socket.end('handled by parent');\n});\nserver.listen(1337, function() {\n  child.send('server', server);\n});
    \n

    And the child would the receive the server object as:\n\n

    \n
    process.on('message', function(m, server) {\n  if (m === 'server') {\n    server.on('connection', function (socket) {\n      socket.end('handled by child');\n    });\n  }\n});
    \n

    Note that the server is now shared between the parent and child, this means\nthat some connections will be handled by the parent and some by the child.\n\n

    \n

    For dgram servers the workflow is exactly the same. Here you listen on\na message event instead of connection and use server.bind instead of\nserver.listen. (Currently only supported on UNIX platforms.)\n\n

    \n

    Example: sending socket object

    \n

    Here is an example of sending a socket. It will spawn two children and handle\nconnections with the remote address 74.125.127.100 as VIP by sending the\nsocket to a "special" child process. Other sockets will go to a "normal" process.\n\n

    \n
    var normal = require('child_process').fork('child.js', ['normal']);\nvar special = require('child_process').fork('child.js', ['special']);\n\n// Open up the server and send sockets to child\nvar server = require('net').createServer();\nserver.on('connection', function (socket) {\n\n  // if this is a VIP\n  if (socket.remoteAddress === '74.125.127.100') {\n    special.send('socket', socket);\n    return;\n  }\n  // just the usual dudes\n  normal.send('socket', socket);\n});\nserver.listen(1337);
    \n

    The child.js could look like this:\n\n

    \n
    process.on('message', function(m, socket) {\n  if (m === 'socket') {\n    socket.end('You were handled as a ' + process.argv[2] + ' person');\n  }\n});
    \n

    Note that once a single socket has been sent to a child the parent can no\nlonger keep track of when the socket is destroyed. To indicate this condition\nthe .connections property becomes null.\nIt is also recommended not to use .maxConnections in this condition.\n\n

    \n" - }, - { - "textRaw": "child.disconnect()", - "type": "method", - "name": "disconnect", - "desc": "

    Close the IPC channel between parent and child, allowing the child to exit\ngracefully once there are no other connections keeping it alive. After calling\nthis method the .connected flag will be set to false in both the parent and\nchild, and it is no longer possible to send messages.\n\n

    \n

    The 'disconnect' event will be emitted when there are no messages in the process\nof being received, most likely immediately.\n\n

    \n

    Note that you can also call process.disconnect() in the child process.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - } - ], - "methods": [ - { - "textRaw": "child_process.spawn(command, [args], [options])", - "type": "method", - "name": "spawn", - "signatures": [ - { - "return": { - "textRaw": "return: {ChildProcess object} ", - "name": "return", - "type": "ChildProcess object" - }, - "params": [ - { - "textRaw": "`command` {String} The command to run ", - "name": "command", - "type": "String", - "desc": "The command to run" - }, - { - "textRaw": "`args` {Array} List of string arguments ", - "name": "args", - "type": "Array", - "desc": "List of string arguments", - "optional": true - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`cwd` {String} Current working directory of the child process ", - "name": "cwd", - "type": "String", - "desc": "Current working directory of the child process" - }, - { - "textRaw": "`stdio` {Array|String} Child's stdio configuration. (See below) ", - "name": "stdio", - "type": "Array|String", - "desc": "Child's stdio configuration. (See below)" - }, - { - "textRaw": "`customFds` {Array} **Deprecated** File descriptors for the child to use for stdio. (See below) ", - "name": "customFds", - "type": "Array", - "desc": "**Deprecated** File descriptors for the child to use for stdio. (See below)" - }, - { - "textRaw": "`env` {Object} Environment key-value pairs ", - "name": "env", - "type": "Object", - "desc": "Environment key-value pairs" - }, - { - "textRaw": "`detached` {Boolean} The child will be a process group leader. (See below) ", - "name": "detached", - "type": "Boolean", - "desc": "The child will be a process group leader. (See below)" - }, - { - "textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ", - "name": "uid", - "type": "Number", - "desc": "Sets the user identity of the process. (See setuid(2).)" - }, - { - "textRaw": "`gid` {Number} Sets the group identity of the process. (See setgid(2).) ", - "name": "gid", - "type": "Number", - "desc": "Sets the group identity of the process. (See setgid(2).)" - } - ], - "name": "options", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "command" - }, - { - "name": "args", - "optional": true - }, - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    Launches a new process with the given command, with command line arguments in args.\nIf omitted, args defaults to an empty Array.\n\n

    \n

    The third argument is used to specify additional options, which defaults to:\n\n

    \n
    { cwd: undefined,\n  env: process.env\n}
    \n

    cwd allows you to specify the working directory from which the process is spawned.\nUse env to specify environment variables that will be visible to the new process.\n\n

    \n

    Example of running ls -lh /usr, capturing stdout, stderr, and the exit code:\n\n

    \n
    var spawn = require('child_process').spawn,\n    ls    = spawn('ls', ['-lh', '/usr']);\n\nls.stdout.on('data', function (data) {\n  console.log('stdout: ' + data);\n});\n\nls.stderr.on('data', function (data) {\n  console.log('stderr: ' + data);\n});\n\nls.on('close', function (code) {\n  console.log('child process exited with code ' + code);\n});
    \n

    Example: A very elaborate way to run 'ps ax | grep ssh'\n\n

    \n
    var spawn = require('child_process').spawn,\n    ps    = spawn('ps', ['ax']),\n    grep  = spawn('grep', ['ssh']);\n\nps.stdout.on('data', function (data) {\n  grep.stdin.write(data);\n});\n\nps.stderr.on('data', function (data) {\n  console.log('ps stderr: ' + data);\n});\n\nps.on('close', function (code) {\n  if (code !== 0) {\n    console.log('ps process exited with code ' + code);\n  }\n  grep.stdin.end();\n});\n\ngrep.stdout.on('data', function (data) {\n  console.log('' + data);\n});\n\ngrep.stderr.on('data', function (data) {\n  console.log('grep stderr: ' + data);\n});\n\ngrep.on('close', function (code) {\n  if (code !== 0) {\n    console.log('grep process exited with code ' + code);\n  }\n});
    \n

    Example of checking for failed exec:\n\n

    \n
    var spawn = require('child_process').spawn,\n    child = spawn('bad_command');\n\nchild.stderr.setEncoding('utf8');\nchild.stderr.on('data', function (data) {\n  if (/^execvp\\(\\)/.test(data)) {\n    console.log('Failed to start child process.');\n  }\n});
    \n

    Note that if spawn receives an empty options object, it will result in\nspawning the process with an empty environment rather than using\nprocess.env. This due to backwards compatibility issues with a deprecated\nAPI.\n\n

    \n

    The 'stdio' option to child_process.spawn() is an array where each\nindex corresponds to a fd in the child. The value is one of the following:\n\n

    \n
      \n
    1. 'pipe' - Create a pipe between the child process and the parent process.\nThe parent end of the pipe is exposed to the parent as a property on the\nchild_process object as ChildProcess.stdio[fd]. Pipes created for\nfds 0 - 2 are also available as ChildProcess.stdin, ChildProcess.stdout\nand ChildProcess.stderr, respectively.
    2. \n
    3. 'ipc' - Create an IPC channel for passing messages/file descriptors\nbetween parent and child. A ChildProcess may have at most one IPC stdio\nfile descriptor. Setting this option enables the ChildProcess.send() method.\nIf the child writes JSON messages to this file descriptor, then this will\ntrigger ChildProcess.on('message'). If the child is a Node.js program, then\nthe presence of an IPC channel will enable process.send() and\nprocess.on('message').
    4. \n
    5. 'ignore' - Do not set this file descriptor in the child. Note that Node\nwill always open fd 0 - 2 for the processes it spawns. When any of these is\nignored node will open /dev/null and attach it to the child's fd.
    6. \n
    7. Stream object - Share a readable or writable stream that refers to a tty,\nfile, socket, or a pipe with the child process. The stream's underlying\nfile descriptor is duplicated in the child process to the fd that \ncorresponds to the index in the stdio array.
    8. \n
    9. Positive integer - The integer value is interpreted as a file descriptor \nthat is is currently open in the parent process. It is shared with the child\nprocess, similar to how Stream objects can be shared.
    10. \n
    11. null, undefined - Use default value. For stdio fds 0, 1 and 2 (in other\nwords, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the\ndefault is 'ignore'.
    12. \n
    \n

    As a shorthand, the stdio argument may also be one of the following\nstrings, rather than an array:\n\n

    \n
      \n
    • ignore - ['ignore', 'ignore', 'ignore']
    • \n
    • pipe - ['pipe', 'pipe', 'pipe']
    • \n
    • inherit - [process.stdin, process.stdout, process.stderr] or [0,1,2]
    • \n
    \n

    Example:\n\n

    \n
    var spawn = require('child_process').spawn;\n\n// Child will use parent's stdios\nspawn('prg', [], { stdio: 'inherit' });\n\n// Spawn child sharing only stderr\nspawn('prg', [], { stdio: ['pipe', 'pipe', process.stderr] });\n\n// Open an extra fd=4, to interact with programs present a\n// startd-style interface.\nspawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
    \n

    If the detached option is set, the child process will be made the leader of a\nnew process group. This makes it possible for the child to continue running \nafter the parent exits.\n\n

    \n

    By default, the parent will wait for the detached child to exit. To prevent\nthe parent from waiting for a given child, use the child.unref() method,\nand the parent's event loop will not include the child in its reference count.\n\n

    \n

    Example of detaching a long-running process and redirecting its output to a\nfile:\n\n

    \n
     var fs = require('fs'),\n     spawn = require('child_process').spawn,\n     out = fs.openSync('./out.log', 'a'),\n     err = fs.openSync('./out.log', 'a');\n\n var child = spawn('prg', [], {\n   detached: true,\n   stdio: [ 'ignore', out, err ]\n });\n\n child.unref();
    \n

    When using the detached option to start a long-running process, the process\nwill not stay running in the background unless it is provided with a stdio\nconfiguration that is not connected to the parent. If the parent's stdio is\ninherited, the child will remain attached to the controlling terminal.\n\n

    \n

    There is a deprecated option called customFds which allows one to specify\nspecific file descriptors for the stdio of the child process. This API was\nnot portable to all platforms and therefore removed.\nWith customFds it was possible to hook up the new process' [stdin, stdout,\nstderr] to existing streams; -1 meant that a new stream should be created.\nUse at your own risk.\n\n

    \n

    See also: child_process.exec() and child_process.fork()\n\n

    \n" - }, - { - "textRaw": "child_process.exec(command, [options], callback)", - "type": "method", - "name": "exec", - "signatures": [ - { - "return": { - "textRaw": "Return: ChildProcess object ", - "name": "return", - "desc": "ChildProcess object" - }, - "params": [ - { - "textRaw": "`command` {String} The command to run, with space-separated arguments ", - "name": "command", - "type": "String", - "desc": "The command to run, with space-separated arguments" - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`cwd` {String} Current working directory of the child process ", - "name": "cwd", - "type": "String", - "desc": "Current working directory of the child process" - }, - { - "textRaw": "`env` {Object} Environment key-value pairs ", - "name": "env", - "type": "Object", - "desc": "Environment key-value pairs" - }, - { - "textRaw": "`encoding` {String} (Default: 'utf8') ", - "name": "encoding", - "default": "utf8", - "type": "String" - }, - { - "textRaw": "`timeout` {Number} (Default: 0) ", - "name": "timeout", - "default": "0", - "type": "Number" - }, - { - "textRaw": "`maxBuffer` {Number} (Default: `200*1024`) ", - "name": "maxBuffer", - "default": "200*1024", - "type": "Number" - }, - { - "textRaw": "`killSignal` {String} (Default: 'SIGTERM') ", - "name": "killSignal", - "default": "SIGTERM", - "type": "String" - } - ], - "name": "options", - "type": "Object", - "optional": true - }, - { - "textRaw": "`callback` {Function} called with the output when process terminates ", - "options": [ - { - "textRaw": "`error` {Error} ", - "name": "error", - "type": "Error" - }, - { - "textRaw": "`stdout` {Buffer} ", - "name": "stdout", - "type": "Buffer" - }, - { - "textRaw": "`stderr` {Buffer} ", - "name": "stderr", - "type": "Buffer" - } - ], - "name": "callback", - "type": "Function", - "desc": "called with the output when process terminates" - } - ] - }, - { - "params": [ - { - "name": "command" - }, - { - "name": "options", - "optional": true - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Runs a command in a shell and buffers the output.\n\n

    \n
    var exec = require('child_process').exec,\n    child;\n\nchild = exec('cat *.js bad_file | wc -l',\n  function (error, stdout, stderr) {\n    console.log('stdout: ' + stdout);\n    console.log('stderr: ' + stderr);\n    if (error !== null) {\n      console.log('exec error: ' + error);\n    }\n});
    \n

    The callback gets the arguments (error, stdout, stderr). On success, error\nwill be null. On error, error will be an instance of Error and err.code\nwill be the exit code of the child process, and err.signal will be set to the\nsignal that terminated the process.\n\n

    \n

    There is a second optional argument to specify several options. The\ndefault options are\n\n

    \n
    { encoding: 'utf8',\n  timeout: 0,\n  maxBuffer: 200*1024,\n  killSignal: 'SIGTERM',\n  cwd: null,\n  env: null }
    \n

    If timeout is greater than 0, then it will kill the child process\nif it runs longer than timeout milliseconds. The child process is killed with\nkillSignal (default: 'SIGTERM'). maxBuffer specifies the largest\namount of data allowed on stdout or stderr - if this value is exceeded then\nthe child process is killed.\n\n\n

    \n" - }, - { - "textRaw": "child_process.execFile(file, args, options, callback)", - "type": "method", - "name": "execFile", - "signatures": [ - { - "return": { - "textRaw": "Return: ChildProcess object ", - "name": "return", - "desc": "ChildProcess object" - }, - "params": [ - { - "textRaw": "`file` {String} The filename of the program to run ", - "name": "file", - "type": "String", - "desc": "The filename of the program to run" - }, - { - "textRaw": "`args` {Array} List of string arguments ", - "name": "args", - "type": "Array", - "desc": "List of string arguments" - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`cwd` {String} Current working directory of the child process ", - "name": "cwd", - "type": "String", - "desc": "Current working directory of the child process" - }, - { - "textRaw": "`env` {Object} Environment key-value pairs ", - "name": "env", - "type": "Object", - "desc": "Environment key-value pairs" - }, - { - "textRaw": "`encoding` {String} (Default: 'utf8') ", - "name": "encoding", - "default": "utf8", - "type": "String" - }, - { - "textRaw": "`timeout` {Number} (Default: 0) ", - "name": "timeout", - "default": "0", - "type": "Number" - }, - { - "textRaw": "`maxBuffer` {Number} (Default: 200\\*1024) ", - "name": "maxBuffer", - "default": "200\\*1024", - "type": "Number" - }, - { - "textRaw": "`killSignal` {String} (Default: 'SIGTERM') ", - "name": "killSignal", - "default": "SIGTERM", - "type": "String" - } - ], - "name": "options", - "type": "Object" - }, - { - "textRaw": "`callback` {Function} called with the output when process terminates ", - "options": [ - { - "textRaw": "`error` {Error} ", - "name": "error", - "type": "Error" - }, - { - "textRaw": "`stdout` {Buffer} ", - "name": "stdout", - "type": "Buffer" - }, - { - "textRaw": "`stderr` {Buffer} ", - "name": "stderr", - "type": "Buffer" - } - ], - "name": "callback", - "type": "Function", - "desc": "called with the output when process terminates" - } - ] - }, - { - "params": [ - { - "name": "file" - }, - { - "name": "args" - }, - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    This is similar to child_process.exec() except it does not execute a\nsubshell but rather the specified file directly. This makes it slightly\nleaner than child_process.exec. It has the same options.\n\n\n

    \n" - }, - { - "textRaw": "child_process.fork(modulePath, [args], [options])", - "type": "method", - "name": "fork", - "signatures": [ - { - "return": { - "textRaw": "Return: ChildProcess object ", - "name": "return", - "desc": "ChildProcess object" - }, - "params": [ - { - "textRaw": "`modulePath` {String} The module to run in the child ", - "name": "modulePath", - "type": "String", - "desc": "The module to run in the child" - }, - { - "textRaw": "`args` {Array} List of string arguments ", - "name": "args", - "type": "Array", - "desc": "List of string arguments", - "optional": true - }, - { - "textRaw": "`options` {Object} ", - "options": [ - { - "textRaw": "`cwd` {String} Current working directory of the child process ", - "name": "cwd", - "type": "String", - "desc": "Current working directory of the child process" - }, - { - "textRaw": "`env` {Object} Environment key-value pairs ", - "name": "env", - "type": "Object", - "desc": "Environment key-value pairs" - }, - { - "textRaw": "`encoding` {String} (Default: 'utf8') ", - "name": "encoding", - "default": "utf8", - "type": "String" - }, - { - "textRaw": "`execPath` {String} Executable used to create the child process ", - "name": "execPath", - "type": "String", - "desc": "Executable used to create the child process" - }, - { - "textRaw": "`silent` {Boolean} If true, prevent stdout and stderr in the spawned node process from being associated with the parent's (default is false) ", - "name": "silent", - "type": "Boolean", - "desc": "If true, prevent stdout and stderr in the spawned node process from being associated with the parent's (default is false)" - } - ], - "name": "options", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "modulePath" - }, - { - "name": "args", - "optional": true - }, - { - "name": "options", - "optional": true - } - ] - } - ], - "desc": "

    This is a special case of the spawn() functionality for spawning Node\nprocesses. In addition to having all the methods in a normal ChildProcess\ninstance, the returned object has a communication channel built-in. See\nchild.send(message, [sendHandle]) for details.\n\n

    \n

    These child Nodes are still whole new instances of V8. Assume at least 30ms\nstartup and 10mb memory for each new Node. That is, you cannot create many\nthousands of them.\n\n

    \n

    The execPath property in the options object allows for a process to be\ncreated for the child rather than the current node executable. This should be\ndone with care and by default will talk over the fd represented an\nenvironmental variable NODE_CHANNEL_FD on the child process. The input and\noutput on this fd is expected to be line delimited JSON objects.\n\n

    \n" - } - ], - "type": "module", - "displayName": "Child Process" - }, - { - "textRaw": "Assert", - "name": "assert", - "stability": 5, - "stabilityText": "Locked", - "desc": "

    This module is used for writing unit tests for your applications, you can\naccess it with require('assert').\n\n

    \n", - "methods": [ - { - "textRaw": "assert.fail(actual, expected, message, operator)", - "type": "method", - "name": "fail", - "desc": "

    Throws an exception that displays the values for actual and expected separated by the provided operator.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message" - }, - { - "name": "operator" - } - ] - } - ] - }, - { - "textRaw": "assert(value, message), assert.ok(value, [message])", - "type": "method", - "name": "ok", - "desc": "

    Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "value" - }, - { - "name": "message)" - }, - { - "name": "assert.ok(value" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.equal(actual, expected, [message])", - "type": "method", - "name": "equal", - "desc": "

    Tests shallow, coercive equality with the equal comparison operator ( == ).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.notEqual(actual, expected, [message])", - "type": "method", - "name": "notEqual", - "desc": "

    Tests shallow, coercive non-equality with the not equal comparison operator ( != ).\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.deepEqual(actual, expected, [message])", - "type": "method", - "name": "deepEqual", - "desc": "

    Tests for deep equality.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.notDeepEqual(actual, expected, [message])", - "type": "method", - "name": "notDeepEqual", - "desc": "

    Tests for any deep inequality.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.strictEqual(actual, expected, [message])", - "type": "method", - "name": "strictEqual", - "desc": "

    Tests strict equality, as determined by the strict equality operator ( === )\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.notStrictEqual(actual, expected, [message])", - "type": "method", - "name": "notStrictEqual", - "desc": "

    Tests strict non-equality, as determined by the strict not equal operator ( !== )\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "actual" - }, - { - "name": "expected" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.throws(block, [error], [message])", - "type": "method", - "name": "throws", - "desc": "

    Expects block to throw an error. error can be constructor, regexp or \nvalidation function.\n\n

    \n

    Validate instanceof using constructor:\n\n

    \n
    assert.throws(\n  function() {\n    throw new Error("Wrong value");\n  },\n  Error\n);
    \n

    Validate error message using RegExp:\n\n

    \n
    assert.throws(\n  function() {\n    throw new Error("Wrong value");\n  },\n  /value/\n);
    \n

    Custom error validation:\n\n

    \n
    assert.throws(\n  function() {\n    throw new Error("Wrong value");\n  },\n  function(err) {\n    if ( (err instanceof Error) && /value/.test(err) ) {\n      return true;\n    }\n  },\n  "unexpected error"\n);
    \n", - "signatures": [ - { - "params": [ - { - "name": "block" - }, - { - "name": "error", - "optional": true - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.doesNotThrow(block, [message])", - "type": "method", - "name": "doesNotThrow", - "desc": "

    Expects block not to throw an error, see assert.throws for details.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "block" - }, - { - "name": "message", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "assert.ifError(value)", - "type": "method", - "name": "ifError", - "desc": "

    Tests if value is not a false value, throws if it is a true value. Useful when\ntesting the first argument, error in callbacks.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "value" - } - ] - } - ] - } - ], - "type": "module", - "displayName": "Assert" - }, - { - "textRaw": "TTY", - "name": "tty", - "stability": 2, - "stabilityText": "Unstable", - "desc": "

    The tty module houses the tty.ReadStream and tty.WriteStream classes. In\nmost cases, you will not need to use this module directly.\n\n

    \n

    When node detects that it is being run inside a TTY context, then process.stdin\nwill be a tty.ReadStream instance and process.stdout will be\na tty.WriteStream instance. The preferred way to check if node is being run in\na TTY context is to check process.stdout.isTTY:\n\n

    \n
    $ node -p -e "Boolean(process.stdout.isTTY)"\ntrue\n$ node -p -e "Boolean(process.stdout.isTTY)" | cat\nfalse
    \n", - "methods": [ - { - "textRaw": "tty.isatty(fd)", - "type": "method", - "name": "isatty", - "desc": "

    Returns true or false depending on if the fd is associated with a\nterminal.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "fd" - } - ] - } - ] - }, - { - "textRaw": "tty.setRawMode(mode)", - "type": "method", - "name": "setRawMode", - "desc": "

    Deprecated. Use tty.ReadStream#setRawMode()\n(i.e. process.stdin.setRawMode()) instead.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "mode" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: ReadStream", - "type": "class", - "name": "ReadStream", - "desc": "

    A net.Socket subclass that represents the readable portion of a tty. In normal\ncircumstances, process.stdin will be the only tty.ReadStream instance in any\nnode program (only when isatty(0) is true).\n\n

    \n", - "properties": [ - { - "textRaw": "rs.isRaw", - "name": "isRaw", - "desc": "

    A Boolean that is initialized to false. It represents the current "raw" state\nof the tty.ReadStream instance.\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "rs.setRawMode(mode)", - "type": "method", - "name": "setRawMode", - "desc": "

    mode should be true or false. This sets the properties of the\ntty.ReadStream to act either as a raw device or default. isRaw will be set\nto the resulting mode.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "mode" - } - ] - } - ] - } - ] - }, - { - "textRaw": "Class: WriteStream", - "type": "class", - "name": "WriteStream", - "desc": "

    A net.Socket subclass that represents the writable portion of a tty. In normal\ncircumstances, process.stdout will be the only tty.WriteStream instance\never created (and only when isatty(1) is true).\n\n

    \n", - "properties": [ - { - "textRaw": "ws.columns", - "name": "columns", - "desc": "

    A Number that gives the number of columns the TTY currently has. This property\ngets updated on "resize" events.\n\n

    \n" - }, - { - "textRaw": "ws.rows", - "name": "rows", - "desc": "

    A Number that gives the number of rows the TTY currently has. This property\ngets updated on "resize" events.\n\n

    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'resize'", - "type": "event", - "name": "resize", - "desc": "

    function () {}\n\n

    \n

    Emitted by refreshSize() when either of the columns or rows properties\nhas changed.\n\n

    \n
    process.stdout.on('resize', function() {\n  console.log('screen size has changed!');\n  console.log(process.stdout.columns + 'x' + process.stdout.rows);\n});
    \n", - "params": [] - } - ] - } - ], - "type": "module", - "displayName": "TTY" - }, - { - "textRaw": "Zlib", - "name": "zlib", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    You can access this module with:\n\n

    \n
    var zlib = require('zlib');
    \n

    This provides bindings to Gzip/Gunzip, Deflate/Inflate, and\nDeflateRaw/InflateRaw classes. Each class takes the same options, and\nis a readable/writable Stream.\n\n

    \n

    Examples

    \n

    Compressing or decompressing a file can be done by piping an\nfs.ReadStream into a zlib stream, then into an fs.WriteStream.\n\n

    \n
    var gzip = zlib.createGzip();\nvar fs = require('fs');\nvar inp = fs.createReadStream('input.txt');\nvar out = fs.createWriteStream('input.txt.gz');\n\ninp.pipe(gzip).pipe(out);
    \n

    Compressing or decompressing data in one step can be done by using\nthe convenience methods.\n\n

    \n
    var input = '.................................';\nzlib.deflate(input, function(err, buffer) {\n  if (!err) {\n    console.log(buffer.toString('base64'));\n  }\n});\n\nvar buffer = new Buffer('eJzT0yMAAGTvBe8=', 'base64');\nzlib.unzip(buffer, function(err, buffer) {\n  if (!err) {\n    console.log(buffer.toString());\n  }\n});
    \n

    To use this module in an HTTP client or server, use the\naccept-encoding\non requests, and the\ncontent-encoding\nheader on responses.\n\n

    \n

    Note: these examples are drastically simplified to show\nthe basic concept. Zlib encoding can be expensive, and the results\nought to be cached. See Memory Usage Tuning\nbelow for more information on the speed/memory/compression\ntradeoffs involved in zlib usage.\n\n

    \n
    // client request example\nvar zlib = require('zlib');\nvar http = require('http');\nvar fs = require('fs');\nvar request = http.get({ host: 'izs.me',\n                         path: '/',\n                         port: 80,\n                         headers: { 'accept-encoding': 'gzip,deflate' } });\nrequest.on('response', function(response) {\n  var output = fs.createWriteStream('izs.me_index.html');\n\n  switch (response.headers['content-encoding']) {\n    // or, just use zlib.createUnzip() to handle both cases\n    case 'gzip':\n      response.pipe(zlib.createGunzip()).pipe(output);\n      break;\n    case 'deflate':\n      response.pipe(zlib.createInflate()).pipe(output);\n      break;\n    default:\n      response.pipe(output);\n      break;\n  }\n});\n\n// server example\n// Running a gzip operation on every request is quite expensive.\n// It would be much more efficient to cache the compressed buffer.\nvar zlib = require('zlib');\nvar http = require('http');\nvar fs = require('fs');\nhttp.createServer(function(request, response) {\n  var raw = fs.createReadStream('index.html');\n  var acceptEncoding = request.headers['accept-encoding'];\n  if (!acceptEncoding) {\n    acceptEncoding = '';\n  }\n\n  // Note: this is not a conformant accept-encoding parser.\n  // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3\n  if (acceptEncoding.match(/\\bdeflate\\b/)) {\n    response.writeHead(200, { 'content-encoding': 'deflate' });\n    raw.pipe(zlib.createDeflate()).pipe(response);\n  } else if (acceptEncoding.match(/\\bgzip\\b/)) {\n    response.writeHead(200, { 'content-encoding': 'gzip' });\n    raw.pipe(zlib.createGzip()).pipe(response);\n  } else {\n    response.writeHead(200, {});\n    raw.pipe(response);\n  }\n}).listen(1337);
    \n", - "methods": [ - { - "textRaw": "zlib.createGzip([options])", - "type": "method", - "name": "createGzip", - "desc": "

    Returns a new Gzip object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createGunzip([options])", - "type": "method", - "name": "createGunzip", - "desc": "

    Returns a new Gunzip object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createDeflate([options])", - "type": "method", - "name": "createDeflate", - "desc": "

    Returns a new Deflate object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createInflate([options])", - "type": "method", - "name": "createInflate", - "desc": "

    Returns a new Inflate object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createDeflateRaw([options])", - "type": "method", - "name": "createDeflateRaw", - "desc": "

    Returns a new DeflateRaw object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createInflateRaw([options])", - "type": "method", - "name": "createInflateRaw", - "desc": "

    Returns a new InflateRaw object with an\noptions.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.createUnzip([options])", - "type": "method", - "name": "createUnzip", - "desc": "

    Returns a new Unzip object with an\noptions.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "options", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "zlib.deflate(buf, callback)", - "type": "method", - "name": "deflate", - "desc": "

    Compress a string with Deflate.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.deflateRaw(buf, callback)", - "type": "method", - "name": "deflateRaw", - "desc": "

    Compress a string with DeflateRaw.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.gzip(buf, callback)", - "type": "method", - "name": "gzip", - "desc": "

    Compress a string with Gzip.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.gunzip(buf, callback)", - "type": "method", - "name": "gunzip", - "desc": "

    Decompress a raw Buffer with Gunzip.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.inflate(buf, callback)", - "type": "method", - "name": "inflate", - "desc": "

    Decompress a raw Buffer with Inflate.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.inflateRaw(buf, callback)", - "type": "method", - "name": "inflateRaw", - "desc": "

    Decompress a raw Buffer with InflateRaw.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.unzip(buf, callback)", - "type": "method", - "name": "unzip", - "desc": "

    Decompress a raw Buffer with Unzip.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "buf" - }, - { - "name": "callback" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: zlib.Zlib", - "type": "class", - "name": "zlib.Zlib", - "desc": "

    Not exported by the zlib module. It is documented here because it is the base\nclass of the compressor/decompressor classes.\n\n

    \n", - "methods": [ - { - "textRaw": "zlib.flush(callback)", - "type": "method", - "name": "flush", - "desc": "

    Flush pending data. Don't call this frivolously, premature flushes negatively\nimpact the effectiveness of the compression algorithm.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "zlib.reset()", - "type": "method", - "name": "reset", - "desc": "

    Reset the compressor/decompressor to factory defaults. Only applicable to\nthe inflate and deflate algorithms.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - } - ] - }, - { - "textRaw": "Class: zlib.Gzip", - "type": "class", - "name": "zlib.Gzip", - "desc": "

    Compress data using gzip.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.Gunzip", - "type": "class", - "name": "zlib.Gunzip", - "desc": "

    Decompress a gzip stream.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.Deflate", - "type": "class", - "name": "zlib.Deflate", - "desc": "

    Compress data using deflate.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.Inflate", - "type": "class", - "name": "zlib.Inflate", - "desc": "

    Decompress a deflate stream.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.DeflateRaw", - "type": "class", - "name": "zlib.DeflateRaw", - "desc": "

    Compress data using deflate, and do not append a zlib header.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.InflateRaw", - "type": "class", - "name": "zlib.InflateRaw", - "desc": "

    Decompress a raw deflate stream.\n\n

    \n" - }, - { - "textRaw": "Class: zlib.Unzip", - "type": "class", - "name": "zlib.Unzip", - "desc": "

    Decompress either a Gzip- or Deflate-compressed stream by auto-detecting\nthe header.\n\n

    \n" - } - ], - "miscs": [ - { - "textRaw": "Convenience Methods", - "name": "Convenience Methods", - "type": "misc", - "desc": "

    All of these take a string or buffer as the first argument, and call the\nsupplied callback with callback(error, result). The\ncompression/decompression engine is created using the default settings\nin all convenience methods. To supply different options, use the\nzlib classes directly.\n\n

    \n" - }, - { - "textRaw": "Options", - "name": "Options", - "type": "misc", - "desc": "

    Each class takes an options object. All options are optional. (The\nconvenience methods use the default settings for all options.)\n\n

    \n

    Note that some options are only relevant when compressing, and are\nignored by the decompression classes.\n\n

    \n
      \n
    • flush (default: zlib.Z_NO_FLUSH)
    • \n
    • chunkSize (default: 16*1024)
    • \n
    • windowBits
    • \n
    • level (compression only)
    • \n
    • memLevel (compression only)
    • \n
    • strategy (compression only)
    • \n
    • dictionary (deflate/inflate only, empty dictionary by default)
    • \n
    \n

    See the description of deflateInit2 and inflateInit2 at\n

    \n

    http://zlib.net/manual.html#Advanced for more information on these.\n\n

    \n" - }, - { - "textRaw": "Memory Usage Tuning", - "name": "Memory Usage Tuning", - "type": "misc", - "desc": "

    From zlib/zconf.h, modified to node's usage:\n\n

    \n

    The memory requirements for deflate are (in bytes):\n\n

    \n
    (1 << (windowBits+2)) +  (1 << (memLevel+9))
    \n

    that is: 128K for windowBits=15 + 128K for memLevel = 8\n(default values) plus a few kilobytes for small objects.\n\n

    \n

    For example, if you want to reduce\nthe default memory requirements from 256K to 128K, set the options to:\n\n

    \n
    { windowBits: 14, memLevel: 7 }
    \n

    Of course this will generally degrade compression (there's no free lunch).\n\n

    \n

    The memory requirements for inflate are (in bytes)\n\n

    \n
    1 << windowBits
    \n

    that is, 32K for windowBits=15 (default value) plus a few kilobytes\nfor small objects.\n\n

    \n

    This is in addition to a single internal output slab buffer of size\nchunkSize, which defaults to 16K.\n\n

    \n

    The speed of zlib compression is affected most dramatically by the\nlevel setting. A higher level will result in better compression, but\nwill take longer to complete. A lower level will result in less\ncompression, but will be much faster.\n\n

    \n

    In general, greater memory usage options will mean that node has to make\nfewer calls to zlib, since it'll be able to process more data in a\nsingle write operation. So, this is another factor that affects the\nspeed, at the cost of memory usage.\n\n

    \n" - }, - { - "textRaw": "Constants", - "name": "Constants", - "type": "misc", - "desc": "

    All of the constants defined in zlib.h are also defined on\nrequire('zlib').\nIn the normal course of operations, you will not need to ever set any of\nthese. They are documented here so that their presence is not\nsurprising. This section is taken almost directly from the zlib\ndocumentation. See\n

    \n

    http://zlib.net/manual.html#Constants for more details.\n\n

    \n

    Allowed flush values.\n\n

    \n
      \n
    • zlib.Z_NO_FLUSH
    • \n
    • zlib.Z_PARTIAL_FLUSH
    • \n
    • zlib.Z_SYNC_FLUSH
    • \n
    • zlib.Z_FULL_FLUSH
    • \n
    • zlib.Z_FINISH
    • \n
    • zlib.Z_BLOCK
    • \n
    • zlib.Z_TREES
    • \n
    \n

    Return codes for the compression/decompression functions. Negative\nvalues are errors, positive values are used for special but normal\nevents.\n\n

    \n
      \n
    • zlib.Z_OK
    • \n
    • zlib.Z_STREAM_END
    • \n
    • zlib.Z_NEED_DICT
    • \n
    • zlib.Z_ERRNO
    • \n
    • zlib.Z_STREAM_ERROR
    • \n
    • zlib.Z_DATA_ERROR
    • \n
    • zlib.Z_MEM_ERROR
    • \n
    • zlib.Z_BUF_ERROR
    • \n
    • zlib.Z_VERSION_ERROR
    • \n
    \n

    Compression levels.\n\n

    \n
      \n
    • zlib.Z_NO_COMPRESSION
    • \n
    • zlib.Z_BEST_SPEED
    • \n
    • zlib.Z_BEST_COMPRESSION
    • \n
    • zlib.Z_DEFAULT_COMPRESSION
    • \n
    \n

    Compression strategy.\n\n

    \n
      \n
    • zlib.Z_FILTERED
    • \n
    • zlib.Z_HUFFMAN_ONLY
    • \n
    • zlib.Z_RLE
    • \n
    • zlib.Z_FIXED
    • \n
    • zlib.Z_DEFAULT_STRATEGY
    • \n
    \n

    Possible values of the data_type field.\n\n

    \n
      \n
    • zlib.Z_BINARY
    • \n
    • zlib.Z_TEXT
    • \n
    • zlib.Z_ASCII
    • \n
    • zlib.Z_UNKNOWN
    • \n
    \n

    The deflate compression method (the only one supported in this version).\n\n

    \n
      \n
    • zlib.Z_DEFLATED
    • \n
    \n

    For initializing zalloc, zfree, opaque.\n\n

    \n
      \n
    • zlib.Z_NULL
    • \n
    \n" - } - ], - "type": "module", - "displayName": "Zlib" - }, - { - "textRaw": "os", - "name": "os", - "stability": 4, - "stabilityText": "API Frozen", - "desc": "

    Provides a few basic operating-system related utility functions.\n\n

    \n

    Use require('os') to access this module.\n\n

    \n", - "methods": [ - { - "textRaw": "os.tmpdir()", - "type": "method", - "name": "tmpdir", - "desc": "

    Returns the operating system's default directory for temp files.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.endianness()", - "type": "method", - "name": "endianness", - "desc": "

    Returns the endianness of the CPU. Possible values are "BE" or "LE".\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.hostname()", - "type": "method", - "name": "hostname", - "desc": "

    Returns the hostname of the operating system.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.type()", - "type": "method", - "name": "type", - "desc": "

    Returns the operating system name.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.platform()", - "type": "method", - "name": "platform", - "desc": "

    Returns the operating system platform.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.arch()", - "type": "method", - "name": "arch", - "desc": "

    Returns the operating system CPU architecture.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.release()", - "type": "method", - "name": "release", - "desc": "

    Returns the operating system release.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.uptime()", - "type": "method", - "name": "uptime", - "desc": "

    Returns the system uptime in seconds.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.loadavg()", - "type": "method", - "name": "loadavg", - "desc": "

    Returns an array containing the 1, 5, and 15 minute load averages.\n\n

    \n

    The load average is a measure of system activity, calculated by the operating\nsystem and expressed as a fractional number. As a rule of thumb, the load\naverage should ideally be less than the number of logical CPUs in the system.\n\n

    \n

    The load average is a very UNIX-y concept; there is no real equivalent on\nWindows platforms. That is why this function always returns [0, 0, 0] on\nWindows.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.totalmem()", - "type": "method", - "name": "totalmem", - "desc": "

    Returns the total amount of system memory in bytes.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.freemem()", - "type": "method", - "name": "freemem", - "desc": "

    Returns the amount of free system memory in bytes.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.cpus()", - "type": "method", - "name": "cpus", - "desc": "

    Returns an array of objects containing information about each CPU/core\ninstalled: model, speed (in MHz), and times (an object containing the number of\nmilliseconds the CPU/core spent in: user, nice, sys, idle, and irq).\n\n

    \n

    Example inspection of os.cpus:\n\n

    \n
    [ { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 252020,\n       nice: 0,\n       sys: 30340,\n       idle: 1070356870,\n       irq: 0 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 306960,\n       nice: 0,\n       sys: 26980,\n       idle: 1071569080,\n       irq: 0 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 248450,\n       nice: 0,\n       sys: 21750,\n       idle: 1070919370,\n       irq: 0 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 256880,\n       nice: 0,\n       sys: 19430,\n       idle: 1070905480,\n       irq: 20 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 511580,\n       nice: 20,\n       sys: 40900,\n       idle: 1070842510,\n       irq: 0 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 291660,\n       nice: 0,\n       sys: 34360,\n       idle: 1070888000,\n       irq: 10 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 308260,\n       nice: 0,\n       sys: 55410,\n       idle: 1071129970,\n       irq: 880 } },\n  { model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',\n    speed: 2926,\n    times:\n     { user: 266450,\n       nice: 1480,\n       sys: 34920,\n       idle: 1072572010,\n       irq: 30 } } ]
    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "os.networkInterfaces()", - "type": "method", - "name": "networkInterfaces", - "desc": "

    Get a list of network interfaces:\n\n

    \n
    { lo0: \n   [ { address: '::1', family: 'IPv6', internal: true },\n     { address: 'fe80::1', family: 'IPv6', internal: true },\n     { address: '127.0.0.1', family: 'IPv4', internal: true } ],\n  en1: \n   [ { address: 'fe80::cabc:c8ff:feef:f996', family: 'IPv6',\n       internal: false },\n     { address: '10.0.1.123', family: 'IPv4', internal: false } ],\n  vmnet1: [ { address: '10.99.99.254', family: 'IPv4', internal: false } ],\n  vmnet8: [ { address: '10.88.88.1', family: 'IPv4', internal: false } ],\n  ppp0: [ { address: '10.2.0.231', family: 'IPv4', internal: false } ] }
    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "properties": [ - { - "textRaw": "os.EOL", - "name": "EOL", - "desc": "

    A constant defining the appropriate End-of-line marker for the operating system.\n\n

    \n" - } - ], - "type": "module", - "displayName": "os" - }, - { - "textRaw": "Cluster", - "name": "cluster", - "stability": 1, - "stabilityText": "Experimental", - "desc": "

    A single instance of Node runs in a single thread. To take advantage of\nmulti-core systems the user will sometimes want to launch a cluster of Node\nprocesses to handle the load.\n\n

    \n

    The cluster module allows you to easily create child processes that\nall share server ports.\n\n

    \n
    var cluster = require('cluster');\nvar http = require('http');\nvar numCPUs = require('os').cpus().length;\n\nif (cluster.isMaster) {\n  // Fork workers.\n  for (var i = 0; i < numCPUs; i++) {\n    cluster.fork();\n  }\n\n  cluster.on('exit', function(worker, code, signal) {\n    console.log('worker ' + worker.process.pid + ' died');\n  });\n} else {\n  // Workers can share any TCP connection\n  // In this case its a HTTP server\n  http.createServer(function(req, res) {\n    res.writeHead(200);\n    res.end("hello world\\n");\n  }).listen(8000);\n}
    \n

    Running node will now share port 8000 between the workers:\n\n

    \n
    % NODE_DEBUG=cluster node server.js\n23521,Master Worker 23524 online\n23521,Master Worker 23526 online\n23521,Master Worker 23523 online\n23521,Master Worker 23528 online
    \n

    This feature was introduced recently, and may change in future versions.\nPlease try it out and provide feedback.\n\n

    \n

    Also note that, on Windows, it is not yet possible to set up a named pipe\nserver in a worker.\n\n

    \n", - "miscs": [ - { - "textRaw": "How It Works", - "name": "How It Works", - "type": "misc", - "desc": "

    The worker processes are spawned using the child_process.fork method,\nso that they can communicate with the parent via IPC and pass server\nhandles back and forth.\n\n

    \n

    When you call server.listen(...) in a worker, it serializes the\narguments and passes the request to the master process. If the master\nprocess already has a listening server matching the worker's\nrequirements, then it passes the handle to the worker. If it does not\nalready have a listening server matching that requirement, then it will\ncreate one, and pass the handle to the worker.\n\n

    \n

    This causes potentially surprising behavior in three edge cases:\n\n

    \n
      \n
    1. server.listen({fd: 7}) Because the message is passed to the master,\nfile descriptor 7 in the parent will be listened on, and the\nhandle passed to the worker, rather than listening to the worker's\nidea of what the number 7 file descriptor references.
    2. \n
    3. server.listen(handle) Listening on handles explicitly will cause\nthe worker to use the supplied handle, rather than talk to the master\nprocess. If the worker already has the handle, then it's presumed\nthat you know what you are doing.
    4. \n
    5. server.listen(0) Normally, this will cause servers to listen on a\nrandom port. However, in a cluster, each worker will receive the\nsame "random" port each time they do listen(0). In essence, the\nport is random the first time, but predictable thereafter. If you\nwant to listen on a unique port, generate a port number based on the\ncluster worker ID.
    6. \n
    \n

    When multiple processes are all accept()ing on the same underlying\nresource, the operating system load-balances across them very\nefficiently. There is no routing logic in Node.js, or in your program,\nand no shared state between the workers. Therefore, it is important to\ndesign your program such that it does not rely too heavily on in-memory\ndata objects for things like sessions and login.\n\n

    \n

    Because workers are all separate processes, they can be killed or\nre-spawned depending on your program's needs, without affecting other\nworkers. As long as there are some workers still alive, the server will\ncontinue to accept connections. Node does not automatically manage the\nnumber of workers for you, however. It is your responsibility to manage\nthe worker pool for your application's needs.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "`settings` {Object} ", - "name": "settings", - "options": [ - { - "textRaw": "`exec` {String} file path to worker file. (Default=`process.argv[1]`) ", - "name": "exec", - "default": "process.argv[1]", - "type": "String", - "desc": "file path to worker file." - }, - { - "textRaw": "`args` {Array} string arguments passed to worker. (Default=`process.argv.slice(2)`) ", - "name": "args", - "default": "process.argv.slice(2)", - "type": "Array", - "desc": "string arguments passed to worker." - }, - { - "textRaw": "`silent` {Boolean} whether or not to send output to parent's stdio. (Default=`false`) ", - "name": "silent", - "default": "false", - "type": "Boolean", - "desc": "whether or not to send output to parent's stdio." - } - ], - "desc": "

    After calling .setupMaster() (or .fork()) this settings object will contain\nthe settings, including the default values.\n\n

    \n

    It is effectively frozen after being set, because .setupMaster() can\nonly be called once.\n\n

    \n

    This object is not supposed to be changed or set manually, by you.\n\n

    \n" - }, - { - "textRaw": "`isMaster` {Boolean} ", - "name": "isMaster", - "desc": "

    True if the process is a master. This is determined\nby the process.env.NODE_UNIQUE_ID. If process.env.NODE_UNIQUE_ID is\nundefined, then isMaster is true.\n\n

    \n" - }, - { - "textRaw": "`isWorker` {Boolean} ", - "name": "isWorker", - "desc": "

    True if the process is not a master (it is the negation of cluster.isMaster).\n\n

    \n" - }, - { - "textRaw": "`worker` {Object} ", - "name": "worker", - "desc": "

    A reference to the current worker object. Not available in the master process.\n\n

    \n
    var cluster = require('cluster');\n\nif (cluster.isMaster) {\n  console.log('I am master');\n  cluster.fork();\n  cluster.fork();\n} else if (cluster.isWorker) {\n  console.log('I am worker #' + cluster.worker.id);\n}
    \n" - }, - { - "textRaw": "`workers` {Object} ", - "name": "workers", - "desc": "

    A hash that stores the active worker objects, keyed by id field. Makes it\neasy to loop through all the workers. It is only available in the master\nprocess.\n\n

    \n

    A worker is removed from cluster.workers just before the 'disconnect' or\n'exit' event is emitted.\n\n

    \n
    // Go through all workers\nfunction eachWorker(callback) {\n  for (var id in cluster.workers) {\n    callback(cluster.workers[id]);\n  }\n}\neachWorker(function(worker) {\n  worker.send('big announcement to all workers');\n});
    \n

    Should you wish to reference a worker over a communication channel, using\nthe worker's unique id is the easiest way to find the worker.\n\n

    \n
    socket.on('data', function(id) {\n  var worker = cluster.workers[id];\n});
    \n" - } - ], - "events": [ - { - "textRaw": "Event: 'fork'", - "type": "event", - "name": "fork", - "params": [], - "desc": "

    When a new worker is forked the cluster module will emit a 'fork' event.\nThis can be used to log worker activity, and create you own timeout.\n\n

    \n
    var timeouts = [];\nfunction errorMsg() {\n  console.error("Something must be wrong with the connection ...");\n}\n\ncluster.on('fork', function(worker) {\n  timeouts[worker.id] = setTimeout(errorMsg, 2000);\n});\ncluster.on('listening', function(worker, address) {\n  clearTimeout(timeouts[worker.id]);\n});\ncluster.on('exit', function(worker, code, signal) {\n  clearTimeout(timeouts[worker.id]);\n  errorMsg();\n});
    \n" - }, - { - "textRaw": "Event: 'online'", - "type": "event", - "name": "online", - "params": [], - "desc": "

    After forking a new worker, the worker should respond with an online message.\nWhen the master receives an online message it will emit this event.\nThe difference between 'fork' and 'online' is that fork is emitted when the\nmaster forks a worker, and 'online' is emitted when the worker is running.\n\n

    \n
    cluster.on('online', function(worker) {\n  console.log("Yay, the worker responded after it was forked");\n});
    \n" - }, - { - "textRaw": "Event: 'listening'", - "type": "event", - "name": "listening", - "params": [], - "desc": "

    After calling listen() from a worker, when the 'listening' event is emitted on\nthe server, a listening event will also be emitted on cluster in the master.\n\n

    \n

    The event handler is executed with two arguments, the worker contains the worker\nobject and the address object contains the following connection properties:\naddress, port and addressType. This is very useful if the worker is listening\non more than one address.\n\n

    \n
    cluster.on('listening', function(worker, address) {\n  console.log("A worker is now connected to " + address.address + ":" + address.port);\n});
    \n

    The addressType is one of:\n\n

    \n
      \n
    • 4 (TCPv4)
    • \n
    • 6 (TCPv6)
    • \n
    • -1 (unix domain socket)
    • \n
    • "udp4" or "udp6" (UDP v4 or v6)
    • \n
    \n" - }, - { - "textRaw": "Event: 'disconnect'", - "type": "event", - "name": "disconnect", - "params": [], - "desc": "

    Emitted after the worker IPC channel has disconnected. This can occur when a\nworker exits gracefully, is killed, or is disconnected manually (such as with\nworker.disconnect()).\n\n

    \n

    There may be a delay between the disconnect and exit events. These events\ncan be used to detect if the process is stuck in a cleanup or if there are\nlong-living connections.\n\n

    \n
    cluster.on('disconnect', function(worker) {\n  console.log('The worker #' + worker.id + ' has disconnected');\n});
    \n" - }, - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "params": [], - "desc": "

    When any of the workers die the cluster module will emit the 'exit' event.\n\n

    \n

    This can be used to restart the worker by calling .fork() again.\n\n

    \n
    cluster.on('exit', function(worker, code, signal) {\n  console.log('worker %d died (%s). restarting...',\n    worker.process.pid, signal || code);\n  cluster.fork();\n});
    \n

    See child_process event: 'exit'.\n\n

    \n" - }, - { - "textRaw": "Event: 'setup'", - "type": "event", - "name": "setup", - "desc": "

    Emitted the first time that .setupMaster() is called.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "cluster.setupMaster([settings])", - "type": "method", - "name": "setupMaster", - "signatures": [ - { - "params": [ - { - "textRaw": "`settings` {Object} ", - "options": [ - { - "textRaw": "`exec` {String} file path to worker file. (Default=`process.argv[1]`) ", - "name": "exec", - "default": "process.argv[1]", - "type": "String", - "desc": "file path to worker file." - }, - { - "textRaw": "`args` {Array} string arguments passed to worker. (Default=`process.argv.slice(2)`) ", - "name": "args", - "default": "process.argv.slice(2)", - "type": "Array", - "desc": "string arguments passed to worker." - }, - { - "textRaw": "`silent` {Boolean} whether or not to send output to parent's stdio. (Default=`false`) ", - "name": "silent", - "default": "false", - "type": "Boolean", - "desc": "whether or not to send output to parent's stdio." - } - ], - "name": "settings", - "type": "Object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "settings", - "optional": true - } - ] - } - ], - "desc": "

    setupMaster is used to change the default 'fork' behavior. Once called,\nthe settings will be present in cluster.settings.\n\n

    \n

    Note that:\n\n

    \n
      \n
    • Only the first call to .setupMaster() has any effect, subsequent calls are\nignored
    • \n
    • That because of the above, the only attribute of a worker that may be\ncustomized per-worker is the env passed to .fork()
    • \n
    • .fork() calls .setupMaster() internally to establish the defaults, so to\nhave any effect, .setupMaster() must be called before any calls to\n.fork()
    • \n
    \n

    Example:\n\n

    \n
    var cluster = require("cluster");\ncluster.setupMaster({\n  exec : "worker.js",\n  args : ["--use", "https"],\n  silent : true\n});\ncluster.fork();
    \n

    This can only be called from the master process.\n\n

    \n" - }, - { - "textRaw": "cluster.fork([env])", - "type": "method", - "name": "fork", - "signatures": [ - { - "return": { - "textRaw": "return {Worker object} ", - "name": "return", - "type": "Worker object" - }, - "params": [ - { - "textRaw": "`env` {Object} Key/value pairs to add to worker process environment. ", - "name": "env", - "type": "Object", - "desc": "Key/value pairs to add to worker process environment.", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "env", - "optional": true - } - ] - } - ], - "desc": "

    Spawn a new worker process.\n\n

    \n

    This can only be called from the master process.\n\n

    \n" - }, - { - "textRaw": "cluster.disconnect([callback])", - "type": "method", - "name": "disconnect", - "signatures": [ - { - "params": [ - { - "textRaw": "`callback` {Function} called when all workers are disconnected and handles are closed ", - "name": "callback", - "type": "Function", - "desc": "called when all workers are disconnected and handles are closed", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    Calls .disconnect() on each worker in cluster.workers.\n\n

    \n

    When they are disconnected all internal handles will be closed, allowing the\nmaster process to die gracefully if no other event is waiting.\n\n

    \n

    The method takes an optional callback argument which will be called when finished.\n\n

    \n

    This can only be called from the master process.\n\n

    \n" - } - ], - "classes": [ - { - "textRaw": "Class: Worker", - "type": "class", - "name": "Worker", - "desc": "

    A Worker object contains all public information and method about a worker.\nIn the master it can be obtained using cluster.workers. In a worker\nit can be obtained using cluster.worker.\n\n

    \n", - "properties": [ - { - "textRaw": "`id` {String} ", - "name": "id", - "desc": "

    Each new worker is given its own unique id, this id is stored in the\nid.\n\n

    \n

    While a worker is alive, this is the key that indexes it in\ncluster.workers\n\n

    \n" - }, - { - "textRaw": "`process` {ChildProcess object} ", - "name": "process", - "desc": "

    All workers are created using child_process.fork(), the returned object\nfrom this function is stored as .process. In a worker, the global process\nis stored.\n\n

    \n

    See: Child Process module\n\n

    \n

    Note that workers will call process.exit(0) if the 'disconnect' event occurs\non process and .suicide is not true. This protects against accidental\ndisconnection.\n\n

    \n" - }, - { - "textRaw": "`suicide` {Boolean} ", - "name": "suicide", - "desc": "

    Set by calling .kill() or .disconnect(), until then it is undefined.\n\n

    \n

    The boolean worker.suicide lets you distinguish between voluntary and accidental\nexit, the master may choose not to respawn a worker based on this value.\n\n

    \n
    cluster.on('exit', function(worker, code, signal) {\n  if (worker.suicide === true) {\n    console.log('Oh, it was just suicide\\' – no need to worry').\n  }\n});\n\n// kill worker\nworker.kill();
    \n" - } - ], - "methods": [ - { - "textRaw": "worker.send(message, [sendHandle])", - "type": "method", - "name": "send", - "signatures": [ - { - "params": [ - { - "textRaw": "`message` {Object} ", - "name": "message", - "type": "Object" - }, - { - "textRaw": "`sendHandle` {Handle object} ", - "name": "sendHandle", - "type": "Handle object", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "message" - }, - { - "name": "sendHandle", - "optional": true - } - ] - } - ], - "desc": "

    This function is equal to the send methods provided by\nchild_process.fork(). In the master you should use this function to\nsend a message to a specific worker.\n\n

    \n

    In a worker you can also use process.send(message), it is the same function.\n\n

    \n

    This example will echo back all messages from the master:\n\n

    \n
    if (cluster.isMaster) {\n  var worker = cluster.fork();\n  worker.send('hi there');\n\n} else if (cluster.isWorker) {\n  process.on('message', function(msg) {\n    process.send(msg);\n  });\n}
    \n" - }, - { - "textRaw": "worker.kill([signal='SIGTERM'])", - "type": "method", - "name": "kill", - "signatures": [ - { - "params": [ - { - "textRaw": "`signal` {String} Name of the kill signal to send to the worker process. ", - "name": "signal", - "type": "String", - "desc": "Name of the kill signal to send to the worker process.", - "optional": true, - "default": "'SIGTERM'" - } - ] - }, - { - "params": [ - { - "name": "signal", - "optional": true, - "default": "'SIGTERM'" - } - ] - } - ], - "desc": "

    This function will kill the worker. In the master, it does this by disconnecting\nthe worker.process, and once disconnected, killing with signal. In the\nworker, it does it by disconnecting the channel, and then exiting with code 0.\n\n

    \n

    Causes .suicide to be set.\n\n

    \n

    This method is aliased as worker.destroy() for backwards compatibility.\n\n

    \n

    Note that in a worker, process.kill() exists, but it is not this function,\nit is kill.\n\n

    \n" - }, - { - "textRaw": "worker.disconnect()", - "type": "method", - "name": "disconnect", - "desc": "

    In a worker, this function will close all servers, wait for the 'close' event on\nthose servers, and then disconnect the IPC channel.\n\n

    \n

    In the master, an internal message is sent to the worker causing it to call\n.disconnect() on itself.\n\n

    \n

    Causes .suicide to be set.\n\n

    \n

    Note that after a server is closed, it will no longer accept new connections,\nbut connections may be accepted by any other listening worker. Existing\nconnections will be allowed to close as usual. When no more connections exist,\nsee server.close(), the IPC channel to the worker\nwill close allowing it to die gracefully.\n\n

    \n

    The above applies only to server connections, client connections are not\nautomatically closed by workers, and disconnect does not wait for them to close\nbefore exiting.\n\n

    \n

    Note that in a worker, process.disconnect exists, but it is not this function,\nit is disconnect.\n\n

    \n

    Because long living server connections may block workers from disconnecting, it\nmay be useful to send a message, so application specific actions may be taken to\nclose them. It also may be useful to implement a timeout, killing a worker if\nthe disconnect event has not been emitted after some time.\n\n

    \n
    if (cluster.isMaster) {\n  var worker = cluster.fork();\n  var timeout;\n\n  worker.on('listening', function(address) {\n    worker.send('shutdown');\n    worker.disconnect();\n    timeout = setTimeout(function() {\n      worker.kill();\n    }, 2000);\n  });\n\n  worker.on('disconnect', function() {\n    clearTimeout(timeout);\n  });\n\n} else if (cluster.isWorker) {\n  var net = require('net');\n  var server = net.createServer(function(socket) {\n    // connections never end\n  });\n\n  server.listen(8000);\n\n  process.on('message', function(msg) {\n    if(msg === 'shutdown') {\n      // initiate graceful close of any connections to server\n    }\n  });\n}
    \n", - "signatures": [ - { - "params": [] - } - ] - } - ], - "events": [ - { - "textRaw": "Event: 'message'", - "type": "event", - "name": "message", - "params": [], - "desc": "

    This event is the same as the one provided by child_process.fork().\n\n

    \n

    In a worker you can also use process.on('message').\n\n

    \n

    As an example, here is a cluster that keeps count of the number of requests\nin the master process using the message system:\n\n

    \n
    var cluster = require('cluster');\nvar http = require('http');\n\nif (cluster.isMaster) {\n\n  // Keep track of http requests\n  var numReqs = 0;\n  setInterval(function() {\n    console.log("numReqs =", numReqs);\n  }, 1000);\n\n  // Count requestes\n  function messageHandler(msg) {\n    if (msg.cmd && msg.cmd == 'notifyRequest') {\n      numReqs += 1;\n    }\n  }\n\n  // Start workers and listen for messages containing notifyRequest\n  var numCPUs = require('os').cpus().length;\n  for (var i = 0; i < numCPUs; i++) {\n    cluster.fork();\n  }\n\n  Object.keys(cluster.workers).forEach(function(id) {\n    cluster.workers[id].on('message', messageHandler);\n  });\n\n} else {\n\n  // Worker processes have a http server.\n  http.Server(function(req, res) {\n    res.writeHead(200);\n    res.end("hello world\\n");\n\n    // notify master about the request\n    process.send({ cmd: 'notifyRequest' });\n  }).listen(8000);\n}
    \n" - }, - { - "textRaw": "Event: 'online'", - "type": "event", - "name": "online", - "desc": "

    Similar to the cluster.on('online') event, but specific to this worker.\n\n

    \n
    cluster.fork().on('online', function() {\n  // Worker is online\n});
    \n

    It is not emitted in the worker.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'listening'", - "type": "event", - "name": "listening", - "params": [], - "desc": "

    Similar to the cluster.on('listening') event, but specific to this worker.\n\n

    \n
    cluster.fork().on('listening', function(address) {\n  // Worker is listening\n});
    \n

    It is not emitted in the worker.\n\n

    \n" - }, - { - "textRaw": "Event: 'disconnect'", - "type": "event", - "name": "disconnect", - "desc": "

    Similar to the cluster.on('disconnect') event, but specfic to this worker.\n\n

    \n
    cluster.fork().on('disconnect', function() {\n  // Worker has disconnected\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'exit'", - "type": "event", - "name": "exit", - "params": [], - "desc": "

    Similar to the cluster.on('exit') event, but specific to this worker.\n\n

    \n
    var worker = cluster.fork();\nworker.on('exit', function(code, signal) {\n  if( signal ) {\n    console.log("worker was killed by signal: "+signal);\n  } else if( code !== 0 ) {\n    console.log("worker exited with error code: "+code);\n  } else {\n    console.log("worker success!");\n  }\n});
    \n" - }, - { - "textRaw": "Event: 'error'", - "type": "event", - "name": "error", - "desc": "

    This event is the same as the one provided by child_process.fork().\n\n

    \n

    In a worker you can also use process.on('error').\n\n

    \n", - "params": [] - } - ] - } - ], - "type": "module", - "displayName": "Cluster" - } - ], - "stability": 3, - "stabilityText": "Stable" -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completions.json b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completions.json deleted file mode 100644 index 3bddb2f7..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completions.json +++ /dev/null @@ -1,1078 +0,0 @@ -{ - "completions": [ - { - "trigger": "ArrayBuffer();" - }, - { - "trigger": "Int8Array();" - }, - { - "trigger": "Uint8Array();" - }, - { - "trigger": "Int16Array();" - }, - { - "trigger": "Uint16Array();" - }, - { - "trigger": "Int32Array();" - }, - { - "trigger": "Uint32Array();" - }, - { - "trigger": "Float32Array();" - }, - { - "trigger": "Float64Array();" - }, - { - "trigger": "DataView();" - }, - { - "trigger": "Buffer(subject, encoding, offset);" - }, - { - "trigger": "setTimeout();" - }, - { - "trigger": "setInterval();" - }, - { - "trigger": "clearTimeout();" - }, - { - "trigger": "clearInterval();" - }, - { - "trigger": "process.EventEmitter();" - }, - { - "trigger": "process.assert();" - }, - { - "trigger": "process._tickCallback();" - }, - { - "trigger": "process.nextTick(callback);" - }, - { - "trigger": "process.openStdin();" - }, - { - "trigger": "process.exit(code);" - }, - { - "trigger": "process.kill(pid, sig);" - }, - { - "trigger": "process.addListener(type, listener);" - }, - { - "trigger": "process._needTickCallback();" - }, - { - "trigger": "process.on(type, listener);" - }, - { - "trigger": "process.reallyExit();" - }, - { - "trigger": "process.removeListener(type, listener);" - }, - { - "trigger": "process.chdir();" - }, - { - "trigger": "process.debug();" - }, - { - "trigger": "process.cwd();" - }, - { - "trigger": "process.error();" - }, - { - "trigger": "process.watchFile();" - }, - { - "trigger": "process.umask();" - }, - { - "trigger": "process._kill();" - }, - { - "trigger": "process.unwatchFile();" - }, - { - "trigger": "process._debugProcess();" - }, - { - "trigger": "process.mixin();" - }, - { - "trigger": "process.dlopen();" - }, - { - "trigger": "process.createChildProcess();" - }, - { - "trigger": "process.inherits();" - }, - { - "trigger": "process.uptime();" - }, - { - "trigger": "process._byteLength();" - }, - { - "trigger": "process.memoryUsage();" - }, - { - "trigger": "process.uvCounters();" - }, - { - "trigger": "process.binding();" - }, - { - "trigger": "process.setMaxListeners(n);" - }, - { - "trigger": "process.emit();" - }, - { - "trigger": "process.once(type, listener);" - }, - { - "trigger": "process.removeAllListeners(type);" - }, - { - "trigger": "process.listeners(type);" - }, - { - "trigger": "require.resolve(request);" - }, - { - "trigger": "require.registerExtension();" - }, - { - "trigger": "_debugger.start(argv, stdin, stdout);" - }, - { - "trigger": "_debugger.Protocol();" - }, - { - "trigger": "_debugger.Client();" - }, - { - "trigger": "_linklist.init(list);" - }, - { - "trigger": "_linklist.peek(list);" - }, - { - "trigger": "_linklist.shift(list);" - }, - { - "trigger": "_linklist.remove(item);" - }, - { - "trigger": "_linklist.append(list, item);" - }, - { - "trigger": "_linklist.isEmpty(list);" - }, - { - "trigger": "assert.AssertionError;" - }, - { - "trigger": "assert.fail(actual, expected, message, operator, stackStartFunction);" - }, - { - "trigger": "assert.ok(value, message);" - }, - { - "trigger": "assert.equal(actual, expected, message);" - }, - { - "trigger": "assert.notEqual(actual, expected, message);" - }, - { - "trigger": "assert.deepEqual(actual, expected, message);" - }, - { - "trigger": "assert.notDeepEqual(actual, expected, message);" - }, - { - "trigger": "assert.strictEqual(actual, expected, message);" - }, - { - "trigger": "assert.notStrictEqual(actual, expected, message);" - }, - { - "trigger": "assert.throws(block, /*optional*/error, /*optional*/message);" - }, - { - "trigger": "assert.doesNotThrow(block, /*optional*/error, /*optional*/message);" - }, - { - "trigger": "assert.ifError(err);" - }, - { - "trigger": "buffer.SlowBuffer();" - }, - { - "trigger": "buffer.Buffer(subject, encoding, offset);" - }, - { - "trigger": "buffer_ieee754.readIEEE754(buffer, offset, isBE, mLen, nBytes);" - }, - { - "trigger": "buffer_ieee754.writeIEEE754(buffer, value, offset, isBE, mLen, nBytes);" - }, - { - "trigger": "child_process.fork(modulePath, args, options);" - }, - { - "trigger": "child_process._forkChild();" - }, - { - "trigger": "child_process.exec(command /*, options, callback */);" - }, - { - "trigger": "child_process.execFile(file /* args, options, callback */);" - }, - { - "trigger": "child_process.spawn(file, args, options);" - }, - { - "trigger": "cluster.fork();" - }, - { - "trigger": "cluster._startWorker();" - }, - { - "trigger": "cluster._getServer(address, port, addressType, cb);" - }, - { - "trigger": "cluster.setMaxListeners(n);" - }, - { - "trigger": "cluster.emit();" - }, - { - "trigger": "cluster.addListener(type, listener);" - }, - { - "trigger": "cluster.on(type, listener);" - }, - { - "trigger": "cluster.once(type, listener);" - }, - { - "trigger": "cluster.removeListener(type, listener);" - }, - { - "trigger": "cluster.removeAllListeners(type);" - }, - { - "trigger": "cluster.listeners(type);" - }, - { - "trigger": "console.log();" - }, - { - "trigger": "console.info();" - }, - { - "trigger": "console.warn();" - }, - { - "trigger": "console.error();" - }, - { - "trigger": "console.dir(object);" - }, - { - "trigger": "console.time(label);" - }, - { - "trigger": "console.timeEnd(label);" - }, - { - "trigger": "console.trace(label);" - }, - { - "trigger": "console.assert(expression);" - }, - { - "trigger": "crypto.Credentials(secureProtocol, flags, context);" - }, - { - "trigger": "crypto.createCredentials(options, context);" - }, - { - "trigger": "crypto.Hash();" - }, - { - "trigger": "crypto.createHash(hash);" - }, - { - "trigger": "crypto.Hmac();" - }, - { - "trigger": "crypto.createHmac(hmac, key);" - }, - { - "trigger": "crypto.Cipher();" - }, - { - "trigger": "crypto.createCipher(cipher, password);" - }, - { - "trigger": "crypto.createCipheriv(cipher, key, iv);" - }, - { - "trigger": "crypto.Decipher();" - }, - { - "trigger": "crypto.createDecipher(cipher, password);" - }, - { - "trigger": "crypto.createDecipheriv(cipher, key, iv);" - }, - { - "trigger": "crypto.Sign();" - }, - { - "trigger": "crypto.createSign(algorithm);" - }, - { - "trigger": "crypto.Verify();" - }, - { - "trigger": "crypto.createVerify(algorithm);" - }, - { - "trigger": "crypto.DiffieHellman();" - }, - { - "trigger": "crypto.createDiffieHellman(size_or_key, enc);" - }, - { - "trigger": "crypto.pbkdf2();" - }, - { - "trigger": "crypto.randomBytes();" - }, - { - "trigger": "crypto.pseudoRandomBytes();" - }, - { - "trigger": "crypto.rng();" - }, - { - "trigger": "crypto.prng();" - }, - { - "trigger": "dgram.Socket(type, listener);" - }, - { - "trigger": "dgram.createSocket(type, listener);" - }, - { - "trigger": "dns.lookup(domain, family, callback);" - }, - { - "trigger": "dns.resolve4(name, callback);" - }, - { - "trigger": "dns.resolve6(name, callback);" - }, - { - "trigger": "dns.resolveCname(name, callback);" - }, - { - "trigger": "dns.resolveMx(name, callback);" - }, - { - "trigger": "dns.resolveNs(name, callback);" - }, - { - "trigger": "dns.resolveTxt(name, callback);" - }, - { - "trigger": "dns.resolveSrv(name, callback);" - }, - { - "trigger": "dns.reverse(name, callback);" - }, - { - "trigger": "dns.resolve(domain, type_, callback_);" - }, - { - "trigger": "events.EventEmitter();" - }, - { - "trigger": "freelist.FreeList(name, max, constructor);" - }, - { - "trigger": "fs.Stats();" - }, - { - "trigger": "fs.readFile(path, encoding_);" - }, - { - "trigger": "fs.readFileSync(path, encoding);" - }, - { - "trigger": "fs.close(fd, callback);" - }, - { - "trigger": "fs.closeSync(fd);" - }, - { - "trigger": "fs.open(path, flags, mode, callback);" - }, - { - "trigger": "fs.openSync(path, flags, mode);" - }, - { - "trigger": "fs.read(fd, buffer, offset, length, position, callback);" - }, - { - "trigger": "fs.readSync(fd, buffer, offset, length, position);" - }, - { - "trigger": "fs.write(fd, buffer, offset, length, position, callback);" - }, - { - "trigger": "fs.writeSync(fd, buffer, offset, length, position);" - }, - { - "trigger": "fs.rename(oldPath, newPath, callback);" - }, - { - "trigger": "fs.renameSync(oldPath, newPath);" - }, - { - "trigger": "fs.truncate(fd, len, callback);" - }, - { - "trigger": "fs.truncateSync(fd, len);" - }, - { - "trigger": "fs.rmdir(path, callback);" - }, - { - "trigger": "fs.rmdirSync(path);" - }, - { - "trigger": "fs.fdatasync(fd, callback);" - }, - { - "trigger": "fs.fdatasyncSync(fd);" - }, - { - "trigger": "fs.fsync(fd, callback);" - }, - { - "trigger": "fs.fsyncSync(fd);" - }, - { - "trigger": "fs.mkdir(path, mode, callback);" - }, - { - "trigger": "fs.mkdirSync(path, mode);" - }, - { - "trigger": "fs.sendfile(outFd, inFd, inOffset, length, callback);" - }, - { - "trigger": "fs.sendfileSync(outFd, inFd, inOffset, length);" - }, - { - "trigger": "fs.readdir(path, callback);" - }, - { - "trigger": "fs.readdirSync(path);" - }, - { - "trigger": "fs.fstat(fd, callback);" - }, - { - "trigger": "fs.lstat(path, callback);" - }, - { - "trigger": "fs.stat(path, callback);" - }, - { - "trigger": "fs.fstatSync(fd);" - }, - { - "trigger": "fs.lstatSync(path);" - }, - { - "trigger": "fs.statSync(path);" - }, - { - "trigger": "fs.readlink(path, callback);" - }, - { - "trigger": "fs.readlinkSync(path);" - }, - { - "trigger": "fs.symlink(destination, path, mode_, callback);" - }, - { - "trigger": "fs.symlinkSync(destination, path, mode);" - }, - { - "trigger": "fs.link(srcpath, dstpath, callback);" - }, - { - "trigger": "fs.linkSync(srcpath, dstpath);" - }, - { - "trigger": "fs.unlink(path, callback);" - }, - { - "trigger": "fs.unlinkSync(path);" - }, - { - "trigger": "fs.fchmod(fd, mode, callback);" - }, - { - "trigger": "fs.fchmodSync(fd, mode);" - }, - { - "trigger": "fs.chmod(path, mode, callback);" - }, - { - "trigger": "fs.chmodSync(path, mode);" - }, - { - "trigger": "fs.fchown(fd, uid, gid, callback);" - }, - { - "trigger": "fs.fchownSync(fd, uid, gid);" - }, - { - "trigger": "fs.chown(path, uid, gid, callback);" - }, - { - "trigger": "fs.chownSync(path, uid, gid);" - }, - { - "trigger": "fs._toUnixTimestamp(time);" - }, - { - "trigger": "fs.utimes(path, atime, mtime, callback);" - }, - { - "trigger": "fs.utimesSync(path, atime, mtime);" - }, - { - "trigger": "fs.futimes(fd, atime, mtime, callback);" - }, - { - "trigger": "fs.futimesSync(fd, atime, mtime);" - }, - { - "trigger": "fs.writeFile(path, data, encoding_, callback);" - }, - { - "trigger": "fs.writeFileSync(path, data, encoding);" - }, - { - "trigger": "fs.watch(filename);" - }, - { - "trigger": "fs.watchFile(filename);" - }, - { - "trigger": "fs.unwatchFile(filename);" - }, - { - "trigger": "fs.realpathSync(p, cache);" - }, - { - "trigger": "fs.realpath(p, cache, cb);" - }, - { - "trigger": "fs.createReadStream(path, options);" - }, - { - "trigger": "fs.ReadStream(path, options);" - }, - { - "trigger": "fs.FileReadStream(path, options);" - }, - { - "trigger": "fs.createWriteStream(path, options);" - }, - { - "trigger": "fs.WriteStream(path, options);" - }, - { - "trigger": "fs.FileWriteStream(path, options);" - }, - { - "trigger": "fs.SyncWriteStream(fd);" - }, - { - "trigger": "http.IncomingMessage(socket);" - }, - { - "trigger": "http.OutgoingMessage();" - }, - { - "trigger": "http.ServerResponse(req);" - }, - { - "trigger": "http.Agent(options);" - }, - { - "trigger": "http.ClientRequest(options, cb);" - }, - { - "trigger": "http.request(options, cb);" - }, - { - "trigger": "http.get(options, cb);" - }, - { - "trigger": "http.Server(requestListener);" - }, - { - "trigger": "http.createServer(requestListener);" - }, - { - "trigger": "http._connectionListener(socket);" - }, - { - "trigger": "http.Client(port, host);" - }, - { - "trigger": "http.createClient(port, host);" - }, - { - "trigger": "https.Server(opts, requestListener);" - }, - { - "trigger": "https.createServer(opts, requestListener);" - }, - { - "trigger": "https.Agent(options);" - }, - { - "trigger": "https.request(options, cb);" - }, - { - "trigger": "https.get(options, cb);" - }, - { - "trigger": "module.wrap(script);" - }, - { - "trigger": "module._debug();" - }, - { - "trigger": "module._findPath(request, paths);" - }, - { - "trigger": "module._nodeModulePaths(from);" - }, - { - "trigger": "module._resolveLookupPaths(request, parent);" - }, - { - "trigger": "module._load(request, parent, isMain);" - }, - { - "trigger": "module._resolveFilename(request, parent);" - }, - { - "trigger": "module.runMain();" - }, - { - "trigger": "module._initPaths();" - }, - { - "trigger": "module.requireRepl();" - }, - { - "trigger": "module.Module(id, parent);" - }, - { - "trigger": "net.createServer();" - }, - { - "trigger": "net.createConnection(port /* [host], [cb] */);" - }, - { - "trigger": "net.connect(port /* [host], [cb] */);" - }, - { - "trigger": "net.Socket(options);" - }, - { - "trigger": "net.Stream(options);" - }, - { - "trigger": "net.Server(/* [ options, ] listener */);" - }, - { - "trigger": "net._createServerHandle(address, port, addressType);" - }, - { - "trigger": "net.isIP(input);" - }, - { - "trigger": "net.isIPv4(input);" - }, - { - "trigger": "net.isIPv6(input);" - }, - { - "trigger": "os.hostname();" - }, - { - "trigger": "os.loadavg();" - }, - { - "trigger": "os.uptime();" - }, - { - "trigger": "os.freemem();" - }, - { - "trigger": "os.totalmem();" - }, - { - "trigger": "os.cpus();" - }, - { - "trigger": "os.type();" - }, - { - "trigger": "os.release();" - }, - { - "trigger": "os.networkInterfaces();" - }, - { - "trigger": "os.arch();" - }, - { - "trigger": "os.platform();" - }, - { - "trigger": "os.getNetworkInterfaces();" - }, - { - "trigger": "path.resolve();" - }, - { - "trigger": "path.normalize(path);" - }, - { - "trigger": "path.join();" - }, - { - "trigger": "path.relative(from, to);" - }, - { - "trigger": "path.dirname(path);" - }, - { - "trigger": "path.basename(path, ext);" - }, - { - "trigger": "path.extname(path);" - }, - { - "trigger": "path.exists(path, callback);" - }, - { - "trigger": "path.existsSync(path);" - }, - { - "trigger": "punycode.decode(input, preserveCase);" - }, - { - "trigger": "punycode.encode(input, preserveCase);" - }, - { - "trigger": "punycode.toASCII(domain);" - }, - { - "trigger": "punycode.toUnicode(domain);" - }, - { - "trigger": "querystring.unescapeBuffer(s, decodeSpaces);" - }, - { - "trigger": "querystring.unescape(s, decodeSpaces);" - }, - { - "trigger": "querystring.escape(str);" - }, - { - "trigger": "querystring.encode(obj, sep, eq, name);" - }, - { - "trigger": "querystring.stringify(obj, sep, eq, name);" - }, - { - "trigger": "querystring.decode(qs, sep, eq);" - }, - { - "trigger": "querystring.parse(qs, sep, eq);" - }, - { - "trigger": "readline.createInterface(input, output, completer);" - }, - { - "trigger": "readline.Interface(input, output, completer);" - }, - { - "trigger": "repl.writer(obj, showHidden, depth, colors);" - }, - { - "trigger": "repl.REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined);" - }, - { - "trigger": "repl.start(prompt, source, eval, useGlobal);" - }, - { - "trigger": "stream.super_();" - }, - { - "trigger": "stream.Stream();" - }, - { - "trigger": "string_decoder.StringDecoder(encoding);" - }, - { - "trigger": "sys.print();" - }, - { - "trigger": "sys.puts();" - }, - { - "trigger": "sys.debug(x);" - }, - { - "trigger": "sys.error(x);" - }, - { - "trigger": "sys.inspect(obj, showHidden, depth, colors);" - }, - { - "trigger": "sys.p();" - }, - { - "trigger": "sys.log(msg);" - }, - { - "trigger": "sys.exec();" - }, - { - "trigger": "sys.pump(readStream, writeStream, callback);" - }, - { - "trigger": "sys.inherits(ctor, superCtor);" - }, - { - "trigger": "timers.unenroll(item);" - }, - { - "trigger": "timers.enroll(item, msecs);" - }, - { - "trigger": "timers.active(item);" - }, - { - "trigger": "timers.setTimeout(callback, after);" - }, - { - "trigger": "timers.clearTimeout(timer);" - }, - { - "trigger": "timers.setInterval(callback, repeat);" - }, - { - "trigger": "timers.clearInterval(timer);" - }, - { - "trigger": "tls.createSecurePair(credentials, isServer, requestCert, rejectUnauthorized);" - }, - { - "trigger": "tls.Server(/* [options], listener */);" - }, - { - "trigger": "tls.createServer(options, listener);" - }, - { - "trigger": "tls.connect(port /* host, options, cb */);" - }, - { - "trigger": "tty.isatty(fd);" - }, - { - "trigger": "tty.setRawMode(flag);" - }, - { - "trigger": "tty.getWindowSize();" - }, - { - "trigger": "tty.setWindowSize();" - }, - { - "trigger": "tty.ReadStream(fd);" - }, - { - "trigger": "tty.WriteStream(fd);" - }, - { - "trigger": "url.parse(url, parseQueryString, slashesDenoteHost);" - }, - { - "trigger": "url.resolve(source, relative);" - }, - { - "trigger": "url.resolveObject(source, relative);" - }, - { - "trigger": "url.format(obj);" - }, - { - "trigger": "util.format(f);" - }, - { - "trigger": "util.print();" - }, - { - "trigger": "util.puts();" - }, - { - "trigger": "util.debug(x);" - }, - { - "trigger": "util.error(x);" - }, - { - "trigger": "util.inspect(obj, showHidden, depth, colors);" - }, - { - "trigger": "util.isArray(ar);" - }, - { - "trigger": "util.isRegExp(re);" - }, - { - "trigger": "util.isDate(d);" - }, - { - "trigger": "util.isError(e);" - }, - { - "trigger": "util.p();" - }, - { - "trigger": "util.log(msg);" - }, - { - "trigger": "util.exec();" - }, - { - "trigger": "util.pump(readStream, writeStream, callback);" - }, - { - "trigger": "util.inherits(ctor, superCtor);" - }, - { - "trigger": "vm.Script();" - }, - { - "trigger": "vm.createScript(code, ctx, name);" - }, - { - "trigger": "vm.createContext();" - }, - { - "trigger": "vm.runInContext();" - }, - { - "trigger": "vm.runInThisContext();" - }, - { - "trigger": "vm.runInNewContext();" - }, - { - "trigger": "zlib.Deflate(opts);" - }, - { - "trigger": "zlib.Inflate(opts);" - }, - { - "trigger": "zlib.Gzip(opts);" - }, - { - "trigger": "zlib.Gunzip(opts);" - }, - { - "trigger": "zlib.DeflateRaw(opts);" - }, - { - "trigger": "zlib.InflateRaw(opts);" - }, - { - "trigger": "zlib.Unzip(opts);" - }, - { - "trigger": "zlib.createDeflate(o);" - }, - { - "trigger": "zlib.createInflate(o);" - }, - { - "trigger": "zlib.createDeflateRaw(o);" - }, - { - "trigger": "zlib.createInflateRaw(o);" - }, - { - "trigger": "zlib.createGzip(o);" - }, - { - "trigger": "zlib.createGunzip(o);" - }, - { - "trigger": "zlib.createUnzip(o);" - }, - { - "trigger": "zlib.deflate(buffer, callback);" - }, - { - "trigger": "zlib.gzip(buffer, callback);" - }, - { - "trigger": "zlib.deflateRaw(buffer, callback);" - }, - { - "trigger": "zlib.unzip(buffer, callback);" - }, - { - "trigger": "zlib.inflate(buffer, callback);" - }, - { - "trigger": "zlib.gunzip(buffer, callback);" - }, - { - "trigger": "zlib.inflateRaw(buffer, callback);" - } - ] -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completionsProcessor.njs b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completionsProcessor.njs deleted file mode 100644 index 1454b646..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/completionsProcessor.njs +++ /dev/null @@ -1,39 +0,0 @@ -// Author: Paul Verest -// process completions.json file - -var fs = require('fs'); - -var curfolder = __dirname; - -var filename = './completions.json'; -var filename2 = './completions2.json'; - -var completionsJson = require(filename); -var completionsArray = completionsJson.completions; - -var counterEQ =0; -var counterNQ =0; - -for (var i = 0; i < completionsArray.length; i++) { - var entry = completionsArray[i]; - if (entry.trigger === entry.contents ){ - counterEQ++; - delete entry.contents; - } else{ - counterNQ++; - } -} - -console.log("counterEQ="+counterEQ+" counterNQ="+counterNQ); - - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify -var completionsJsonString = JSON.stringify(completionsJson,null,"\t"); - -fs.writeFile(filename2, completionsJsonString, function(err) { - if(err) { - console.log(err); - } else { - console.log("The "+filename2+" file was written."); - } -}); diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/http.json b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/http.json deleted file mode 100644 index 417fe500..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/http.json +++ /dev/null @@ -1,762 +0,0 @@ -{ - "source": "doc/api/http.markdown", - "modules": [ - { - "textRaw": "HTTP", - "name": "http", - "stability": 3, - "stabilityText": "Stable", - "desc": "

    To use the HTTP server and client one must require('http').\n\n

    \n

    The HTTP interfaces in Node are designed to support many features\nof the protocol which have been traditionally difficult to use.\nIn particular, large, possibly chunk-encoded, messages. The interface is\ncareful to never buffer entire requests or responses--the\nuser is able to stream data.\n\n

    \n

    HTTP message headers are represented by an object like this:\n\n

    \n
    { 'content-length': '123',\n  'content-type': 'text/plain',\n  'connection': 'keep-alive',\n  'accept': '*/*' }
    \n

    Keys are lowercased. Values are not modified.\n\n

    \n

    In order to support the full spectrum of possible HTTP applications, Node's\nHTTP API is very low-level. It deals with stream handling and message\nparsing only. It parses a message into headers and body but it does not\nparse the actual headers or the body.\n\n\n

    \n", - "properties": [ - { - "textRaw": "`STATUS_CODES` {Object} ", - "name": "STATUS_CODES", - "desc": "

    A collection of all the standard HTTP response status codes, and the\nshort description of each. For example, http.STATUS_CODES[404] === 'Not\nFound'.\n\n

    \n" - }, - { - "textRaw": "http.globalAgent", - "name": "globalAgent", - "desc": "

    Global instance of Agent which is used as the default for all http client\nrequests.\n\n\n

    \n" - }, - { - "textRaw": "http.IncomingMessage", - "name": "IncomingMessage", - "desc": "

    An IncomingMessage object is created by [http.Server][] or\n[http.ClientRequest][] and passed as the first argument to the 'request'\nand 'response' event respectively. It may be used to access response status,\nheaders and data.\n\n

    \n

    It implements the [Readable Stream][] interface, as well as the\nfollowing additional events, methods, and properties.\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Indicates that the underlaying connection was closed.\nJust like 'end', this event occurs only once per response.\n\n

    \n", - "params": [] - } - ], - "properties": [ - { - "textRaw": "message.httpVersion", - "name": "httpVersion", - "desc": "

    In case of server request, the HTTP version sent by the client. In the case of\nclient response, the HTTP version of the connected-to server.\nProbably either '1.1' or '1.0'.\n\n

    \n

    Also response.httpVersionMajor is the first integer and\nresponse.httpVersionMinor is the second.\n\n

    \n" - }, - { - "textRaw": "message.headers", - "name": "headers", - "desc": "

    The request/response headers object.\n\n

    \n

    Read only map of header names and values. Header names are lower-cased.\nExample:\n\n

    \n
    // Prints something like:\n//\n// { 'user-agent': 'curl/7.22.0',\n//   host: '127.0.0.1:8000',\n//   accept: '*/*' }\nconsole.log(request.headers);
    \n" - }, - { - "textRaw": "message.trailers", - "name": "trailers", - "desc": "

    The request/response trailers object. Only populated after the 'end' event.\n\n

    \n" - }, - { - "textRaw": "message.method", - "name": "method", - "desc": "

    Only valid for request obtained from [http.Server][].\n\n

    \n

    The request method as a string. Read only. Example:\n'GET', 'DELETE'.\n\n

    \n" - }, - { - "textRaw": "message.url", - "name": "url", - "desc": "

    Only valid for request obtained from [http.Server][].\n\n

    \n

    Request URL string. This contains only the URL that is\npresent in the actual HTTP request. If the request is:\n\n

    \n
    GET /status?name=ryan HTTP/1.1\\r\\n\nAccept: text/plain\\r\\n\n\\r\\n
    \n

    Then request.url will be:\n\n

    \n
    '/status?name=ryan'
    \n

    If you would like to parse the URL into its parts, you can use\nrequire('url').parse(request.url). Example:\n\n

    \n
    node> require('url').parse('/status?name=ryan')\n{ href: '/status?name=ryan',\n  search: '?name=ryan',\n  query: 'name=ryan',\n  pathname: '/status' }
    \n

    If you would like to extract the params from the query string,\nyou can use the require('querystring').parse function, or pass\ntrue as the second argument to require('url').parse. Example:\n\n

    \n
    node> require('url').parse('/status?name=ryan', true)\n{ href: '/status?name=ryan',\n  search: '?name=ryan',\n  query: { name: 'ryan' },\n  pathname: '/status' }
    \n" - }, - { - "textRaw": "message.statusCode", - "name": "statusCode", - "desc": "

    Only valid for response obtained from http.ClientRequest.\n\n

    \n

    The 3-digit HTTP response status code. E.G. 404.\n\n

    \n" - }, - { - "textRaw": "message.socket", - "name": "socket", - "desc": "

    The net.Socket object associated with the connection.\n\n

    \n

    With HTTPS support, use request.connection.verifyPeer() and\nrequest.connection.getPeerCertificate() to obtain the client's\nauthentication details.\n\n\n

    \n" - } - ], - "methods": [ - { - "textRaw": "message.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Calls message.connection.setTimeout(msecs, callback).\n\n

    \n" - } - ] - } - ], - "methods": [ - { - "textRaw": "http.createServer([requestListener])", - "type": "method", - "name": "createServer", - "desc": "

    Returns a new web server object.\n\n

    \n

    The requestListener is a function which is automatically\nadded to the 'request' event.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "requestListener", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "http.createClient([port], [host])", - "type": "method", - "name": "createClient", - "desc": "

    This function is deprecated; please use [http.request()][] instead.\nConstructs a new HTTP client. port and host refer to the server to be\nconnected to.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port", - "optional": true - }, - { - "name": "host", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "http.request(options, callback)", - "type": "method", - "name": "request", - "desc": "

    Node maintains several connections per server to make HTTP requests.\nThis function allows one to transparently issue requests.\n\n

    \n

    options can be an object or a string. If options is a string, it is\nautomatically parsed with [url.parse()][].\n\n

    \n

    Options:\n\n

    \n
      \n
    • host: A domain name or IP address of the server to issue the request to.\nDefaults to 'localhost'.
    • \n
    • hostname: To support url.parse() hostname is preferred over host
    • \n
    • port: Port of remote server. Defaults to 80.
    • \n
    • localAddress: Local interface to bind for network connections.
    • \n
    • socketPath: Unix Domain Socket (use one of host:port or socketPath)
    • \n
    • method: A string specifying the HTTP request method. Defaults to 'GET'.
    • \n
    • path: Request path. Defaults to '/'. Should include query string if any.\nE.G. '/index.html?page=12'
    • \n
    • headers: An object containing request headers.
    • \n
    • auth: Basic authentication i.e. 'user:password' to compute an\nAuthorization header.
    • \n
    • agent: Controls [Agent][] behavior. When an Agent is used request will\ndefault to Connection: keep-alive. Possible values:
        \n
      • undefined (default): use [global Agent][] for this host and port.
      • \n
      • Agent object: explicitly use the passed in Agent.
      • \n
      • false: opts out of connection pooling with an Agent, defaults request to\nConnection: close.
      • \n
      \n
    • \n
    \n

    http.request() returns an instance of the [http.ClientRequest][]\nclass. The ClientRequest instance is a writable stream. If one needs to\nupload a file with a POST request, then write to the ClientRequest object.\n\n

    \n

    Example:\n\n

    \n
    var options = {\n  hostname: 'www.google.com',\n  port: 80,\n  path: '/upload',\n  method: 'POST'\n};\n\nvar req = http.request(options, function(res) {\n  console.log('STATUS: ' + res.statusCode);\n  console.log('HEADERS: ' + JSON.stringify(res.headers));\n  res.setEncoding('utf8');\n  res.on('data', function (chunk) {\n    console.log('BODY: ' + chunk);\n  });\n});\n\nreq.on('error', function(e) {\n  console.log('problem with request: ' + e.message);\n});\n\n// write data to request body\nreq.write('data\\n');\nreq.write('data\\n');\nreq.end();
    \n

    Note that in the example req.end() was called. With http.request() one\nmust always call req.end() to signify that you're done with the request -\neven if there is no data being written to the request body.\n\n

    \n

    If any error is encountered during the request (be that with DNS resolution,\nTCP level errors, or actual HTTP parse errors) an 'error' event is emitted\non the returned request object.\n\n

    \n

    There are a few special headers that should be noted.\n\n

    \n
      \n
    • Sending a 'Connection: keep-alive' will notify Node that the connection to\nthe server should be persisted until the next request.

      \n
    • \n
    • Sending a 'Content-length' header will disable the default chunked encoding.

      \n
    • \n
    • Sending an 'Expect' header will immediately send the request headers.\nUsually, when sending 'Expect: 100-continue', you should both set a timeout\nand listen for the continue event. See RFC2616 Section 8.2.3 for more\ninformation.

      \n
    • \n
    • Sending an Authorization header will override using the auth option\nto compute basic authentication.

      \n
    • \n
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - }, - { - "textRaw": "http.get(options, callback)", - "type": "method", - "name": "get", - "desc": "

    Since most requests are GET requests without bodies, Node provides this\nconvenience method. The only difference between this method and http.request()\nis that it sets the method to GET and calls req.end() automatically.\n\n

    \n

    Example:\n\n

    \n
    http.get("http://www.google.com/index.html", function(res) {\n  console.log("Got response: " + res.statusCode);\n}).on('error', function(e) {\n  console.log("Got error: " + e.message);\n});
    \n", - "signatures": [ - { - "params": [ - { - "name": "options" - }, - { - "name": "callback" - } - ] - } - ] - } - ], - "classes": [ - { - "textRaw": "Class: http.Server", - "type": "class", - "name": "http.Server", - "desc": "

    This is an [EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'request'", - "type": "event", - "name": "request", - "desc": "

    function (request, response) { }\n\n

    \n

    Emitted each time there is a request. Note that there may be multiple requests\nper connection (in the case of keep-alive connections).\n request is an instance of [http.IncomingMessage][] and response is\nan instance of [http.ServerResponse][].\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connection'", - "type": "event", - "name": "connection", - "desc": "

    function (socket) { }\n\n

    \n

    When a new TCP stream is established. socket is an object of type\n net.Socket. Usually users will not want to access this event. In\n particular, the socket will not emit readable events because of how\n the protocol parser attaches to the socket. The socket can also be\n accessed at request.connection.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Emitted when the server closes.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'checkContinue'", - "type": "event", - "name": "checkContinue", - "desc": "

    function (request, response) { }\n\n

    \n

    Emitted each time a request with an http Expect: 100-continue is received.\nIf this event isn't listened for, the server will automatically respond\nwith a 100 Continue as appropriate.\n\n

    \n

    Handling this event involves calling [response.writeContinue()][] if the client\nshould continue to send the request body, or generating an appropriate HTTP\nresponse (e.g., 400 Bad Request) if the client should not continue to send the\nrequest body.\n\n

    \n

    Note that when this event is emitted and handled, the request event will\nnot be emitted.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connect'", - "type": "event", - "name": "connect", - "desc": "

    function (request, socket, head) { }\n\n

    \n

    Emitted each time a client requests a http CONNECT method. If this event isn't\nlistened for, then clients requesting a CONNECT method will have their\nconnections closed.\n\n

    \n
      \n
    • request is the arguments for the http request, as it is in the request\nevent.
    • \n
    • socket is the network socket between the server and client.
    • \n
    • head is an instance of Buffer, the first packet of the tunneling stream,\nthis may be empty.
    • \n
    \n

    After this event is emitted, the request's socket will not have a data\nevent listener, meaning you will need to bind to it in order to handle data\nsent to the server on that socket.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'upgrade'", - "type": "event", - "name": "upgrade", - "desc": "

    function (request, socket, head) { }\n\n

    \n

    Emitted each time a client requests a http upgrade. If this event isn't\nlistened for, then clients requesting an upgrade will have their connections\nclosed.\n\n

    \n
      \n
    • request is the arguments for the http request, as it is in the request\nevent.
    • \n
    • socket is the network socket between the server and client.
    • \n
    • head is an instance of Buffer, the first packet of the upgraded stream,\nthis may be empty.
    • \n
    \n

    After this event is emitted, the request's socket will not have a data\nevent listener, meaning you will need to bind to it in order to handle data\nsent to the server on that socket.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'clientError'", - "type": "event", - "name": "clientError", - "desc": "

    function (exception, socket) { }\n\n

    \n

    If a client connection emits an 'error' event - it will forwarded here.\n\n

    \n

    socket is the net.Socket object that the error originated from.\n\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "server.listen(port, [hostname], [backlog], [callback])", - "type": "method", - "name": "listen", - "desc": "

    Begin accepting connections on the specified port and hostname. If the\nhostname is omitted, the server will accept connections directed to any\nIPv4 address (INADDR_ANY).\n\n

    \n

    To listen to a unix socket, supply a filename instead of port and hostname.\n\n

    \n

    Backlog is the maximum length of the queue of pending connections.\nThe actual length will be determined by your OS through sysctl settings such as\ntcp_max_syn_backlog and somaxconn on linux. The default value of this\nparameter is 511 (not 512).\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the ['listening'][] event. See also [net.Server.listen(port)][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "port" - }, - { - "name": "hostname", - "optional": true - }, - { - "name": "backlog", - "optional": true - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(path, [callback])", - "type": "method", - "name": "listen", - "desc": "

    Start a UNIX socket server listening for connections on the given path.\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the ['listening'][] event. See also [net.Server.listen(path)][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "path" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.listen(handle, [callback])", - "type": "method", - "name": "listen", - "signatures": [ - { - "params": [ - { - "textRaw": "`handle` {Object} ", - "name": "handle", - "type": "Object" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function", - "optional": true - } - ] - }, - { - "params": [ - { - "name": "handle" - }, - { - "name": "callback", - "optional": true - } - ] - } - ], - "desc": "

    The handle object can be set to either a server or socket (anything\nwith an underlying _handle member), or a {fd: <n>} object.\n\n

    \n

    This will cause the server to accept connections on the specified\nhandle, but it is presumed that the file descriptor or handle has\nalready been bound to a port or domain socket.\n\n

    \n

    Listening on a file descriptor is not supported on Windows.\n\n

    \n

    This function is asynchronous. The last parameter callback will be added as\na listener for the 'listening' event.\nSee also net.Server.listen().\n\n

    \n" - }, - { - "textRaw": "server.close([callback])", - "type": "method", - "name": "close", - "desc": "

    Stops the server from accepting new connections. See [net.Server.close()][].\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "server.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Sets the timeout value for sockets, and emits a 'timeout' event on\nthe Server object, passing the socket as an argument, if a timeout\noccurs.\n\n

    \n

    If there is a 'timeout' event listener on the Server object, then it\nwill be called with the timed-out socket as an argument.\n\n

    \n

    By default, the Server's timeout value is 2 minutes, and sockets are\ndestroyed automatically if they time out. However, if you assign a\ncallback to the Server's 'timeout' event, then you are responsible\nfor handling socket timeouts.\n\n

    \n" - } - ], - "properties": [ - { - "textRaw": "server.maxHeadersCount", - "name": "maxHeadersCount", - "desc": "

    Limits maximum incoming headers count, equal to 1000 by default. If set to 0 -\nno limit will be applied.\n\n

    \n" - }, - { - "textRaw": "`timeout` {Number} Default = 120000 (2 minutes) ", - "name": "timeout", - "desc": "

    The number of milliseconds of inactivity before a socket is presumed\nto have timed out.\n\n

    \n

    Note that the socket timeout logic is set up on connection, so\nchanging this value only affects new connections to the server, not\nany existing connections.\n\n

    \n

    Set to 0 to disable any kind of automatic timeout behavior on incoming\nconnections.\n\n

    \n", - "shortDesc": "Default = 120000 (2 minutes)" - } - ] - }, - { - "textRaw": "Class: http.ServerResponse", - "type": "class", - "name": "http.ServerResponse", - "desc": "

    This object is created internally by a HTTP server--not by the user. It is\npassed as the second parameter to the 'request' event.\n\n

    \n

    The response implements the [Writable Stream][] interface. This is an\n[EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event: 'close'", - "type": "event", - "name": "close", - "desc": "

    function () { }\n\n

    \n

    Indicates that the underlying connection was terminated before\n[response.end()][] was called or able to flush.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "response.writeContinue()", - "type": "method", - "name": "writeContinue", - "desc": "

    Sends a HTTP/1.1 100 Continue message to the client, indicating that\nthe request body should be sent. See the ['checkContinue'][] event on Server.\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "response.writeHead(statusCode, [reasonPhrase], [headers])", - "type": "method", - "name": "writeHead", - "desc": "

    Sends a response header to the request. The status code is a 3-digit HTTP\nstatus code, like 404. The last argument, headers, are the response headers.\nOptionally one can give a human-readable reasonPhrase as the second\nargument.\n\n

    \n

    Example:\n\n

    \n
    var body = 'hello world';\nresponse.writeHead(200, {\n  'Content-Length': body.length,\n  'Content-Type': 'text/plain' });
    \n

    This method must only be called once on a message and it must\nbe called before [response.end()][] is called.\n\n

    \n

    If you call [response.write()][] or [response.end()][] before calling this, the\nimplicit/mutable headers will be calculated and call this function for you.\n\n

    \n

    Note: that Content-Length is given in bytes not characters. The above example\nworks because the string 'hello world' contains only single byte characters.\nIf the body contains higher coded characters then Buffer.byteLength()\nshould be used to determine the number of bytes in a given encoding.\nAnd Node does not check whether Content-Length and the length of the body\nwhich has been transmitted are equal or not.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "statusCode" - }, - { - "name": "reasonPhrase", - "optional": true - }, - { - "name": "headers", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "response.setTimeout(msecs, callback)", - "type": "method", - "name": "setTimeout", - "signatures": [ - { - "params": [ - { - "textRaw": "`msecs` {Number} ", - "name": "msecs", - "type": "Number" - }, - { - "textRaw": "`callback` {Function} ", - "name": "callback", - "type": "Function" - } - ] - }, - { - "params": [ - { - "name": "msecs" - }, - { - "name": "callback" - } - ] - } - ], - "desc": "

    Sets the Socket's timeout value to msecs. If a callback is\nprovided, then it is added as a listener on the 'timeout' event on\nthe response object.\n\n

    \n

    If no 'timeout' listener is added to the request, the response, or\nthe server, then sockets are destroyed when they time out. If you\nassign a handler on the request, the response, or the server's\n'timeout' events, then it is your responsibility to handle timed out\nsockets.\n\n

    \n" - }, - { - "textRaw": "response.setHeader(name, value)", - "type": "method", - "name": "setHeader", - "desc": "

    Sets a single header value for implicit headers. If this header already exists\nin the to-be-sent headers, its value will be replaced. Use an array of strings\nhere if you need to send multiple headers with the same name.\n\n

    \n

    Example:\n\n

    \n
    response.setHeader("Content-Type", "text/html");
    \n

    or\n\n

    \n
    response.setHeader("Set-Cookie", ["type=ninja", "language=javascript"]);
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - }, - { - "name": "value" - } - ] - } - ] - }, - { - "textRaw": "response.getHeader(name)", - "type": "method", - "name": "getHeader", - "desc": "

    Reads out a header that's already been queued but not sent to the client. Note\nthat the name is case insensitive. This can only be called before headers get\nimplicitly flushed.\n\n

    \n

    Example:\n\n

    \n
    var contentType = response.getHeader('content-type');
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - } - ] - } - ] - }, - { - "textRaw": "response.removeHeader(name)", - "type": "method", - "name": "removeHeader", - "desc": "

    Removes a header that's queued for implicit sending.\n\n

    \n

    Example:\n\n

    \n
    response.removeHeader("Content-Encoding");
    \n", - "signatures": [ - { - "params": [ - { - "name": "name" - } - ] - } - ] - }, - { - "textRaw": "response.write(chunk, [encoding])", - "type": "method", - "name": "write", - "desc": "

    If this method is called and [response.writeHead()][] has not been called,\nit will switch to implicit header mode and flush the implicit headers.\n\n

    \n

    This sends a chunk of the response body. This method may\nbe called multiple times to provide successive parts of the body.\n\n

    \n

    chunk can be a string or a buffer. If chunk is a string,\nthe second parameter specifies how to encode it into a byte stream.\nBy default the encoding is 'utf8'.\n\n

    \n

    Note: This is the raw HTTP body and has nothing to do with\nhigher-level multi-part body encodings that may be used.\n\n

    \n

    The first time response.write() is called, it will send the buffered\nheader information and the first body to the client. The second time\nresponse.write() is called, Node assumes you're going to be streaming\ndata, and sends that separately. That is, the response is buffered up to the\nfirst chunk of body.\n\n

    \n

    Returns true if the entire data was flushed successfully to the kernel\nbuffer. Returns false if all or part of the data was queued in user memory.\n'drain' will be emitted when the buffer is again free.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "response.addTrailers(headers)", - "type": "method", - "name": "addTrailers", - "desc": "

    This method adds HTTP trailing headers (a header but at the end of the\nmessage) to the response.\n\n

    \n

    Trailers will only be emitted if chunked encoding is used for the\nresponse; if it is not (e.g., if the request was HTTP/1.0), they will\nbe silently discarded.\n\n

    \n

    Note that HTTP requires the Trailer header to be sent if you intend to\nemit trailers, with a list of the header fields in its value. E.g.,\n\n

    \n
    response.writeHead(200, { 'Content-Type': 'text/plain',\n                          'Trailer': 'Content-MD5' });\nresponse.write(fileData);\nresponse.addTrailers({'Content-MD5': "7895bf4b8828b55ceaf47747b4bca667"});\nresponse.end();
    \n", - "signatures": [ - { - "params": [ - { - "name": "headers" - } - ] - } - ] - }, - { - "textRaw": "response.end([data], [encoding])", - "type": "method", - "name": "end", - "desc": "

    This method signals to the server that all of the response headers and body\nhave been sent; that server should consider this message complete.\nThe method, response.end(), MUST be called on each\nresponse.\n\n

    \n

    If data is specified, it is equivalent to calling response.write(data, encoding)\nfollowed by response.end().\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - } - ], - "properties": [ - { - "textRaw": "response.statusCode", - "name": "statusCode", - "desc": "

    When using implicit headers (not calling [response.writeHead()][] explicitly),\nthis property controls the status code that will be sent to the client when\nthe headers get flushed.\n\n

    \n

    Example:\n\n

    \n
    response.statusCode = 404;
    \n

    After response header was sent to the client, this property indicates the\nstatus code which was sent out.\n\n

    \n" - }, - { - "textRaw": "response.headersSent", - "name": "headersSent", - "desc": "

    Boolean (read-only). True if headers were sent, false otherwise.\n\n

    \n" - }, - { - "textRaw": "response.sendDate", - "name": "sendDate", - "desc": "

    When true, the Date header will be automatically generated and sent in\nthe response if it is not already present in the headers. Defaults to true.\n\n

    \n

    This should only be disabled for testing; HTTP requires the Date header\nin responses.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: http.Agent", - "type": "class", - "name": "http.Agent", - "desc": "

    In node 0.5.3+ there is a new implementation of the HTTP Agent which is used\nfor pooling sockets used in HTTP client requests.\n\n

    \n

    Previously, a single agent instance helped pool for a single host+port. The\ncurrent implementation now holds sockets for any number of hosts.\n\n

    \n

    The current HTTP Agent also defaults client requests to using\nConnection:keep-alive. If no pending HTTP requests are waiting on a socket\nto become free the socket is closed. This means that node's pool has the\nbenefit of keep-alive when under load but still does not require developers\nto manually close the HTTP clients using keep-alive.\n\n

    \n

    Sockets are removed from the agent's pool when the socket emits either a\n"close" event or a special "agentRemove" event. This means that if you intend\nto keep one HTTP request open for a long time and don't want it to stay in the\npool you can do something along the lines of:\n\n

    \n
    http.get(options, function(res) {\n  // Do stuff\n}).on("socket", function (socket) {\n  socket.emit("agentRemove");\n});
    \n

    Alternatively, you could just opt out of pooling entirely using agent:false:\n\n

    \n
    http.get({hostname:'localhost', port:80, path:'/', agent:false}, function (res) {\n  // Do stuff\n})
    \n", - "properties": [ - { - "textRaw": "agent.maxSockets", - "name": "maxSockets", - "desc": "

    By default set to 5. Determines how many concurrent sockets the agent can have\nopen per host.\n\n

    \n" - }, - { - "textRaw": "agent.sockets", - "name": "sockets", - "desc": "

    An object which contains arrays of sockets currently in use by the Agent. Do not\nmodify.\n\n

    \n" - }, - { - "textRaw": "agent.requests", - "name": "requests", - "desc": "

    An object which contains queues of requests that have not yet been assigned to\nsockets. Do not modify.\n\n

    \n" - } - ] - }, - { - "textRaw": "Class: http.ClientRequest", - "type": "class", - "name": "http.ClientRequest", - "desc": "

    This object is created internally and returned from http.request(). It\nrepresents an in-progress request whose header has already been queued. The\nheader is still mutable using the setHeader(name, value), getHeader(name),\nremoveHeader(name) API. The actual header will be sent along with the first\ndata chunk or when closing the connection.\n\n

    \n

    To get the response, add a listener for 'response' to the request object.\n'response' will be emitted from the request object when the response\nheaders have been received. The 'response' event is executed with one\nargument which is an instance of [http.IncomingMessage][].\n\n

    \n

    During the 'response' event, one can add listeners to the\nresponse object; particularly to listen for the 'data' event.\n\n

    \n

    If no 'response' handler is added, then the response will be\nentirely discarded. However, if you add a 'response' event handler,\nthen you must consume the data from the response object, either by\ncalling response.read() whenever there is a 'readable' event, or\nby adding a 'data' handler, or by calling the .resume() method.\nUntil the data is consumed, the 'end' event will not fire. Also, until\nthe data is read it will consume memory that can eventually lead to a\n'process out of memory' error.\n\n

    \n

    Note: Node does not check whether Content-Length and the length of the body\nwhich has been transmitted are equal or not.\n\n

    \n

    The request implements the [Writable Stream][] interface. This is an\n[EventEmitter][] with the following events:\n\n

    \n", - "events": [ - { - "textRaw": "Event 'response'", - "type": "event", - "name": "response", - "desc": "

    function (response) { }\n\n

    \n

    Emitted when a response is received to this request. This event is emitted only\nonce. The response argument will be an instance of [http.IncomingMessage][].\n\n

    \n

    Options:\n\n

    \n
      \n
    • host: A domain name or IP address of the server to issue the request to.
    • \n
    • port: Port of remote server.
    • \n
    • socketPath: Unix Domain Socket (use one of host:port or socketPath)
    • \n
    \n", - "params": [] - }, - { - "textRaw": "Event: 'socket'", - "type": "event", - "name": "socket", - "desc": "

    function (socket) { }\n\n

    \n

    Emitted after a socket is assigned to this request.\n\n

    \n", - "params": [] - }, - { - "textRaw": "Event: 'connect'", - "type": "event", - "name": "connect", - "desc": "

    function (response, socket, head) { }\n\n

    \n

    Emitted each time a server responds to a request with a CONNECT method. If this\nevent isn't being listened for, clients receiving a CONNECT method will have\ntheir connections closed.\n\n

    \n

    A client server pair that show you how to listen for the connect event.\n\n

    \n
    var http = require('http');\nvar net = require('net');\nvar url = require('url');\n\n// Create an HTTP tunneling proxy\nvar proxy = http.createServer(function (req, res) {\n  res.writeHead(200, {'Content-Type': 'text/plain'});\n  res.end('okay');\n});\nproxy.on('connect', function(req, cltSocket, head) {\n  // connect to an origin server\n  var srvUrl = url.parse('http://' + req.url);\n  var srvSocket = net.connect(srvUrl.port, srvUrl.hostname, function() {\n    cltSocket.write('HTTP/1.1 200 Connection Established\\r\\n' +\n                    'Proxy-agent: Node-Proxy\\r\\n' +\n                    '\\r\\n');\n    srvSocket.write(head);\n    srvSocket.pipe(cltSocket);\n    cltSocket.pipe(srvSocket);\n  });\n});\n\n// now that proxy is running\nproxy.listen(1337, '127.0.0.1', function() {\n\n  // make a request to a tunneling proxy\n  var options = {\n    port: 1337,\n    hostname: '127.0.0.1',\n    method: 'CONNECT',\n    path: 'www.google.com:80'\n  };\n\n  var req = http.request(options);\n  req.end();\n\n  req.on('connect', function(res, socket, head) {\n    console.log('got connected!');\n\n    // make a request over an HTTP tunnel\n    socket.write('GET / HTTP/1.1\\r\\n' +\n                 'Host: www.google.com:80\\r\\n' +\n                 'Connection: close\\r\\n' +\n                 '\\r\\n');\n    socket.on('data', function(chunk) {\n      console.log(chunk.toString());\n    });\n    socket.on('end', function() {\n      proxy.close();\n    });\n  });\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'upgrade'", - "type": "event", - "name": "upgrade", - "desc": "

    function (response, socket, head) { }\n\n

    \n

    Emitted each time a server responds to a request with an upgrade. If this\nevent isn't being listened for, clients receiving an upgrade header will have\ntheir connections closed.\n\n

    \n

    A client server pair that show you how to listen for the upgrade event.\n\n

    \n
    var http = require('http');\n\n// Create an HTTP server\nvar srv = http.createServer(function (req, res) {\n  res.writeHead(200, {'Content-Type': 'text/plain'});\n  res.end('okay');\n});\nsrv.on('upgrade', function(req, socket, head) {\n  socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\\r\\n' +\n               'Upgrade: WebSocket\\r\\n' +\n               'Connection: Upgrade\\r\\n' +\n               '\\r\\n');\n\n  socket.pipe(socket); // echo back\n});\n\n// now that server is running\nsrv.listen(1337, '127.0.0.1', function() {\n\n  // make a request\n  var options = {\n    port: 1337,\n    hostname: '127.0.0.1',\n    headers: {\n      'Connection': 'Upgrade',\n      'Upgrade': 'websocket'\n    }\n  };\n\n  var req = http.request(options);\n  req.end();\n\n  req.on('upgrade', function(res, socket, upgradeHead) {\n    console.log('got upgraded!');\n    socket.end();\n    process.exit(0);\n  });\n});
    \n", - "params": [] - }, - { - "textRaw": "Event: 'continue'", - "type": "event", - "name": "continue", - "desc": "

    function () { }\n\n

    \n

    Emitted when the server sends a '100 Continue' HTTP response, usually because\nthe request contained 'Expect: 100-continue'. This is an instruction that\nthe client should send the request body.\n\n

    \n", - "params": [] - } - ], - "methods": [ - { - "textRaw": "request.write(chunk, [encoding])", - "type": "method", - "name": "write", - "desc": "

    Sends a chunk of the body. By calling this method\nmany times, the user can stream a request body to a\nserver--in that case it is suggested to use the\n['Transfer-Encoding', 'chunked'] header line when\ncreating the request.\n\n

    \n

    The chunk argument should be a [Buffer][] or a string.\n\n

    \n

    The encoding argument is optional and only applies when chunk is a string.\nDefaults to 'utf8'.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "chunk" - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.end([data], [encoding])", - "type": "method", - "name": "end", - "desc": "

    Finishes sending the request. If any parts of the body are\nunsent, it will flush them to the stream. If the request is\nchunked, this will send the terminating '0\\r\\n\\r\\n'.\n\n

    \n

    If data is specified, it is equivalent to calling\nrequest.write(data, encoding) followed by request.end().\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "data", - "optional": true - }, - { - "name": "encoding", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.abort()", - "type": "method", - "name": "abort", - "desc": "

    Aborts a request. (New since v0.3.8.)\n\n

    \n", - "signatures": [ - { - "params": [] - } - ] - }, - { - "textRaw": "request.setTimeout(timeout, [callback])", - "type": "method", - "name": "setTimeout", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setTimeout()][] will be called.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "timeout" - }, - { - "name": "callback", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.setNoDelay([noDelay])", - "type": "method", - "name": "setNoDelay", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setNoDelay()][] will be called.\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "noDelay", - "optional": true - } - ] - } - ] - }, - { - "textRaw": "request.setSocketKeepAlive([enable], [initialDelay])", - "type": "method", - "name": "setSocketKeepAlive", - "desc": "

    Once a socket is assigned to this request and is connected\n[socket.setKeepAlive()][] will be called.\n\n\n

    \n", - "signatures": [ - { - "params": [ - { - "name": "enable", - "optional": true - }, - { - "name": "initialDelay", - "optional": true - } - ] - } - ] - } - ] - } - ], - "type": "module", - "displayName": "HTTP" - } - ] -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/README.md b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/README.md deleted file mode 100644 index e3bd2d9b..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/README.md +++ /dev/null @@ -1,9 +0,0 @@ -from https://github.com/eclipse/orion.client - -orion.client\bundles\org.eclipse.orion.client.javascript\web\javascript\contentAssist\indexFiles - -source code is available -under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html) -and [Eclipse Distribution License](http://www.eclipse.org/org/documents/edl-v10.php). - -For changes please contribute to the named project. diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/amqpIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/amqpIndex.js deleted file mode 100644 index 899db9a9..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/amqpIndex.js +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/amqpIndex', [ -], function () { - return { - "!name": "amqp", - "this": "", - "global": "", - "!define": { - "amqp": { - "!proto" : "Object", - "Connection": "fn(connectionArgs: Object, options: Object, readyCallback: fn())", - "createConnection": "fn(options: Object, implOptions: Object, readyCallback: fn()) -> Connection" - }, - "Connection": { - "!type": "fn(connectionArgs: ?, options: ?, readyCallback: ?)", - "!proto" : "EventEmitter", - "prototype": { - "setOptions": "fn(options: Object)", - "setImplOptions": "fn(options: Object)", - "connect": "fn()", - "reconnect": "fn()", - "addAllListeners": "fn()", - "heartbeat": "fn()", - "exchange": "fn(name: String, options: Object, openCallback: fn()) -> Exchange", - "exchangeClosed": "fn(name: String)", - "queue": "fn(name: String) -> Queue", - "queueClosed": "fn(name: String)", - "publish": "fn(routingKey: Object, body: Object, options: Object, callback: fn())", - "generateChannelId": "fn() -> String", - }, - - }, - "Exchange": { - "!type": "fn(connection: Connection, channel: Channel, name: String, options: Object, openCallback: fn())", - "!proto" : "Channel", - "prototype": { - "publish": "fn(routingKey: Object, data: Object, options: Object, callback: fn())", - "cleanup": "fn()", - "destroy": "fn(ifUnused: Boolean)", - "unbind": "fn()", - "bind": "fn()", - "bind_headers": "fn()" - } - }, - "Queue": { - "!type": "fn(connection: Connection, channel: Channel, name: String, options: Object, callback: fn())", - "!proto" : "Channel", - "prototype": { - "subscribeRaw": "fn(options: Object, messageListener: fn())", - "unsubscribe": "fn(consumerTag: String)", - "subscribe": "fn(options: Object, messageListener: fn())", - "shift": "fn(reject: Object, requeue: Object)", - "bind": "fn(exchange: Exchange, routingKey: String, callback: fn())", - "unbind": "fn(exchange: Exchange, routingKey: String)", - "bind_headers": "fn()", - "destroy": "fn(options: Object)", - "purge": "fn()", - "flow": "fn(active: Object)", - "subscribeJSON": "fn(options: Object, messageListener: fn())" - } - }, - "Channel": { - "!type": "fn(connection: Connection, channel: Channel)", - "!proto" : "EventEmitter", - "prototype": { - "closeOK": "fn()", - "reconnect": "fn()", - "close": "fn()" - } - } - } - } -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/browserIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/browserIndex.js deleted file mode 100644 index dba5ee4d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/browserIndex.js +++ /dev/null @@ -1,985 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2013 IBM Corporation. - * 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 - ******************************************************************************/ - -// this file was generated by a script from the model in types.js -/*global define */ -define('javascript/contentAssist/indexFiles/browserIndex', [ -], function () { - return { - "!name": "browser", - "!define": { - "WebSocket": { - "!proto": "Object", - "onreadystatechange": "EventHandler", - "onopen": "EventHandler", - "onerror": "EventHandler", - "onclose": "EventHandler", - "readyState": "Number", - "extensions": "String", - "protocol": "String", - "close": { - "!type": "fn(reason?: Object)" - }, - "send": { - "!type": "fn(data: String)" - } - }, - "WebSocket_obj": { - "!type": "fn(url: String, protocols: String)", - "prototype": "WebSocket" - }, - "EventHandler": { - "!proto": "Object" - }, - "XMLHttpRequest": { - "!proto": "Object", - "onreadystatechange": "EventHandler", - "open": { - "!type": "fn(method: String, url: String, async?: Boolean, user?: String, password?: String)" - }, - "setRequestHeader": { - "!type": "fn(header: String, value: String)" - }, - "timeout": "Number", - "withCredentials": "Boolean", - "upload": "Object", - "send": { - "!type": "fn(data?: String)" - }, - "abort": { - "!type": "fn()" - }, - "getResponseHeader": { - "!type": "fn(header: String) -> String" - }, - "getAllResponseHeaders": { - "!type": "fn() -> String" - }, - "overrideMimeType": "Object", - "responseType": "Object", - "readyState": "Number", - "response": "Object", - "responseText": "String", - "responseXML": "Document", - "status": "Number", - "statusText": "String" - }, - "XHR_obj": { - "!type": "fn()", - "prototype": "XMLHttpRequest" - }, - "Worker_proto": { - "!proto": "Object", - "terminate": { - "!type": "fn()" - }, - "postMessage": { - "!type": "fn(message: String, transfer?: Object)" - }, - "onmessage": { - "!type": "fn()" - } - }, - "Worker_obj": { - "!type": "fn(url: String)", - "prototype": "Worker_proto" - }, - "HTMLOptionElement": { - "!proto": "HTMLElement" - }, - "HTMLElement": { - "!proto": "Element", - "id": "String", - "title": "String", - "lang": "String", - "dir": "String", - "className": "String" - }, - "HTMLImageElement": { - "!proto": "HTMLElement" - }, - "Event": { - "!proto": "Object", - "bubbles": "Boolean", - "cancelable": "Boolean", - "currentTarget": "Object", - "defaultPrevented": "Boolean", - "eventPhase": "Number", - "explicitOriginalTarget": "Object", - "originalTarget": "Object", - "target": "Object", - "timeStamp": "Number", - "isTrusted": "Boolean", - "initEvent": { - "!type": "fn(type: String, bubbles: Boolean, cancelable: Boolean)" - }, - "preventDefault": { - "!type": "fn()" - }, - "stopImmediatePropagation": { - "!type": "fn()" - }, - "stopPropagation": { - "!type": "fn()" - } - }, - "Event_obj": { - "!type": "fn(type: String)", - "prototype": "Event" - }, - "MediaQueryList": { - "!proto": "Object" - }, - "Selection": { - "!proto": "Object", - "anchorNode": "Node", - "anchorOffset": "Number", - "focusNode": "Node", - "focusOffset": "Number", - "rangeCount": "Number", - "isCollapsed": "Boolean", - "collapse": { - "!type": "fn(node: Node, offset: Number)" - }, - "collapseToStart": { - "!type": "fn()" - }, - "collapseToEnd": { - "!type": "fn()" - }, - "extend": { - "!type": "fn(node: Node, offset: Number)" - }, - "selectAllChildren": { - "!type": "fn(node: Node)" - }, - "deleteFromDocument": { - "!type": "fn()" - }, - "getRangeAt": { - "!type": "fn(index: Number) -> Range" - }, - "addRange": { - "!type": "fn(range: Range)" - }, - "removeRange": { - "!type": "fn(range: Range)" - }, - "removeAllRanges": { - "!type": "fn()" - } - }, - "Range": { - "!proto": "Object", - "startContainer": "Node", - "startOffset": "Number", - "endContainer": "Node", - "endOffset": "Number", - "collapsed": "Boolean", - "commonAncestorContainer": "Node", - "setStart": { - "!type": "fn(refNode: Node, offset: Number)" - }, - "setEnd": { - "!type": "fn(refNode: Node, offset: Number)" - }, - "setStartBefore": { - "!type": "fn(refNode: Node)" - }, - "setStartAfter": { - "!type": "fn(refNode: Node)" - }, - "setEndBefore": { - "!type": "fn(refNode: Node)" - }, - "setEndAfter": { - "!type": "fn(refNode: Node)" - }, - "collapse": { - "!type": "fn(toStart: Node)" - }, - "selectNode": { - "!type": "fn(refNode: Node)" - }, - "selectNodeContents": { - "!type": "fn(refNode: Node)" - }, - "compareBoundaryPoints": { - "!type": "fn(how: Object, sourceRange: Object) -> Number" - }, - "deleteContents": { - "!type": "fn()" - }, - "extractContents": { - "!type": "fn() -> DocumentFragment" - }, - "cloneContents": { - "!type": "fn() -> DocumentFragment" - }, - "insertNode": { - "!type": "fn(node: Node)" - }, - "surroundContents": { - "!type": "fn(nodeParent: Node)" - }, - "cloneRange": { - "!type": "fn() -> Range" - }, - "detach": { - "!type": "fn()" - }, - "isPointInRange": { - "!type": "fn(node: Node, offset: Number) -> Boolean" - }, - "comparePoint": { - "!type": "fn(node: Node, offset: Number) -> Number" - }, - "intersectsNode": { - "!type": "fn(node: Node) -> Boolean" - } - }, - "DocumentFragment": { - "!proto": "Node", - "prepend": { - "!type": "fn(nodes: Node)" - }, - "append": { - "!type": "fn(nodes: Node)" - } - }, - "CSSStyleDeclaration": { - "!proto": "Object" - }, - "Node": { - "!proto": "Object", - "nodeType": "Number", - "nodeName": "String", - "baseURI": "String", - "ownerDocument": "Document", - "parentNode": "Node", - "parentElement": "Element", - "childNodes": "NodeList", - "firstChild": "Node", - "lastChild": "Node", - "previousSibling": "Node", - "nextSibling": "Node", - "nodeValue": "String", - "textContent": "String", - "hasChildNodes": { - "!type": "fn() -> Boolean" - }, - "compareDocumentPosition": { - "!type": "fn(other: Node) -> Number" - }, - "contains": { - "!type": "fn(other: Node) -> Boolean" - }, - "insertBefore": { - "!type": "fn(child: Node) -> Node" - }, - "appendChild": { - "!type": "fn(node: Node) -> Node" - }, - "replaceChild": { - "!type": "fn(child: Node) -> Node" - }, - "removeChild": { - "!type": "fn(child: Node) -> Node" - }, - "normalize": { - "!type": "fn()" - }, - "cloneNode": { - "!type": "fn(deep?: Boolean) -> Node" - }, - "isEqualNode": { - "!type": "fn(node: Node) -> Boolean" - }, - "lookupPrefix": { - "!type": "fn(namespace: String) -> String" - }, - "lookupNamespaceURI": { - "!type": "fn(prefix: String) -> String" - }, - "isDefaultNamespace": { - "!type": "fn(namespace: String) -> Boolean" - } - }, - "Node_obj": { - "!type": "fn()", - "prototype": "Node" - }, - "NodeList": { - "!proto": "Object", - "item": "Node", - "length": "Number" - }, - "Screen": { - "!proto": "Object", - "availTop": "Number", - "availLeft": "Number", - "availHeight": "Number", - "availWidth": "Number", - "colorDepth": "Number", - "height": "Number", - "left": "Number", - "pixelDepth": "Number", - "top": "Number", - "width": "Number" - }, - "Performance": { - "!proto": "Object" - }, - "Navigator": { - "!proto": "Object", - "appName": "String", - "appVersion": "String", - "connection": "Connection", - "cookieEnabled": "Boolean", - "language": "String", - "mimeTypes": "MimeTypeArray", - "onLine": "Boolean", - "oscpu": "String", - "platform": "String", - "plugins": "String", - "userAgent": "String", - "javaEnabled": { - "!type": "fn() -> Boolean" - }, - "registerContentHandler": { - "!type": "fn(mimType: String, url: String, title: String)" - }, - "registerProtocolHandler": { - "!type": "fn(protocol: String, url: String, title: String)" - } - }, - "MimeTypeArray": { - "length": "Number", - "item": { - "!type": "fn(index: Number) -> MimeType" - }, - "namedItem": { - "!type": "fn(name: String) -> MimeType" - } - }, - "MimeType": { - "description": "String", - "suffixes": "String", - "type": "String", - "enabledPlugin": "Plugin" - }, - "Plugin": { - "description": "String", - "fileName": "String", - "length": "Number", - "name": "String", - "item": { - "!type": "fn(index: Number) -> MimeType" - }, - "namedItem": { - "!type": "fn(name: String) -> MimeType" - } - }, - "Connection": { - "bandwidth": "Number", - "metered": "Boolean", - "onchange": "Function" - }, - "Storage": { - "!proto": "Object", - "length": "Number", - "key": { - "!type": "fn(idx: Number) -> String" - }, - "getItem": { - "!type": "fn(key: String) -> String" - }, - "setItem": { - "!type": "fn(key: String, value: String)" - }, - "removeItem": { - "!type": "fn(key: String)" - }, - "clear": { - "!type": "fn()" - } - }, - "BarInfo": { - "!proto": "Object", - "visible": "Boolean" - }, - "Location": { - "!proto": "Object", - "assign": { - "!type": "fn(url: String)" - }, - "replace": { - "!type": "fn(url: String)" - }, - "reload": { - "!type": "fn()" - }, - "href": "String", - "protocol": "String", - "host": "String", - "hostname": "String", - "port": "String", - "pathname": "String", - "search": "String", - "hash": "String" - }, - "History": { - "!proto": "Object", - "length": "Number", - "state": "Object", - "go": { - "!type": "fn(delta: Number)" - }, - "back": { - "!type": "fn()" - }, - "forward": { - "!type": "fn()" - }, - "pushState": { - "!type": "fn(data: Object, title: String, url: String)" - }, - "replaceState": { - "!type": "fn(data: Object, title: String, url: String)" - } - }, - "Element": { - "!proto": "Node", - "namespaceURI": "String", - "prefix": "String", - "localName": "String", - "tagName": "String", - "id": "String", - "className": "String", - "classList": "DOMTokenList", - "attributes": "Array", - "childElementCount": "Number", - "children": "HTMLCollection", - "firstElementChild": "Element", - "lastElementChild": "Element", - "previousElementSibling": "Element", - "nextElementSibling": "Element", - "getAttribute": { - "!type": "fn(name: String) -> String" - }, - "getAttributeNS": { - "!type": "fn(namespace: String, localname: String) -> String" - }, - "setAttribute": { - "!type": "fn(name: String, value: Object)" - }, - "setAttributeNS": { - "!type": "fn(namespace: String, name: String, value: Object)" - }, - "removeAttribute": { - "!type": "fn(name: String)" - }, - "removeAttributeNS": { - "!type": "fn(namespace: String, localname: String)" - }, - "hasAttribute": { - "!type": "fn(name: String) -> Boolean" - }, - "hasAttributeNS": { - "!type": "fn(namespace: String, localname: String) -> Boolean" - }, - "getElementsByTagName": { - "!type": "fn(localName: String) -> HTMLCollection" - }, - "getElementsByTagNameNS": { - "!type": "fn(namespace: String, localName: String) -> HTMLCollection" - }, - "getElementsByClassName": { - "!type": "fn(classname: String) -> HTMLCollection" - }, - "prepend": { - "!type": "fn(nodes: Node)" - }, - "append": { - "!type": "fn(nodes: Node)" - }, - "before": { - "!type": "fn(nodes: Node)" - }, - "after": { - "!type": "fn(nodes: Node)" - }, - "replace": { - "!type": "fn(nodes: Node)" - }, - "remove": { - "!type": "fn()" - } - }, - "HTMLCollection": { - "!proto": "Object", - "length": "Number", - "item": { - "!type": "fn(index: Number) -> Element" - }, - "namedItem": { - "!type": "fn(name: String) -> Element" - } - }, - "DOMTokenList": { - "!proto": "Object", - "length": "Number", - "item": { - "!type": "fn(index: Number) -> String" - }, - "contains": { - "!type": "fn(token: String) -> Boolean" - }, - "add": { - "!type": "fn(token: String)" - }, - "remove": { - "!type": "fn(token: String)" - }, - "toggle": { - "!type": "fn(token: String) -> Boolean" - } - }, - "Document": { - "!proto": "Node", - "implementation": "DOMImplementation", - "URL": "String", - "documentURI": "String", - "compatMode": "String", - "characterSet": "String", - "contentType": "String", - "doctype": "DocumentType", - "documentElement": "Element", - "getElementsByTagName": { - "!type": "fn(localName: String) -> HTMLCollection" - }, - "getElementsByTagNameNS": { - "!type": "fn(namespace: String, localName: String) -> HTMLCollection" - }, - "getElementsByClassName": { - "!type": "fn(classNames: String) -> HTMLCollection" - }, - "getElementById": { - "!type": "fn(elementId: String) -> Element" - }, - "createElement": { - "!type": "fn(elementId: String) -> Element" - }, - "createElementNS": { - "!type": "fn(namespace: String, qualifiedName: String) -> Element" - }, - "createDocumentFragment": { - "!type": "fn() -> DocumentFragment" - }, - "createTextNode": { - "!type": "fn(data: String) -> Text" - }, - "createComment": { - "!type": "fn(data: String) -> Comment" - }, - "createProcessingInstruction": { - "!type": "fn(target: String, data: String) -> ProcessingInstruction" - }, - "importNode": { - "!type": "fn(node: Node, deep?: Boolean) -> Node" - }, - "adoptNode": { - "!type": "fn(node: Node) -> Node" - }, - "createEvent": { - "!type": "fn(eventInterfaceName: String) -> Event" - }, - "createRange": { - "!type": "fn() -> Range" - }, - "createNodeIterator": { - "!type": "fn(root: Node, whatToShow?: Object, filter?: Object) -> NodeIterator" - }, - "createTreeWalker": { - "!type": "fn(root: Node, whatToShow?: Object, filter?: Object) -> TreeWalker" - } - }, - "TreeWalker": { - "!proto": "Object" - }, - "NodeIterator": { - "!proto": "Object" - }, - "ProcessingInstruction": { - "!proto": "Node" - }, - "Comment": { - "!proto": "Node" - }, - "Text": { - "!proto": "Node" - }, - "DocumentType": { - "!proto": "Node", - "name": "String", - "publicId": "String", - "systemId": "String", - "before": { - "!type": "fn(nodeOrString: Node)" - }, - "after": { - "!type": "fn(nodeOrString: Node)" - }, - "replace": { - "!type": "fn(nodeOrString: Node)" - }, - "remove": { - "!type": "fn()" - } - }, - "DOMImplementation": { - "!proto": "Object", - "createDocumentType": { - "!type": "fn(qualifiedName: String, publicId: String, systemId: String) -> DocumentType" - }, - "createDocument": { - "!type": "fn(namespace: String, qualifiedName: String, doctype: String) -> Document" - }, - "createHTMLDocument": { - "!type": "fn(title: String) -> Document" - }, - "hasFeature": { - "!type": "fn(feature: String) -> Boolean" - } - }, - "Console": { - "debug": { - "!type": "fn(msg: String)" - }, - "dir": { - "!type": "fn(obj: Object)" - }, - "error": { - "!type": "fn(msg: String)" - }, - "group": { - "!type": "fn()" - }, - "groupCollapsed": { - "!type": "fn()" - }, - "groupEnd": { - "!type": "fn()" - }, - "info": { - "!type": "fn(msg: String)" - }, - "log": { - "!type": "fn(msg: String)" - }, - "time": { - "!type": "fn(timerName: String)" - }, - "timeEnd": { - "!type": "fn(timerName: String)" - }, - "trace": { - "!type": "fn()" - }, - "warn": { - "!type": "fn(msg: String)" - } - }, - "DOMApplicationCache": { - "!proto": "Object" - } - }, - "this": "", - "applicationCache": "DOMApplicationCache", - "closed": "Boolean", - "console": "Console", - "defaultStatus": "String", - "document": "Document", - "frameElement": "Element", - "frames": "Array", - "history": "History", - "innerHeight": "Number", - "innerWidth": "Number", - "length": "Number", - "location": "Location", - "locationbar": "BarInfo", - "localStorage": "Storage", - "menubar": "BarInfo", - "name": "String", - "navigator": "Navigator", - "opener": "", - "outerHeight": "Number", - "outerWidth": "Number", - "pageXOffset": "Number", - "pageYOffset": "Number", - "parent": "", - "performance": "Performance", - "personalbar": "BarInfo", - "screen": "Screen", - "screenX": "Number", - "screenY": "Number", - "scrollbars": "BarInfo", - "scrollMaxX": "Number", - "scrollMaxY": "Number", - "scrollX": "Number", - "scrollY": "Number", - "self": "", - "sessionStorage": "Storage", - "sidebar": "BarInfo", - "status": "String", - "statusbar": "BarInfo", - "toolbar": "BarInfo", - "top": "", - "window": "", - "addEventListener": { - "!type": "fn()" - }, - "alert": { - "!type": "fn(msg: String)" - }, - "atob": { - "!type": "fn(val: Object) -> String" - }, - "back": { - "!type": "fn()" - }, - "blur": { - "!type": "fn()" - }, - "btoa": { - "!type": "fn(val: Object) -> String" - }, - "clearInterval": { - "!type": "fn(t: Number)" - }, - "clearTimeout": { - "!type": "fn(t: Number)" - }, - "close": { - "!type": "fn()" - }, - "confirm": { - "!type": "fn(msg: String) -> Boolean" - }, - "dispatchEvent": { - "!type": "fn(domnode: Node)" - }, - "dump": { - "!type": "fn(msg: String)" - }, - "escape": { - "!type": "fn(str: String) -> String" - }, - "find": { - "!type": "fn(str: String) -> Boolean" - }, - "focus": { - "!type": "fn()" - }, - "forward": { - "!type": "fn()" - }, - "getAttention": { - "!type": "fn()" - }, - "getComputedStyle": { - "!type": "fn(domnode: Node) -> CSSStyleDeclaration" - }, - "getSelection": { - "!type": "fn() -> Selection" - }, - "home": { - "!type": "fn()" - }, - "matchMedia": { - "!type": "fn(query: Object) -> MediaQueryList" - }, - "moveBy": { - "!type": "fn(deltaX: Number, deltaY: Number)" - }, - "moveTo": { - "!type": "fn(x: Number, y: Number)" - }, - "open": { - "!type": "fn(strUrl: String, strWindowName: String, strWindowFeatures?: String) -> " - }, - "openDialog": { - "!type": "fn(strUrl: String, strWindowName: String, strWindowFeatures: String, args?: String) -> " - }, - "postMessage": { - "!type": "fn(message: String, targetOrigin: String)" - }, - "print": { - "!type": "fn()" - }, - "prompt": { - "!type": "fn(message: String) -> String" - }, - "removeEventListener": { - "!type": "fn(type: String, listener: Object, useCapture?: Boolean)" - }, - "resizeBy": { - "!type": "fn(deltaX: Number, deltaY: Number)" - }, - "resizeTo": { - "!type": "fn(x: Number, y: Number)" - }, - "scroll": { - "!type": "fn(x: Number, y: Number)" - }, - "scrollBy": { - "!type": "fn(deltaX: Number, deltaY: Number)" - }, - "scrollByLines": { - "!type": "fn(lines: Number)" - }, - "scrollByPages": { - "!type": "fn(pages: Number)" - }, - "scrollTo": { - "!type": "fn(x: Number, y: Number)" - }, - "setCursor": { - "!type": "fn(cursor: String)" - }, - "setInterval": { - "!type": "fn(callback: Function, ms: Number) -> Number" - }, - "setTimeout": { - "!type": "fn(callback: Function, ms: Number) -> Number" - }, - "sizeToContent": { - "!type": "fn()" - }, - "stop": { - "!type": "fn()" - }, - "unescape": { - "!type": "fn(str: String) -> String" - }, - "updateCommands": { - "!type": "fn(cmdName: String)" - }, - "onabort": { - "!type": "fn(event: Event)" - }, - "onbeforeunload": { - "!type": "fn(event: Event)" - }, - "onblur": { - "!type": "fn(event: Event)" - }, - "onchange": { - "!type": "fn(event: Event)" - }, - "onclick": { - "!type": "fn(event: Event)" - }, - "onclose": { - "!type": "fn(event: Event)" - }, - "oncontextmenu": { - "!type": "fn(event: Event)" - }, - "ondevicemotion": { - "!type": "fn(event: Event)" - }, - "ondeviceorientation": { - "!type": "fn(event: Event)" - }, - "ondragdrop": { - "!type": "fn(event: Event)" - }, - "onerror": { - "!type": "fn(event: Event)" - }, - "onfocus": { - "!type": "fn(event: Event)" - }, - "onhashchange": { - "!type": "fn(event: Event)" - }, - "onkeydown": { - "!type": "fn(event: Event)" - }, - "onkeypress": { - "!type": "fn(event: Event)" - }, - "onkeyup": { - "!type": "fn(event: Event)" - }, - "onload": { - "!type": "fn(event: Event)" - }, - "onmousedown": { - "!type": "fn(event: Event)" - }, - "onmousemove": { - "!type": "fn(event: Event)" - }, - "onmouseout": { - "!type": "fn(event: Event)" - }, - "onmouseover": { - "!type": "fn(event: Event)" - }, - "onmouseup": { - "!type": "fn(event: Event)" - }, - "onpaint": { - "!type": "fn(event: Event)" - }, - "onpopstate": { - "!type": "fn(event: Event)" - }, - "onreset": { - "!type": "fn(event: Event)" - }, - "onresize": { - "!type": "fn(event: Event)" - }, - "onscroll": { - "!type": "fn(event: Event)" - }, - "onselect": { - "!type": "fn(event: Event)" - }, - "onsubmit": { - "!type": "fn(event: Event)" - }, - "onunload": { - "!type": "fn(event: Event)" - }, - "onpageshow": { - "!type": "fn(event: Event)" - }, - "onpagehide": { - "!type": "fn(event: Event)" - }, - "Image": { - "!type": "fn(width?: Number, height?: Number)" - }, - "Option": { - "!type": "fn(text?: String, value?: Object, defaultSelected?: Boolean, selected?: Boolean)" - }, - "Worker": "Worker_obj", - "XMLHttpRequest": "XHR_obj", - "WebSocket": "WebSocket_obj", - "Event": "Event_obj", - "Node": "Node_obj" - }; -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/ecma5Index.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/ecma5Index.js deleted file mode 100644 index f110a1a2..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/ecma5Index.js +++ /dev/null @@ -1,598 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2013 IBM Corporation. - * 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 - ******************************************************************************/ - -// this file was generated by a script from the model in types.js -/*global define */ -define('javascript/contentAssist/indexFiles/ecma5Index', [ -], function () { - return { - "!name": "ecma5", - "!define": { - "Error": { - "name": { - "!type": "String" - }, - "message": { - "!type": "String" - }, - "stack": { - "!type": "String" - }, - "!proto": "Object" - }, - "Error_obj": { - "!type": "fn(err?: Error)", - "prototype": "Error" - }, - "RegExp": { - "source": { - "!type": "String" - }, - "global": { - "!type": "Boolean" - }, - "ignoreCase": { - "!type": "Boolean" - }, - "multiline": { - "!type": "Boolean" - }, - "lastIndex": { - "!type": "Boolean" - }, - "exec": { - "!type": "fn(str: String) -> [String]" - }, - "test": { - "!type": "fn(str: String) -> Boolean" - }, - "!proto": "Object" - }, - "RegExp_obj": { - "!type": "fn(val?: RegExp)", - "prototype": "RegExp" - }, - "Date": { - "toDateString": { - "!type": "fn() -> String" - }, - "toTimeString": { - "!type": "fn() -> String" - }, - "toUTCString": { - "!type": "fn() -> String" - }, - "toISOString": { - "!type": "fn() -> String" - }, - "toJSON": { - "!type": "fn(key: String) -> Object" - }, - "toLocaleDateString": { - "!type": "fn() -> String" - }, - "toLocaleTimeString": { - "!type": "fn() -> String" - }, - "getTime": { - "!type": "fn() -> Number" - }, - "getTimezoneOffset": { - "!type": "fn() -> Number" - }, - "getDay": { - "!type": "fn() -> Number" - }, - "getUTCDay": { - "!type": "fn() -> Number" - }, - "getFullYear": { - "!type": "fn() -> Number" - }, - "getUTCFullYear": { - "!type": "fn() -> Number" - }, - "getHours": { - "!type": "fn() -> Number" - }, - "getUTCHours": { - "!type": "fn() -> Number" - }, - "getMinutes": { - "!type": "fn() -> Number" - }, - "getUTCMinutes": { - "!type": "fn() -> Number" - }, - "getSeconds": { - "!type": "fn() -> Number" - }, - "getUTCSeconds": { - "!type": "fn() -> Number" - }, - "getMilliseconds": { - "!type": "fn() -> Number" - }, - "getUTCMilliseconds": { - "!type": "fn() -> Number" - }, - "getMonth": { - "!type": "fn() -> Number" - }, - "getUTCMonth": { - "!type": "fn() -> Number" - }, - "getDate": { - "!type": "fn() -> Number" - }, - "getUTCDate": { - "!type": "fn() -> Number" - }, - "setTime": { - "!type": "fn() -> Number" - }, - "setTimezoneOffset": { - "!type": "fn() -> Number" - }, - "setDay": { - "!type": "fn(dayOfWeek: Number) -> Number" - }, - "setUTCDay": { - "!type": "fn(dayOfWeek: Number) -> Number" - }, - "setFullYear": { - "!type": "fn(year: Number, month?: Number, date?: Number) -> Number" - }, - "setUTCFullYear": { - "!type": "fn(year: Number, month?: Number, date?: Number) -> Number" - }, - "setHours": { - "!type": "fn(hour: Number, min?: Number, sec?: Number, ms?: Number) -> Number" - }, - "setUTCHours": { - "!type": "fn(hour: Number, min?: Number, sec?: Number, ms?: Number) -> Number" - }, - "setMinutes": { - "!type": "fn(min: Number, sec?: Number, ms?: Number) -> Number" - }, - "setUTCMinutes": { - "!type": "fn(min: Number, sec?: Number, ms?: Number) -> Number" - }, - "setSeconds": { - "!type": "fn(sec: Number, ms?: Number) -> Number" - }, - "setUTCSeconds": { - "!type": "fn(sec: Number, ms?: Number) -> Number" - }, - "setMilliseconds": { - "!type": "fn(ms: Number) -> Number" - }, - "setUTCMilliseconds": { - "!type": "fn(ms: Number) -> Number" - }, - "setMonth": { - "!type": "fn(month: Number, date?: Number) -> Number" - }, - "setUTCMonth": { - "!type": "fn(month: Number, date?: Number) -> Number" - }, - "setDate": { - "!type": "fn(date: Number) -> Number" - }, - "setUTCDate": { - "!type": "fn(date: Number) -> Number" - }, - "!proto": "Object" - }, - "Date_obj": { - "!type": "fn(val?: Date)", - "now": { - "!type": "fn() -> Number" - }, - "parse": { - "!type": "fn(dateString: String) -> Number" - }, - "UTC": { - "!type": "fn(year: Number, month: Number, date?: Number, hrs?: Number, min?:Number, sec?:Number, ms?:Number) -> Number" - }, - "prototype": "Date" - }, - "Boolean": { - "!proto": "Object" - }, - "Boolean_obj": { - "!type": "fn(val?: Boolean)", - "prototype": "Boolean" - }, - "Array": { - "concat": { - "!type": "fn(first: Array, rest: Array) -> Array" - }, - "join": { - "!type": "fn(separator: Object) -> String" - }, - "length": { - "!type": "Number" - }, - "pop": { - "!type": "fn() -> Object" - }, - "push": { - "!type": "fn(vals: Object) -> Object" - }, - "reverse": { - "!type": "fn() -> Array" - }, - "shift": { - "!type": "fn() -> Object" - }, - "slice": { - "!type": "fn(start: Number, deleteCount: Number, items: Object) -> Array" - }, - "splice": { - "!type": "fn(start: Number, end: Number) -> Array" - }, - "sort": { - "!type": "fn(sorter?: Object) -> Array" - }, - "unshift": { - "!type": "fn(items: Object) -> Number" - }, - "indexOf": { - "!type": "fn(searchElement: Object, fromIndex?: Number) -> Number" - }, - "lastIndexOf": { - "!type": "fn(searchElement: Object, fromIndex?: Number) -> Number" - }, - "every": { - "!type": "fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Boolean" - }, - "some": { - "!type": "fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Boolean" - }, - "forEach": { - "!type": "fn(callbackFn: fn(elt: Object), thisArg?: Object) -> Object" - }, - "map": { - "!type": "fn(callbackFn: fn(elt: Object) -> Object, thisArg?: Object) -> Array" - }, - "filter": { - "!type": "fn(callbackFn: fn(elt: Object) -> Boolean, thisArg?: Object) -> Array" - }, - "reduce": { - "!type": "fn(callbackFn: fn(elt: Object) -> Object, initialValue?: Object) -> Array" - }, - "reduceRight": { - "!type": "fn(callbackFn: fn(elt: Object) -> Object, initialValue?: Object) -> Array" - }, - "!proto": "Object" - }, - "Array_obj": { - "!type": "fn(val?: Array)", - "isArray": { - "!type": "fn(obj: Object) -> Boolean" - }, - "prototype": "Array" - }, - "Function": { - "apply": { - "!type": "fn(func: fn(), argArray?: Array) -> Object" - }, - "arguments": { - "!type": "Arguments" - }, - "bind": { - "!type": "fn(func: fn(), args: Object) -> Object" - }, - "call": { - "!type": "fn(func: fn(), args: Object) -> Object" - }, - "caller": { - "!type": "Function" - }, - "length": { - "!type": "Number" - }, - "name": { - "!type": "String" - }, - "!proto": "Object" - }, - "Function_obj": { - "!type": "fn()", - "prototype": "Function" - }, - "Arguments": { - "callee": { - "!type": "Function" - }, - "length": { - "!type": "Number" - }, - "!proto": "Object" - }, - "JSON": { - "parse": { - "!type": "fn(str: String) -> Object" - }, - "stringify": { - "!type": "fn(json: Object) -> String" - }, - "!proto": "Object" - }, - "Math": { - "E": { - "!type": "Number" - }, - "LN2": { - "!type": "Number" - }, - "LN10": { - "!type": "Number" - }, - "LOG2E": { - "!type": "Number" - }, - "LOG10E": { - "!type": "Number" - }, - "PI": { - "!type": "Number" - }, - "SQRT1_2": { - "!type": "Number" - }, - "SQRT2": { - "!type": "Number" - }, - "abs": { - "!type": "fn(val: Number) -> Number" - }, - "acos": { - "!type": "fn(val: Number) -> Number" - }, - "asin": { - "!type": "fn(val: Number) -> Number" - }, - "atan": { - "!type": "fn(val: Number) -> Number" - }, - "atan2": { - "!type": "fn(val1: Number, val2: Number) -> Number" - }, - "ceil": { - "!type": "fn(val: Number) -> Number" - }, - "cos": { - "!type": "fn(val: Number) -> Number" - }, - "exp": { - "!type": "fn(val: Number) -> Number" - }, - "floor": { - "!type": "fn(val: Number) -> Number" - }, - "log": { - "!type": "fn(val: Number) -> Number" - }, - "max": { - "!type": "fn(val1: Number, val2: Number) -> Number" - }, - "min": { - "!type": "fn(val1: Number, val2: Number) -> Number" - }, - "pow": { - "!type": "fn(x: Number, y: Number) -> Number" - }, - "random": { - "!type": "fn() -> Number" - }, - "round": { - "!type": "fn(val: Number) -> Number" - }, - "sin": { - "!type": "fn(val: Number) -> Number" - }, - "sqrt": { - "!type": "fn(val: Number) -> Number" - }, - "tan": { - "!type": "fn(val: Number) -> Number" - }, - "!proto": "Object" - }, - "Number": { - "toExponential": { - "!type": "fn(digits: Number) -> String" - }, - "toFixed": { - "!type": "fn(digits: Number) -> String" - }, - "toPrecision": { - "!type": "fn(digits: Number) -> String" - }, - "!proto": "Object" - }, - "Number_obj": { - "!type": "fn(val?: Number)", - "MAX_VALUE": "Number", - "MIN_VALUE": "Number", - "prototype": "Number" - }, - "Object": { - "toString": { - "!type": "fn() -> String" - }, - "toLocaleString": { - "!type": "fn() -> String" - }, - "valueOf": { - "!type": "fn() -> Object" - }, - "hasOwnProperty": { - "!type": "fn(property: String) -> Boolean" - }, - "isPrototypeOf": { - "!type": "fn(object: Object) -> Boolean" - }, - "propertyIsEnumerable": { - "!type": "fn(property: String) -> Boolean" - } - }, - "Object_obj": { - "!type": "fn(val?: Object)", - "create": { - "!type": "fn(proto: Object, propertiesObject?: Object) -> Object" - }, - "defineProperty": { - "!type": "fn(obj: Object, prop: String, descriptor: Object) -> Object" - }, - "defineProperties": { - "!type": "fn(obj: Object, props: Object) -> Object" - }, - // TODO specify property-descriptor return type - "getOwnPropertyDescriptor": { - "!type": "fn(obj: Object, prop: String) -> Object" - }, - "keys": { - "!type": "fn(obj: Object) -> Array" - }, - "getOwnPropertyNames": { - "!type": "fn(obj: Object) -> Array" - }, - "getPrototypeOf": { - "!type": "fn(obj: Object) -> Object" - }, - "prototype": "Object" - }, - "String": { - "charAt": { - "!type": "fn(index: Number) -> String" - }, - "charCodeAt": { - "!type": "fn(index: Number) -> Number" - }, - "concat": { - "!type": "fn(str: String) -> String" - }, - "indexOf": { - "!type": "fn(searchString: String, start?: Number) -> Number" - }, - "lastIndexOf": { - "!type": "fn(searchString: String, start?: Number) -> Number" - }, - "length": { - "!type": "Number" - }, - "localeCompare": { - "!type": "fn(str: String) -> Number" - }, - "match": { - "!type": "fn(regexp: String) -> Boolean" - }, - "replace": { - "!type": "fn(searchValue: String, replaceValue: String) -> String" - }, - "search": { - "!type": "fn(regexp: String) -> String" - }, - "slice": { - "!type": "fn(start: Number, end: Number) -> String" - }, - "split": { - "!type": "fn(separator: String, limit?: Number) -> [String]" - }, - "substring": { - "!type": "fn(start: Number, end?: Number) -> String" - }, - "toLocaleUpperCase": { - "!type": "fn() -> String" - }, - "toLowerCase": { - "!type": "fn() -> String" - }, - "toLocaleLowerCase": { - "!type": "fn() -> String" - }, - "toUpperCase": { - "!type": "fn() -> String" - }, - "trim": { - "!type": "fn() -> String" - }, - "!proto": "Object" - }, - "String_obj": { - "!type": "fn(val?: Object)", - "fromCharCode": { - "!type": "fn(num1: Number, rest: Number) -> String" - }, - "prototype": "String", - "!proto": "Object" - } - }, - "decodeURI": { - "!type": "fn(uri: String) -> String" - }, - "encodeURI": { - "!type": "fn(uri: String) -> String" - }, - "eval": { - "!type": "fn(toEval: String) -> Object" - }, - "parseInt": { - "!type": "fn(str: String, radix?: Number) -> Number" - }, - "parseFloat": { - "!type": "fn(str: String, radix?: Number) -> Number" - }, - "Math": { - "!type": "Math" - }, - "JSON": { - "!type": "JSON" - }, - "Object": "Object_obj", - "Function": "Function_obj", - "Array": "Array_obj", - "Boolean": "Boolean_obj", - "Number": "Number_obj", - "Date": "Date_obj", - "RegExp": "RegExp_obj", - "String": "String_obj", - "Error": "Error_obj", - "undefined": { - "!type": "?" - }, - "isNaN": { - "!type": "fn(num: Number) -> Boolean" - }, - "isFinite": { - "!type": "fn(num: Number) -> Boolean" - }, - "NaN": { - "!type": "number" - }, - "Infinity": { - "!type": "number" - }, - "decodeURIComponent": { - "!type": "fn(encodedURIString: String) -> String" - }, - "encodeURIComponent": { - "!type": "fn(decodedURIString: String) -> String" - }, - "this": { - "!type": "" - } - }; -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/express.json b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/express.json deleted file mode 100644 index b5328b7f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/express.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "!define": { - "response": { - "send": {"!type": "fn(body: String) -> response"}, - "get": {"!type": "fn(field: String) -> String"}, - "location": {"!type": "fn(url: String) -> response"}, - "status": {"!type": "fn(code: Number) -> response"}, - "set": {"!type": "fn(field: Object, val: String) -> response"}, - "links": {"!type": "fn(links: Object) -> response"}, - "download": {"!type": "fn(path: String, filename: String, fn: fn())"}, - "contentType": {"!type": "fn(type: String)"}, - "format": {"!type": "fn(obj: Object) -> response"}, - "attachment": {"!type": "fn(filename: String) -> response"}, - "type": {"!type": "fn(type: String)"}, - "vary": {"!type": "fn(field: Object) -> response"}, - "header": {"!type": "fn(field: Object, val: String) -> response"}, - "render": {"!type": "fn(view: String, options: Object, fn: fn())"}, - "cookie": {"!type": "fn(name: String, val: Object, options: Object) -> response"}, - "sendfile": {"!type": "fn(path: String, options: Object, fn: fn())"}, - "json": {"!type": "fn(obj: Object) -> response"}, - "jsonp": {"!type": "fn(obj: Object) -> response"}, - "redirect": {"!type": "fn(url: String)"}, - "clearCookie": {"!type": "fn(name: String, options: Object) -> response"}, - "!proto": "Object" - }, - "application": { - "enabled": {"!type": "fn(setting: String) -> Boolean"}, - "engine": {"!type": "fn(ext: String, fn: fn()) -> Object"}, - "param": {"!type": "fn(name: String, fn: fn()) -> Object"}, - "set": {"!type": "fn(setting: String, val: String) -> Object"}, - "enable": {"!type": "fn(setting: String) -> Object"}, - "init": {"!type": "fn()"}, - "use": {"!type": "fn(route: String, fn: fn()) -> Object"}, - "defaultConfiguration": {"!type": "fn()"}, - "render": {"!type": "fn(name: String, options: Object, fn: fn())"}, - "path": {"!type": "fn() -> String"}, - "disable": {"!type": "fn(setting: String) -> Object"}, - "listen": {"!type": "fn()"}, - "configure": {"!type": "fn(env: String, fn: fn()) -> Object"}, - "all": {"!type": "fn(path: String) -> Object"}, - "disabled": {"!type": "fn(setting: String) -> Boolean"}, - "!proto": "Object" - }, - "middleware": { - "init": {"!type": "fn(app: fn())"}, - "!proto": "Object" - }, - "request": { - "acceptsLanguage": {"!type": "fn(lang: String) -> Boolean"}, - "acceptsCharset": {"!type": "fn(charset: String) -> Boolean"}, - "acceptsEncoding": {"!type": "fn(encoding: String) -> Boolean"}, - "is": {"!type": "fn(type: String) -> Boolean"}, - "get": {"!type": "fn(name: String) -> Object"}, - "range": {"!type": "fn(size: Number)"}, - "param": {"!type": "fn(name: String, defaultValue: Object) -> String"}, - "accepts": {"!type": "fn(type: Object)"}, - "header": {"!type": "fn(name: String) -> Object"}, - "!proto": "Object" - }, - "express": { - "response": "response", - "application": "application", - "!type": "fn() -> application", - "request": "request", - "Router": "Router", - "Route": "Route", - "!proto": "Object", - "createServer": {"!type": "fn() -> application"} - }, - "Router": { - "!type": "fn(options: Object)", - "prototype": { - "matchRequest": {"!type": "fn(req: IncomingMessage, i: Number, head: String) -> Route"}, - "param": {"!type": "fn(name: String, fn: fn()) -> Object"}, - "route": {"!type": "fn(method: String, path: String, callbacks: fn()) -> Router"}, - "match": {"!type": "fn(method: String, url: String, i: Number, head: String) -> Route"}, - "all": {"!type": "fn(path: String) -> Router"} - }, - "!proto": "Object" - }, - "Route": { - "!type": "fn(method: String, path: String, callbacks: [fn()], options: Object)", - "prototype": {"match": {"!type": "fn(path: String) -> Boolean"}}, - "!proto": "Object" - } - }, - "!name": "express" -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/expressIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/expressIndex.js deleted file mode 100644 index d9ba0dde..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/expressIndex.js +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/expressIndex', [], -function () { - return { - "!name": "express", - "!define": { - "express": { - "createServer": { - "!type" : "fn() -> application" - }, - "application": "application", - "request": "request", - "response": "response", - "Route": "Route", - "Router": "Router", - "!proto" : "Object", - "!type": "fn() -> application" - }, - "Route": { - "prototype": { - "match": { - "!type": "fn(path: String) -> Boolean" - } - }, - "!proto" : "Object", - "!type": "fn(method: String, path: String, callbacks: [fn()], options: Object)" - }, - "Router": { - "prototype": { - "param": { - "!type": "fn(name: String, fn: fn()) -> Object" - }, - "matchRequest": { - "!type": "fn(req: IncomingMessage, i: Number, head: String) -> Route" - }, - "match": { - "!type": "fn(method: String, url: String, i: Number, head: String) -> Route" - }, - "route": { - "!type": "fn(method: String, path: String, callbacks: fn()) -> Router" - }, - "all": { - "!type": "fn(path: String) -> Router" - } - }, - "!proto" : "Object", - "!type": "fn(options: Object)" - }, - "application": { - "!proto" : "Object", - "init": { - "!type": "fn()" - }, - "defaultConfiguration": { - "!type": "fn()" - }, - "use": { - "!type": "fn(route: String, fn: fn()) -> Object" - }, - "engine": { - "!type": "fn(ext: String, fn: fn()) -> Object" - }, - "param": { - "!type": "fn(name: String, fn: fn()) -> Object" - }, - "set": { - "!type": "fn(setting: String, val: String) -> Object" - }, - "path": { - "!type": "fn() -> String" - }, - "enabled": { - "!type": "fn(setting: String) -> Boolean" - }, - "disabled": { - "!type": "fn(setting: String) -> Boolean" - }, - "enable": { - "!type": "fn(setting: String) -> Object" - }, - "disable": { - "!type": "fn(setting: String) -> Object" - }, - "configure": { - "!type": "fn(env: String, fn: fn()) -> Object" - }, - "all": { - "!type": "fn(path: String) -> Object" - }, - "render": { - "!type": "fn(name: String, options: Object, fn: fn())" - }, - "listen": { - "!type": "fn()" - } - }, - "request": { - "!proto" : "Object", - "header": { - "!type": "fn(name: String) -> Object" - }, - "accepts": { - "!type": "fn(type: Object)" - }, - "acceptsEncoding": { - "!type": "fn(encoding: String) -> Boolean" - }, - "acceptsCharset": { - "!type": "fn(charset: String) -> Boolean" - }, - "acceptsLanguage": { - "!type": "fn(lang: String) -> Boolean" - }, - "range": { - "!type": "fn(size: Number)" - }, - "param": { - "!type": "fn(name: String, defaultValue: Object) -> String" - }, - "is": { - "!type": "fn(type: String) -> Boolean" - }, - "get": { - "!type": "fn(name: String) -> Object" - } - }, - "response": { - "!proto" : "Object", - "status": { - "!type": "fn(code: Number) -> response" - }, - "links": { - "!type": "fn(links: Object) -> response" - }, - "send": { - "!type": "fn(body: String) -> response" - }, - "json": { - "!type": "fn(obj: Object) -> response" - }, - "jsonp": { - "!type": "fn(obj: Object) -> response" - }, - "sendfile": { - "!type": "fn(path: String, options: Object, fn: fn())" - }, - "download": { - "!type": "fn(path: String, filename: String, fn: fn())" - }, - "type": { - "!type" : "fn(type: String)" - }, - "format": { - "!type": "fn(obj: Object) -> response" - }, - "attachment": { - "!type": "fn(filename: String) -> response" - }, - "header": { - "!type" : "fn(field: Object, val: String) -> response" - }, - "get": { - "!type": "fn(field: String) -> String" - }, - "clearCookie": { - "!type": "fn(name: String, options: Object) -> response" - }, - "cookie": { - "!type": "fn(name: String, val: Object, options: Object) -> response" - }, - "location": { - "!type": "fn(url: String) -> response" - }, - "redirect": { - "!type": "fn(url: String)" - }, - "vary": { - "!type": "fn(field: Object) -> response" - }, - "render": { - "!type": "fn(view: String, options: Object, fn: fn())" - }, - "contentType": { - "!type" : "fn(type: String)" - }, - "set": { - "!type" : "fn(field: Object, val: String) -> response" - } - }, - "middleware": { - "!proto" : "Object", - "init": { - "!type": "fn(app: fn())" - } - } - } - } -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodbIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodbIndex.js deleted file mode 100644 index fada0e64..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodbIndex.js +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/mongodbIndex', [], -function () { - return { - "!name": "mongodb", - "this": "", - "global": "", - "mongodb" : "mongodb", - "MongoClient" : "mongodb.MongoClient", - "Db" : "mongodb.Db", - "!define": { - "mongodb": { - "MongoClient" : { - "!proto": "Object", - "!type" : "fn(serverConfig: Object, options: Object)", - "prototype" : { - "connect" : { - "!type" : "fn(url: String, options: Object, callback: fn())" - }, - "open" : { - "!type" : "fn(callback: fn())" - }, - "close" : { - "!type" : "fn(callback: fn())" - }, - "db" : { - "!type" : "fn(dbName: String) -> Db" - } - }, - "connect" : { - "!type" : "fn(url: String, options: Object, callback: fn())" - } - }, - "Db" : { - "!proto": "Object", - "!type" : "fn(databaseName: String, serverConfig: Object, options: Object)", - "prototype" : { - "addUser" : { - "!type" : "fn(username: String, password: String, options: Object, callback: fn())" - }, - "admin" : { - "!type" : "fn(callback: fn())" - }, - "authenticate" : { - "!type" : "fn(username: String, password: String, options: Object, callback: fn())" - }, - "close" : { - "!type" : "fn(forceClose: Boolean, callback: fn())" - }, - "createCollection" : { - "!type" : "fn(collectionName: String, options: Object, callback: fn())" - }, - "createIndex" : { - "!type" : "fn(collectionName: String, fieldOrSpec: Object, options: Object, callback: fn())" - }, - "command" : { - "!type" : "fn(selector: Object, options: Object, callback: fn())" - }, - "collection" : { - "!type" : "fn(collectionName: String, options: Object, callback: fn())" - }, - "collectionsInfo" : { - "!type" : "fn(collectionName: String, callback: fn())" - }, - "collectionNames" : { - "!type" : "fn(collectionName: String, options: Object, callback: fn())" - }, - "collections" : { - "!type" : "fn(callback: fn())" - }, - "cursorInfo" : { - "!type" : "fn(options: Object, callback: fn())" - }, - "db" : { - "!type" : "fn(dbName: String) -> Db" - }, - "dereference" : { - "!type" : "fn(dbRef: DBRef, callback: fn())" - }, - "dropCollection" : { - "!type" : "fn(collectionName: String, callback: fn())" - }, - "dropDatabase" : { - "!type" : "fn(callback: fn())" - }, - "dropIndex" : { - "!type" : "fn(collectionName: String, indexName: String, callback: fn())" - }, - "ensureIndex" : { - "!type" : "fn(collectionName: String, fieldOrSpec: Object, options: Object, callback: fn())" - }, - "executeDbAdminCommand" : { - "!type" : "fn(command_hash: String, options: Object, callback: fn())" - }, - "executeDbCommand" : { - "!type" : "fn(command_hash: String, options: Object, callback: fn())" - }, - "eval" : { - "!type" : "fn(code: Code, parameters: Object, options: Object, callback: fn())" - }, - "indexInformation" : { - "!type" : "fn(collectionName: String, options: Object, callback: fn())" - }, - "logout" : { - "!type" : "fn(options: Object, callback: fn())" - }, - "open" : { - "!type" : "fn(callback: fn())" - }, - "reIndex" : { - "!type" : "fn(collectionName: String, callback: fn())" - }, - "removeAllEventListeners" : { - "!type" : "fn()" - }, - "renameCollection" : { - "!type" : "fn(fromCollection: String, toCollection: String, options: Object, callback: fn())" - }, - "removeUser" : { - "!type" : "fn(username: String, options: Object, callback: fn())" - }, - "stats" : { - "!type" : "fn(options: Object, callback: fn())" - } - }, - "connect" : { - "!type" : "fn(url: String, options: Object, callback: fn())" - }, - "DEFAULT_URL" : "String", - "wrap" : { - "!type" : "fn()" - } - } - - } - } - } - }); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodb_example.json b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodb_example.json deleted file mode 100644 index 9bf7db63..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mongodb_example.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "module_completions": [ - { - "trigger": "MongoClient.connect(connectionString, function(err, db)", - "name": "MongoClient.connect", - "type": "method", // maybe also "event", "class" or "property" - "desc": "MongoClient or how to connect in a new and better way http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html
    -

    The URL connection format

    -
    mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
    -
    -

    The URL format is unified across official drivers from 10gen with some -options not supported on some drivers due to natural reasons. The ones -not supported by the Node.js driver are left out for simplicities sake.

    -
    -

    Basic parts of the url

    -
      -
    • mongodb:// is a required prefix to identify that this is a string -in the standard connection format.
    • -
    • username:password@ is optional. If given, the driver will attempt -to login to a database after connecting to a database server.
    • -
    • host1 is the only required part of the URI. It identifies either -a hostname, IP address, or unix domain socket
    • -
    • :portX is optional and defaults to :27017 if not provided.
    • -
    • /database is the name of the database to login to and thus is -only relevant if the username:password@ syntax is used. If not -specified the “admin” database will be used by default.
    • -
    • ?options are connection options. Note that if database is absent -there is still a / required between the last host and the ? -introducing the options. Options are name=value pairs and the pairs -are separated by “&”. For any unrecognized or unsupported option, a -driver should log a warning and continue processing. A driver should -not support any options that are not explicitly defined in this -specification. This is in order to reduce the likelihood that -different drivers will support overlapping that differ in small but -incompatible ways (like different name, different values, or -different default value).
    • -
    -
    -
    -

    Replica set configuration:

    -
      -
    • replicaSet=name
        -
      • The driver verifies that the name of the replica set it connects -to matches this name. Implies that the hosts given are a seed -list, and the driver will attempt to find all members of the set.
      • -
      • No default value.
      • -
      -
    • -
    -
    -
    -

    Connection Configuration:

    -
      -
    • ssl=true|false|prefer
        -
      • true: the driver initiates each connections with SSL
      • -
      • false: the driver initiates each connection without SSL
      • -
      • prefer: the driver tries to initiate each connection with SSL, and -falls back to without SSL if it fails.
      • -
      • Default value is false.
      • -
      -
    • -
    • connectTimeoutMS=ms
        -
      • How long a connection can take to be opened before timing out.
      • -
      • Current driver behavior already differs on this, so the default -must be left to each driver. For new implementations, the default -should be to never timeout.
      • -
      -
    • -
    • socketTimeoutMS=ms
        -
      • How long a send or receive on a socket can take before timing out.
      • -
      • Current driver behavior already differs on this, so the default -must be left to each driver. For new implementations, the default -should be to never timeout.
      • -
      -
    • -
    -
    -
    -

    Connection pool configuration:

    -
      -
    • maxPoolSize=n: The maximum number of connections in the -connection pool
        -
      • Default value is 5
      • -
      -
    • -
    -
    -
    -

    Write concern configuration:

    -

    More detailed information about write concerns can be found at -http://www.mongodb.org/display/DOCS/getLastError+Command

    -
      -
    • w=wValue
        -
      • For numeric values above 1, the driver adds { w : wValue } to the -getLastError command.
      • -
      • wValue is typically a number, but can be any string in order to -allow for specifications like “majority”
      • -
      • Default value is 1.
      • -
      • wValue == -1 ignore network errors
      • -
      • wValue == 0 no write acknowledgement
      • -
      • wValue == 1 perform a write acknowledgement
      • -
      • wValue == 2 perform a write acknowledgement across primary and one -secondary
      • -
      • wValue == ‘majority’ perform a write acknowledgement across the -majority of servers in the replicaset
      • -
      • wValue == ‘tag name’ perform a write acknowledgement against the -replicaset tag name
      • -
      -
    • -
    • wtimeoutMS=ms
        -
      • The driver adds { wtimeout : ms } to the getlasterror command.
      • -
      • Used in combination with w
      • -
      • No default value
      • -
      -
    • -
    • journal=true|false
        -
      • true: Sync to journal.
      • -
      • false: the driver does not add j to the getlasterror command
      • -
      • Default value is false
      • -
      -
    • -
    • fsync=true|false
        -
      • true: Sync to disk.
      • -
      • false: the driver does not add fsync to the getlasterror command
      • -
      • Default value is false
      • -
      • If conflicting values for fireAndForget, and any write concern are -passed the driver should raise an exception about the conflict.
      • -
      -
    • -
    -
    -
    -

    Auth options

    -
      -
    • authSource=string: Used when the user for authentication is -stored in another database using indirect authentication.
        -
      • Default value is null
      • -
      -
    • -
    -
    -
    -

    Read Preference

    -
      -
    • slaveOk=true|false: Whether a driver connected to a replica set -will send reads to slaves/secondaries.
        -
      • Default value is false
      • -
      -
    • -
    • readPreference=enum: The read preference for this connection. If -set, it overrides any slaveOk value.
        -
      • Enumerated values:
      • -
      • primary
      • -
      • primaryPreferred
      • -
      • secondary
      • -
      • secondaryPreferred
      • -
      • nearest
      • -
      • Default value is primary
      • -
      -
    • -
    • readPreferenceTags=string. A representation of a tag set as a -comma-separated list of colon-separated key-value pairs, e.g. -dc:ny,rack:1. Spaces should be stripped from beginning and end of -all keys and values. To specify a list of tag sets, using multiple -readPreferenceTags, e.g. -readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=
        -
      • Note the empty value, it provides for fallback to any other -secondary server if none is available
      • -
      • Order matters when using multiple readPreferenceTags
      • -
      • There is no default value
      • -
      -
    • -
    -
    -
    " - } - ] -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mysqlIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mysqlIndex.js deleted file mode 100644 index f4ec07b0..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/mysqlIndex.js +++ /dev/null @@ -1,227 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/mysqlIndex', [], -function () { - return { - "!name": "mysql", - "this": "", - "global": "", - "mysql" : "mysql", - "Types" : "mysql.Types", - "Connection" : "Connection", - "Pool" : "Pool", - "PoolCluster" : "PoolCluster", - "Query" : "Query", - "!define": { - "mysql": { - "createConnection": { - "!type": "fn(config: Object) -> +Connection" - }, - "createPool": { - "!type": "fn(config: Object) -> +Pool" - }, - "createPoolCluster": { - "!type": "fn(config: Object) -> +PoolCluster" - }, - "createQuery": { - "!type": "fn(sql: String, values: Object, cb: fn()) -> +Query" - }, - "escape": { - "!type": "fn(val: String, stringifyObjects: Boolean, timeZone: String) -> String" - }, - "escapeId": { - "!type": "fn(val: String, forbidQualified: Boolean) -> String" - }, - "format": { - "!type": "fn(sql: String, values: [String], stringifyObjects: Boolean, timeZone: String) -> String" - }, - "Types": { - "!proto": "Object", - "DECIMAL": "Number", - "TINY": "Number", - "SHORT": "Number", - "LONG": "Number", - "FLOAT": "Number", - "DOUBLE": "Number", - "NULL": "Number", - "TIMESTAMP": "Number", - "LONGLONG": "Number", - "INT24": "Number", - "DATE": "Number", - "TIME": "Number", - "DATETIME": "Number", - "YEAR": "Number", - "NEWDATE": "Number", - "VARCHAR": "Number", - "BIT": "Number", - "NEWDECIMAL": "Number", - "ENUM": "Number", - "SET": "Number", - "TINY_BLOB": "Number", - "MEDIUM_BLOB": "Number", - "LONG_BLOB": "Number", - "BLOB": "Number", - "VAR_STRING": "Number", - "STRING": "Number", - "GEOMETRY": "Number" - }, - }, - "Connection" : { - "!proto": "EventEmitter", - "!type": "fn(options: Object)", - "createQuery": { - "!type": "fn(sql: String, values: Object, cb: fn()) -> +Query" - }, - "prototype": { - "connect": { - "!type": "fn(cb: fn())" - }, - "changeUser": { - "!type": "fn(options: Object, cb: fn()) -> Object" - }, - "beginTransaction": { - "!type": "fn(cb: fn()) -> Object" - }, - "commit": { - "!type": "fn(cb: fn()) -> Object" - }, - "rollback": { - "!type": "fn(cb: fn()) -> Object" - }, - "query": { - "!type": "fn(sql: Object, values: Object, cb: fn()) -> Object" - }, - "ping": { - "!type": "fn(cb: fn())" - }, - "statistics": { - "!type": "fn(cb: fn())" - }, - "end": { - "!type": "fn(cb: fn())" - }, - "destroy": { - "!type": "fn()" - }, - "pause": { - "!type": "fn()" - }, - "resume": { - "!type": "fn()" - }, - "escape": { - "!type": "fn(value: String) -> String" - }, - "format": { - "!type": "fn(sql: Object, values: [String]) -> String" - }, - }, - }, - "Pool": { - "!proto": "EventEmitter", - "!type": "fn(options: Object)", - "prototype": { - "getConnection": { - "!type": "fn(cb: fn(err: Error, conn: Connection))" - }, - "releaseConnection": { - "!type": "fn(connection: Connection)" - }, - "end": { - "!type": "fn(cb: fn(err: Error)) -> Object" - }, - "query": { - "!type": "fn(sql: String, values: Object, cb: fn())" - }, - "escape": { - "!type": "fn(value: String) -> String" - } - } - }, - "PoolCluster": { - "!proto": "Object", - "!type": "fn(config: Object)", - "prototype": { - "of": { - "!type": "fn(pattern: String, selector: String) -> Object", - }, - "add": { - "!type": "fn(id: String, config: String)" - }, - "getConnection": { - "!type": "fn(pattern: String, selector: String, cb: fn())" - }, - "end": { - "!type": "fn()" - }, - }, - }, - "Query": { - "!proto": "Sequence", - "!type": "fn(options: Object, callback: fn())", - "prototype": { - "start": { - "!type": "fn()" - }, - "determinePacket": { - "!type": "fn(firstByte: Number, parser: Object)" - }, - "OkPacket": { - "!type": "fn(packet: Object)" - }, - "ErrorPacket": { - "!type": "fn(packet: Object)" - }, - "ResultSetHeaderPacket": { - "!type": "fn(packet: Object)" - }, - "FieldPacket": { - "!type": "fn(packet: Object)" - }, - "EofPacket": { - "!type": "fn(packet: Object)" - }, - "RowDataPacket": { - "!type": "fn(packet: Object, parser: Parser, connection: Connection)" - }, - "stream": { - "!type": "fn(options: Object) -> Object" - } - } - }, - "Sequence": { - "!proto" : "Object", - "!type": "fn(callback: fn())", - "determinePacket": { - "!type": "fn(byte: Number)" - }, - "prototype": { - "hasErrorHandler": { - "!type": "fn() -> Boolean" - }, - "end": { - "!type": "fn(err: Error)", - }, - "OkPacket": { - "!type": "fn(packet: Object)" - }, - "ErrorPacket": { - "!type": "fn(packet: Object)" - }, - "start": { - "!type": "fn()", - } - } - } - } -}}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/nodeIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/nodeIndex.js deleted file mode 100644 index d6ef94db..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/nodeIndex.js +++ /dev/null @@ -1,1746 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2013 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/nodeIndex', [ -], function () { - return { - "console": "Console", - "process": "Process", - "!define": { - "assert": { - "fail": { - "!type": "fn(actual: Object, expected: Object, message: Object, operator: Object)" - }, - "assert": { - "!type": "fn(value: Object, message: Object)" - }, - "ok": { - "!type": "fn(value: Object, message?: Object)" - }, - "equal": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "notEqual": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "deepEqual": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "notDeepEqual": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "strictEqual": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "notStrictEqual": { - "!type": "fn(actual: Object, expected: Object, message?: Object)" - }, - "throws": { - "!type": "fn(block: Object, error?: Object, message?: Object)" - }, - "doesNotThrow": { - "!type": "fn(block: Object, message?: Object)" - }, - "ifError": { - "!type": "fn(value: Object)" - } - }, - "buffer": { - "INSPECT_MAX_BYTES": { - "!type": "Number" - }, - "Buffer": { - "!type": "fn()", - "prototype": { - "write": { - "!type": "fn(string: Object, offset?: Object, length?: Object, encoding?: Object)" - }, - "toString": { - "!type": "fn(encoding?: Object, start?: Object, end?: Object)" - }, - "toJSON": { - "!type": "fn()" - }, - "copy": { - "!type": "fn(targetBuffer: Object, targetStart?: Object, sourceStart?: Object, sourceEnd?: Object)" - }, - "slice": { - "!type": "fn(start?: Object, end?: Object)" - }, - "readUInt8": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readUInt16LE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readUInt16BE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readUInt32LE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readUInt32BE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readInt8": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readInt16LE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readInt16BE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readInt32LE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readInt32BE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readFloatLE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readFloatBE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readDoubleLE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "readDoubleBE": { - "!type": "fn(offset: Object, noAssert?: Object)" - }, - "writeUInt8": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeUInt16LE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeUInt16BE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeUInt32LE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeUInt32BE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeInt8": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeInt16LE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeInt16BE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeInt32LE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeInt32BE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeFloatLE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeFloatBE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeDoubleLE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "writeDoubleBE": { - "!type": "fn(value: Object, offset: Object, noAssert?: Object)" - }, - "fill": { - "!type": "fn(value: Object, offset?: Object, end?: Object)" - }, -// "[index]": { -// "!type": "Object" -// }, - "length": { - "!type": "Number" - } - }, - "isEncoding": { - "!type": "fn(encoding: Object)" - }, - "isBuffer": { - "!type": "fn(obj: Object)" - }, - "byteLength": { - "!type": "fn(string: Object, encoding?: Object)" - }, - "concat": { - "!type": "fn(list: Object, totalLength?: Object)" - } - }, - "SlowBuffer": { - "!type": "fn()", - "prototype": {} - } - }, - "child_process": { - "spawn": { - "!type": "fn(command: Object, args?: Object, options?: Object) -> +ChildProcess" - }, - "exec": { - "!type": "fn(command: Object, options: Object, callback: Object) -> +ChildProcess" - }, - "execFile": { - "!type": "fn(file: Object, args: Object, options: Object, callback: Object) -> +ChildProcess" - }, - "fork": { - "!type": "fn(modulePath: Object, args?: Object, options?: Object) -> +ChildProcess" - }, - }, - // Note this is outside the child_process module, as it is not exported. - "ChildProcess": { - "!type": "fn()", - "prototype": { - "kill": { - "!type": "fn(signal?: String)" - }, - "unref": { - "!type": "fn()" - }, - "send": { - "!type": "fn(message: Object, sendHandle?: Object)" - }, - "disconnect": { - "!type": "fn()" - }, - "stdin": { - "!type": "Object" // Stream - }, - "stdout": { - "!type": "Object" // Stream - }, - "stderr": { - "!type": "Object" // Stream - }, - "pid": { - "!type": "Number" - } - } - }, - "cluster": { - "setupMaster": { - "!type": "fn(settings?: Object)" - }, - "fork": { - "!type": "fn(env?: Object) -> Workerobject" - }, - "disconnect": { - "!type": "fn(callback?: Object)" - }, - "settings": { - "!type": "Object" - }, - "isMaster": { - "!type": "Object" - }, - "isWorker": { - "!type": "Object" - }, - "worker": { - "!type": "Object" - }, - "workers": { - "!type": "Object" - }, - "Worker": { - "!type": "fn()", - "prototype": { - "send": { - "!type": "fn(message: Object, sendHandle?: Object)" - }, - "kill": { - "!type": "fn(signal?: Object)" - }, - "disconnect": { - "!type": "fn()" - }, - "id": { - "!type": "Object" - }, - "process": { - "!type": "Object" - }, - "suicide": { - "!type": "Object" - } - } - } - }, - "Console": { - "log": { - "!type": "fn(data?: Object, other?: Object)" - }, - "info": { - "!type": "fn(data?: Object, other?: Object)" - }, - "error": { - "!type": "fn(data?: Object, other?: Object)" - }, - "warn": { - "!type": "fn(data?: Object, other?: Object)" - }, - "dir": { - "!type": "fn(obj: Object)" - }, - "time": { - "!type": "fn(label: Object)" - }, - "timeEnd": { - "!type": "fn(label: Object)" - }, - "trace": { - "!type": "fn(label: Object)" - }, - "assert": { - "!type": "fn(expression: Object, message?: Object)" - } - }, - "crypto": { - "getCiphers": { - "!type": "fn()" - }, - "getHashes": { - "!type": "fn()" - }, - "createCredentials": { - "!type": "fn(details: Object)" - }, - "createHash": { - "!type": "fn(algorithm: Object)" - }, - "createHmac": { - "!type": "fn(algorithm: Object, key: Object)" - }, - "createCipher": { - "!type": "fn(algorithm: Object, password: Object)" - }, - "createCipheriv": { - "!type": "fn(algorithm: Object, key: Object, iv: Object)" - }, - "createDecipher": { - "!type": "fn(algorithm: Object, password: Object)" - }, - "createDecipheriv": { - "!type": "fn(algorithm: Object, key: Object, iv: Object)" - }, - "createSign": { - "!type": "fn(algorithm: Object)" - }, - "createVerify": { - "!type": "fn(algorithm: Object)" - }, - "createDiffieHellman": { - "!type": "fn(prime: Object, encoding?: Object)" - }, - "getDiffieHellman": { - "!type": "fn(group_name: Object)" - }, - "pbkdf2": { - "!type": "fn(password: Object, salt: Object, iterations: Object, keylen: Object, callback: Object)" - }, - "pbkdf2Sync": { - "!type": "fn(password: Object, salt: Object, iterations: Object, keylen: Object)" - }, - "randomBytes": { - "!type": "fn(size: Object, callback?: Object)" - }, - "pseudoRandomBytes": { - "!type": "fn(size: Object, callback?: Object)" - }, - "DEFAULT_ENCODING": { - "!type": "Object" - }, - "Hash": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object, input_encoding?: Object)" - }, - "digest": { - "!type": "fn(encoding?: Object)" - } - } - }, - "Hmac": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object)" - }, - "digest": { - "!type": "fn(encoding?: Object)" - } - } - }, - "Cipher": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object, input_encoding?: Object, output_encoding?: Object)" - }, - "final": { - "!type": "fn(output_encoding?: Object)" - }, - "setAutoPadding": { - "!type": "fn(auto_padding: Object)" - } - } - }, - "Decipher": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object, input_encoding?: Object, output_encoding?: Object)" - }, - "final": { - "!type": "fn(output_encoding?: Object)" - }, - "setAutoPadding": { - "!type": "fn(auto_padding: Object)" - } - } - }, - "Sign": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object)" - }, - "sign": { - "!type": "fn(private_key: Object, output_format?: Object)" - } - } - }, - "Verify": { - "!type": "fn()", - "prototype": { - "update": { - "!type": "fn(data: Object)" - }, - "verify": { - "!type": "fn(object: Object, signature: Object, signature_format?: Object)" - } - } - }, - "DiffieHellman": { - "!type": "fn()", - "prototype": { - "generateKeys": { - "!type": "fn(encoding?: Object)" - }, - "computeSecret": { - "!type": "fn(other_public_key: Object, input_encoding?: Object, output_encoding?: Object)" - }, - "getPrime": { - "!type": "fn(encoding?: Object)" - }, - "getGenerator": { - "!type": "fn(encoding?: Object)" - }, - "getPublicKey": { - "!type": "fn(encoding?: Object)" - }, - "getPrivateKey": { - "!type": "fn(encoding?: Object)" - }, - "setPublicKey": { - "!type": "fn(public_key: Object, encoding?: Object)" - }, - "setPrivateKey": { - "!type": "fn(private_key: Object, encoding?: Object)" - } - } - } - }, - "dgram": { - "createSocket": { - "!type": "fn(type: Object, callback?: Object)" - }, - "Socket": { - "!type": "fn()", - "prototype": { - "send": { - "!type": "fn(buf: Object, offset: Object, length: Object, port: Object, address: Object, callback?: Object)" - }, - "bind": { - "!type": "fn(port: Object, address?: Object, callback?: Object)" - }, - "close": { - "!type": "fn()" - }, - "address": { - "!type": "fn()" - }, - "setBroadcast": { - "!type": "fn(flag: Object)" - }, - "setTTL": { - "!type": "fn(ttl: Object)" - }, - "setMulticastTTL": { - "!type": "fn(ttl: Object)" - }, - "setMulticastLoopback": { - "!type": "fn(flag: Object)" - }, - "addMembership": { - "!type": "fn(multicastAddress: Object, multicastInterface?: Object)" - }, - "dropMembership": { - "!type": "fn(multicastAddress: Object, multicastInterface?: Object)" - }, - "unref": { - "!type": "fn()" - }, - "ref": { - "!type": "fn()" - } - } - } - }, - "dns": { - "lookup": { - "!type": "fn(domain: Object, family: Object, callback: Object)" - }, - "resolve": { - "!type": "fn(domain: Object, rrtype: Object, callback: Object)" - }, - "resolve4": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolve6": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolveMx": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolveTxt": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolveSrv": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolveNs": { - "!type": "fn(domain: Object, callback: Object)" - }, - "resolveCname": { - "!type": "fn(domain: Object, callback: Object)" - }, - "reverse": { - "!type": "fn(ip: Object, callback: Object)" - } - }, - "domain": { - "create": { - "!type": "fn() -> +domain.Domain" - }, - "createDomain": { - "!type": "fn() -> +domain.Domain" - }, - "Domain": { - "!type": "fn()", - "prototype": { - "run": { - "!type": "fn(fn: Object)" - }, - "add": { - "!type": "fn(emitter: Object)" - }, - "remove": { - "!type": "fn(emitter: Object)" - }, - "bind": { - "!type": "fn(callback: Object) -> Function" - }, - "intercept": { - "!type": "fn(callback: Object) -> Function" - }, - "enter": { - "!type": "fn()" - }, - "exit": { - "!type": "fn()" - }, - "dispose": { - "!type": "fn()" - }, - "members": { - "!type": "Object" - } - } - } - }, - "events": { - "EventEmitter": { - "!type": "fn()", - "prototype": { - "addListener": { - "!type": "fn(event: Object, listener: Object)" - }, - "on": { - "!type": "fn(event: Object, listener: Object)" - }, - "once": { - "!type": "fn(event: Object, listener: Object)" - }, - "removeListener": { - "!type": "fn(event: Object, listener: Object)" - }, - "removeAllListeners": { - "!type": "fn(event?: Object)" - }, - "setMaxListeners": { - "!type": "fn(n: Object)" - }, - "listeners": { - "!type": "fn(event: Object)" - }, - "emit": { - "!type": "fn(event: Object, arg1?: Object, arg2?: Object, other?: Object)" - } - }, - "listenerCount": { - "!type": "fn(emitter: Object, event: Object)" - } - } - }, - "fs": { - "rename": { - "!type": "fn(oldPath: Object, newPath: Object, callback: Object)" - }, - "renameSync": { - "!type": "fn(oldPath: Object, newPath: Object)" - }, - "ftruncate": { - "!type": "fn(fd: Object, len: Object, callback: Object)" - }, - "ftruncateSync": { - "!type": "fn(fd: Object, len: Object)" - }, - "truncate": { - "!type": "fn(path: Object, len: Object, callback: Object)" - }, - "truncateSync": { - "!type": "fn(path: Object, len: Object)" - }, - "chown": { - "!type": "fn(path: Object, uid: Object, gid: Object, callback: Object)" - }, - "chownSync": { - "!type": "fn(path: Object, uid: Object, gid: Object)" - }, - "fchown": { - "!type": "fn(fd: Object, uid: Object, gid: Object, callback: Object)" - }, - "fchownSync": { - "!type": "fn(fd: Object, uid: Object, gid: Object)" - }, - "lchown": { - "!type": "fn(path: Object, uid: Object, gid: Object, callback: Object)" - }, - "lchownSync": { - "!type": "fn(path: Object, uid: Object, gid: Object)" - }, - "chmod": { - "!type": "fn(path: Object, mode: Object, callback: Object)" - }, - "chmodSync": { - "!type": "fn(path: Object, mode: Object)" - }, - "fchmod": { - "!type": "fn(fd: Object, mode: Object, callback: Object)" - }, - "fchmodSync": { - "!type": "fn(fd: Object, mode: Object)" - }, - "lchmod": { - "!type": "fn(path: Object, mode: Object, callback: Object)" - }, - "lchmodSync": { - "!type": "fn(path: Object, mode: Object)" - }, - "stat": { - "!type": "fn(path: Object, callback: Object)" - }, - "lstat": { - "!type": "fn(path: Object, callback: Object)" - }, - "fstat": { - "!type": "fn(fd: Object, callback: Object)" - }, - "statSync": { - "!type": "fn(path: Object)" - }, - "lstatSync": { - "!type": "fn(path: Object)" - }, - "fstatSync": { - "!type": "fn(fd: Object)" - }, - "link": { - "!type": "fn(srcpath: Object, dstpath: Object, callback: Object)" - }, - "linkSync": { - "!type": "fn(srcpath: Object, dstpath: Object)" - }, - "symlink": { - "!type": "fn(srcpath: Object, dstpath: Object, type: Object, callback: Object)" - }, - "symlinkSync": { - "!type": "fn(srcpath: Object, dstpath: Object, type?: Object)" - }, - "readlink": { - "!type": "fn(path: Object, callback: Object)" - }, - "readlinkSync": { - "!type": "fn(path: Object)" - }, - "realpath": { - "!type": "fn(path: Object, cache: Object, callback: Object)" - }, - "realpathSync": { - "!type": "fn(path: Object, cache?: Object)" - }, - "unlink": { - "!type": "fn(path: Object, callback: Object)" - }, - "unlinkSync": { - "!type": "fn(path: Object)" - }, - "rmdir": { - "!type": "fn(path: Object, callback: Object)" - }, - "rmdirSync": { - "!type": "fn(path: Object)" - }, - "mkdir": { - "!type": "fn(path: Object, mode: Object, callback: Object)" - }, - "mkdirSync": { - "!type": "fn(path: Object, mode?: Object)" - }, - "readdir": { - "!type": "fn(path: Object, callback: Object)" - }, - "readdirSync": { - "!type": "fn(path: Object)" - }, - "close": { - "!type": "fn(fd: Object, callback: Object)" - }, - "closeSync": { - "!type": "fn(fd: Object)" - }, - "open": { - "!type": "fn(path: Object, flags: Object, mode: Object, callback: Object)" - }, - "openSync": { - "!type": "fn(path: Object, flags: Object, mode?: Object) -> Number" - }, - "utimes": { - "!type": "fn(path: Object, atime: Object, mtime: Object)" - }, - "utimesSync": { - "!type": "fn(path: Object, atime: Object, mtime: Object)" - }, - "futimes": { - "!type": "fn(fd: Object, atime: Object, mtime: Object)" - }, - "futimesSync": { - "!type": "fn(fd: Object, atime: Object, mtime: Object)" - }, - "fsync": { - "!type": "fn(fd: Object, callback: Object)" - }, - "fsyncSync": { - "!type": "fn(fd: Object)" - }, - "write": { - "!type": "fn(fd: Object, buffer: Object, offset: Object, length: Object, position: Object, callback: Object)" - }, - "writeSync": { - "!type": "fn(fd: Object, buffer: Object, offset: Object, length: Object, position: Object)" - }, - "read": { - "!type": "fn(fd: Object, buffer: Object, offset: Object, length: Object, position: Object, callback: Object)" - }, - "readSync": { - "!type": "fn(fd: Object, buffer: Object, offset: Object, length: Object, position: Object)" - }, - "readFile": { - "!type": "fn(filename: Object, options: Object, callback: Object)" - }, - "readFileSync": { - "!type": "fn(filename: Object, options?: Object)" - }, - "writeFile": { - "!type": "fn(filename: Object, data: Object, options: Object, callback: Object)" - }, - "writeFileSync": { - "!type": "fn(filename: Object, data: Object, options?: Object)" - }, - "appendFile": { - "!type": "fn(filename: Object, data: Object, options: Object, callback: Object)" - }, - "appendFileSync": { - "!type": "fn(filename: Object, data: Object, options?: Object)" - }, - "watchFile": { - "!type": "fn(filename: Object, options: Object, listener: Object)" - }, - "unwatchFile": { - "!type": "fn(filename: Object, listener?: Object)" - }, - "watch": { - "!type": "fn(filename: Object, options?: Object, listener?: Object)" - }, - "exists": { - "!type": "fn(path: Object, callback: Object)" - }, - "existsSync": { - "!type": "fn(path: Object)" - }, - "createReadStream": { - "!type": "fn(path: Object, options?: Object)" - }, - "createWriteStream": { - "!type": "fn(path: Object, options?: Object)" - }, - "Stats": { - "!type": "fn()", - "prototype": {} - }, - "ReadStream": { - "!type": "fn()", - "prototype": {} - }, - "WriteStream": { - "!type": "fn()", - "prototype": { - "bytesWritten": { - "!type": "Object" - } - } - }, - "FSWatcher": { - "!type": "fn()", - "prototype": { - "close": { - "!type": "fn()" - } - } - } - }, - "http": { - "createServer": { - "!type": "fn(requestListener?: Object)" - }, - "createClient": { - "!type": "fn(port?: Object, host?: Object)" - }, - "request": { - "!type": "fn(options: Object, callback: Object)" - }, - "get": { - "!type": "fn(options: Object, callback: Object)" - }, - "STATUS_CODES": { - "!type": "Object" - }, - "globalAgent": { - "!type": "Object" - }, - "IncomingMessage": { - "!type": "Object" - }, - "Server": { - "!type": "fn()", - "prototype": { - "listen": { - "!type": "fn(handle: Object, callback?: Object)" - }, - "close": { - "!type": "fn(callback?: Object)" - }, - "setTimeout": { - "!type": "fn(msecs: Object, callback: Object)" - }, - "maxHeadersCount": { - "!type": "Object" - }, - "timeout": { - "!type": "Object" - } - } - }, - "ServerResponse": { - "!type": "fn()", - "prototype": { - "writeContinue": { - "!type": "fn()" - }, - "writeHead": { - "!type": "fn(statusCode: Object, reasonPhrase?: Object, headers?: Object)" - }, - "setTimeout": { - "!type": "fn(msecs: Object, callback: Object)" - }, - "setHeader": { - "!type": "fn(name: Object, value: Object)" - }, - "getHeader": { - "!type": "fn(name: Object)" - }, - "removeHeader": { - "!type": "fn(name: Object)" - }, - "write": { - "!type": "fn(chunk: Object, encoding?: Object)" - }, - "addTrailers": { - "!type": "fn(headers: Object)" - }, - "end": { - "!type": "fn(data?: Object, encoding?: Object)" - }, - "statusCode": { - "!type": "Object" - }, - "headersSent": { - "!type": "Object" - }, - "sendDate": { - "!type": "Object" - } - } - }, - "Agent": { - "!type": "fn()", - "prototype": { - "maxSockets": { - "!type": "Object" - }, - "sockets": { - "!type": "Object" - }, - "requests": { - "!type": "Object" - } - } - }, - "ClientRequest": { - "!type": "fn()", - "prototype": { - "write": { - "!type": "fn(chunk: Object, encoding?: Object)" - }, - "end": { - "!type": "fn(data?: Object, encoding?: Object)" - }, - "abort": { - "!type": "fn()" - }, - "setTimeout": { - "!type": "fn(timeout: Object, callback?: Object)" - }, - "setNoDelay": { - "!type": "fn(noDelay?: Object)" - }, - "setSocketKeepAlive": { - "!type": "fn(enable?: Object, initialDelay?: Object)" - } - } - } - }, - "https": { - "createServer": { - "!type": "fn(options: Object, requestListener?: Object)" - }, - "request": { - "!type": "fn(options: Object, callback: Object)" - }, - "get": { - "!type": "fn(options: Object, callback: Object)" - }, - "globalAgent": { - "!type": "Object" - }, - "Server": { - "!type": "fn()", - "prototype": {} - }, - "Agent": { - "!type": "fn()", - "prototype": {} - } - }, - "net": { - "createServer": { - "!type": "fn(options?: Object, connectionListener?: Object)" - }, - "connect": { - "!type": "fn(path: Object, connectListener?: Object)" - }, - "createConnection": { - "!type": "fn(path: Object, connectListener?: Object)" - }, - "isIP": { - "!type": "fn(input: Object)" - }, - "isIPv4": { - "!type": "fn(input: Object)" - }, - "isIPv6": { - "!type": "fn(input: Object)" - }, - "Server": { - "!type": "fn()", - "prototype": { - "listen": { - "!type": "fn(handle: Object, callback?: Object)" - }, - "close": { - "!type": "fn(callback?: Object)" - }, - "address": { - "!type": "fn()" - }, - "unref": { - "!type": "fn()" - }, - "ref": { - "!type": "fn()" - }, - "getConnections": { - "!type": "fn(callback: Object)" - }, - "maxConnections": { - "!type": "Object" - }, - "connections": { - "!type": "Object" - } - } - }, - "Socket": { - "!type": "fn()", - "prototype": { - "Socket": { - "!type": "fn(options?: Object)" - }, - "connect": { - "!type": "fn(path: Object, connectListener?: Object)" - }, - "setEncoding": { - "!type": "fn(encoding?: Object)" - }, - "write": { - "!type": "fn(data: Object, encoding?: Object, callback?: Object)" - }, - "end": { - "!type": "fn(data?: Object, encoding?: Object)" - }, - "destroy": { - "!type": "fn()" - }, - "pause": { - "!type": "fn()" - }, - "resume": { - "!type": "fn()" - }, - "setTimeout": { - "!type": "fn(timeout: Object, callback?: Object)" - }, - "setNoDelay": { - "!type": "fn(noDelay?: Object)" - }, - "setKeepAlive": { - "!type": "fn(enable?: Object, initialDelay?: Object)" - }, - "address": { - "!type": "fn()" - }, - "unref": { - "!type": "fn()" - }, - "ref": { - "!type": "fn()" - }, - "bufferSize": { - "!type": "Object" - }, - "remoteAddress": { - "!type": "Object" - }, - "remotePort": { - "!type": "Object" - }, - "localAddress": { - "!type": "Object" - }, - "localPort": { - "!type": "Object" - }, - "bytesRead": { - "!type": "Object" - }, - "bytesWritten": { - "!type": "Object" - } - } - } - }, - "os": { - "tmpdir": { - "!type": "fn()" - }, - "endianness": { - "!type": "fn()" - }, - "hostname": { - "!type": "fn()" - }, - "type": { - "!type": "fn()" - }, - "platform": { - "!type": "fn()" - }, - "arch": { - "!type": "fn()" - }, - "release": { - "!type": "fn()" - }, - "uptime": { - "!type": "fn()" - }, - "loadavg": { - "!type": "fn()" - }, - "totalmem": { - "!type": "fn()" - }, - "freemem": { - "!type": "fn()" - }, - "cpus": { - "!type": "fn()" - }, - "networkInterfaces": { - "!type": "fn()" - }, - "EOL": { - "!type": "Object" - } - }, - "path": { - "normalize": { - "!type": "fn(p: Object)" - }, - "join": { - "!type": "fn(path1?: Object, path2?: Object, other?: Object)" - }, - "resolve": { - "!type": "fn(from: Object, to: Object)" - }, - "relative": { - "!type": "fn(from: Object, to: Object)" - }, - "dirname": { - "!type": "fn(p: Object)" - }, - "basename": { - "!type": "fn(p: Object, ext?: Object)" - }, - "extname": { - "!type": "fn(p: Object)" - }, - "sep": { - "!type": "Object" - }, - "delimiter": { - "!type": "Object" - } - }, - "Process": { - "abort": { - "!type": "fn()" - }, - "chdir": { - "!type": "fn(directory: Object)" - }, - "cwd": { - "!type": "fn()" - }, - "exit": { - "!type": "fn(code?: Object)" - }, - "getgid": { - "!type": "fn()" - }, - "setgid": { - "!type": "fn(id: Object)" - }, - "getuid": { - "!type": "fn()" - }, - "setuid": { - "!type": "fn(id: Object)" - }, - "getgroups": { - "!type": "fn()" - }, - "setgroups": { - "!type": "fn(groups: Object)" - }, - "initgroups": { - "!type": "fn(user: Object, extra_group: Object)" - }, - "kill": { - "!type": "fn(pid: Object, signal?: Object)" - }, - "memoryUsage": { - "!type": "fn()" - }, - "nextTick": { - "!type": "fn(callback: Object)" - }, - "umask": { - "!type": "fn(mask?: Object)" - }, - "uptime": { - "!type": "fn()" - }, - "hrtime": { - "!type": "fn()" - }, - "stdout": { - "!type": "+stream.Writable" - }, - "stderr": { - "!type": "Object" - }, - "stdin": { - "!type": "Object" - }, - "argv": { - "!type": "Object" - }, - "execPath": { - "!type": "Object" - }, - "execArgv": { - "!type": "Object" - }, - "env": { - "!type": "Object" - }, - "version": { - "!type": "Object" - }, - "versions": { - "!type": "Object" - }, - "config": { - "!type": "Object" - }, - "pid": { - "!type": "Object" - }, - "title": { - "!type": "Object" - }, - "arch": { - "!type": "Object" - }, - "platform": { - "!type": "Object" - }, - "maxTickDepth": { - "!type": "Object" - } - }, - "punycode": { - "decode": { - "!type": "fn(string: Object)" - }, - "encode": { - "!type": "fn(string: Object)" - }, - "toUnicode": { - "!type": "fn(domain: Object)" - }, - "toASCII": { - "!type": "fn(domain: Object)" - }, - "ucs2": { - "!type": "Object" - }, - "version": { - "!type": "Object" - } - }, - "querystring": { - "stringify": { - "!type": "fn(obj: Object, sep?: Object, eq?: Object)" - }, - "parse": { - "!type": "fn(str: Object, sep?: Object, eq?: Object, options?: Object)" - }, - "escape": { - "!type": "Object" - }, - "unescape": { - "!type": "Object" - } - }, - "readline": { - "createInterface": { - "!type": "fn(options: Object)" - }, - "Interface": { - "!type": "fn()", - "prototype": { - "setPrompt": { - "!type": "fn(prompt: Object, length: Object)" - }, - "prompt": { - "!type": "fn(preserveCursor?: Object)" - }, - "question": { - "!type": "fn(query: Object, callback: Object)" - }, - "pause": { - "!type": "fn()" - }, - "resume": { - "!type": "fn()" - }, - "close": { - "!type": "fn()" - }, - "write": { - "!type": "fn(data: Object, key?: Object)" - } - } - } - }, - "repl": { - "start": { - "!type": "fn(options: Object)" - } - }, - "stream": { - "Readable": { - "!type": "fn()", - "prototype": { - "read": { - "!type": "fn(size?: Object) -> String" - }, - "setEncoding": { - "!type": "fn(encoding: Object)" - }, - "resume": { - "!type": "fn()" - }, - "pause": { - "!type": "fn()" - }, - "pipe": { - "!type": "fn(destination: Object, options?: Object)" - }, - "unpipe": { - "!type": "fn(destination?: Object)" - }, - "unshift": { - "!type": "fn(chunk: Object)" - }, - "wrap": { - "!type": "fn(stream: Object)" - } - } - }, - "Writable": { - "!type": "fn()", - "prototype": { - "write": { - "!type": "fn(chunk: Object, encoding?: Object, callback?: Object) -> Boolean" - }, - "end": { - "!type": "fn(chunk?: Object, encoding?: Object, callback?: Object)" - } - } - }, - "Duplex": { - "!type": "fn()", - "prototype": {} - }, - "Transform": { - "!type": "fn()", - "prototype": {} - } - }, - "string_decoder": { - "StringDecoder": { - "!type": "fn()", - "prototype": { - "write": { - "!type": "fn(buffer: Object)" - }, - "end": { - "!type": "fn()" - } - } - } - }, - "timers": { - "setTimeout": { - "!type": "fn(callback: Object, delay: Object, arg?: Object, other?: Object)" - }, - "clearTimeout": { - "!type": "fn(timeoutId: Object)" - }, - "setInterval": { - "!type": "fn(callback: Object, delay: Object, arg?: Object, other?: Object)" - }, - "clearInterval": { - "!type": "fn(intervalId: Object)" - }, - "unref": { - "!type": "fn()" - }, - "ref": { - "!type": "fn()" - }, - "setImmediate": { - "!type": "fn(callback: Object, arg?: Object, other?: Object)" - }, - "clearImmediate": { - "!type": "fn(immediateId: Object)" - } - }, - "tls": { - "getCiphers": { - "!type": "fn()" - }, - "createServer": { - "!type": "fn(options: Object, secureConnectionListener?: Object)" - }, - "connect": { - "!type": "fn(port: Object, host?: Object, options?: Object, callback?: Object)" - }, - "createSecurePair": { - "!type": "fn(credentials?: Object, isServer?: Object, requestCert?: Object, rejectUnauthorized?: Object)" - }, - "SLAB_BUFFER_SIZE": { - "!type": "Object" - }, - "SecurePair": { - "!type": "fn()", - "prototype": {} - }, - "Server": { - "!type": "fn()", - "prototype": { - "listen": { - "!type": "fn(port: Object, host?: Object, callback?: Object)" - }, - "close": { - "!type": "fn()" - }, - "address": { - "!type": "fn()" - }, - "addContext": { - "!type": "fn(hostname: Object, credentials: Object)" - }, - "maxConnections": { - "!type": "Object" - }, - "connections": { - "!type": "Object" - } - } - }, - "CryptoStream": { - "!type": "fn()", - "prototype": { - "bytesWritten": { - "!type": "Object" - } - } - }, - "CleartextStream": { - "!type": "fn()", - "prototype": { - "getPeerCertificate": { - "!type": "fn()" - }, - "getCipher": { - "!type": "fn()" - }, - "address": { - "!type": "fn()" - }, - "authorized": { - "!type": "Object" - }, - "authorizationError": { - "!type": "Object" - }, - "remoteAddress": { - "!type": "Object" - }, - "remotePort": { - "!type": "Object" - } - } - } - }, - "tty": { - "isatty": { - "!type": "fn(fd: Object)" - }, - "setRawMode": { - "!type": "fn(mode: Object)" - }, - "ReadStream": { - "!type": "fn()", - "prototype": { - "setRawMode": { - "!type": "fn(mode: Object)" - }, - "isRaw": { - "!type": "Object" - } - } - }, - "WriteStream": { - "!type": "fn()", - "prototype": { - "columns": { - "!type": "Object" - }, - "rows": { - "!type": "Object" - } - } - } - }, - "url": { - "parse": { - "!type": "fn(urlStr: Object, parseQueryString?: Object, slashesDenoteHost?: Object)" - }, - "format": { - "!type": "fn(urlObj: Object)" - }, - "resolve": { - "!type": "fn(from: Object, to: Object)" - } - }, - "util": { - "format": { - "!type": "fn(format: Object, other?: Object)" - }, - "debug": { - "!type": "fn(string: Object)" - }, - "error": { - "!type": "fn(other?: Object)" - }, - "puts": { - "!type": "fn(other?: Object)" - }, - "print": { - "!type": "fn(other?: Object)" - }, - "log": { - "!type": "fn(string: Object)" - }, - "inspect": { - "!type": "fn(object: Object, options?: Object)" - }, - "isArray": { - "!type": "fn(object: Object)" - }, - "isRegExp": { - "!type": "fn(object: Object)" - }, - "isDate": { - "!type": "fn(object: Object)" - }, - "isError": { - "!type": "fn(object: Object)" - }, - "pump": { - "!type": "fn(readableStream: Object, writableStream: Object, callback?: Object)" - }, - "inherits": { - "!type": "fn(constructor: Object, superConstructor: Object)" - } - }, - "vm": { - "runInThisContext": { - "!type": "fn(code: Object, filename?: Object)" - }, - "runInNewContext": { - "!type": "fn(code: Object, sandbox?: Object, filename?: Object)" - }, - "runInContext": { - "!type": "fn(code: Object, context: Object, filename?: Object)" - }, - "createContext": { - "!type": "fn(initSandbox?: Object)" - }, - "createScript": { - "!type": "fn(code: Object, filename?: Object)" - }, - "Script": { - "!type": "fn()", - "prototype": { - "runInThisContext": { - "!type": "fn()" - }, - "runInNewContext": { - "!type": "fn(sandbox?: Object)" - } - } - } - }, - "zlib": { - "createGzip": { - "!type": "fn(options?: Object)" - }, - "createGunzip": { - "!type": "fn(options?: Object)" - }, - "createDeflate": { - "!type": "fn(options?: Object)" - }, - "createInflate": { - "!type": "fn(options?: Object)" - }, - "createDeflateRaw": { - "!type": "fn(options?: Object)" - }, - "createInflateRaw": { - "!type": "fn(options?: Object)" - }, - "createUnzip": { - "!type": "fn(options?: Object)" - }, - "deflate": { - "!type": "fn(buf: Object, callback: Object)" - }, - "deflateRaw": { - "!type": "fn(buf: Object, callback: Object)" - }, - "gzip": { - "!type": "fn(buf: Object, callback: Object)" - }, - "gunzip": { - "!type": "fn(buf: Object, callback: Object)" - }, - "inflate": { - "!type": "fn(buf: Object, callback: Object)" - }, - "inflateRaw": { - "!type": "fn(buf: Object, callback: Object)" - }, - "unzip": { - "!type": "fn(buf: Object, callback: Object)" - }, - "Zlib": { - "!type": "fn()", - "prototype": { - "flush": { - "!type": "fn(callback: Object)" - }, - "reset": { - "!type": "fn()" - } - } - }, - "Gzip": { - "!type": "fn()", - "prototype": {} - }, - "Gunzip": { - "!type": "fn()", - "prototype": {} - }, - "Deflate": { - "!type": "fn()", - "prototype": {} - }, - "Inflate": { - "!type": "fn()", - "prototype": {} - }, - "DeflateRaw": { - "!type": "fn()", - "prototype": {} - }, - "InflateRaw": { - "!type": "fn()", - "prototype": {} - }, - "Unzip": { - "!type": "fn()", - "prototype": {} - } - }, - "TimeoutID": { - }, - "IntervalID": { - } - }, - "!name": "node", - "this": "", - "global": "", - "Buffer": "buffer.Buffer", - "require": { - "!type": "fn(name: String)" - }, - "__filename": "String", - "__dirname": "String", - "module": { - "exports": "Object", - "id": "String", - "filename": "String", - "loaded": "String", - "parent": "Object", - "children": "[Object]" - }, - "exports": "Object", - "setTimeout": { - "!type": "fn(cb: Object, ms: Number) -> TimeoutID" - }, - "clearTimeout": { - "!type": "fn(t: TimeoutID)" - }, - "setInterval": { - "!type": "fn(cb: Object, ms: Number) -> IntervalID" - }, - "clearInterval": { - "!type": "fn(t: IntervalID)" - } - }; -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/postgresIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/postgresIndex.js deleted file mode 100644 index b90cc555..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/postgresIndex.js +++ /dev/null @@ -1,324 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/postgresIndex', [ -], function () { - return { - "!name": "pg", - "this": "", - "global": "", - "pg" : "pg", - "PG" : "pg.PG", - "Client" : "pg.Client", - "Connection" : "pg.Connection", - "Error" : "pg.Error", - "Query" : "pg.Query", - "Types" : "pg.Types", - "Defaults" : "pg.Defaults", - "!define": { - "pg": { - "PG" : { - "!proto": "EventEmitter", - "!type": "fn(config: Object)", - "prototype" : { - "end" : { - "!type" : "fn()" - }, - "connect" : { - "!type" : "fn(config: Object, callback: fn())" - }, - "cancel" : { - "!type" : "fn(config: Object, client: Client, query: Query)" - } - }, - "Client" : "Client", - "Query" : "Query", - "pools" : "Pool", - "types" : "Types", - "Connection" : "Connection", - "defaults" : "Defaults", - }, - "Client": { - "!proto": "EventEmitter", - "!type": "fn(config: Object)", - "prototype": { - "connect": { - "!type" : "fn(callback: fn(err:Error))" - }, - "getStartupConf": { - "!type" : "fn() -> Object" - }, - "cancel": { - "!type" : "fn(client: Client, query: Query)" - }, - "escapeIdentifier": { - "!type": "fn(str: String) -> String", - }, - "escapeLiteral": { - "!type": "fn(str: String) -> String", - }, - "copyFrom": { - "!type" : "fn(text: String)" - }, - "copyTo": { - "!type" : "fn(text: String)" - }, - "query": { - "!type" : "fn(config: Object, values: Object, callback: fn()) -> Object" - }, - "end": { - "!type" : "fn()" - } - }, - "md5": "fn(string: String)" - }, - "Connection": { - "!proto": "EventEmitter", - "!type": "fn(config: Object)", - "prototype": { - "connect": { - "!type" : "fn(port: Number, host: String)" - }, - "attachListeners": { - "!type" : "fn(stream: Object)" - }, - "requestSsl": { - "!type" : "fn(config: Object)" - }, - "startup": { - "!type" : "fn(config: Object)" - }, - "cancel": { - "!type" : "fn(processID: Number, secretKey: String)" - }, - "password": { - "!type" : "fn(password: String)" - }, - "query": { - "!type" : "fn(text: String)" - }, - "parse": { - "!type": "fn(query: Query, more: Object)", - }, - "bind": { - "!type": "fn(config: Object, more: Object)", - }, - "execute": { - "!type": "fn(config: Object, more: Object)", - }, - "flush": { - "!type" : "fn()" - }, - "sync": { - "!type" : "fn()" - }, - "end": { - "!type" : "fn()" - }, - "describe": { - "!type" : "fn(msg: Message, more: Object)" - }, - "sendCopyFromChunk": { - "!type" : "fn(chunk: Object)" - }, - "endCopyFrom": { - "!type" : "fn()" - }, - "sendCopyFail": { - "!type" : "fn(msg: Message)" - }, - "setBuffer": { - "!type": "fn(buffer: Buffer)", - }, - "readSslResponse": { - "!type" : "fn()" - }, - "parseMessage": { - "!type" : "fn() -> Boolean" - }, - "parseR": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseS": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseK": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseC": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseZ": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseT": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseField": { - "!type": "fn(buffer: Buffer) -> Object", - }, - "parseD": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseE": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseN": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseA": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseG": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseH": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseGH": { - "!type": "fn(buffer: Buffer, msg: String) -> Message", - }, - "parsed": { - "!type": "fn(buffer: Buffer, length: Number) -> Message", - }, - "parseInt32": { - "!type": "fn(buffer: Buffer) -> Number", - }, - "parseInt16": { - "!type": "fn(buffer: Buffer) -> Number", - }, - "readString": { - "!type": "fn(buffer: Buffer, length: Number) -> String", - }, - "readBytes": { - "!type": "fn(buffer: Buffer, length: Number) -> Buffer", - }, - "parseCString": { - "!type": "fn(buffer: Buffer) -> String", - } - }, - }, - "Error": { - "!proto": "Object", - "name": "String", - "length": "Number", - "salt": "Buffer", - "parameterName": "String", - "parameterValue": "String", - "processID": "Number", - "secretKey": "Number", - "text": "String", - "status": "String", - "fieldCount": "Number", - "fields": "[Object]", - "processId": "Number", - "channel": "String", - "payload": "String", - "binary": "Boolean", - "columnTypes": "[Number]", - "chunk": "Buffer" - }, - "Query": { - "!proto": "EventEmitter", - "!type": "fn(config: Object, values: Object, callback: fn()) -> Query", - "prototype": { - "requiresPreparation": { - "!type" : "fn() -> Boolean" - }, - "handleRowDescription": { - "!type": "fn(msg: Message)", - }, - "handleDataRow": { - "!type" : "fn(msg: Message)" - }, - "handleCommandComplete": { - "!type" : "fn(msg: Message, con: Connection)" - }, - "handleReadyForQuery": { - "!type" : "fn()" - }, - "handleError": { - "!type" : "fn(err: Boolean, connection: Connection)" - }, - "submit": { - "!type" : "fn(connection: Connection)" - }, - "hasBeenParsed": { - "!type" : "fn(connection: Connection) -> String" - }, - "handlePortalSuspended": { - "!type" : "fn(connection: Connection)" - }, - "prepare": { - "!type" : "fn(connection: Connection)" - }, - "handleCopyInResponse": { - "!type" : "fn(connection: Connection)" - }, - "handleCopyData": { - "!type" : "fn(msg: Message, connection: Connection)" - } - }, - "portal": { - "!type": "String", - }, - "isPreparedStatement": { - "!type": "Boolean", - }, - }, - "Types": { - "!proto": "Object", - "getTypeParser": { - "!type": "fn(oid: String, format: Object) -> Object" - }, - "setTypeParser": { - "!type": "fn(oid: String, format: String, parseFn: fn())" - } - }, - "Pool": { - "!proto": "Object", - "all": "Object", - "getOrCreate": "fn(clientConfig: Object)" - }, - "Defaults": { - "!proto": "Object", - "host": { - "!type": "String", - }, - "port": { - "!type": "Number", - }, - "rows": { - "!type": "Number", - }, - "binary": { - "!type": "Boolean", - }, - "poolSize": { - "!type": "Number", - }, - "poolIdleTimeout": { - "!type": "Number", - }, - "reapIntervalMillis": { - "!type": "Number", - }, - "poolLog": { - "!type": "Boolean", - }, - "client_encoding": "String", - "ssl": "Boolean" - } - } - } - } -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/redisIndex.js b/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/redisIndex.js deleted file mode 100644 index dc1cdad6..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/contentassist/indexFiles/redisIndex.js +++ /dev/null @@ -1,306 +0,0 @@ -/******************************************************************************* - * @license - * Copyright (c) 2014 IBM Corporation. - * 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('javascript/contentAssist/indexFiles/redisIndex', [], -function () { - return { - "!name": "redis", - "this": "", - "global": "", - "redis": "redis", - "RedisClient" : "redis.RedisClient", - "Multi" : "redis.Multi", - "commands" : "Commands", - "!define": { - "redis": { - "debug_mode": { - "!type": "Boolean", - }, - "createClient": { - "!type": "fn(port_arg: Number, host_arg: String, options: Object) -> +redis.RedisClient", - }, - "print": { - "!type" : "fn(err: Error, reply: Object)" - }, - "RedisClient": { - "!type": "fn(stream: Object, options: Object)", - "prototype": { - "initialize_retry_vars": { - "!type" : "fn()" - }, - "unref": { - "!type" : "fn()" - }, - "flush_and_error": { - "!type": "fn(message: String)", - }, - "on_error": { - "!type" : "fn(msg: String)" - }, - "do_auth": { - "!type" : "fn()" - }, - "on_connect": { - "!type" : "fn()" - }, - "init_parser": { - "!type" : "fn()" - }, - "on_ready": { - "!type" : "fn()" - }, - "on_info_cmd": { - "!type" : "fn(err: Error, res: Object)" - }, - "ready_check": { - "!type" : "fn()" - }, - "send_offline_queue": { - "!type" : "fn()" - }, - "connection_gone": { - "!type" : "fn(why: String)" - }, - "on_data": { - "!type" : "fn(data: Object)" - }, - "return_error": { - "!type" : "fn(err: Error)" - }, - "return_reply": { - "!type" : "fn(reply: Object)" - }, - "send_command": { - "!type" : "fn(command: String, args: Object, callback: fn()) -> Object" - }, - "pub_sub_command": { - "!type" : "fn(command_obj: Object)" - }, - "end": { - "!type" : "fn()" - }, - "select": { - "!type": "fn(db: Object, callback: fn())", - }, - "auth": { - "!type": "fn()", - }, - "hmget": { - "!type" : "fn(arg1: Object, arg2: Object, arg3: Object)" - }, - "hmset": { - "!type" : "fn(args: Object, callback: fn())" - }, - "multi": { - "!type" : "fn(args: Object) -> +redis.Multi" - }, - "MULTI": { - "!type": "fn(args: Object) -> +redis.Multi", - }, - "EVAL": { - "!type" : "fn()" - }, - "SELECT": { - "!type" : "fn()" - }, - "AUTH": { - "!type" : "fn()" - }, - "HMGET": { - "!type" : "fn(arg1: Object, arg2: Object, arg3: Object)" - }, - "HMSET": { - "!type" : "fn(args: Object, callback: fn())" - }, - "eval": { - "!type" : "fn()" - } - } - }, - "Multi": { - "!proto" : "Object", - "!type" : "fn(client: RedisClient, args: Object)", - "prototype": { - "hmset": { - "!type": "fn() -> +redis.Multi", - }, - "exec": { - "!type" : "fn(callback: fn()) -> Boolean" - }, - "HMSET": { - "!type" : "fn()" - }, - "EXEC": { - "!type" : "fn()" - } - }, - "queue": "[[MULTI]]", - }, - }, - "Commands": { - "!proto" : "Object", - "append" : "String", - "auth" : "String", - "bgrewriteaof" : "String", - "bgsave" : "String", - "bitcount" : "String", - "bitop" : "String", - "blpop" : "String", - "brpop" : "String", - "brpoplpush" : "String", - "client kill" : "String", - "client list" : "String", - "client getname" : "String", - "client setname" : "String", - "config get" : "String", - "config rewrite" : "String", - "config set" : "String", - "config resetstat" : "String", - "dbsize" : "String", - "debug object" : "String", - "debug segfault" : "String", - "decr" : "String", - "decrby" : "String", - "del" : "String", - "discard" : "String", - "dump" : "String", - "echo" : "String", - "eval" : "String", - "evalsha" : "String", - "exec" : "String", - "exists" : "String", - "expire" : "String", - "expireat" : "String", - "flushall" : "String", - "flushdb" : "String", - "get" : "String", - "getbit" : "String", - "getrange" : "String", - "getset" : "String", - "hdel" : "String", - "hexists" : "String", - "hget" : "String", - "hgetall" : "String", - "hincrby" : "String", - "hincrbyfloat" : "String", - "hkeys" : "String", - "hlen" : "String", - "hmget" : "String", - "hmset" : "String", - "hset" : "String", - "hsetnx" : "String", - "hvals" : "String", - "incr" : "String", - "incrby" : "String", - "incrbyfloat" : "String", - "info" : "String", - "keys" : "String", - "lastsave" : "String", - "lindex" : "String", - "linsert" : "String", - "llen" : "String", - "lpop" : "String", - "lpush" : "String", - "lpushx" : "String", - "lrange" : "String", - "lrem" : "String", - "lset" : "String", - "ltrim" : "String", - "mget" : "String", - "migrate" : "String", - "monitor" : "String", - "move" : "String", - "mset" : "String", - "msetnx" : "String", - "multi" : "String", - "object" : "String", - "persist" : "String", - "pexpire" : "String", - "pexpireat" : "String", - "ping" : "String", - "psetex" : "String", - "psubscribe" : "String", - "pubsub" : "String", - "pttl" : "String", - "publish" : "String", - "punsubscribe" : "String", - "quit" : "String", - "randomkey" : "String", - "rename" : "String", - "renamenx" : "String", - "restore" : "String", - "rpop" : "String", - "rpoplpush" : "String", - "rpush" : "String", - "rpushx" : "String", - "sadd" : "String", - "save" : "String", - "scard" : "String", - "script exists" : "String", - "script flush" : "String", - "script kill" : "String", - "script load" : "String", - "sdiff" : "String", - "sdiffstore" : "String", - "select" : "String", - "set" : "String", - "setbit" : "String", - "setex" : "String", - "setnx" : "String", - "setrange" : "String", - "shutdown" : "String", - "sinter" : "String", - "sinterstore" : "String", - "sismember" : "String", - "slaveof" : "String", - "slowlog" : "String", - "smembers" : "String", - "smove" : "String", - "sort" : "String", - "spop" : "String", - "srandmember" : "String", - "srem" : "String", - "strlen" : "String", - "subscribe" : "String", - "sunion" : "String", - "sunionstore" : "String", - "sync" : "String", - "time" : "String", - "ttl" : "String", - "type" : "String", - "unsubscribe" : "String", - "unwatch" : "String", - "watch" : "String", - "zadd" : "String", - "zcard" : "String", - "zcount" : "String", - "zincrby" : "String", - "zinterstore" : "String", - "zrange" : "String", - "zrangebyscore" : "String", - "zrank" : "String", - "zrem" : "String", - "zremrangebyrank" : "String", - "zremrangebyscore" : "String", - "zrevrange" : "String", - "zrevrangebyscore" : "String", - "zrevrank" : "String", - "zscore" : "String", - "zunionstore" : "String", - "scan" : "String", - "sscan" : "String", - "hscan" : "String", - "zscan" : "String" - } - } - } -}); \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeDocumentProvider.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeDocumentProvider.java deleted file mode 100644 index ab7ea4ba..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeDocumentProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.nodeclipse.ui.editors; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IDocumentPartitioner; -import org.eclipse.jface.text.rules.FastPartitioner; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.editors.text.FileDocumentProvider; -import org.nodeclipse.ui.highlight.NodePartitionScanner; - -public class NodeDocumentProvider extends FileDocumentProvider { - - @Override - protected IDocument createDocument(Object element) throws CoreException { - IDocument doc = super.createDocument(element); - if (doc != null) { - IDocumentPartitioner partitioner = new FastPartitioner(new NodePartitionScanner(), NodePartitionScanner.PARTITION_TYPES); - partitioner.connect(doc); - doc.setDocumentPartitioner(partitioner); - } - return doc; - } - - /** - * Alternative implementation of the method that does not require file to be - * a physical file. - */ - @Override - public boolean isDeleted(Object element) { - if (element instanceof IFileEditorInput) { - IFileEditorInput input = (IFileEditorInput) element; - - IProject project = input.getFile().getProject(); - if (project != null && !project.exists()) { - return true; - } - - return !input.getFile().exists(); - } - return super.isDeleted(element); - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeEditor.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeEditor.java deleted file mode 100644 index 3d814c7a..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeEditor.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.nodeclipse.ui.editors; - -import org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor; - - -/** - * Editor based on JSDT JavaScript Editor - * @author Nodeclipse authors - */ -@SuppressWarnings("restriction") -public class NodeEditor extends CompilationUnitEditor { -} - -/* -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.text.IDocumentExtension3; -import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; -import org.eclipse.ui.editors.text.TextEditor; -import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; - -public class NodeEditor extends TextEditor { - - public static final String EDITOR_ID = "org.nodeclipse.ui.editors.NodeEditor"; - public static final String RULER_CONTEXT = EDITOR_ID + ".ruler"; - public final static String EDITOR_MATCHING_BRACKETS = "matchingBrackets"; - public final static String EDITOR_MATCHING_BRACKETS_COLOR = "matchingBracketsColor"; - - private DefaultCharacterPairMatcher matcher; - - public NodeEditor() { - setSourceViewerConfiguration(new NodeSourceViewerConfiguration()); - } - - @Override - protected void initializeEditor() { - super.initializeEditor(); - setRulerContextMenuId(RULER_CONTEXT); - setDocumentProvider(new NodeDocumentProvider()); - } - - @Override - protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { - super.configureSourceViewerDecorationSupport(support); - - char[] matchChars = { '(', ')', '[', ']', '{', '}' }; // which brackets - // to match - matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING); - support.setCharacterPairMatcher(matcher); - support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR); - - // Enable bracket highlighting in the preference store - IPreferenceStore store = getPreferenceStore(); - store.setDefault(EDITOR_MATCHING_BRACKETS, true); - store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128"); - } - -} -*/ \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeSourceViewerConfiguration.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeSourceViewerConfiguration.java deleted file mode 100644 index f051bc7d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeSourceViewerConfiguration.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.nodeclipse.ui.editors; - -import org.eclipse.jface.text.DefaultInformationControl; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IInformationControl; -import org.eclipse.jface.text.IInformationControlCreator; -import org.eclipse.jface.text.contentassist.ContentAssistant; -import org.eclipse.jface.text.contentassist.IContentAssistant; -import org.eclipse.jface.text.presentation.IPresentationReconciler; -import org.eclipse.jface.text.presentation.PresentationReconciler; -import org.eclipse.jface.text.rules.DefaultDamagerRepairer; -import org.eclipse.jface.text.rules.ITokenScanner; -import org.eclipse.jface.text.source.ISourceViewer; -import org.eclipse.jface.text.source.SourceViewerConfiguration; -import org.eclipse.swt.widgets.Shell; -import org.nodeclipse.ui.contentassist.NodeContentAssistant; -import org.nodeclipse.ui.highlight.MultilineCommentScanner; -import org.nodeclipse.ui.highlight.NodeCodeScanner; -import org.nodeclipse.ui.highlight.NodePartitionScanner; - -public class NodeSourceViewerConfiguration extends SourceViewerConfiguration { - - @Override - public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { - PresentationReconciler pr = new PresentationReconciler(); - pr.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); - - NodeCodeScanner scanner = new NodeCodeScanner(); - setDamagerRepairer(pr, scanner, IDocument.DEFAULT_CONTENT_TYPE); - setDamagerRepairer(pr, new MultilineCommentScanner(scanner.getCommentAttribute()), NodePartitionScanner.MULTILINE_COMMENT); - setDamagerRepairer(pr, new MultilineCommentScanner(scanner.getDocAttribute()), NodePartitionScanner.NODEDOC); - return pr; - } - - private void setDamagerRepairer(PresentationReconciler pr, ITokenScanner scanner, String tokenType) { - DefaultDamagerRepairer damagerRepairer = new DefaultDamagerRepairer(scanner); - pr.setDamager(damagerRepairer, tokenType); - pr.setRepairer(damagerRepairer, tokenType); - } - - @Override - public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { - return NodePartitionScanner.CONTENT_TYPES; - } - - @Override - public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { - // TODO Preferences - ContentAssistant contentAssistant = new ContentAssistant(); - contentAssistant.setInformationControlCreator(new IInformationControlCreator() { - public IInformationControl createInformationControl(Shell parent) { - DefaultInformationControl control = new DefaultInformationControl(parent, true); - return control; - } - }); - contentAssistant.setContentAssistProcessor(new NodeContentAssistant(), IDocument.DEFAULT_CONTENT_TYPE); - contentAssistant.enableAutoActivation(true); - contentAssistant.setAutoActivationDelay(500); - return contentAssistant; - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeclipseNodejsEditor.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeclipseNodejsEditor.java deleted file mode 100644 index b843a8fb..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/editors/NodeclipseNodejsEditor.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.nodeclipse.ui.editors; - -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.text.IDocumentExtension3; -import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; -import org.eclipse.ui.editors.text.TextEditor; -import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; - - -/** - * TODO base classes, color theme support - * @author Nodeclipse authors - */ -public class NodeclipseNodejsEditor extends TextEditor { - - public static final String EDITOR_ID = "org.nodeclipse.ui.editors.Nodeclipse01Editor"; - public static final String RULER_CONTEXT = EDITOR_ID + ".ruler"; - public final static String EDITOR_MATCHING_BRACKETS = "matchingBrackets"; - public final static String EDITOR_MATCHING_BRACKETS_COLOR = "matchingBracketsColor"; - - private DefaultCharacterPairMatcher matcher; - - public NodeclipseNodejsEditor() { - setSourceViewerConfiguration(new NodeSourceViewerConfiguration()); - } - - @Override - protected void initializeEditor() { - super.initializeEditor(); - setRulerContextMenuId(RULER_CONTEXT); - setDocumentProvider(new NodeDocumentProvider()); - } - - @Override - protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { - super.configureSourceViewerDecorationSupport(support); - - char[] matchChars = { '(', ')', '[', ']', '{', '}' }; // which brackets - // to match - matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING); - support.setCharacterPairMatcher(matcher); - support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR); - - // Enable bracket highlighting in the preference store - IPreferenceStore store = getPreferenceStore(); - store.setDefault(EDITOR_MATCHING_BRACKETS, true); - store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128"); - } - -} - diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/EditorColors.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/EditorColors.java deleted file mode 100644 index 49c01b2d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/EditorColors.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.nodeclipse.ui.highlight; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Display; - -/** - * Converts RGB to Color, reuses the existing Color instances. A singleton. - */ -public class EditorColors { - - private static final Map intToColor = new HashMap(); - - public static Color getColor(RGB rgb) { - Integer colorInt = rgbToInteger(rgb); - Color color = intToColor.get(colorInt); - if (color == null) { - color = new Color(Display.getDefault(), rgb); - intToColor.put(colorInt, color); - } - return color; - } - - private static Integer rgbToInteger(RGB rgb) { - return ((rgb.red & 0xFF) << 16) + ((rgb.green & 0xFF) << 8) + (rgb.blue & 0xFF); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/MultilineCommentScanner.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/MultilineCommentScanner.java deleted file mode 100644 index ac00cbf7..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/MultilineCommentScanner.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.nodeclipse.ui.highlight; - -import org.eclipse.jface.text.TextAttribute; -import org.eclipse.jface.text.rules.BufferedRuleBasedScanner; -import org.eclipse.jface.text.rules.Token; - -public class MultilineCommentScanner extends BufferedRuleBasedScanner { - public MultilineCommentScanner(TextAttribute attr) { - setDefaultReturnToken(new Token(attr)); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodeCodeScanner.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodeCodeScanner.java deleted file mode 100644 index 7b6eaa44..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodeCodeScanner.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.nodeclipse.ui.highlight; - -import org.eclipse.jface.text.TextAttribute; -import org.eclipse.jface.text.rules.EndOfLineRule; -import org.eclipse.jface.text.rules.IRule; -import org.eclipse.jface.text.rules.IWhitespaceDetector; -import org.eclipse.jface.text.rules.IWordDetector; -import org.eclipse.jface.text.rules.MultiLineRule; -import org.eclipse.jface.text.rules.NumberRule; -import org.eclipse.jface.text.rules.RuleBasedScanner; -import org.eclipse.jface.text.rules.SingleLineRule; -import org.eclipse.jface.text.rules.Token; -import org.eclipse.jface.text.rules.WhitespaceRule; -import org.eclipse.jface.text.rules.WordRule; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.RGB; - -/** - * JavaScript code scanner for source code highlighting. - */ -public class NodeCodeScanner extends RuleBasedScanner { - - // TODO Preferences - private TextAttribute commentAttribute = new TextAttribute(EditorColors.getColor(new RGB(63, 127, 95)), null, SWT.NORMAL); - private TextAttribute docAttribute = new TextAttribute(EditorColors.getColor(new RGB(127, 127, 159)), null, SWT.NORMAL); - private TextAttribute keywordAttribute = new TextAttribute(EditorColors.getColor(new RGB(127, 0, 85)), null, SWT.BOLD); - private TextAttribute stringAttribute = new TextAttribute(EditorColors.getColor(new RGB(42, 0, 255)), null, SWT.NORMAL); - private TextAttribute numberAttribute = new TextAttribute(EditorColors.getColor(new RGB(0, 0, 0)), null, SWT.NORMAL); - private TextAttribute normalAttribute = new TextAttribute(EditorColors.getColor(new RGB(0, 0, 0)), null, SWT.NORMAL); - - public NodeCodeScanner() { - createRules(); - } - - public TextAttribute getCommentAttribute() { - return commentAttribute; - } - - public TextAttribute getDocAttribute() { - return docAttribute; - } - - /** - * Use the default Eclipse higlighting scheme. - */ - private void createRules() { - Token keywordToken = new Token(keywordAttribute); - Token commentToken = new Token(commentAttribute); - Token docToken = new Token(docAttribute); - Token stringToken = new Token(stringAttribute); - Token numberToken = new Token(numberAttribute); - Token normalToken = new Token(normalAttribute); - - setDefaultReturnToken(normalToken); - - setRules(new IRule[] { new EndOfLineRule("//", commentToken),//$NON-NLS-2$ - new KeywordRule(keywordToken),//$NON-NLS-2$ - new MultiLineRule("/**", "*/", docToken, (char) 0, false), //$NON-NLS-2$ - new MultiLineRule("/*", "*/", commentToken, (char) 0, false), //$NON-NLS-2$ - new SingleLineRule("\"", "\"", stringToken, '\\'), //$NON-NLS-2$ - // Regexp - new SingleLineRule("/", "/", stringToken, '\\'), //$NON-NLS-2$ - new SingleLineRule("'", "'", stringToken, '\\'), //$NON-NLS-2$ - new WhitespaceRule(new IWhitespaceDetector() { - public boolean isWhitespace(char c) { - return Character.isWhitespace(c); - } - }),//$NON-NLS-2$ - new WordRule(new WordDetector(), normalToken),//$NON-NLS-2$ - new NumberRule(numberToken) }); - } - - private static class KeywordRule extends WordRule { - - public KeywordRule(Token token) { - super(new WordDetector()); - for (String word : Words.KEYWORDS) { - addWord(word, token); - } - for (String word : Words.NODE_WORDS) { - addWord(word, token); - } - } - } - - private static class WordDetector implements IWordDetector { - - public boolean isWordPart(char c) { - return Character.isJavaIdentifierPart(c); - } - - public boolean isWordStart(char c) { - return Character.isJavaIdentifierStart(c); - } - - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodePartitionScanner.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodePartitionScanner.java deleted file mode 100644 index 6b4d3541..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/NodePartitionScanner.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.nodeclipse.ui.highlight; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.rules.EndOfLineRule; -import org.eclipse.jface.text.rules.ICharacterScanner; -import org.eclipse.jface.text.rules.IPredicateRule; -import org.eclipse.jface.text.rules.IToken; -import org.eclipse.jface.text.rules.IWordDetector; -import org.eclipse.jface.text.rules.MultiLineRule; -import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; -import org.eclipse.jface.text.rules.SingleLineRule; -import org.eclipse.jface.text.rules.Token; -import org.eclipse.jface.text.rules.WordRule; - -public class NodePartitionScanner extends RuleBasedPartitionScanner { - - public static final String PARTITIONING = "NodePartitioning"; - public static final String MULTILINE_COMMENT = "__node_multiline_comment"; - public static final String NODEDOC = "__nodedoc"; - public static final String[] PARTITION_TYPES = { MULTILINE_COMMENT, NODEDOC }; - public static final String[] CONTENT_TYPES = { IDocument.DEFAULT_CONTENT_TYPE, NODEDOC, MULTILINE_COMMENT }; - - private static class EmptyCommentDetector implements IWordDetector { - - public boolean isWordStart(char c) { - return (c == '/'); - } - - public boolean isWordPart(char c) { - return (c == '*' || c == '/'); - } - } - - private static class EmptyCommentPredicateRule extends WordRule implements IPredicateRule { - private final IToken successToken; - - public EmptyCommentPredicateRule(IToken successToken) { - super(new EmptyCommentDetector()); - this.successToken = successToken; - addWord("/**/", successToken); //$NON-NLS-1$ - } - - public IToken evaluate(ICharacterScanner scanner, boolean resume) { - return super.evaluate(scanner); - } - - public IToken getSuccessToken() { - return successToken; - } - } - - public NodePartitionScanner() { - IToken jsDocToken = new Token(NODEDOC); - IToken multilineCommentToken = new Token(MULTILINE_COMMENT); - - setPredicateRules(new IPredicateRule[] { new EndOfLineRule("//", Token.UNDEFINED), //$NON-NLS-1$ - new SingleLineRule("\"", "\"", Token.UNDEFINED, '\\'), //$NON-NLS-2$ //$NON-NLS-1$ - new SingleLineRule("'", "'", Token.UNDEFINED, '\\'), //$NON-NLS-2$ //$NON-NLS-1$ - new EmptyCommentPredicateRule(multilineCommentToken), new MultiLineRule("/**", "*/", jsDocToken, (char) 0, true), //$NON-NLS-1$ //$NON-NLS-2$ - new MultiLineRule("/*", "*/", multilineCommentToken, (char) 0, true) //$NON-NLS-1$ //$NON-NLS-2$ - }); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/Words.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/Words.java deleted file mode 100644 index 7185d1cd..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/highlight/Words.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.nodeclipse.ui.highlight; - -public class Words { - - public static final String[] KEYWORDS = { "break", "do", "instanceof", "typeof",// - "case", "else", "new", "var",// - "catch", "finally", "return", "void",// - "continue", "for", "switch", "while",// - "debugger", "function", "this", "with",// - "default", "if", "throw",// - "delete", "in", "try"// - }; - - public static final String[] RESERVEDWORDS = { "let", "yield",// - "abstract", "enum", "int", "short",// - "boolean", "export", "interface", "static",// - "byte", "extends", "long", "super",// - "char", "final", "native", "synchronized",// - "class", "float", "package", "throws",// - "const", "goto", "private", "transient",// - "debugger", "implements", "protected", "volatile",// - "double", "import", "public"// - }; - - public static final String[] NODE_WORDS = new String[] { "require", "__filename",// - "__dirname", "module", "exports", "setInterval"// - }; - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/CoffeeNature.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/CoffeeNature.java deleted file mode 100644 index b325804f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/CoffeeNature.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.nodeclipse.ui.nature; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -/** - * CoffeeNature is for CoffeeScript support. - * It is added to Node project to indicate, that some (.coffee) files need to be compiled. - * - * @author Paul Verest - * @since 0.5 - * - * TODO move to org.nodeclipse.core.nature - */ -public class CoffeeNature implements IProjectNature { - - /** - * ID of this project nature - */ - public static final String NATURE_ID = "org.nodeclipse.core.CoffeeNature"; - - private IProject project; - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#configure() - */ - public void configure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#deconfigure() - */ - public void deconfigure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#getProject() - */ - public IProject getProject() { - return project; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) - */ - public void setProject(IProject project) { - this.project = project; - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/NodeNature.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/NodeNature.java deleted file mode 100644 index f856f0b6..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/nature/NodeNature.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.nodeclipse.ui.nature; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -public class NodeNature implements IProjectNature { - - /** - * ID of this project nature - */ - public static final String NATURE_ID = "org.nodeclipse.ui.NodeNature"; - - private IProject project; - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#configure() - */ - public void configure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#deconfigure() - */ - public void deconfigure() throws CoreException { - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#getProject() - */ - public IProject getProject() { - return project; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) - */ - public void setProject(IProject project) { - this.project = project; - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/CoffeeLaunchShortcut.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/CoffeeLaunchShortcut.java deleted file mode 100644 index 43c12dd2..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/CoffeeLaunchShortcut.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.nodeclipse.ui.npm; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * was: Using "Run As" --> "coffee" will lead here. - * - * @author Paul Verest - * @since 0.5 - * - **/ -@Deprecated //not used -public class CoffeeLaunchShortcut implements ILaunchShortcut,IGoal { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - public void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(Constants.NPM_LAUNCH_CONFIGURATION_TYPE_ID); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - String goalString = null; - goalString = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - if (Constants.BLANK_STRING.equals(goalString)) { - Shell shell = Activator.getActiveWorkbenchShell(); - String groupIdentifier = Constants.NPM_LAUNCH_CONFIGURATION_TABGROUP_ID + mode; - DebugUITools.openLaunchConfigurationPropertiesDialog(shell, configuration, groupIdentifier); - } - goalString = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - if (!Constants.BLANK_STRING.equals(goalString)) { - DebugUITools.launch(configuration, mode); - } - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, file.getName()); - workingCopy.setAttribute(Constants.KEY_FILE_PATH, path); - workingCopy.setAttribute(Constants.KEY_GOAL, getGoal()); - return workingCopy.doSave(); - } - - @Override - public String getGoal() { - return Constants.BLANK_STRING; - } - - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/IGoal.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/IGoal.java deleted file mode 100644 index 9978e504..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/IGoal.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.nodeclipse.ui.npm; - -public interface IGoal { - public String getGoal(); -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/InstallLaunchShortcut.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/InstallLaunchShortcut.java deleted file mode 100644 index 8364a46e..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/InstallLaunchShortcut.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.nodeclipse.ui.npm; - -import org.nodeclipse.ui.util.Constants; - -/** - * Using "Run As" --> "npm install" will lead here. - **/ -public class InstallLaunchShortcut extends LaunchShortcut implements IGoal { - public String getGoal() { - return Constants.NPM_INSTALL; - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationDelegate.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationDelegate.java deleted file mode 100644 index 87dc122d..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationDelegate.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.nodeclipse.ui.npm; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; -import org.nodeclipse.ui.util.OSUtils; - -public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { - - private boolean warned = false; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org. - * eclipse.debug.core.ILaunchConfiguration, java.lang.String, - * org.eclipse.debug.core.ILaunch, - * org.eclipse.core.runtime.IProgressMonitor) - */ - @Override - public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { - // Using configuration to build command line - List cmdLine = new ArrayList(); - String nodePath = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.NODE_PATH); - cmdLine.add(findNpm(nodePath)); - - String goal = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - cmdLine.add(goal); - String file = configuration.getAttribute(Constants.KEY_FILE_PATH, Constants.BLANK_STRING); - String filePath = ResourcesPlugin.getWorkspace().getRoot().findMember(file).getLocation().toOSString(); - - File workingPath = (new File(filePath)).getParentFile(); - - //env - String[] envp = getEnvironmentVariables(configuration); - - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - -// Process p = null; -// if(OSUtils.isMacOS()) { -// String[] env = {"PATH=" + nodePath.substring(0, nodePath.lastIndexOf(File.separator))}; -// p = DebugPlugin.exec(cmds, (new File(filePath)).getParentFile(), env); -// } else { -// p = DebugPlugin.exec(cmds, (new File(filePath)).getParentFile()); -// } - Process p = DebugPlugin.exec(cmds, workingPath, envp); - DebugPlugin.newProcess(launch, p, Constants.NPM_PROCESS_MESSAGE + goal); - } - - // copied from org.nodeclipse.debug.launch.LaunchConfigurationDelegate { - public static String[] NODE_ENV_VAR_SET = new String[]{"APPDATA","PATH","TEMP","TMP","SystemDrive"}; // #81, #197 - - private String[] getEnvironmentVariables(ILaunchConfiguration configuration) throws CoreException { - Map envm = new HashMap(); - envm = configuration.getAttribute(Constants.ATTR_ENVIRONMENT_VARIABLES, envm); - - int envmSizeDelta = NODE_ENV_VAR_SET.length; - Map all = null; - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean passAllEnvVars = preferenceStore.getBoolean(PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES);//@since 0.12 - if (passAllEnvVars){ - all = System.getenv(); - envmSizeDelta = all.size(); - } - - String[] envp = new String[envm.size()+envmSizeDelta]; // see below - int idx = 0; - for(String key : envm.keySet()) { - String value = envm.get(key); - envp[idx++] = key + "=" + value; - } - - if (passAllEnvVars){ - for (Map.Entry entry : all.entrySet()) - { - //System.out.println(entry.getKey() + "/" + entry.getValue()); - envp[idx++] = entry.getKey() + "=" + entry.getValue(); - } - }else{ - for (String envVarName : NODE_ENV_VAR_SET){ - envp[idx++] = getEnvVariableEqualsString(envVarName); - } - } - if (!warned ){ - NodeclipseConsole.write(" These environment variables will be applied automatically to every `node` launch.\n"); - StringBuilder sb = new StringBuilder(100); - for(int i=0; i directories = new ArrayList(); - for(String p : paths) { - directories.add(p); - } - - // ensure /usr/local/bin is included for OS X - if (OSUtils.isMacOS()) { - directories.add("/usr/local/bin"); - } - - // search for Node.js in the PATH directories - for (String directory : directories) { - npmFile = new File(directory, npmFileName); - - if (npmFile.exists()) { - return npmFile.getAbsolutePath(); - } - } - - throw new IllegalStateException("Could not find npm."); - } - - private static String getNpmFileName() { - if (OSUtils.isWindows()) { - return "npm.cmd"; - } - - return "npm"; - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationMainTab.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationMainTab.java deleted file mode 100644 index 96f68d12..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationMainTab.java +++ /dev/null @@ -1,217 +0,0 @@ -package org.nodeclipse.ui.npm; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ResourceListSelectionDialog; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.util.Constants; - -public class LaunchConfigurationMainTab extends AbstractLaunchConfigurationTab { - - public static final String MAIN_TAB_NAME = "Main"; - private Text fileText; - private Button fileButton; - private Text goalText; - - /** - * @wbp.parser.entryPoint (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse - * .swt.widgets.Composite) - **/ - public void createControl(Composite parent) { - Font font = parent.getFont(); - Composite comp = createComposite(parent, font, 1, 1, GridData.FILL_BOTH); - createFileGroup(comp); - createGoalGroup(comp); - setControl(comp); - - } - - private void createGoalGroup(Composite parent) { - Group goalGroup = new Group(parent, SWT.NONE); - goalGroup.setText(Constants.GOAL_LABEL); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - goalGroup.setLayoutData(gd); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - goalGroup.setLayout(layout); - goalGroup.setFont(parent.getFont()); - - goalText = new Text(goalGroup, SWT.SINGLE | SWT.BORDER); - gd = new GridData(GridData.FILL_HORIZONTAL); - goalText.setLayoutData(gd); - goalText.setFont(parent.getFont()); - } - - private void createFileGroup(Composite parent) { - Group fileGroup = new Group(parent, SWT.NONE); - fileGroup.setText(Constants.FILE_LABEL); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - fileGroup.setLayoutData(gd); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - fileGroup.setLayout(layout); - fileGroup.setFont(parent.getFont()); - - fileText = new Text(fileGroup, SWT.SINGLE | SWT.BORDER); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.setFont(parent.getFont()); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - updateLaunchConfigurationDialog(); - } - }); - - fileButton = createPushButton(fileGroup, Constants.SEARCH_LABEL, null); //$NON-NLS-1$ - gd = new GridData(GridData.FILL_HORIZONTAL); - fileButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - browseFiles(); - } - }); - } - - /*** - * Open a resource chooser to select a file - **/ - protected void browseFiles() { - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), root, IResource.FILE); - dialog.setTitle(Constants.SEARCH_TITLE); - if (dialog.open() == Window.OK) { - Object[] files = dialog.getResult(); - IFile file = (IFile) files[0]; - fileText.setText(file.getFullPath().toString()); - } - - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse. - * debug.core.ILaunchConfigurationWorkingCopy) - **/ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse - * .debug.core.ILaunchConfiguration) - **/ - public void initializeFrom(ILaunchConfiguration configuration) { - - try { - String path = null; - path = configuration.getAttribute(Constants.KEY_FILE_PATH, Constants.BLANK_STRING); - - String goal = null; - goal = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - if (path != null) { - fileText.setText(path); - } - if (goal != null) { - goalText.setText(goal); - } - } catch (CoreException e) { - setErrorMessage(e.getMessage()); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse - * .debug.core.ILaunchConfigurationWorkingCopy) - **/ - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - String file = fileText.getText().trim(); - if (file.length() == 0) { - file = null; - } - String goal = goalText.getText().trim(); - if (goal.length() == 0) { - goal = null; - } - configuration.setAttribute(Constants.KEY_FILE_PATH, file); - configuration.setAttribute(Constants.KEY_GOAL, goal); - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug - * .core.ILaunchConfiguration) - **/ - public boolean isValid(ILaunchConfiguration launchConfig) { - setErrorMessage(null); - setMessage(null); - String text = fileText.getText(); - - if (text.length() > 0) { - IPath path = new Path(text); - if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) { - setErrorMessage("Specified file does not exist"); - return false; - } - } else { - setMessage("Specify an file"); - } - return true; - } - - public Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) { - Composite g = new Composite(parent, SWT.NONE); - g.setLayout(new GridLayout(columns, false)); - g.setFont(font); - GridData gd = new GridData(fill); - gd.horizontalSpan = hspan; - g.setLayoutData(gd); - return g; - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() - **/ - public Image getImage() { - return Activator.getImageDescriptor(Constants.NPM_ICON).createImage(); - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() - **/ - public String getName() { - return MAIN_TAB_NAME; - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationTabGroup.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationTabGroup.java deleted file mode 100644 index 459511c7..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchConfigurationTabGroup.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.nodeclipse.ui.npm; - -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; - -/** - * Using "Run"-->"Run Configurations"--> "New Configuration"-- > "Run" willlead - * here. - **/ -public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - @Override - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { new LaunchConfigurationMainTab(), new CommonTab() }; - setTabs(tabs); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchShortcut.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchShortcut.java deleted file mode 100644 index 6bcd158a..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/npm/LaunchShortcut.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.nodeclipse.ui.npm; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchShortcut; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.NodeclipseConsole; - -/** - * Using "Run As" --> "npm ..." will lead here from plugin.xml in .ui project. - **/ -public class LaunchShortcut implements ILaunchShortcut,IGoal { - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers - * .ISelection, java.lang.String) - **/ - @Override - public void launch(ISelection selection, String mode) { - try { - Object selectObj = ((IStructuredSelection) selection).getFirstElement(); - if (selectObj instanceof IFile) { - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * (non-Javadoc) - * - * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, - * java.lang.String) - **/ - @Override - public void launch(IEditorPart editor, String mode) { - try { - IEditorInput editorInput = editor.getEditorInput(); - if (editorInput instanceof IFileEditorInput) { - IFile selectObj = ((IFileEditorInput) editorInput).getFile(); - launchFile((IFile) selectObj, mode); - } else { - MessageDialog.openWarning(null, "Warning", "Not implemeneted yet!"); - } - } catch (CoreException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - } - - /** - * Launch an file,using the file information, which means using default - * launch configurations. - * - * @param file - * @param mode - */ - public void launchFile(IFile file, String mode) throws CoreException { - // check for an existing launch config for the file - String path = file.getFullPath().toString(); - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(Constants.NPM_LAUNCH_CONFIGURATION_TYPE_ID); - ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file); - String goalString = null; - goalString = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - if (Constants.BLANK_STRING.equals(goalString)) { - Shell shell = Activator.getActiveWorkbenchShell(); - String groupIdentifier = Constants.NPM_LAUNCH_CONFIGURATION_TABGROUP_ID + mode; - DebugUITools.openLaunchConfigurationPropertiesDialog(shell, configuration, groupIdentifier); - } - goalString = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING); - if (!Constants.BLANK_STRING.equals(goalString)) { - DebugUITools.launch(configuration, mode); - } - } - - /** - * Create a new configuration and set useful data. - * - * @param type - * @param path - * @param file - * @return - * @throws CoreException - */ - private ILaunchConfiguration createLaunchConfiguration(ILaunchConfigurationType type, String path, IFile file) throws CoreException { - // create a new configuration for the file - ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, file.getName()); - workingCopy.setAttribute(Constants.KEY_FILE_PATH, path); - workingCopy.setAttribute(Constants.KEY_GOAL, getGoal()); - return workingCopy.doSave(); - } - - @Override - public String getGoal() { - return Constants.BLANK_STRING; - } - - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/perspectives/NodePerspective.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/perspectives/NodePerspective.java deleted file mode 100644 index ab8a2663..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/perspectives/NodePerspective.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.nodeclipse.ui.perspectives; - -import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.ui.IFolderLayout; -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.console.IConsoleConstants; -import org.eclipse.ui.views.IViewRegistry; - -/** - * This class is meant to serve as an example for how various contributions are - * made to a perspective. Note that some of the extension point id's are - * referred to as API constants while others are hardcoded and may be subject to - * change. - */ -public class NodePerspective implements IPerspectiveFactory { - - public static final String ID = "org.nodeclipse.ui.perspectives.NodePerspective"; - - public static final String ID_TERMINALS_VIEW = "org.eclipse.tcf.te.ui.terminals.TerminalsView"; - public static final String ID_MARKDOWN_VIEW = "winterwell.markdown.views.MarkdownPreview"; - public static final String ID_GFM_VIEW = "code.satyagraha.gfm.viewer.views.GfmView"; - public static final String ID_DEBUG_VIEW = "org.eclipse.debug.ui.DebugView"; - public static final String ID_LOG_VIEW = "org.eclipse.pde.runtime.LogView"; - public static final String ID_TERN_OUTLINE_VIEW = "tern.eclipse.ide.ui.views.TernOutlineView"; - public static final String ID_TERN_EXPLORER_VIEW = "tern.eclipse.ide.ui.views.TernExplorerView"; //TODO delete in 2016 - - - private IPageLayout factory; - - private IViewRegistry viewRegistry; - - public NodePerspective() { - super(); - } - - public void createInitialLayout(IPageLayout factory) { - this.factory = factory; - this.viewRegistry = PlatformUI.getWorkbench().getViewRegistry(); - - addViews(); - addViewShortcuts(); - addActionSets(); - addNewWizardShortcuts(); - addPerspectiveShortcuts(); - } - - private void addViews() { - // Creates the overall folder layout. - // Note that each new Folder uses a percentage of the remaining EditorArea. - - IFolderLayout left = factory.createFolder("left", IPageLayout.LEFT, 0.25f, factory.getEditorArea()); - left.addView(IPageLayout.ID_PROJECT_EXPLORER); - - IFolderLayout rightBottom = factory.createFolder("rightBottom", IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());// NON-NLS-1 - // remove over Bug 478249 - [terminal][regression] Launching Terminal freezes Eclipse forever ; activating Terminal freezes UI for 13s - // https://bugs.eclipse.org/bugs/show_bug.cgi?id=478249 -// if (viewRegistry.find(ID_TERMINALS_VIEW) != null){ -// rightBottom.addView(ID_TERMINALS_VIEW); -// } - rightBottom.addView(IConsoleConstants.ID_CONSOLE_VIEW); - rightBottom.addView(ID_DEBUG_VIEW); - if (viewRegistry.find(ID_MARKDOWN_VIEW) != null){ - rightBottom.addView(ID_MARKDOWN_VIEW); - } - if (viewRegistry.find(ID_GFM_VIEW) != null){ - rightBottom.addView(ID_GFM_VIEW); - } - rightBottom.addView(IPageLayout.ID_PROBLEM_VIEW); - if (viewRegistry.find(ID_LOG_VIEW) != null){ - rightBottom.addView(ID_LOG_VIEW); - } - - IFolderLayout rightTopRight = factory.createFolder("rightTopRight", IPageLayout.RIGHT, 0.75f, factory.getEditorArea()); - rightTopRight.addView(IPageLayout.ID_OUTLINE); - rightTopRight.addView(ID_TERN_OUTLINE_VIEW); - rightTopRight.addView(ID_TERN_EXPLORER_VIEW); - rightTopRight.addView(IPageLayout.ID_TASK_LIST); - } - - private void addViewShortcuts() { - factory.addShowViewShortcut(IPageLayout.ID_TASK_LIST); - factory.addShowViewShortcut(IPageLayout.ID_PROP_SHEET); - factory.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); - factory.addShowViewShortcut(IPageLayout.ID_NAVIGATE_ACTION_SET); - factory.addShowViewShortcut(IPageLayout.ID_OUTLINE); - factory.addShowViewShortcut(ID_TERN_OUTLINE_VIEW); - factory.addShowViewShortcut(ID_TERN_EXPLORER_VIEW); - factory.addShowViewShortcut(IPageLayout.ID_BOOKMARKS); - - factory.addShowViewShortcut("org.eclipse.team.ui.GenericHistoryView"); // NON-NLS-1 - factory.addShowViewShortcut("org.eclipse.ui.views.ResourceNavigator"); // NON-NLS-1 - factory.addShowViewShortcut("com.eclipserunner.views.RunnerView"); // NON-NLS-1 @since 0.8 - factory.addShowViewShortcut("org.eclipse.angularjs.ui.views.AngularExplorerView"); - - //as in rightBottom - factory.addShowViewShortcut(ID_TERMINALS_VIEW); - factory.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); - factory.addShowViewShortcut(ID_DEBUG_VIEW); - factory.addShowViewShortcut(ID_MARKDOWN_VIEW); - factory.addShowViewShortcut(ID_GFM_VIEW); - factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); - factory.addShowViewShortcut(ID_LOG_VIEW); - } - - private void addActionSets() { - factory.addActionSet("org.eclipse.debug.ui.launchActionSet"); // NON-NLS-1 - factory.addActionSet("org.eclipse.debug.ui.debugActionSet"); // NON-NLS-1 - factory.addActionSet("org.eclipse.debug.ui.profileActionSet"); // NON-NLS-1 - factory.addActionSet("org.eclipse.team.ui.actionSet"); // NON-NLS-1 - factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // NON-NLS-1 - } - - private void addPerspectiveShortcuts() { - factory.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); // NON-NLS-1 - factory.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); // NON-NLS-1 - factory.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); - } - - private void addNewWizardShortcuts() { - factory.addNewWizardShortcut("org.nodeclipse.ui.wizards.NodeProjectWizard"); // NON-NLS-1 - factory.addNewWizardShortcut("org.nodeclipse.ui.wizards.ExpressProjectWizard"); // NON-NLS-1 - factory.addNewWizardShortcut("org.nodeclipse.phantomjs.wizards.PhantomjsProjectWizard"); // NON-NLS-1 @since 0.8 - factory.addNewWizardShortcut("org.nodeclipse.jjs.wizards.NashornProjectWizard"); // NON-NLS-1 @since 0.8 - factory.addNewWizardShortcut("org.nodeclipse.vertx.wizards.VertxProjectWizard"); // NON-NLS-1 @since 0.11 - factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); // NON-NLS-1 - // auto new section - factory.addNewWizardShortcut("org.nodeclipse.ui.wizards.NodeFileWizard"); // NON-NLS-1 - factory.addNewWizardShortcut("org.nodeclipse.ui.wizards.CoffeeFileWizard"); // NON-NLS-1 - factory.addNewWizardShortcut("org.nodeclipse.ui.wizards.TypeScriptFileWizard"); // NON-NLS-1 - factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); // NON-NLS-1 - factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");// NON-NLS-1 - // Tern Wizards - factory.addNewWizardShortcut("tern.eclipse.ide.tools.ui.wizards.NewTernDefWizard");// NON-NLS-1 - factory.addNewWizardShortcut("tern.eclipse.ide.tools.ui.wizards.NewTernPluginWizard");// NON-NLS-1 - factory.addNewWizardShortcut("tern.eclipse.ide.tools.ui.wizards.webbrowser.NewCodeMirrorWizard");// NON-NLS-1 - factory.addNewWizardShortcut("tern.eclipse.ide.tools.ui.wizards.webbrowser.NewAceWizard");// NON-NLS-1 - factory.addNewWizardShortcut("tern.eclipse.ide.tools.ui.wizards.webbrowser.NewOrionWizard");// NON-NLS-1 - // http://ternjs.net/doc/manual.html#plugins - // https://github.com/angelozerr/tern.java/wiki/Tern-Toolings - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/Dialogs.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/Dialogs.java deleted file mode 100644 index 0a07adba..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/Dialogs.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.nodeclipse.ui.preferences; - -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.PreferenceDialog; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.PreferencesUtil; - -/** - * Dialogs used in .debug & .phantomjs - * @author Paul Verest, Pushkar Gupte - */ -public class Dialogs { - - - public static void showPreferencesDialog(final String message) { - Display.getDefault().syncExec(new Runnable() { - public void run() { - Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - - MessageDialog dialog = new MessageDialog(shell, "Nodeclipse", null, message, - MessageDialog.ERROR, new String[] { "Open Prefrences ...", "Cancel" }, 0); - int result = dialog.open(); - if (result == 0) { - PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(shell, - PreferenceConstants.PREFERENCES_PAGE, null, null); - if (pref != null) - pref.open(); - } - } - }); - } - - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/NodePreferencePage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/NodePreferencePage.java deleted file mode 100644 index f3ffb566..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/NodePreferencePage.java +++ /dev/null @@ -1,255 +0,0 @@ -package org.nodeclipse.ui.preferences; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.FileFieldEditor; -import org.eclipse.jface.preference.IntegerFieldEditor; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Link; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.browser.IWebBrowser; -import org.eclipse.ui.browser.IWorkbenchBrowserSupport; -import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport; -import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.util.ProcessUtils; -import org.nodeclipse.ui.util.VersionUtil; - -/** - * @author Tomoyuki Inagaki - * @author Paul Verest - */ -public class NodePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - private BooleanFieldEditor nodeclipseConsoleEnabled; - - private BooleanFieldEditor nodeJustNode; - private FileFieldEditor nodePath; - private StringFieldEditor nodeOptions; - private StringFieldEditor nodeApplicationArguments; - private BooleanFieldEditor nodeAllowMany; - private BooleanFieldEditor nodePassAllEnvVars; - private BooleanFieldEditor addJsdtNature; - private BooleanFieldEditor addTernNature; - private DirectoryFieldEditor nodeSourcesPath; - private BooleanFieldEditor useNodejsBaseModuleDefinitions; - private BooleanFieldEditor useOrionIndexFiles; - private BooleanFieldEditor useCompletionJson; - private FileFieldEditor completionsPath; - private BooleanFieldEditor nodeDebugNoBreak; - private IntegerFieldEditor nodeDebugPort; - //private FileFieldEditor nodeMonitorPath; - private FileFieldEditor expressPath; - private StringFieldEditor expressVersion; - private FileFieldEditor coffeePath; - //private BooleanFieldEditor coffeeJustCoffee; - private StringFieldEditor coffeeCompileOptions; - private StringFieldEditor coffeeCompileOutputFolder; - private FileFieldEditor typescriptCompilerPath; - private StringFieldEditor typescriptCompilerOptions; - - public NodePreferencePage() { - super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setImageDescriptor(Activator.getImageDescriptor("icons/node.png")); - setDescription( - VersionUtil.getLongString()+ - "\n"+ - "Node.js, Express, CoffeeScript, TypeScript settings"); - } - - @Override - public void init(IWorkbench workbench) { - } - - private void addLinkWidget(String text, final String urlString){ - // http://stackoverflow.com/questions/22424993/eclipse-plugin-dev-how-to-add-hyperlink-on-fieldeditorpreferencepage - Link link = new Link(getFieldEditorParent(), SWT.NONE); - link.setText(text); - //link.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 3, 1)); - link.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(final SelectionEvent event) { - try { - URL url = new URL(urlString); - try { - //WorkbenchBrowserSupport.getInstance().getExternalBrowser().openURL(url ); - PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(url ); - } catch (PartInitException e) { - } - } catch (MalformedURLException e) { - } - } - }); - } - -//// int style = IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS; -//// IWebBrowser browser; -//// try { -//// browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, "NodeclipsePluginsListID", "NodeclipsePluginsList", "Nodeclipse Plugins List"); -//// browser.openURL(new URL("http://www.nodeclipse.org/updates")); -//// } catch (PartInitException e) { -//// e.printStackTrace(); -//// } catch (MalformedURLException e) { -//// e.printStackTrace(); -//// } -// -//// IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); -//// container.openPage("org.eclipse.ui.preferencePages.GeneralTextEditor", null); - - //TODO possible to copy version string - // String verString = VersionUtil.getLongString(); - // nodeclipseVersionsString = new StringFieldEditor(PreferenceConstants.NODE_OPTIONS, "Node options (node -h):", getFieldEditorParent()); - // nodeclipseVersionsString.setStringValue(verString); - // nodeclipseVersionsString.setTextLimit(verString.length()); - // nodeclipseVersionsString.setEnabled(false, (Composite) this); - // addField(nodeclipseVersionsString); - @Override - protected void createFieldEditors() { - addLinkWidget("Visit www.nodeclipse.org for news", "http://www.nodeclipse.org/"); - addLinkWidget(" and history.", "http://www.nodeclipse.org/history"); - addLinkWidget("GitHub", "https://github.com/nodeclipse/nodeclipse-1/"); - - nodeclipseConsoleEnabled = new BooleanFieldEditor(PreferenceConstants.NODECLIPSE_CONSOLE_ENABLED, - "enable Nodeclipse Console", getFieldEditorParent()); - addField(nodeclipseConsoleEnabled); - - nodeJustNode = new BooleanFieldEditor(PreferenceConstants.NODE_JUST_NODE, - "find node on PATH. Otherwise use Node.js instance in location below", getFieldEditorParent()); - addField(nodeJustNode); - - nodePath = new FileFieldEditor(PreferenceConstants.NODE_PATH, "Node.js path:", getFieldEditorParent()); - addField(nodePath); - - nodeOptions = new StringFieldEditor(PreferenceConstants.NODE_OPTIONS, "Node options (node -h):", getFieldEditorParent()); - addField(nodeOptions); - - nodeApplicationArguments = new StringFieldEditor(PreferenceConstants.NODE_APPLICATION_ARGUMENTS, "Node Application arguments:", getFieldEditorParent()); - addField(nodeApplicationArguments); - - nodeAllowMany = new BooleanFieldEditor(PreferenceConstants.NODE_ALLOW_MANY, - "allow many Node.js instances running", getFieldEditorParent()); - addField(nodeAllowMany); - - nodePassAllEnvVars = new BooleanFieldEditor(PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES, - "pass all environment variables of Eclipse to launched Node.js app", getFieldEditorParent()); - addField(nodePassAllEnvVars); - - addJsdtNature = new BooleanFieldEditor(PreferenceConstants.ADD_JSDT_NATURE, - "add JSDT nature to newly created projects", getFieldEditorParent()); - addField(addJsdtNature); - addTernNature = new BooleanFieldEditor(PreferenceConstants.ADD_TERN_NATURE, - "add Tern nature to newly created projects", getFieldEditorParent()); - addField(addTernNature); - - nodeSourcesPath = new DirectoryFieldEditor(PreferenceConstants.NODE_SOURCES_PATH, "Node sources directory path:", getFieldEditorParent()); - addField(nodeSourcesPath); - - useNodejsBaseModuleDefinitions = new BooleanFieldEditor(PreferenceConstants.USE_NODEJS_BASE_MODULE_DEFINITIONS, - "use Node.js base module definitions (changed after restart)", getFieldEditorParent()); - addField(useNodejsBaseModuleDefinitions); - useOrionIndexFiles = new BooleanFieldEditor(PreferenceConstants.USE_ORION_INDEX_FILES, - "use Orion IndexFiles (changed after restart)", getFieldEditorParent()); - addField(useOrionIndexFiles); - useCompletionJson = new BooleanFieldEditor(PreferenceConstants.USE_COMPLETIONS_JSON, - "use completion.json (changed after restart)", getFieldEditorParent()); - addField(useCompletionJson); - - completionsPath = new FileFieldEditor(PreferenceConstants.COMPLETIONS_JSON_PATH, "Alternative completions.json path:", getFieldEditorParent()); - addField(completionsPath); - - // "Node debug no -break (disable interruption of Node.js app on first line, check debug Help)" would make dialog wider - nodeDebugNoBreak = new BooleanFieldEditor(PreferenceConstants.NODE_DEBUG_NO_BREAK, - "Node debug without -brk (disable interruption of Node.js app start)", getFieldEditorParent()); - addField(nodeDebugNoBreak); - - nodeDebugPort = new IntegerFieldEditor(PreferenceConstants.NODE_DEBUG_PORT, "Node debug port:", getFieldEditorParent()); - addField(nodeDebugPort); - -// nodeMonitorPath = new FileFieldEditor(PreferenceConstants.NODE_MONITOR_PATH, "Node monitor path:", getFieldEditorParent()); -// addField(nodeMonitorPath); - - expressPath = new FileFieldEditor(PreferenceConstants.EXPRESS_PATH, "Express path:", getFieldEditorParent()); - addField(expressPath); - - expressVersion = new StringFieldEditor(PreferenceConstants.EXPRESS_VERSION, "Selected Express version:", getFieldEditorParent()); - expressVersion.setEnabled(false, getFieldEditorParent()); - addField(expressVersion); - - coffeePath = new FileFieldEditor(PreferenceConstants.COFFEE_PATH, "Coffee path:", getFieldEditorParent()); - addField(coffeePath); - - // coffeeJustCoffee = new BooleanFieldEditor(PreferenceConstants.COFFEE_JUST_COFFEE, - // "just coffee (let Node.js find coffee CLI)", getFieldEditorParent()); - // addField(coffeeJustCoffee); - - coffeeCompileOptions = new StringFieldEditor(PreferenceConstants.COFFEE_COMPILE_OPTIONS, "Coffee compile options:", getFieldEditorParent()); - addField(coffeeCompileOptions); - - coffeeCompileOutputFolder = new StringFieldEditor(PreferenceConstants.COFFEE_COMPILE_OUTPUT_FOLDER, "Coffee output folder #76", getFieldEditorParent()); - addField(coffeeCompileOutputFolder); - - typescriptCompilerPath = new FileFieldEditor(PreferenceConstants.TYPESCRIPT_COMPILER_PATH, "TypeScript compiler path:", getFieldEditorParent()); - addField(typescriptCompilerPath); - - typescriptCompilerOptions = new StringFieldEditor(PreferenceConstants.TYPESCRIPT_COMPILER_OPTIONS, "TypeScript compiler options:", getFieldEditorParent()); - addField(typescriptCompilerOptions); - - } - - @Override - protected void initialize() { - super.initialize(); - expressPath.setPropertyChangeListener(new MyPropertyChangeListener(this)); - } - - private class MyPropertyChangeListener implements IPropertyChangeListener{ - - private FieldEditorPreferencePage page; - private boolean isValidPath = true; - - public MyPropertyChangeListener(FieldEditorPreferencePage nodePreferencePage) { - page = nodePreferencePage; - } - - @Override - public void propertyChange(PropertyChangeEvent event) { - page.propertyChange(event); - - // The IS_VALID property is only fired when the valid state changes. - if (event.getProperty().equals(FieldEditor.IS_VALID)) { - isValidPath = ((Boolean) event.getNewValue()).booleanValue(); - if (!isValidPath) { - expressVersion.setStringValue( "Selected path is not valid" ); - } - return; - } - if (!isValidPath) { // if it is still not valid file, we don't need to check again - return; - } - if (event.getProperty().equals(FieldEditor.VALUE)) { - String newExecutablePath = (String) event.getNewValue(); -// File file = new File(newExecutablePath); -// if (!file.exists() && file.isFile() ){ -// return; -// } - expressVersion.setStringValue( ProcessUtils.getCurrentVersionOf(newExecutablePath) ); - } - } - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceConstants.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceConstants.java deleted file mode 100644 index b29a1a7a..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceConstants.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.nodeclipse.ui.preferences; - -import org.eclipse.wst.jsdt.core.JavaScriptCore; - -/** - * Constant definitions for plug-in preferences - * - * @author Tomoyuki Inagaki - * @author Paul Verest - */ -public class PreferenceConstants { - - public static final String NODECLIPSE_CONSOLE_ENABLED = "nodeclipse_console_enabled"; - public static final String NODE_JUST_NODE = "node_just_node"; - public static final String NODE_PATH = "node_path"; - public static final String NODE_OPTIONS = "node_options"; - public static final String NODE_APPLICATION_ARGUMENTS = "node_application_arguments"; - public static final String NODE_ALLOW_MANY = "node_allow_many"; - public static final String NODE_PASS_ALL_ENVIRONMENT_VARIABLES = "node_pass_all_environment_variables"; - public static final String ADD_JSDT_NATURE = "add_jsdt_nature"; - //public static final String ADD_JSDT_NATURE_VALUE = JavaScriptCore.NATURE_ID; //"org.eclipse.wst.jsdt.core.jsNature"; - public static final String ADD_TERN_NATURE = "add_tern_nature"; - public static final String ADD_TERN_NATURE_VALUE = "tern.eclipse.ide.core.ternnature"; - public static final String NODE_SOURCES_PATH = "node_sources_lib_path"; - public static final String USE_NODEJS_BASE_MODULE_DEFINITIONS = "use_nodejs_base_module_definitions"; - public static final String USE_ORION_INDEX_FILES = "use_orion_index_files"; - public static final String USE_COMPLETIONS_JSON = "use_completions_json"; - public static final String COMPLETIONS_JSON_PATH = "completionsjson_path"; - public static final String NODE_DEBUG_NO_BREAK = "node_debug_no_break"; - public static final String NODE_DEBUG_PORT = "node_debug_port"; - public static final String NODE_MONITOR_PATH = "node_monitor_path"; - public static final String EXPRESS_PATH = "express_pass"; - public static final String EXPRESS_VERSION = "express_version"; - public static final String COFFEE_PATH = "coffee_pass"; - public static final String COFFEE_JUST_COFFEE = "coffee_just_coffee"; - public static final String COFFEE_COMPILE_OPTIONS = "coffee_compile_options"; - public static final String COFFEE_COMPILE_OUTPUT_FOLDER = "coffee_compile_output_folder"; - public static final String TYPESCRIPT_COMPILER_PATH = "typescript_compiler_path"; - public static final String TYPESCRIPT_COMPILER_OPTIONS = "typescript_compiler_options"; - public static final String PREFERENCES_PAGE = "org.nodeclipse.ui.preferences.NodePreferencePage"; - public static final String PHANTOMJS_PATH = "phantomjs_path"; - public static final String PHANTOMJS_DEBUG_PORT = "phantomjs_debug_port"; - public static final String PHANTOMJS_DEBUG_AUTORUN = "phantomjs_debug_autorun"; - public static final String JJS_PATH = "jjs_path"; - public static final String JJS_JUST_JJS = "jjs_just_jjs"; - public static final String JJS_OPTIONS = "jjs_options"; - public static final String MONGODB_SHELL_PATH = "mongodb_shell_path"; - public static final String MONGODB_SHELL_OPTIONS = "mongodb_shell_options"; - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceInitializer.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceInitializer.java deleted file mode 100644 index 3a7d0f8e..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceInitializer.java +++ /dev/null @@ -1,192 +0,0 @@ -package org.nodeclipse.ui.preferences; - -import java.io.File; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.util.NodeclipseConsole; -import org.nodeclipse.ui.util.OSUtils; -import org.nodeclipse.ui.util.ProcessUtils; - -/** - * - * @author oncereply, Paul Verest - * - */ -public class PreferenceInitializer extends AbstractPreferenceInitializer { - - public PreferenceInitializer() { - } - - @Override - public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setDefault(PreferenceConstants.NODECLIPSE_CONSOLE_ENABLED, true); - - //store.setDefault(PreferenceConstants.NODE_OPTIONS, "--harmony"); - //store.setDefault(PreferenceConstants.NODE_APPLICATION_ARGUMENTS, "--tea-pot-mode"); - - store.setDefault(PreferenceConstants.NODE_ALLOW_MANY, true); - - store.setDefault(PreferenceConstants.ADD_JSDT_NATURE, false); - store.setDefault(PreferenceConstants.ADD_TERN_NATURE, true); - - store.setDefault(PreferenceConstants.USE_NODEJS_BASE_MODULE_DEFINITIONS, true); - store.setDefault(PreferenceConstants.USE_ORION_INDEX_FILES, true); - store.setDefault(PreferenceConstants.USE_COMPLETIONS_JSON, true); - - //store.setDefault(PreferenceConstants.NODE_DEBUG_NO_BREAK, ""); //default is empty,null,no - store.setDefault(PreferenceConstants.NODE_DEBUG_PORT, "5858"); - - String node_path = "/usr/local/bin/node"; - String node_monitor_path = "/usr/local/lib/node_modules/node-dev/bin/node-dev"; - String express_path = "/usr/local/lib/node_modules/express/bin/express"; - String express_generator_path = "/usr/local/lib/node_modules/express-generator/bin/express"; - String coffee_path = "/usr/local/bin/coffee"; - String typescript_compiler_path = "/usr/local/lib/node_modules/typescript/bin/tsc"; - - File file; - if (OSUtils.isWindows()) { - store.setDefault(PreferenceConstants.NODE_JUST_NODE, true); - node_path = "C:/Program Files/nodejs/node.exe".replace('/', File.separatorChar); - file = new File(node_path); - if (!file.exists()) { - node_path = "C:/Program Files (x86)/nodejs/node.exe".replace('/', File.separatorChar); - } - String windowsNodeModulesPath = System.getProperty("user.home") - + "/AppData/Roaming/npm/node_modules/"; - node_monitor_path = (windowsNodeModulesPath+"node-dev/bin/node-dev").replace('/', File.separatorChar); - express_path = (windowsNodeModulesPath+"express/bin/express").replace('/', File.separatorChar); - express_generator_path = (windowsNodeModulesPath+"express-generator/bin/express").replace('/', File.separatorChar); - coffee_path = (windowsNodeModulesPath+"coffee-script/bin/coffee").replace('/', File.separatorChar); - typescript_compiler_path = (windowsNodeModulesPath+"typescript/bin/tsc").replace('/', File.separatorChar); - } else if (OSUtils.isMacOS()) { - file = new File(node_path); - if (!file.exists()) { - node_path = "/opt/local/bin/node"; - } - file = new File(node_monitor_path); - if (!file.exists()) { - node_monitor_path = "/opt/local/lib/node_modules/node-dev/bin/node-dev"; - } - file = new File(express_path); - if (!file.exists()) { - express_path = "/opt/local/lib/node_modules/express/bin/express"; - } - file = new File(express_generator_path); - if (!file.exists()) { - express_generator_path = "/opt/local/lib/node_modules/express-generator/bin/express"; - } - file = new File(coffee_path); - if (!file.exists()) { - coffee_path = "/opt/local/lib/node_modules/coffee-script/bin/coffee"; - } - file = new File(typescript_compiler_path); - if (!file.exists()) { - typescript_compiler_path = "/opt/local/lib/node_modules/typescript/bin/tsc"; - } - } - - // Check & set Preferences - - file = new File(node_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.NODE_PATH, node_path); - } else { - file = findNode(); - if (file != null && file.exists()) { - store.setDefault(PreferenceConstants.NODE_PATH, file.getAbsolutePath()); - } - } - file = new File(node_monitor_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.NODE_MONITOR_PATH, node_monitor_path); - } - - // using bundles Node.js modules for Express & CoffeeScript { - - // Express: try to use express-generator (for Express 4.x) - file = new File(express_generator_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.EXPRESS_PATH, express_generator_path); - store.setDefault(PreferenceConstants.EXPRESS_VERSION, - ProcessUtils.getCurrentVersionOf(express_generator_path)); - } else { - file = new File(express_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.EXPRESS_PATH, express_path); - store.setDefault(PreferenceConstants.EXPRESS_VERSION, - ProcessUtils.getCurrentVersionOf(express_path)); - } else { - express_path = ProcessUtils.getBundledExpressPath(); - file = new File(express_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.EXPRESS_PATH, express_path); - store.setDefault(PreferenceConstants.EXPRESS_VERSION, - ProcessUtils.getCurrentVersionOf(express_path)); - } - } - } - //coffee - file = new File(coffee_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.COFFEE_PATH, coffee_path); - } else { - coffee_path = ProcessUtils.getBundledCoffeePath(); - file = new File(coffee_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.COFFEE_PATH, coffee_path); - } - } - //} - store.setDefault(PreferenceConstants.COFFEE_COMPILE_OPTIONS, "--watch"); - file = new File(typescript_compiler_path); - if (file.exists()) { - store.setDefault(PreferenceConstants.TYPESCRIPT_COMPILER_PATH, typescript_compiler_path); - } - - store.setDefault(PreferenceConstants.MONGODB_SHELL_OPTIONS, "--shell"); - } - - private static String getNodeFileName() { - if (OSUtils.isWindows()) { - return "node.exe"; - } - return "node"; - } - - private static File findNode() { - String nodeFileName = getNodeFileName(); - String path = System.getenv("PATH"); - String[] paths = path.split("" + File.pathSeparatorChar, 0); - List directories = new ArrayList(); - for(String p : paths) { - directories.add(p); - } - - // ensure /usr/local/bin is included for OS X - if (OSUtils.isMacOS()) { - directories.add("/usr/local/bin"); - } - - // search for Node.js in the PATH directories - for (String directory : directories) { - File nodeFile = new File(directory, nodeFileName); - - if (nodeFile.exists()) { - return nodeFile; - } - } - - // #158 do not throw Exception for not standard Node path or name, let Node path be empty in Preferences - //throw new IllegalStateException("Could not find Node.js."); - LogUtil.error("Node.js executable can't be found!"); - return null; - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/Constants.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/Constants.java deleted file mode 100644 index aaf04861..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/Constants.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.nodeclipse.ui.util; - -public class Constants { - public static final String ICONS_PATH = "$nl$/icons/"; - //TODO find 3 good icons: - public static final String MODULE_ICON = ICONS_PATH + "npm/npm.png"; - public static final String CLASS_ICON = ICONS_PATH + "node.png"; - public static final String METHOD_ICON = ICONS_PATH + "contentassist/method.gif"; - public static final String PROPERTY_ICON = ICONS_PATH + "contentassist/property.gif"; - public static final String UNKNOWN_BLUE_ICON = ICONS_PATH + "contentassist/method_blue.png"; //+ - public static final String COMPLETIONS_JSON = "org/nodeclipse/ui/contentassist/completions.json"; - public static final String COMPLETIONS_KEY = "completions"; - - public static final String NPM_ICON = ICONS_PATH + "npm/npm.png"; - - public static final String BLANK_STRING = ""; - public static final String KEY_FILE_PATH = "key_file_path"; - public static final String KEY_GOAL = "key_goal"; - - public static final String NPM_LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.ui.npm.LaunchConfigurationType"; - public static final String NPM_LAUNCH_CONFIGURATION_TABGROUP_ID = "org.eclipse.debug.ui.launchGroup."; - public static final String NPM = "npm"; - public static final String NPM_CMD = "npm.cmd"; - public static final String NPM_PROCESS_MESSAGE = "NPM Process "; - public static final String NPM_INSTALL = "install"; - // copied from org.nodeclipse.debug.util.Constants - public static final String ATTR_ENVIRONMENT_VARIABLES = "attr_environment_variables"; - - public static final String FILE_LABEL = "File"; - public static final String SEARCH_LABEL = "Search..."; - public static final String SEARCH_TITLE = "Search File"; - public static final String GOAL_LABEL = "Goal"; - - public static final String PACKAGE_JSON = "package.json"; - public static final String MODE_RUN = "run"; - - /* on NodeProjectWizardPage. Value are folder names inside org.nodeclipse.ui\templates\ */ - public static final String TEMPLATE_HELLO_WORLD = "hello-world"; - public static final String TEMPLATE_HELLO_COFFEE = "hello-coffee"; - public static final String TEMPLATE_HELLO_TYPESCRIPT = "hello-typescript"; - public static final String TEMPLATE_HELLO_HTML = "hello-html"; - // @since 0.18 - public static final String TEMPLATE_HELLO_ANGULARJS = "hello-angularjs"; - // @since 0.11 - public static final String TEMPLATE_HELLO_KOA = "hello-koa"; - public static final String TEMPLATE_HELLO_NASHORN = "hello-nashorn"; - public static final String TEMPLATE_HELLO_VERTX = "hello-vertx"; - - /** - * see ExpressProjectWizardPage - */ - public static final String TEMPLATE_ENGINE_EJS = "ejs"; - public static final String TEMPLATE_ENGINE_JSHTML = "jshtml"; - public static final String TEMPLATE_ENGINE_HOGAN = "hogan"; - public static final String STYLESHEET_LESS = "less"; - public static final String STYLESHEET_STYLUS = "stylus"; - public static final String STYLESHEET_CSS = BLANK_STRING; -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/LogUtil.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/LogUtil.java deleted file mode 100644 index d764d827..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/LogUtil.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.nodeclipse.ui.util; - -import org.eclipse.core.runtime.ILog; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.nodeclipse.ui.Activator; - -/** - * Nodeclipse Log Util - * @author Lamb Gao, Paul Verest - */ -public class LogUtil { - - public static void info(String message) { - log(IStatus.INFO, IStatus.OK, message, null); - } - - public static void error(Throwable exception) { - error("Unexpected Exception", exception); - } - - public static void error(String message) { - error(message, null); - } - - public static void error(String message, Throwable exception) { - log(IStatus.ERROR, IStatus.ERROR, message, exception); - } - - public static void log(int severity, int code, String message, Throwable exception) { - log(createStatus(severity, code, message, exception)); - } - - public static IStatus createStatus(int severity, int code, String message, Throwable exception) { - return new Status(severity, Activator.PLUGIN_ID, code, message, exception); - } - - public static void log(IStatus status) { - ILog log = Activator.getDefault().getLog(); - log.log(status); - NodeclipseConsole.write(status.getMessage()+"\n"); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/NodeclipseConsole.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/NodeclipseConsole.java deleted file mode 100644 index f754912f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/NodeclipseConsole.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.nodeclipse.ui.util; - -import java.io.IOException; - -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.ui.console.ConsolePlugin; -import org.eclipse.ui.console.IConsole; -import org.eclipse.ui.console.IOConsoleOutputStream; -import org.eclipse.ui.console.MessageConsole; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; - -/** - * Console util - * for tracing node launch parameters and errors - * - * @author pverest - */ -public class NodeclipseConsole { - - private static NodeclipseConsole instance = null; - private static IOConsoleOutputStream stream = null; - - public NodeclipseConsole() { - MessageConsole console = new MessageConsole("Nodeclipse Console", null); - console.activate(); - ConsolePlugin.getDefault().getConsoleManager() - .addConsoles(new IConsole[] { console }); - stream = console.newOutputStream(); - } - - static { - getInstance(); - write(VersionUtil.getLongString()); - write("visit http://www.nodeclipse.org/\n\n"); - } - - private static NodeclipseConsole getInstance() { - if (instance == null) - instance = new NodeclipseConsole(); - return instance; - } - - public static void write(String s) { - IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); - boolean nodeclipseConsoleEnabled = preferenceStore.getBoolean(PreferenceConstants.NODECLIPSE_CONSOLE_ENABLED);//@since 0.7 - if (!nodeclipseConsoleEnabled) - return; - - instance = getInstance(); - try { - stream.write(s); - } catch (IOException e) { - //TODO how to show? - //e.printStackTrace(); - } - } - - @Override - public void finalize() { - try { - stream.close(); - } catch (IOException e) { - //TODO how to show? - //e.printStackTrace(); - } - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/OSUtils.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/OSUtils.java deleted file mode 100644 index 214f1d68..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/OSUtils.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.nodeclipse.ui.util; - -import org.eclipse.core.runtime.Platform; - -/** - * @author Nodeclipse authors - * @author Paul Verest - */ -public class OSUtils { - - public static final boolean isWindows = Platform.getOS().startsWith("win"); - - public static boolean isWindows() { - return isWindows; - } - - public static boolean isMacOS() { - return Platform.getOS().equals(Platform.OS_MACOSX); - } - - public static boolean isLinux() { - return Platform.getOS().equals(Platform.OS_LINUX); - } - -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/ProcessUtils.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/ProcessUtils.java deleted file mode 100644 index 7ff48b5b..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/ProcessUtils.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.nodeclipse.ui.util; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.FileLocator; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.osgi.framework.Bundle; - -/** - * @author ? - * @author Tomoyuki Inagaki - * @author Paul Verest - */ -public class ProcessUtils { - public static String getNodePath() { - return Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.NODE_PATH); - } - - public static String getNodeFolder() { - String nodePath = getNodePath(); - return nodePath.substring(0, nodePath.lastIndexOf(File.separator)); - } - - public static String getNpmPath() { - String nodePath = Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.NODE_PATH); - String npmPath = nodePath.substring(0, - nodePath.lastIndexOf(File.separator) + 1); - if (OSUtils.isWindows()) { - return npmPath + Constants.NPM_CMD; - } else { - return npmPath + Constants.NPM; - } - } - - public static String getExpressPath() { - return Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.EXPRESS_PATH); - } - - public static String getExpressVersion() { - return Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.EXPRESS_VERSION); - } - /* actually getting from PreferenceConstants.EXPRESS_VERSION */ - public static int getExpressMajorVersion() { - String ver = getExpressVersion(); - int idx = ver.indexOf('.'); - if(idx < 0) { - return 3; - } - ver = ver.substring(0, idx); - int ret = Integer.parseInt(ver); - return ret; - } - - public static String getCurrentVersionOf(String nodeAppPath) { - List cmdLine = new ArrayList(); - cmdLine.add(getNodePath()); - cmdLine.add(nodeAppPath); - cmdLine.add("--version"); - String ret = Constants.BLANK_STRING; - try { - ret = exec(cmdLine, null); - } catch (InvocationTargetException e) { - NodeclipseConsole.write(e.getLocalizedMessage()+"\n"); - } - return ret; - } - - public static String getCompletionsJsonPath() { - return Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.COMPLETIONS_JSON_PATH); - } - - /** - * @return existing lib folder in Node.js sources, "" otherwise - */ - public static String getSourcesLibPath() { - String path = Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.NODE_SOURCES_PATH); - if (! "".equals(path)){ - path += "/lib/".replace('/', File.separatorChar); - } - // TODO //if (workspace.validateLinkLocation(location).isOK()) { - return path; - } - - public static String getSourcesAllJsonPath() { - String path = Activator.getDefault().getPreferenceStore() - .getString(PreferenceConstants.NODE_SOURCES_PATH); - if (! "".equals(path)){ - path += "/doc/api/all.json".replace('/', File.separatorChar); - } - // TODO check if exists - return path; - } - - - public static String getBundledExpressPath() { - try { - Class clazz = Class.forName("org.nodeclipse.bundle.express.BundlePath"); - Method m = clazz.getMethod("getPath"); - String path = (String)m.invoke(clazz, null); - return path; - } catch (Exception e) { - } - return ""; -// return getBundledPath("node_modules/express/bin/express"); - } - - public static String getBundledCoffeePath() { - try { - Class clazz = Class.forName("org.nodeclipse.bundle.coffee.BundlePath"); - Method m = clazz.getMethod("getPath"); - String path = (String)m.invoke(clazz, null); - return path; - } catch (Exception e) { - } - return ""; -// return getBundledPath("node_modules/coffee-script/bin/coffee"); - } - - public static String getBundledPath(String path) { - Bundle bundle = Activator.getDefault().getBundle(); - if (bundle == null) { - LogUtil.info("getBundlePath(" + path + " bundle is null"); - return ""; - } - try { - URL location = FileLocator.toFileURL(bundle.getEntry("/")); - File file = new File(location.getPath(), path); - LogUtil.info("BundledPath: " + file.getAbsolutePath()); - - return file.getAbsolutePath(); - } catch(Exception ex) { - LogUtil.error(ex); - return ""; - } - } - public static boolean npmInstall(String name) { - List cmdLine = new ArrayList(); - cmdLine.add("sudo"); - cmdLine.add(getNpmPath()); - cmdLine.add("install"); - cmdLine.add("-g"); - cmdLine.add(name); - try { - exec(cmdLine, null); - } catch(InvocationTargetException ex) { - ex.printStackTrace(); - return false; - } - return true; - } - - /* run command and return output as String*/ - public static String exec(List cmdLine, File dir) - throws InvocationTargetException { - String[] cmds = {}; - cmds = cmdLine.toArray(cmds); - ProcessBuilder builder = new ProcessBuilder(cmds); - if (dir != null) { - builder.directory(dir); - } - - if(OSUtils.isMacOS()) { - Map env = builder.environment(); - env.put("PATH", getNodeFolder()); - } - - StringBuilder sb = new StringBuilder(); - try { - Process p = builder.start(); - String line; - BufferedReader bri = new BufferedReader( - new InputStreamReader(p.getInputStream())); - BufferedReader bre = new BufferedReader( - new InputStreamReader(p.getErrorStream())); - while ((line = bri.readLine()) != null) { - sb.append(line); - System.out.println(line); - } - bri.close(); - while ((line = bre.readLine()) != null) { - sb.append(line); - System.out.println(line); - } - bre.close(); - p.waitFor(); - } catch (Exception e) { - throw new InvocationTargetException(e); - } - - return sb.toString(); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/VersionUtil.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/util/VersionUtil.java deleted file mode 100644 index 7f760e6f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/util/VersionUtil.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.nodeclipse.ui.util; - -import org.eclipse.core.runtime.Platform; -import org.osgi.framework.Bundle; -import org.osgi.framework.Version; - -/** - * asked http://stackoverflow.com/questions/19261994/eclipse-plugin-dev-how-to-get-current-bundle-version - * @author Paul Verest - * - * example from ErrorLog Event Detail Session Data - * -eclipse.buildId=4.3.0.I20130605-2000 -java.version=1.7.0_40 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN - */ -public class VersionUtil { - - public static String versionString = "UNDEFINED"; - public static String eclipseVersionString = "UNDEFINED"; - public static String javaVersionString = "UNDEFINED"; - public static String osVersionString = "UNDEFINED"; - - static { - if (Platform.isRunning()){ - Bundle bundle = Platform.getBundle("org.nodeclipse.ui"); - Version version = bundle.getVersion(); - versionString = version.toString(); - //""+version.getMajor()+" "+version.getMinor()+" "+version.getMicro()+" "+version.getQualifier(); - - eclipseVersionString = Platform.getBundle("org.eclipse.platform").getVersion().toString(); - - osVersionString = Platform.getOS()+','+Platform.getOSArch(); - } - // http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html - javaVersionString = System.getProperty("java.version"); - } - - public static String getLongString(){ - return "Nodeclipse:"+VersionUtil.versionString+" Eclipse:"+VersionUtil.eclipseVersionString - +" Java:"+VersionUtil.javaVersionString - +" OS:"+VersionUtil.osVersionString+"\n"; - } - - public VersionUtil() { - } - - public static void main(String[] args){ - System.out.println(getLongString()); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/AbstractNodeProjectWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/AbstractNodeProjectWizard.java deleted file mode 100644 index ae0897cc..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/AbstractNodeProjectWizard.java +++ /dev/null @@ -1,295 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; -import java.net.URL; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.eclipse.core.internal.resources.Workspace; -import org.eclipse.core.internal.utils.FileUtil; -import org.eclipse.core.resources.ICommand; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.IncrementalProjectBuilder; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IPerspectiveRegistry; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.IOverwriteQuery; -import org.eclipse.ui.internal.WorkbenchPlugin; -import org.eclipse.ui.internal.registry.PerspectiveDescriptor; -import org.eclipse.ui.wizards.datatransfer.ImportOperation; -import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; -import org.eclipse.wst.jsdt.core.JavaScriptCore; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.nature.NodeNature; -import org.nodeclipse.ui.perspectives.NodePerspective; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.util.VersionUtil; -import org.osgi.framework.Bundle; - -/** - * Superclass for Node, Express, PhantomJS, Nashorn JJS projects -* @author ..., Paul Verest -*/ - -@SuppressWarnings("restriction") -public abstract class AbstractNodeProjectWizard extends Wizard implements INewWizard { - - protected IPreferenceStore store = org.nodeclipse.ui.Activator.getDefault().getPreferenceStore(); - - private IWorkbench workbench; - private IStructuredSelection selection; - - private IProject newProject; - - public AbstractNodeProjectWizard() { - setNeedsProgressMonitor(true); - } - - @Override - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.workbench = workbench; - this.selection = selection; - } - - public IWorkbench getWorkbench() { - return workbench; - } - - protected IStructuredSelection getSelection() { - return selection; - } - - @Override - public boolean performFinish() { - newProject = createNewProject(); - if (newProject == null) { - return false; - } - - updatePerspective(); - selectAndReveal(); - return true; - } - - protected abstract IProject createNewProject(); - - //+ to let overriding - protected String getProjectNature(){ - return NodeNature.NATURE_ID; - } - - /** - * Set project natures to current type + optionally JSDT/Tern nature - * @param newProjectHandle IProject - * @param location URI - * @return - */ - protected IProjectDescription createProjectDescription(IProject newProjectHandle, URI location) { - boolean addJsdtNature = store.getBoolean(PreferenceConstants.ADD_JSDT_NATURE); - boolean addTernNature = store.getBoolean(PreferenceConstants.ADD_TERN_NATURE); - int numberOfAddedNatures = 1; //always at least 1 - if (addJsdtNature){ - numberOfAddedNatures++; - } - if (addTernNature){ - numberOfAddedNatures++; - } - - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProjectDescription pd = workspace.newProjectDescription(newProjectHandle.getName()); - pd.setLocationURI(location); - String[] natures = pd.getNatureIds(); - String[] newNatures = new String[natures.length + numberOfAddedNatures]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - - int newNaturesIndex = natures.length; - newNatures[newNaturesIndex] = getProjectNature(); - if (addJsdtNature){ - newNatures[++newNaturesIndex] = JavaScriptCore.NATURE_ID; - } - if (addTernNature){ - newNatures[++newNaturesIndex] = PreferenceConstants.ADD_TERN_NATURE_VALUE; - } - pd.setNatureIds(newNatures); - - pd.setComment("Created with Nodeclipse "+VersionUtil.versionString+" at "+DATE_FORMAT.format(new Date())); - return pd; - } - - private static final DateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); - - - protected void generateTemplates(String path, IProject projectHandle) throws CoreException { - Bundle bundle = Activator.getDefault().getBundle(); - if (bundle == null) { - throw new CoreException(new Status(IStatus.ERROR, - Activator.PLUGIN_ID, "bundle not found")); - } - - try { - URL location = FileLocator.toFileURL(bundle.getEntry("/")); - File templateRoot = new File(location.getPath(), path); - LogUtil.info("templateRoot: " + templateRoot.getAbsolutePath()); - - RelativityFileSystemStructureProvider structureProvider = new RelativityFileSystemStructureProvider( - templateRoot); - ImportOperation operation = new ImportOperation( - projectHandle.getFullPath(), templateRoot, - structureProvider, new IOverwriteQuery() { - public String queryOverwrite(String pathString) { - return ALL; - } - }, structureProvider.getChildren(templateRoot)); - - operation.setContext(getShell()); - operation.run(null); - } catch (Exception e) { - throw new CoreException(new Status(IStatus.ERROR, - Activator.PLUGIN_ID, e.getLocalizedMessage())); - } - } - - protected void rewriteFile(String filename, IProject projectHandle) - throws CoreException { - String newLine = System.getProperty("line.separator"); - IFile file = projectHandle.getFile(filename); - if (!file.exists()) { - return; -// throw new CoreException(new Status(IStatus.ERROR, -// Activator.PLUGIN_ID, filename + "not found")); - } - InputStreamReader ir = new InputStreamReader(file.getContents()); - BufferedReader br = new BufferedReader(ir); - StringBuilder sb = new StringBuilder(); - String line; - try { - while ((line = br.readLine()) != null) { - if (line.contains("${projectname}")) { - line = line.replace("${projectname}", - projectHandle.getName()); - } - sb.append(line); - sb.append(newLine); - } - ByteArrayInputStream source = new ByteArrayInputStream(sb - .toString().getBytes()); - file.setContents(source, true, true, null); - } catch (IOException e) { - throw new CoreException(new Status(IStatus.ERROR, - Activator.PLUGIN_ID, "Cannot read " + filename)); - } finally { - try { - ir.close(); - br.close(); - } catch (IOException e) { - } - ir = null; - br = null; - } - } - - protected void runJSHint(IProject projectHandle) throws CoreException { - String builderId = "com.eclipsesource.jshint.ui.builder"; - IProjectDescription description = projectHandle.getDescription(); - - if (!containsBuildCommand(description, builderId)) { - addBuildCommand(description, builderId); - projectHandle.setDescription(description, null); - } - - triggerClean(projectHandle, builderId); - } - - protected boolean isExistingProjectFolder(IProjectDescription description) { - URI location = description.getLocationURI(); - String name = description.getName(); - - File folder = null; - if(location != null) { - folder = FileUtil.toPath(FileUtil.canonicalURI(location)).toFile(); - } else { - Workspace workspace = (Workspace)ResourcesPlugin.getWorkspace(); - folder = workspace.getRoot().getLocation().append(name).toFile(); - } - - if(folder.exists()) { - if(folder.isDirectory()) { - File[] files = folder.listFiles(); - if(files.length == 0) { - return false; - } else { - return true; - } - } else { - return true; - } - } else { - return false; - } - } - - protected boolean containsBuildCommand(IProjectDescription description, - String builderId) { - for (ICommand command : description.getBuildSpec()) { - if (command.getBuilderName().equals(builderId)) { - return true; - } - } - return false; - } - - protected void addBuildCommand(IProjectDescription description, String builderId) { - ICommand[] oldCommands = description.getBuildSpec(); - ICommand[] newCommands = new ICommand[oldCommands.length + 1]; - System.arraycopy(oldCommands, 0, newCommands, 0, oldCommands.length); - newCommands[newCommands.length - 1] = createBuildCommand(description, builderId); - description.setBuildSpec(newCommands); - } - - protected ICommand createBuildCommand(IProjectDescription description, String builderId) { - ICommand command = description.newCommand(); - command.setBuilderName(builderId); - return command; - } - - protected void triggerClean(IProject project, String builderName) throws CoreException { - project.build(IncrementalProjectBuilder.CLEAN_BUILD, builderName, null, null); - } - - private void selectAndReveal() { - BasicNewResourceWizard.selectAndReveal(newProject, workbench.getActiveWorkbenchWindow()); - } - - protected void updatePerspective() { - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - IPerspectiveRegistry reg = WorkbenchPlugin.getDefault().getPerspectiveRegistry(); - PerspectiveDescriptor rtPerspectiveDesc = (PerspectiveDescriptor) reg.findPerspectiveWithId(NodePerspective.ID); - // Now set it as the active perspective. - if (window != null) { - IWorkbenchPage page = window.getActivePage(); - page.setPerspective(rtPerspectiveDesc); - } - } -} - diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizard.java deleted file mode 100644 index e70bf078..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizard.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.operation.*; -import java.lang.reflect.InvocationTargetException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.CoreException; -import java.io.*; -import org.eclipse.ui.*; -import org.eclipse.ui.ide.IDE; - -/** - * This is a sample new wizard. Its role is to create a new file resource in the - * provided container. If the container resource (a folder or a project) is - * selected in the workspace when the wizard is opened, it will accept it as the - * target container. The wizard creates one file with the extension "js". If a - * sample multi-page editor (also available as a template) is registered for the - * same extension, it will be able to open it. - * - * @author Paul Verest - * @since 0.5 - */ -public class CoffeeFileWizard extends Wizard implements INewWizard { - - private final String WINDOW_TITLE = "New CoffeeScript File"; - - private CoffeeFileWizardPage page; - private ISelection selection; - - /** - * Constructor for CoffeeWizard. - */ - public CoffeeFileWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - /** - * Adding the page to the wizard. - */ - - public void addPages() { - page = new CoffeeFileWizardPage(selection); - addPage(page); - } - - /** - * This method is called when 'Finish' button is pressed in the wizard. We - * will create an operation and run it using wizard as execution context. - */ - public boolean performFinish() { - final String containerName = page.getContainerName(); - final String fileName = page.getFileName(); - IRunnableWithProgress op = new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException { - try { - doFinish(containerName, fileName, monitor); - } catch (CoreException e) { - throw new InvocationTargetException(e); - } finally { - monitor.done(); - } - } - }; - try { - getContainer().run(true, false, op); - } catch (InterruptedException e) { - return false; - } catch (InvocationTargetException e) { - Throwable realException = e.getTargetException(); - MessageDialog.openError(getShell(), "Error", realException.getMessage()); - return false; - } - return true; - } - - /** - * The worker method. It will find the container, create the file if missing - * or just replace its contents, and open the editor on the newly created - * file. - */ - - private void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException { - // create a sample file - monitor.beginTask("Creating " + fileName, 2); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IResource resource = root.findMember(new Path(containerName)); - if (!resource.exists() || !(resource instanceof IContainer)) { - throwCoreException("Container \"" + containerName + "\" does not exist."); - } - IContainer container = (IContainer) resource; - final IFile file = container.getFile(new Path(fileName)); - try { - InputStream stream = openContentStream(); - if (file.exists()) { - file.setContents(stream, true, true, monitor); - } else { - file.create(stream, true, monitor); - } - stream.close(); - } catch (IOException e) { - } - monitor.worked(1); - monitor.setTaskName("Opening file for editing..."); - getShell().getDisplay().asyncExec(new Runnable() { - public void run() { - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - try { - IDE.openEditor(page, file, true); - } catch (PartInitException e) { - } - } - }); - monitor.worked(1); - } - - /** - * We will initialize file contents with a sample text. - */ - - private InputStream openContentStream() { - String contents = "###\n * http://usejsdoc.org/\n###\n"; - return new ByteArrayInputStream(contents.getBytes()); - } - - private void throwCoreException(String message) throws CoreException { - IStatus status = new Status(IStatus.ERROR, "org.nodeclipse.ui", IStatus.OK, message, null); - throw new CoreException(status); - } - - /** - * We will accept the selection in the workbench to see if we can initialize - * from it. - * - * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) - */ - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.selection = selection; - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizardPage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizardPage.java deleted file mode 100644 index e879f9a2..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/CoffeeFileWizardPage.java +++ /dev/null @@ -1,186 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ContainerSelectionDialog; - -/** - * The "New" wizard page allows setting the container for the new file as well - * as the file name. The page will only accept file name without the extension - * OR with the extension that matches the expected one (js). - * - * @author Paul Verest - * @since 0.5 - */ - -public class CoffeeFileWizardPage extends WizardPage { - private Text containerText; - - private Text fileText; - - private ISelection selection; - - /** - * Constructor for SampleNewWizardPage. - * - * @param pageName - */ - public CoffeeFileWizardPage(ISelection selection) { - super("CoffeeFileWizardPage"); - setTitle("CoffeeScript Source File"); - setDescription("Create a new CoffeeScript source file."); - this.selection = selection; - } - - /** - * @see IDialogPage#createControl(Composite) - */ - public void createControl(Composite parent) { - Composite container = new Composite(parent, SWT.NULL); - GridLayout layout = new GridLayout(); - container.setLayout(layout); - layout.numColumns = 3; - layout.verticalSpacing = 9; - Label label = new Label(container, SWT.NULL); - label.setText("&Container:"); - - containerText = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - containerText.setLayoutData(gd); - containerText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - - Button button = new Button(container, SWT.PUSH); - button.setText("Browse..."); - button.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - handleBrowse(); - } - }); - label = new Label(container, SWT.NULL); - label.setText("&File name:"); - - fileText = new Text(container, SWT.BORDER | SWT.SINGLE); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - initialize(); - dialogChanged(); - setControl(container); - } - - /** - * Tests if the current workbench selection is a suitable container to use. - */ - - private void initialize() { - if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { - IStructuredSelection ssel = (IStructuredSelection) selection; - if (ssel.size() > 1) - return; - Object obj = ssel.getFirstElement(); - if (obj instanceof IResource) { - IContainer container; - if (obj instanceof IContainer) - container = (IContainer) obj; - else - container = ((IResource) obj).getParent(); - containerText.setText(container.getFullPath().toString()); - } - } - fileText.setText("noname.coffee"); - fileText.setSelection(0, "noname".length()); - fileText.setFocus(); - } - - /** - * Uses the standard container selection dialog to choose the new value for - * the container field. - */ - - private void handleBrowse() { - ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, - "Select new file container"); - if (dialog.open() == ContainerSelectionDialog.OK) { - Object[] result = dialog.getResult(); - if (result.length == 1) { - containerText.setText(((Path) result[0]).toString()); - } - } - } - - /** - * Ensures that both text fields are set. - */ - - private void dialogChanged() { - IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName())); - String fileName = getFileName(); - - if (getContainerName().length() == 0) { - updateStatus("File container must be specified"); - return; - } - if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { - updateStatus("File container must exist"); - return; - } - if (!container.isAccessible()) { - updateStatus("Project must be writable"); - return; - } - if (fileName.length() == 0) { - updateStatus("File name must be specified"); - return; - } - if (fileName.replace('\\', '/').indexOf('/', 1) > 0) { - updateStatus("File name must be valid"); - return; - } - int dotLoc = fileName.lastIndexOf('.'); - if (dotLoc != -1) { - String ext = fileName.substring(dotLoc + 1); - if (ext.equalsIgnoreCase("coffee") == false) { - updateStatus("File extension must be \"coffee\""); - return; - } - } - updateStatus(null); - } - - private void updateStatus(String message) { - setErrorMessage(message); - setPageComplete(message == null); - } - - public String getContainerName() { - return containerText.getText(); - } - - public String getFileName() { - return fileText.getText(); - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizard.java deleted file mode 100644 index b3f8968b..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizard.java +++ /dev/null @@ -1,324 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.dialogs.IOverwriteQuery; -import org.eclipse.ui.ide.undo.CreateProjectOperation; -import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; -import org.eclipse.ui.wizards.datatransfer.ImportOperation; -import org.eclipse.wst.jsdt.internal.ui.workingsets.JavaWorkingSetUpdater; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.npm.InstallLaunchShortcut; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.util.NodeclipseConsole; -import org.nodeclipse.ui.util.ProcessUtils; -import org.osgi.framework.Bundle; - -/** - * @author Tomoyuki Inagaki - */ -public class ExpressProjectWizard extends AbstractNodeProjectWizard { - private final String WINDOW_TITLE = "New Express Project"; - - private ExpressProjectWizardPage mainPage; - - public ExpressProjectWizard() { - super(); - setWindowTitle(WINDOW_TITLE); - } - - @Override - public void addPages() { - mainPage = new ExpressProjectWizardPage("ExpressNewProjectPage") { //$NON-NLS-1$ - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl - * (org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - super.createControl(parent); - createWorkingSetGroup( - (Composite) getControl(), - getSelection(), - new String[] { JavaWorkingSetUpdater.ID, "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ - Dialog.applyDialogFont(getControl()); - } - }; - mainPage.setTitle("Create an Express Project"); - mainPage.setDescription("Create a new Node.js Express project (using `express` CLI underneath,\n" - +"that should be installed before with `npm install -g express`\n" - +"Used `Express` location can be configured in Preferences \"Express path\")."); - addPage(mainPage); - } - - @Override - protected IProject createNewProject() { - final IProject newProjectHandle = mainPage.getProjectHandle(); - URI location = null; - if (!mainPage.useDefaults()) { - location = mainPage.getLocationURI(); - } -/* - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProjectDescription description = workspace - .newProjectDescription(newProjectHandle.getName()); - description.setLocationURI(location); - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = NodeNature.NATURE_ID; - description.setNatureIds(newNatures); -*/ - final IProjectDescription pd = createProjectDescription(newProjectHandle, location); - final boolean exists = isExistingProjectFolder(pd); - final String projectName = mainPage.getProjectName(); - final String templateEngine = mainPage.getSelectedTemplateEngine(); - final String stylesheetEngine = mainPage.getSelectedStylesheetEngine(); - - IRunnableWithProgress op = new IRunnableWithProgress() { - @Override - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - createProject(pd, monitor); - if(exists == true) { - return; - } - - String tempdir = System.getProperty("java.io.tmpdir") - + "/express-work/" - + new Long(System.currentTimeMillis()).toString(); - File workingDirectory = new File(tempdir); - if (workingDirectory.mkdirs() == false) { - throw new InvocationTargetException(new IOException( - "failed creation of working directory.")); - } - - generateExpressApplication(monitor, projectName, newProjectHandle, - templateEngine, stylesheetEngine, workingDirectory); - importExpressApplication(monitor, newProjectHandle, - workingDirectory); - - monitor.beginTask("Generating Express Project...", 3); - - deleteFiles(monitor, workingDirectory); - monitor.worked(1); - - try { - // universal method for all templates - generateTemplates("templates/common-templates", newProjectHandle); - rewriteFile("README.md", newProjectHandle); - - rewritePackageJson(monitor, newProjectHandle); - - boolean addTernNature = store.getBoolean(PreferenceConstants.ADD_TERN_NATURE); - if (addTernNature){ - generateTemplates("templates/tern-node", newProjectHandle); - } - - // JSHint support - runJSHint(newProjectHandle); - } catch (CoreException e1) { - throw new InvocationTargetException(e1); - } - - Display.getDefault().asyncExec(new Runnable() { - @Override - public void run() { - try { - launchNpmInstall(newProjectHandle); - } catch (Exception e) { - // throw new InvocationTargetException(e); - } - } - }); - - try { - newProjectHandle.refreshLocal(1, monitor); - } catch (CoreException e) { - throw new InvocationTargetException(e); - } - - monitor.done(); - } - }; - - try { - getContainer().run(true, true, op); - } catch (InvocationTargetException e) { - LogUtil.error(e); - } catch (InterruptedException e) { - } - - if (newProjectHandle != null) { - // add to workingsets - IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets(); - getWorkbench().getWorkingSetManager().addToWorkingSets( - newProjectHandle, workingSets); - } - - return newProjectHandle; - } - - private void createProject(IProjectDescription description, - IProgressMonitor monitor) throws InvocationTargetException { - CreateProjectOperation op = new CreateProjectOperation(description, - WINDOW_TITLE); - try { - op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell())); - } catch (ExecutionException e) { - throw new InvocationTargetException(e); - } - } - - private void generateExpressApplication(IProgressMonitor monitor, - String projectName, IProject projectHandle, String templateEngine, String stylesheetEngine, File workingDirectory) - throws InvocationTargetException { - Bundle bundle = Activator.getDefault().getBundle(); - if (bundle == null) { - throw new InvocationTargetException( - new CoreException( - new Status(IStatus.ERROR, Activator.PLUGIN_ID, "bundle not found"))); - } - - List cmdLine = new ArrayList(); - cmdLine.add(ProcessUtils.getNodePath()); - cmdLine.add(ProcessUtils.getExpressPath()); - cmdLine.add(workingDirectory.getAbsolutePath() + "/" + projectName); - - if (!templateEngine.equals(Constants.BLANK_STRING)) { - int ver = ProcessUtils.getExpressMajorVersion(); - if (ver < 3) { - cmdLine.add("-t"); - cmdLine.add(templateEngine); - } else { - cmdLine.add("--" + templateEngine); - } - } - - if (!stylesheetEngine.equals(Constants.BLANK_STRING)) { - cmdLine.add("--css " + stylesheetEngine); - } - - for(String s : cmdLine) NodeclipseConsole.write(s+" "); - NodeclipseConsole.write("\n"); - - ProcessUtils.exec(cmdLine, workingDirectory); - } - - private void importExpressApplication(IProgressMonitor monitor, - IProject projectHandle, File workingDirectory) - throws InvocationTargetException, InterruptedException { - String projectName = projectHandle.getName(); - File[] children = workingDirectory.listFiles(); - File root = null; - for (File child : children) { - if (child.getName().equals(projectName)) { - root = child; - break; - } - } - if (root == null) { - throw new InvocationTargetException(new IOException("Express app(" - + projectName + ") is not found. ")); - } - - RelativityFileSystemStructureProvider structureProvider = new RelativityFileSystemStructureProvider( - workingDirectory); - - ImportOperation operation = new ImportOperation( - projectHandle.getFullPath(), root, structureProvider, - new IOverwriteQuery() { - @Override - public String queryOverwrite(String pathString) { - return IOverwriteQuery.ALL; - } - }, structureProvider.collectFiles(root)); - operation.setCreateContainerStructure(false); - operation.setContext(getShell()); - operation.run(monitor); - } - - private void deleteFiles(IProgressMonitor monitor, File f) { - if (f.exists() == false) { - return; - } - - if (f.isFile()) { - f.delete(); - } - - if (f.isDirectory()) { - File[] files = f.listFiles(); - for (int i = 0; i < files.length; i++) { - deleteFiles(monitor, files[i]); - } - f.delete(); - } - } - - private void rewritePackageJson(IProgressMonitor monitor, IProject projectHandle) throws CoreException { - String newLine = System.getProperty("line.separator"); - IFile file = projectHandle.getFile("package.json"); - if(!file.exists()) { - throw new CoreException(new Status(IStatus.ERROR, - Activator.PLUGIN_ID, "package.json not found")); - } - InputStreamReader ir = new InputStreamReader(file.getContents()); - BufferedReader br = new BufferedReader(ir); - StringBuilder sb = new StringBuilder(); - String line; - try { - while((line = br.readLine()) != null) { - if(line.contains("application-name")) { - line = line.replace("application-name", projectHandle.getName()); - } - sb.append(line); - sb.append(newLine); - } - ByteArrayInputStream source = new ByteArrayInputStream(sb.toString().getBytes()); - file.setContents(source, true, true, null); - } catch (IOException e) { - throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Cannot read package.json")); - } finally { - try { - ir.close(); - br.close(); - } catch (IOException e) { - } - ir = null; - br = null; - } - } - - private void launchNpmInstall(IProject projectHandle) throws InvocationTargetException, CoreException { - InstallLaunchShortcut launcher = new InstallLaunchShortcut(); - IFile path = projectHandle.getFile(Constants.PACKAGE_JSON); - launcher.launchFile(path, ILaunchManager.DEBUG_MODE); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizardPage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizardPage.java deleted file mode 100644 index 70f845f8..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizardPage.java +++ /dev/null @@ -1,474 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.net.URI; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.WorkingSetGroup; -import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; -import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; -import org.eclipse.ui.internal.ide.IIDEHelpContextIds; -import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea; -import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea.IErrorMessageReporter; -import org.nodeclipse.ui.Activator; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.Constants; -import org.eclipse.swt.widgets.Button; - -/** - * @author Tomoyuki Inagaki, Paul Verest - * - * -
    ->express -h
    -
    -  Usage: express [options]
    -
    -  Options:
    -
    -    -h, --help          output usage information
    -    -V, --version       output the version number
    -    -s, --sessions      add session support
    -    -e, --ejs           add ejs engine support (defaults to jade)
    -    -J, --jshtml        add jshtml engine support (defaults to jade)
    -    -H, --hogan         add hogan.js engine support
    -    -c, --css `engine`  add stylesheet `engine` support (less|stylus) (defaults to plain css)
    -    -f, --force         force on non-empty directory
    -
    -*/ - -@SuppressWarnings("restriction") -public class ExpressProjectWizardPage extends WizardPage { - - // initial value stores - private String initialProjectFieldValue; - - // widgets - Text projectNameField; - Button btnJade; - Button btnEjs; - Button btnJshtml; - Button btnHogan; - - Button btnCss; - Button btnLess; - Button btnStylus; - - private Listener nameModifyListener = new Listener() { - public void handleEvent(Event e) { - setLocationForSelection(); - boolean valid = validatePage(); - setPageComplete(valid); - - } - }; - - private ProjectContentsLocationArea locationArea; - - private WorkingSetGroup workingSetGroup; - - // constants - private static final int SIZING_TEXT_FIELD_WIDTH = 250; - - /** - * Creates a new project creation wizard page. - * - * @param pageName - * the name of this page - * @wbp.parser.constructor - */ - public ExpressProjectWizardPage(String pageName) { - super(pageName); - setPageComplete(false); - } - - /* - * (non-Javadoc) Method declared on IDialogPage. - */ - public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NULL); - - initializeDialogUnits(parent); - - PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IIDEHelpContextIds.NEW_PROJECT_WIZARD_PAGE); - - composite.setLayout(new GridLayout()); - composite.setLayoutData(new GridData(GridData.FILL_BOTH)); - - createProjectNameGroup(composite); - locationArea = new ProjectContentsLocationArea(getErrorReporter(), composite); - if (initialProjectFieldValue != null) { - locationArea.updateProjectName(initialProjectFieldValue); - } - createTemplateGroup(composite); - - createStylesheetEngineGroup(composite); - - // Scale the button based on the rest of the dialog - setButtonLayoutData(locationArea.getBrowseButton()); - - setPageComplete(validatePage()); - // Show description on opening - setErrorMessage(null); - setMessage(null); - if (!isExpressInstalled()) { - setErrorMessage("Express is not found. Please install Express and check Preference."); - } - - setControl(composite); - Dialog.applyDialogFont(composite); - } - - private boolean isExpressInstalled() { - String path = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.EXPRESS_PATH); - if (path == null || path.equals("")) { - return false; - } - - java.io.File file = new java.io.File(path); - return file.exists(); - } - - /** - * Create a working set group for this page. This method can only be called - * once. - * - * @param composite - * the composite in which to create the group - * @param selection - * the current workbench selection - * @param supportedWorkingSetTypes - * an array of working set type IDs that will restrict what types - * of working sets can be chosen in this group - * @return the created group. If this method has been called previously the - * original group will be returned. - * @since 3.4 - */ - public WorkingSetGroup createWorkingSetGroup(Composite composite, IStructuredSelection selection, String[] supportedWorkingSetTypes) { - if (workingSetGroup != null) - return workingSetGroup; - workingSetGroup = new WorkingSetGroup(composite, selection, supportedWorkingSetTypes); - return workingSetGroup; - } - - /** - * Get an error reporter for the receiver. - * - * @return IErrorMessageReporter - */ - private IErrorMessageReporter getErrorReporter() { - return new IErrorMessageReporter() { - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea - * .IErrorMessageReporter#reportError(java.lang.String) - */ - public void reportError(String errorMessage, boolean infoOnly) { - if (infoOnly) { - setMessage(errorMessage, IStatus.INFO); - setErrorMessage(null); - } else - setErrorMessage(errorMessage); - boolean valid = errorMessage == null; - if (valid) { - valid = validatePage(); - } - - setPageComplete(valid); - } - }; - } - - /** - * Creates the project name specification controls. - * - * @param parent - * the parent composite - */ - private final void createProjectNameGroup(Composite parent) { - // project specification group - Composite projectGroup = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - projectGroup.setLayout(layout); - projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - // new project label - Label projectLabel = new Label(projectGroup, SWT.NONE); - projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel); - projectLabel.setFont(parent.getFont()); - - // new project name entry field - projectNameField = new Text(projectGroup, SWT.BORDER); - GridData data = new GridData(GridData.FILL_HORIZONTAL); - data.widthHint = SIZING_TEXT_FIELD_WIDTH; - projectNameField.setLayoutData(data); - projectNameField.setFont(parent.getFont()); - - // Set the initial value first before listener - // to avoid handling an event during the creation. - if (initialProjectFieldValue != null) { - projectNameField.setText(initialProjectFieldValue); - } - projectNameField.addListener(SWT.Modify, nameModifyListener); - } - - private final void createTemplateGroup(Composite parent) { - Composite templateGroup = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 5; - templateGroup.setLayout(layout); - templateGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label lblTemplateEngine = new Label(templateGroup, SWT.NONE); - lblTemplateEngine.setText("Template Engine:"); - - btnJade = new Button(templateGroup, SWT.RADIO); - btnJade.setSelection(true); - btnJade.setText("Jade"); - - btnEjs = new Button(templateGroup, SWT.RADIO); - btnEjs.setText("ejs"); - - btnJshtml = new Button(templateGroup, SWT.RADIO); - btnJshtml.setText("jshtml"); - - btnHogan = new Button(templateGroup, SWT.RADIO); - btnHogan.setText("hogan.js"); - } - - private final void createStylesheetEngineGroup(Composite parent) { - Composite stylesheetEngineGroup = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 5; - stylesheetEngineGroup.setLayout(layout); - stylesheetEngineGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label lblTemplateEngine = new Label(stylesheetEngineGroup, SWT.NONE); - lblTemplateEngine.setText("Stylesheet Engine:"); - - btnCss = new Button(stylesheetEngineGroup, SWT.RADIO); - btnCss.setSelection(true); - btnCss.setText("CSS"); - - btnLess = new Button(stylesheetEngineGroup, SWT.RADIO); - btnLess.setText("LESS"); - - btnStylus = new Button(stylesheetEngineGroup, SWT.RADIO); - btnStylus.setText("Stylus"); - } - - /** - * Returns the current project location path as entered by the user, or its - * anticipated initial value. Note that if the default has been returned the - * path in a project description used to create a project should not be set. - * - * @return the project location path or its anticipated initial value. - */ - public IPath getLocationPath() { - return new Path(locationArea.getProjectLocation()); - } - - /** - * /** Returns the current project location URI as entered by the user, or - * null if a valid project location has not been entered. - * - * @return the project location URI, or null - * @since 3.2 - */ - public URI getLocationURI() { - return locationArea.getProjectLocationURI(); - } - - /** - * Creates a project resource handle for the current project name field - * value. The project handle is created relative to the workspace root. - *

    - * This method does not create the project resource; this is the - * responsibility of IProject::create invoked by the new - * project resource wizard. - *

    - * - * @return the new project resource handle - */ - public IProject getProjectHandle() { - return ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName()); - } - - /** - * Returns the current project name as entered by the user, or its - * anticipated initial value. - * - * @return the project name, its anticipated initial value, or - * null if no project name is known - */ - public String getProjectName() { - if (projectNameField == null) { - return initialProjectFieldValue; - } - - return getProjectNameFieldValue(); - } - - /** - * Returns the value of the project name field with leading and trailing - * spaces removed. - * - * @return the project name in the field - */ - private String getProjectNameFieldValue() { - if (projectNameField == null) { - return ""; //$NON-NLS-1$ - } - - return projectNameField.getText().trim(); - } - - /** - * Sets the initial project name that this page will use when created. The - * name is ignored if the createControl(Composite) method has already been - * called. Leading and trailing spaces in the name are ignored. Providing - * the name of an existing project will not necessarily cause the wizard to - * warn the user. Callers of this method should first check if the project - * name passed already exists in the workspace. - * - * @param name - * initial project name for this page - * - * @see IWorkspace#validateName(String, int) - * - */ - public void setInitialProjectName(String name) { - if (name == null) { - initialProjectFieldValue = null; - } else { - initialProjectFieldValue = name.trim(); - if (locationArea != null) { - locationArea.updateProjectName(name.trim()); - } - } - } - - /** - * Set the location to the default location if we are set to useDefaults. - */ - void setLocationForSelection() { - locationArea.updateProjectName(getProjectNameFieldValue()); - } - - /** - * Returns whether this page's controls currently all contain valid values. - * - * @return true if all controls are valid, and - * false if at least one is invalid - */ - protected boolean validatePage() { - IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); - - String projectFieldContents = getProjectNameFieldValue(); - if (projectFieldContents.equals("")) { //$NON-NLS-1$ - setErrorMessage(null); - setMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectNameEmpty); - return false; - } - - IStatus nameStatus = workspace.validateName(projectFieldContents, IResource.PROJECT); - if (!nameStatus.isOK()) { - setErrorMessage(nameStatus.getMessage()); - return false; - } - - IProject handle = getProjectHandle(); - if (handle.exists()) { - setErrorMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectExistsMessage); - return false; - } - - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectNameFieldValue()); - locationArea.setExistingProject(project); - - String validLocationMessage = locationArea.checkValidLocation(); - if (validLocationMessage != null) { - // there is no destination location given - setErrorMessage(validLocationMessage); - return false; - } - - setErrorMessage(null); - setMessage(null); - return true; - } - - /* - * see @DialogPage.setVisible(boolean) - */ - public void setVisible(boolean visible) { - super.setVisible(visible); - if (visible) { - projectNameField.setFocus(); - } - } - - /** - * Returns the useDefaults. - * - * @return boolean - */ - public boolean useDefaults() { - return locationArea.isDefault(); - } - - /** - * Return the selected working sets, if any. If this page is not configured - * to interact with working sets this will be an empty array. - * - * @return the selected working sets - * @since 3.4 - */ - public IWorkingSet[] getSelectedWorkingSets() { - return workingSetGroup == null ? new IWorkingSet[0] : workingSetGroup.getSelectedWorkingSets(); - } - - public String getSelectedTemplateEngine() { - if (btnEjs.getSelection()) { - return Constants.TEMPLATE_ENGINE_EJS; - } - if (btnJshtml.getSelection()) { - return Constants.TEMPLATE_ENGINE_JSHTML; - } - if (btnHogan.getSelection()) { - return Constants.TEMPLATE_ENGINE_HOGAN; - } - return Constants.BLANK_STRING; - } - - public String getSelectedStylesheetEngine() { - if (btnLess.getSelection()) { - return Constants.STYLESHEET_LESS; - } - if (btnStylus.getSelection()) { - return Constants.STYLESHEET_STYLUS; - } - return Constants.STYLESHEET_CSS; - } -} - diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizard.java deleted file mode 100644 index a5c349b8..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizard.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.operation.*; -import java.lang.reflect.InvocationTargetException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.CoreException; -import java.io.*; -import org.eclipse.ui.*; -import org.eclipse.ui.ide.IDE; - -/** - * This is a sample new wizard. Its role is to create a new file resource in the - * provided container. If the container resource (a folder or a project) is - * selected in the workspace when the wizard is opened, it will accept it as the - * target container. The wizard creates one file with the extension "js". If a - * sample multi-page editor (also available as a template) is registered for the - * same extension, it will be able to open it. - */ - -public class NodeFileWizard extends Wizard implements INewWizard { - - private final String WINDOW_TITLE = "New JavaScript File"; - - private NodeFileWizardPage page; - private ISelection selection; - - /** - * Constructor for NodeWizard. - */ - public NodeFileWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - /** - * Adding the page to the wizard. - */ - - public void addPages() { - page = new NodeFileWizardPage(selection); - addPage(page); - } - - /** - * This method is called when 'Finish' button is pressed in the wizard. We - * will create an operation and run it using wizard as execution context. - */ - public boolean performFinish() { - final String containerName = page.getContainerName(); - final String fileName = page.getFileName(); - IRunnableWithProgress op = new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException { - try { - doFinish(containerName, fileName, monitor); - } catch (CoreException e) { - throw new InvocationTargetException(e); - } finally { - monitor.done(); - } - } - }; - try { - getContainer().run(true, false, op); - } catch (InterruptedException e) { - return false; - } catch (InvocationTargetException e) { - Throwable realException = e.getTargetException(); - MessageDialog.openError(getShell(), "Error", realException.getMessage()); - return false; - } - return true; - } - - /** - * The worker method. It will find the container, create the file if missing - * or just replace its contents, and open the editor on the newly created - * file. - */ - - private void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException { - // create a sample file - monitor.beginTask("Creating " + fileName, 2); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IResource resource = root.findMember(new Path(containerName)); - if (!resource.exists() || !(resource instanceof IContainer)) { - throwCoreException("Container \"" + containerName + "\" does not exist."); - } - IContainer container = (IContainer) resource; - final IFile file = container.getFile(new Path(fileName)); - try { - InputStream stream = openContentStream(); - if (file.exists()) { - file.setContents(stream, true, true, monitor); - } else { - file.create(stream, true, monitor); - } - stream.close(); - } catch (IOException e) { - } - monitor.worked(1); - monitor.setTaskName("Opening file for editing..."); - getShell().getDisplay().asyncExec(new Runnable() { - public void run() { - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - try { - IDE.openEditor(page, file, true); - } catch (PartInitException e) { - } - } - }); - monitor.worked(1); - } - - /** - * We will initialize file contents with a sample text. - */ - - private InputStream openContentStream() { - String contents = "/**\n * http://usejsdoc.org/\n */\n"; - return new ByteArrayInputStream(contents.getBytes()); - } - - private void throwCoreException(String message) throws CoreException { - IStatus status = new Status(IStatus.ERROR, "org.nodeclipse.ui", IStatus.OK, message, null); - throw new CoreException(status); - } - - /** - * We will accept the selection in the workbench to see if we can initialize - * from it. - * - * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) - */ - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.selection = selection; - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizardPage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizardPage.java deleted file mode 100644 index ba2b7d1f..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeFileWizardPage.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ContainerSelectionDialog; - -/** - * The "New" wizard page allows setting the container for the new file as well - * as the file name. The page will only accept file name without the extension - * OR with the extension that matches the expected one (js). - */ - -public class NodeFileWizardPage extends WizardPage { - private Text containerText; - - private Text fileText; - - private ISelection selection; - - /** - * Constructor for SampleNewWizardPage. - * - * @param pageName - */ - public NodeFileWizardPage(ISelection selection) { - super("NodeFileWizardPage"); - setTitle("Node Source File"); - setDescription("Create a new Node source file."); - this.selection = selection; - } - - /** - * @see IDialogPage#createControl(Composite) - */ - public void createControl(Composite parent) { - Composite container = new Composite(parent, SWT.NULL); - GridLayout layout = new GridLayout(); - container.setLayout(layout); - layout.numColumns = 3; - layout.verticalSpacing = 9; - Label label = new Label(container, SWT.NULL); - label.setText("&Container:"); - - containerText = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - containerText.setLayoutData(gd); - containerText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - - Button button = new Button(container, SWT.PUSH); - button.setText("Browse..."); - button.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - handleBrowse(); - } - }); - label = new Label(container, SWT.NULL); - label.setText("&File name:"); - - fileText = new Text(container, SWT.BORDER | SWT.SINGLE); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - initialize(); - dialogChanged(); - setControl(container); - } - - /** - * Tests if the current workbench selection is a suitable container to use. - */ - - private void initialize() { - if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { - IStructuredSelection ssel = (IStructuredSelection) selection; - if (ssel.size() > 1) - return; - Object obj = ssel.getFirstElement(); - if (obj instanceof IResource) { - IContainer container; - if (obj instanceof IContainer) - container = (IContainer) obj; - else - container = ((IResource) obj).getParent(); - containerText.setText(container.getFullPath().toString()); - } - } - fileText.setText("noname.js"); - fileText.setSelection(0, "noname".length()); - fileText.setFocus(); - } - - /** - * Uses the standard container selection dialog to choose the new value for - * the container field. - */ - - private void handleBrowse() { - ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, - "Select new file container"); - if (dialog.open() == ContainerSelectionDialog.OK) { - Object[] result = dialog.getResult(); - if (result.length == 1) { - containerText.setText(((Path) result[0]).toString()); - } - } - } - - /** - * Ensures that both text fields are set. - */ - - private void dialogChanged() { - IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName())); - String fileName = getFileName(); - - if (getContainerName().length() == 0) { - updateStatus("File container must be specified"); - return; - } - if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { - updateStatus("File container must exist"); - return; - } - if (!container.isAccessible()) { - updateStatus("Project must be writable"); - return; - } - if (fileName.length() == 0) { - updateStatus("File name must be specified"); - return; - } - if (fileName.replace('\\', '/').indexOf('/', 1) > 0) { - updateStatus("File name must be valid"); - return; - } - int dotLoc = fileName.lastIndexOf('.'); - if (dotLoc != -1) { - String ext = fileName.substring(dotLoc + 1); - if (ext.equalsIgnoreCase("js") == false) { - updateStatus("File extension must be \"js\""); - return; - } - } - updateStatus(null); - } - - private void updateStatus(String message) { - setErrorMessage(message); - setPageComplete(message == null); - } - - public String getContainerName() { - return containerText.getText(); - } - - public String getFileName() { - return fileText.getText(); - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizard.java deleted file mode 100644 index 78096d11..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizard.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.lang.reflect.InvocationTargetException; -import java.net.URI; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.ide.undo.CreateProjectOperation; -import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; -import org.eclipse.wst.jsdt.internal.ui.workingsets.JavaWorkingSetUpdater; -import org.nodeclipse.ui.preferences.PreferenceConstants; -import org.nodeclipse.ui.util.Constants; -import org.nodeclipse.ui.util.LogUtil; -import org.nodeclipse.ui.util.ProcessUtils; - -@SuppressWarnings("restriction") -public class NodeProjectWizard extends AbstractNodeProjectWizard implements INewWizard { - - private final String WINDOW_TITLE = "New Node.js Project"; - private NodeProjectWizardPage mainPage; - - private IProject newProject; - - public NodeProjectWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - @Override - public void addPages() { - mainPage = new NodeProjectWizardPage("NodeNewProjectPage") { //$NON-NLS-1$ - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.dialogs.WizardNewProjectCreationPage#createControl - * (org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - super.createControl(parent); - createWorkingSetGroup( - (Composite) getControl(), - getSelection(), - new String[] { JavaWorkingSetUpdater.ID, "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ - Dialog.applyDialogFont(getControl()); - } - }; - mainPage.setTitle("Create a Node.js Project"); - mainPage.setDescription("Create a new Node.js project."); - addPage(mainPage); - } - - @Override - protected IProject createNewProject() { - if (newProject != null) { - return null; - } - final IProject newProjectHandle = mainPage.getProjectHandle(); - URI location = null; - if (!mainPage.useDefaults()) { - location = mainPage.getLocationURI(); - } -/* - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProjectDescription description = workspace - .newProjectDescription(newProjectHandle.getName()); - description.setLocationURI(location); - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = NodeNature.NATURE_ID; - description.setNatureIds(newNatures); -*/ - final IProjectDescription pd = createProjectDescription(newProjectHandle, location); - final boolean existingProjectFolder = isExistingProjectFolder(pd); - final String template = mainPage.getSelectedTemplate(); - - IRunnableWithProgress runnable = new IRunnableWithProgress() { - @Override - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - CreateProjectOperation op = new CreateProjectOperation( - pd, WINDOW_TITLE); - try { - op.execute(monitor, - WorkspaceUndoUtil.getUIInfoAdapter(getShell())); - } catch (ExecutionException e) { - throw new InvocationTargetException(e); - } - - try { - if(!existingProjectFolder) { - // copy README.md, package.json & hello-world-server.js - generateTemplates("templates/common-templates", newProjectHandle); - //generateTemplates("templates/hello-world", newProjectHandle); - if (!template.equals(Constants.BLANK_STRING)){ - generateTemplates("templates/"+template, newProjectHandle); - } - rewriteFile("README.md", newProjectHandle); - rewriteFile("package.json", newProjectHandle); - - boolean addTernNature = store.getBoolean(PreferenceConstants.ADD_TERN_NATURE); - if (addTernNature){ - generateTemplates("templates/tern-node", newProjectHandle); - } - } - // JSHint support - runJSHint(newProjectHandle); - - // linking to Node.js sources lib @since 0.9 - // http://stackoverflow.com/questions/20755770/eclipse-project-add-linked-resources-programmatically - String sourcesLibPath = ProcessUtils.getSourcesLibPath(); - if (! "".equals(sourcesLibPath)){ - IFolder link = newProjectHandle.getFolder("node_lib"); //newProjectHandle.getName()+"/node_lib" - IPath linkedLocation = new Path(sourcesLibPath); - link.createLink(linkedLocation, IResource.NONE, null); - } - - } catch (CoreException e) { - LogUtil.error(e); - } - } - }; - - try { - getContainer().run(true, true, runnable); - } catch (InvocationTargetException e) { - LogUtil.error(e); - } catch (InterruptedException e) { - } - - if (newProjectHandle != null) { - // add to workingsets - IWorkingSet[] workingSets = mainPage.getSelectedWorkingSets(); - getWorkbench().getWorkingSetManager().addToWorkingSets( - newProjectHandle, workingSets); - } - - newProject = newProjectHandle; - return newProject; - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizardPage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizardPage.java deleted file mode 100644 index b69171d6..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/NodeProjectWizardPage.java +++ /dev/null @@ -1,439 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.net.URI; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.WorkingSetGroup; -import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; -import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; -import org.eclipse.ui.internal.ide.IIDEHelpContextIds; -import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea; -import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea.IErrorMessageReporter; -import org.nodeclipse.ui.util.Constants; - -@SuppressWarnings("restriction") -public class NodeProjectWizardPage extends WizardPage { - - // initial value stores - private String initialProjectFieldValue; - - // widgets - Text projectNameField; - Button btnEmpty; - Button btnHelloWorld; - Button btnHelloCoffee; - Button btnHelloTypeScript; - Button btnHelloHtml; - // @since 0.18 - Button btnHelloAngularjs; - // @since 0.11 - Button btnHelloKoa; - Button btnHelloNashorn; - Button btnHelloVertx; - - - private Listener nameModifyListener = new Listener() { - public void handleEvent(Event e) { - setLocationForSelection(); - boolean valid = validatePage(); - setPageComplete(valid); - - } - }; - - private ProjectContentsLocationArea locationArea; - - private WorkingSetGroup workingSetGroup; - - // constants - private static final int SIZING_TEXT_FIELD_WIDTH = 250; - - /** - * Creates a new project creation wizard page. - * - * @param pageName - * the name of this page - * @wbp.parser.constructor - */ - public NodeProjectWizardPage(String pageName) { - super(pageName); - setPageComplete(false); - } - - /* - * (non-Javadoc) Method declared on IDialogPage. - */ - public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NULL); - - initializeDialogUnits(parent); - - PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IIDEHelpContextIds.NEW_PROJECT_WIZARD_PAGE); - - composite.setLayout(new GridLayout()); - composite.setLayoutData(new GridData(GridData.FILL_BOTH)); - - createProjectNameGroup(composite); - locationArea = new ProjectContentsLocationArea(getErrorReporter(), composite); - if (initialProjectFieldValue != null) { - locationArea.updateProjectName(initialProjectFieldValue); - } - createTemplatesGroup(composite); - - // Scale the button based on the rest of the dialog - setButtonLayoutData(locationArea.getBrowseButton()); - - setPageComplete(validatePage()); - // Show description on opening - setErrorMessage(null); - setMessage(null); - setControl(composite); - Dialog.applyDialogFont(composite); - } - - /** - * Create a working set group for this page. This method can only be called - * once. - * - * @param composite - * the composite in which to create the group - * @param selection - * the current workbench selection - * @param supportedWorkingSetTypes - * an array of working set type IDs that will restrict what types - * of working sets can be chosen in this group - * @return the created group. If this method has been called previously the - * original group will be returned. - * @since 3.4 - */ - public WorkingSetGroup createWorkingSetGroup(Composite composite, IStructuredSelection selection, String[] supportedWorkingSetTypes) { - if (workingSetGroup != null) - return workingSetGroup; - workingSetGroup = new WorkingSetGroup(composite, selection, supportedWorkingSetTypes); - return workingSetGroup; - } - - /** - * Get an error reporter for the receiver. - * - * @return IErrorMessageReporter - */ - private IErrorMessageReporter getErrorReporter() { - return new IErrorMessageReporter() { - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea - * .IErrorMessageReporter#reportError(java.lang.String) - */ - public void reportError(String errorMessage, boolean infoOnly) { - if (infoOnly) { - setMessage(errorMessage, IStatus.INFO); - setErrorMessage(null); - } else - setErrorMessage(errorMessage); - boolean valid = errorMessage == null; - if (valid) { - valid = validatePage(); - } - - setPageComplete(valid); - } - }; - } - - /** - * Creates the project name specification controls. - * - * @param parent - * the parent composite - */ - private final void createProjectNameGroup(Composite parent) { - // project specification group - Composite projectGroup = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - projectGroup.setLayout(layout); - projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - // new project label - Label projectLabel = new Label(projectGroup, SWT.NONE); - projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel); - projectLabel.setFont(parent.getFont()); - - // new project name entry field - projectNameField = new Text(projectGroup, SWT.BORDER); - GridData data = new GridData(GridData.FILL_HORIZONTAL); - data.widthHint = SIZING_TEXT_FIELD_WIDTH; - projectNameField.setLayoutData(data); - projectNameField.setFont(parent.getFont()); - - // Set the initial value first before listener - // to avoid handling an event during the creation. - if (initialProjectFieldValue != null) { - projectNameField.setText(initialProjectFieldValue); - } - projectNameField.addListener(SWT.Modify, nameModifyListener); - } - - private final void createTemplatesGroup(Composite parent) { - Composite templatesGroup = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 5; - templatesGroup.setLayout(layout); - templatesGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label lblTemplates = new Label(templatesGroup, SWT.NONE); - lblTemplates.setText("Template to use:"); - - btnEmpty = new Button(templatesGroup, SWT.RADIO); - btnEmpty.setSelection(true); - btnEmpty.setText("none/empty"); - - btnHelloWorld = new Button(templatesGroup, SWT.RADIO); - btnHelloWorld.setText("Hello World"); - - btnHelloCoffee = new Button(templatesGroup, SWT.RADIO); - btnHelloCoffee.setText("Hello Coffee"); - - btnHelloTypeScript = new Button(templatesGroup, SWT.RADIO); - btnHelloTypeScript.setText("Hello TypeScript"); - - btnHelloHtml = new Button(templatesGroup, SWT.RADIO); - btnHelloHtml.setText(Constants.TEMPLATE_HELLO_HTML); - - // @since 0.18 - btnHelloAngularjs = new Button(templatesGroup, SWT.RADIO); - btnHelloAngularjs.setText(Constants.TEMPLATE_HELLO_ANGULARJS); - - // @since 0.11 - btnHelloKoa = new Button(templatesGroup, SWT.RADIO); - btnHelloKoa.setText(Constants.TEMPLATE_HELLO_KOA); - btnHelloNashorn = new Button(templatesGroup, SWT.RADIO); - btnHelloNashorn.setText(Constants.TEMPLATE_HELLO_NASHORN); - btnHelloVertx = new Button(templatesGroup, SWT.RADIO); - btnHelloVertx.setText(Constants.TEMPLATE_HELLO_VERTX); - btnHelloVertx.setEnabled(false); - } - - public String getSelectedTemplate() { - if (btnHelloWorld.getSelection()) { - return Constants.TEMPLATE_HELLO_WORLD; - } - if (btnHelloCoffee.getSelection()) { - return Constants.TEMPLATE_HELLO_COFFEE; - } - if (btnHelloTypeScript.getSelection()) { - return Constants.TEMPLATE_HELLO_TYPESCRIPT; - } - if (btnHelloHtml.getSelection()) { - return Constants.TEMPLATE_HELLO_HTML; - } - if (btnHelloAngularjs.getSelection()) { - return Constants.TEMPLATE_HELLO_ANGULARJS; - } - if (btnHelloKoa.getSelection()) { - return Constants.TEMPLATE_HELLO_KOA; - } - if (btnHelloNashorn.getSelection()) { - return Constants.TEMPLATE_HELLO_NASHORN; - } - if (btnHelloVertx.getSelection()) { - return Constants.TEMPLATE_HELLO_VERTX; - } - return Constants.BLANK_STRING; - } - - - /** - * Returns the current project location path as entered by the user, or its - * anticipated initial value. Note that if the default has been returned the - * path in a project description used to create a project should not be set. - * - * @return the project location path or its anticipated initial value. - */ - public IPath getLocationPath() { - return new Path(locationArea.getProjectLocation()); - } - - /** - * /** Returns the current project location URI as entered by the user, or - * null if a valid project location has not been entered. - * - * @return the project location URI, or null - * @since 3.2 - */ - public URI getLocationURI() { - return locationArea.getProjectLocationURI(); - } - - /** - * Creates a project resource handle for the current project name field - * value. The project handle is created relative to the workspace root. - *

    - * This method does not create the project resource; this is the - * responsibility of IProject::create invoked by the new - * project resource wizard. - *

    - * - * @return the new project resource handle - */ - public IProject getProjectHandle() { - return ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName()); - } - - /** - * Returns the current project name as entered by the user, or its - * anticipated initial value. - * - * @return the project name, its anticipated initial value, or - * null if no project name is known - */ - public String getProjectName() { - if (projectNameField == null) { - return initialProjectFieldValue; - } - - return getProjectNameFieldValue(); - } - - /** - * Returns the value of the project name field with leading and trailing - * spaces removed. - * - * @return the project name in the field - */ - private String getProjectNameFieldValue() { - if (projectNameField == null) { - return ""; //$NON-NLS-1$ - } - - return projectNameField.getText().trim(); - } - - /** - * Sets the initial project name that this page will use when created. The - * name is ignored if the createControl(Composite) method has already been - * called. Leading and trailing spaces in the name are ignored. Providing - * the name of an existing project will not necessarily cause the wizard to - * warn the user. Callers of this method should first check if the project - * name passed already exists in the workspace. - * - * @param name - * initial project name for this page - * - * @see IWorkspace#validateName(String, int) - * - */ - public void setInitialProjectName(String name) { - if (name == null) { - initialProjectFieldValue = null; - } else { - initialProjectFieldValue = name.trim(); - if (locationArea != null) { - locationArea.updateProjectName(name.trim()); - } - } - } - - /** - * Set the location to the default location if we are set to useDefaults. - */ - void setLocationForSelection() { - locationArea.updateProjectName(getProjectNameFieldValue()); - } - - /** - * Returns whether this page's controls currently all contain valid values. - * - * @return true if all controls are valid, and - * false if at least one is invalid - */ - protected boolean validatePage() { - IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); - - String projectFieldContents = getProjectNameFieldValue(); - if (projectFieldContents.equals("")) { //$NON-NLS-1$ - setErrorMessage(null); - setMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectNameEmpty); - return false; - } - - IStatus nameStatus = workspace.validateName(projectFieldContents, IResource.PROJECT); - if (!nameStatus.isOK()) { - setErrorMessage(nameStatus.getMessage()); - return false; - } - - IProject handle = getProjectHandle(); - if (handle.exists()) { - setErrorMessage(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectExistsMessage); - return false; - } - - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectNameFieldValue()); - locationArea.setExistingProject(project); - - String validLocationMessage = locationArea.checkValidLocation(); - if (validLocationMessage != null) { // there is no destination location - // given - setErrorMessage(validLocationMessage); - return false; - } - - setErrorMessage(null); - setMessage(null); - return true; - } - - /* - * see @DialogPage.setVisible(boolean) - */ - public void setVisible(boolean visible) { - super.setVisible(visible); - if (visible) { - projectNameField.setFocus(); - } - } - - /** - * Returns the useDefaults. - * - * @return boolean - */ - public boolean useDefaults() { - return locationArea.isDefault(); - } - - /** - * Return the selected working sets, if any. If this page is not configured - * to interact with working sets this will be an empty array. - * - * @return the selected working sets - * @since 3.4 - */ - public IWorkingSet[] getSelectedWorkingSets() { - return workingSetGroup == null ? new IWorkingSet[0] : workingSetGroup.getSelectedWorkingSets(); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/RelativityFileSystemStructureProvider.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/RelativityFileSystemStructureProvider.java deleted file mode 100755 index 537fd425..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/RelativityFileSystemStructureProvider.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; -import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider; -import org.nodeclipse.ui.util.LogUtil; - -@SuppressWarnings({ "restriction" }) -public class RelativityFileSystemStructureProvider implements - IImportStructureProvider { - private File root; - - public RelativityFileSystemStructureProvider(File root) { - this.root = root; - } - - public RelativityFileSystemStructureProvider(String basepath, String name) { - this(new File(basepath, name)); - } - - public File getRoot() { - LogUtil.info("RelativityFileSystemStructureProvider.getRoot() called"); - return root; - } - - public List getChildren(Object element) { - File folder = (File) element; - String[] children = folder.list(); - int childrenLength = children == null ? 0 : children.length; - List result = new ArrayList(childrenLength); - - for (int i = 0; i < childrenLength; i++) { - result.add(new File(folder, children[i])); - } - - return result; - } - - public List collectFiles(Object element) { - List result = new ArrayList(); - - File root = (File) element; - if (root.isDirectory()) { - collectFiles(root, result); - } else { - result.add(root); - } - LogUtil.info("RelativityFileSystemStructureProvider.cllectFiles() called. file count=" - + result.size()); - return result; - } - - private void collectFiles(File parent, List result) { - File[] children = parent.listFiles(); - for (File child : children) { - if (child.isDirectory()) { - collectFiles(child, result); - } else { - result.add(child); - } - } - } - - public InputStream getContents(Object element) { - try { - LogUtil.info("RelativityFileSystemStructureProvider.getContents() called. elemnt=" - + element.toString()); - return new FileInputStream((File) element); - } catch (FileNotFoundException e) { - LogUtil.error(e.getLocalizedMessage(), e); - IDEWorkbenchPlugin.log(e.getLocalizedMessage(), e); - } - return null; - } - - private String stripPath(String path) { - int index = path.indexOf(root.getName()); - path = path.substring(index + root.getName().length()); - return path; - } - - public String getFullPath(Object element) { - return stripPath(((File) element).getPath()); - } - - public String getLabel(Object element) { - File file = (File) element; - String name = file.getName(); - if (name.length() == 0) { - return file.getPath(); - } - return name; - } - - public boolean isFolder(Object element) { - return ((File) element).isDirectory(); - } -} diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizard.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizard.java deleted file mode 100644 index 371c4d85..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizard.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.operation.*; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.CoreException; - -import java.io.*; - -import org.eclipse.ui.*; -import org.eclipse.ui.ide.IDE; - -/** - * This is a sample new wizard. Its role is to create a new file resource in the - * provided container. If the container resource (a folder or a project) is - * selected in the workspace when the wizard is opened, it will accept it as the - * target container. The wizard creates one file with the extension "js". If a - * sample multi-page editor (also available as a template) is registered for the - * same extension, it will be able to open it. - * - * @author Paul Verest - * @since 0.12 - */ -public class TypeScriptFileWizard extends Wizard implements INewWizard { - - private static final String WINDOW_TITLE = "New TypeScript File"; - /* - * New TypeScript file - */ - private static final String NEW_FILE_CONTENT = "/*\n* http://usejsdoc.org/\n*/\n"; - - private TypeScriptFileWizardPage page; - private ISelection selection; - - /** - * Constructor for Wizard. - */ - public TypeScriptFileWizard() { - setWindowTitle(WINDOW_TITLE); - setNeedsProgressMonitor(true); - } - - /** - * Adding the page to the wizard. - */ - - public void addPages() { - page = new TypeScriptFileWizardPage(selection); - addPage(page); - } - - /** - * This method is called when 'Finish' button is pressed in the wizard. We - * will create an operation and run it using wizard as execution context. - */ - public boolean performFinish() { - final String containerName = page.getContainerName(); - final String fileName = page.getFileName(); - IRunnableWithProgress op = new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException { - try { - doFinish(containerName, fileName, monitor); - } catch (CoreException e) { - throw new InvocationTargetException(e); - } finally { - monitor.done(); - } - } - }; - try { - getContainer().run(true, false, op); - } catch (InterruptedException e) { - return false; - } catch (InvocationTargetException e) { - Throwable realException = e.getTargetException(); - MessageDialog.openError(getShell(), "Error", realException.getMessage()); - return false; - } - return true; - } - - /** - * The worker method. It will find the container, create the file if missing - * or just replace its contents, and open the editor on the newly created - * file. - */ - - private void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException { - // create a sample file - monitor.beginTask("Creating " + fileName, 2); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IResource resource = root.findMember(new Path(containerName)); - if (!resource.exists() || !(resource instanceof IContainer)) { - throwCoreException("Container \"" + containerName + "\" does not exist."); - } - IContainer container = (IContainer) resource; - final IFile file = container.getFile(new Path(fileName)); - try { - InputStream stream = openContentStream(); - if (file.exists()) { - file.setContents(stream, true, true, monitor); - } else { - file.create(stream, true, monitor); - } - stream.close(); - } catch (IOException e) { - } - monitor.worked(1); - monitor.setTaskName("Opening file for editing..."); - getShell().getDisplay().asyncExec(new Runnable() { - public void run() { - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - try { - IDE.openEditor(page, file, true); - } catch (PartInitException e) { - } - } - }); - monitor.worked(1); - } - - /** - * We will initialize file contents with a sample text. - */ - - private InputStream openContentStream() { - String contents = NEW_FILE_CONTENT; - return new ByteArrayInputStream(contents.getBytes()); - } - - private void throwCoreException(String message) throws CoreException { - IStatus status = new Status(IStatus.ERROR, "org.nodeclipse.ui", IStatus.OK, message, null); - throw new CoreException(status); - } - - /** - * We will accept the selection in the workbench to see if we can initialize - * from it. - * - * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) - */ - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.selection = selection; - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizardPage.java b/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizardPage.java deleted file mode 100644 index f8c6a374..00000000 --- a/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/TypeScriptFileWizardPage.java +++ /dev/null @@ -1,190 +0,0 @@ -package org.nodeclipse.ui.wizards; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ContainerSelectionDialog; - -/** - * The "New" wizard page allows setting the container for the new file as well - * as the file name. The page will only accept file name without the extension - * OR with the extension that matches the expected one (js). - * - * @author Paul Verest - * @since 0.12 - */ - -public class TypeScriptFileWizardPage extends WizardPage { - - private static final String PAGE_TITLE = "TypeScript source file"; - private static final String PAGE_DESCRIPTION = "Create a new TypeScript source file."; - - private Text containerText; - - private Text fileText; - - private ISelection selection; - - /** - * Constructor for SampleNewWizardPage. - * - * @param pageName - */ - public TypeScriptFileWizardPage(ISelection selection) { - super("TypeScriptFileWizardPage"); - setTitle(PAGE_TITLE); - setDescription(PAGE_DESCRIPTION); - this.selection = selection; - } - - /** - * @see IDialogPage#createControl(Composite) - */ - public void createControl(Composite parent) { - Composite container = new Composite(parent, SWT.NULL); - GridLayout layout = new GridLayout(); - container.setLayout(layout); - layout.numColumns = 3; - layout.verticalSpacing = 9; - Label label = new Label(container, SWT.NULL); - label.setText("&Container:"); - - containerText = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - containerText.setLayoutData(gd); - containerText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - - Button button = new Button(container, SWT.PUSH); - button.setText("Browse..."); - button.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - handleBrowse(); - } - }); - label = new Label(container, SWT.NULL); - label.setText("&File name:"); - - fileText = new Text(container, SWT.BORDER | SWT.SINGLE); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - initialize(); - dialogChanged(); - setControl(container); - } - - /** - * Tests if the current workbench selection is a suitable container to use. - */ - - private void initialize() { - if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { - IStructuredSelection ssel = (IStructuredSelection) selection; - if (ssel.size() > 1) - return; - Object obj = ssel.getFirstElement(); - if (obj instanceof IResource) { - IContainer container; - if (obj instanceof IContainer) - container = (IContainer) obj; - else - container = ((IResource) obj).getParent(); - containerText.setText(container.getFullPath().toString()); - } - } - fileText.setText("noname.ts"); - fileText.setSelection(0, "noname".length()); - fileText.setFocus(); - } - - /** - * Uses the standard container selection dialog to choose the new value for - * the container field. - */ - - private void handleBrowse() { - ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, - "Select new file container"); - if (dialog.open() == ContainerSelectionDialog.OK) { - Object[] result = dialog.getResult(); - if (result.length == 1) { - containerText.setText(((Path) result[0]).toString()); - } - } - } - - /** - * Ensures that both text fields are set. - */ - - private void dialogChanged() { - IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName())); - String fileName = getFileName(); - - if (getContainerName().length() == 0) { - updateStatus("File container must be specified"); - return; - } - if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { - updateStatus("File container must exist"); - return; - } - if (!container.isAccessible()) { - updateStatus("Project must be writable"); - return; - } - if (fileName.length() == 0) { - updateStatus("File name must be specified"); - return; - } - if (fileName.replace('\\', '/').indexOf('/', 1) > 0) { - updateStatus("File name must be valid"); - return; - } - int dotLoc = fileName.lastIndexOf('.'); - if (dotLoc != -1) { - String ext = fileName.substring(dotLoc + 1); - if (ext.equalsIgnoreCase("ts") == false) { - updateStatus("File extension must be \"ts\""); - return; - } - } - updateStatus(null); - } - - private void updateStatus(String message) { - setErrorMessage(message); - setPageComplete(message == null); - } - - public String getContainerName() { - return containerText.getText(); - } - - public String getFileName() { - return fileText.getText(); - } -} \ No newline at end of file diff --git a/org.nodeclipse.ui/templates/.gitignore b/org.nodeclipse.ui/templates/.gitignore deleted file mode 100644 index da11100b..00000000 --- a/org.nodeclipse.ui/templates/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.*.md.html diff --git a/org.nodeclipse.ui/templates/.jshintrc b/org.nodeclipse.ui/templates/.jshintrc deleted file mode 100644 index 65561277..00000000 --- a/org.nodeclipse.ui/templates/.jshintrc +++ /dev/null @@ -1,122 +0,0 @@ -{ - // -------------------------------------------------------------------- - // JSHint Nodeclipse Configuration v0.18 - // Strict Edition with some relaxations and switch to Node.js, no `use strict` - // by Ory Band, Michael Haschke, Paul Verest - // https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.ui/templates/common-templates/.jshintrc - // JSHint Documentation is at http://www.jshint.com/docs/options/ - // JSHint Integration v0.9.10 comes with JSHInt 2.5.6 , see https://github.com/eclipsesource/jshint-eclipse - // -------------------------------------------------------------------- - // from https://gist.github.com/haschek/2595796 - // - // This is a options template for [JSHint][1], using [JSHint example][2] - // and [Ory Band's example][3] as basis and setting config values to - // be most strict: - // - // * set all enforcing options to true - // * set all relaxing options to false - // * set all environment options to false, except the node value - // * set all JSLint legacy options to false - // - // [1]: http://www.jshint.com/ - // [2]: https://github.com/jshint/node-jshint/blob/master/example/config.json //404 - // [3]: https://github.com/oryband/dotfiles/blob/master/jshintrc - // - // @author http://michael.haschke.biz/ - // @license http://unlicense.org/ - - // == Enforcing Options =============================================== - // - // These options tell JSHint to be more strict towards your code. Use - // them if you want to allow only a safe subset of JavaScript, very - // useful when your codebase is shared with a big number of developers - // with different skill levels. Was all true. - - "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). - "curly" : true, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : true, // Prohibit variable use before definition. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "noempty" : true, // Prohibit use of empty blocks. - "nonew" : true, // Prohibit use of constructors for side-effects. - "plusplus" : false, // Prohibit use of `++` & `--`. //coding style related only - "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. - "undef" : true, // Require all non-global variables be declared before they are used. - "strict" : false, // Require `use strict` pragma in every file. - "trailing" : true, // Prohibit trailing whitespaces. - - // == Relaxing Options ================================================ - // - // These options allow you to suppress certain types of warnings. Use - // them only if you are absolutely positive that you know what you are - // doing. Was all false. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // Tolerate use of `== null`. - //"es5" : true, // Allow EcmaScript 5 syntax. // es5 is default https://github.com/jshint/jshint/issues/1411 - "esnext" : false, // Allow ES.next (ECMAScript 6) specific features such as `const` and `let`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "funcscope" : false, // Tolerate declarations of variables inside of control structures while accessing them later from the outside. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "iterator" : false, // Allow usage of __iterator__ property. - "lastsemic" : false, // Tolerat missing semicolons when the it is omitted for the last statement in a one-line block. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "laxcomma" : true, // Suppress warnings about comma-first coding style. - "loopfunc" : false, // Allow functions to be defined within loops. - "multistr" : false, // Tolerate multi-line strings. - "onecase" : false, // Tolerate switches with just one case. - "proto" : false, // Tolerate __proto__ property. This property is deprecated. - "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. - "scripturl" : false, // Tolerate script-targeted URLs. - "smarttabs" : false, // Tolerate mixed tabs and spaces when the latter are used for alignmnent only. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "validthis" : false, // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function. - - // == Environments ==================================================== - // - // These options pre-define global variables that are exposed by - // popular JavaScript libraries and runtime environments—such as - // browser or node.js. - "browser" : false, // Standard browser globals e.g. `window`, `document`. - "couch" : false, // Enable globals exposed by CouchDB. - "devel" : false, // Allow development statements e.g. `console.log();`. - "dojo" : false, // Enable globals exposed by Dojo Toolkit. - "jquery" : false, // Enable globals exposed by jQuery JavaScript library. - "mootools" : false, // Enable globals exposed by MooTools JavaScript framework. - "node" : true, // Enable globals available when code is running inside of the NodeJS runtime environment. - "nonstandard" : false, // Define non-standard but widely adopted globals such as escape and unescape. - "prototypejs" : false, // Enable globals exposed by Prototype JavaScript framework. - "rhino" : false, // Enable globals available when your code is running inside of the Rhino runtime environment. - "wsh" : false, // Enable globals available when your code is running as a script for the Windows Script Host. - - // == JSLint Legacy =================================================== - // - // These options are legacy from JSLint. Aside from bug fixes they will - // not be improved in any way and might be removed at any point. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "onevar" : false, // Allow only one `var` statement per function. - "passfail" : false, // Stop on first error. - "white" : false, // Check against strict whitespace and indentation rules. - - // == Undocumented Options ============================================ - // - // While I've found these options in [example1][2] and [example2][3] - // they are not described in the [JSHint Options documentation][4]. - // - // [4]: http://www.jshint.com/options/ - - "maxerr" : 100, // Maximum errors before stopping. - "predef" : [ // Extra globals. - //"exampleVar", - //"anotherCoolGlobal", - //"iLoveDouglas" - ] - //, "indent" : 2 // Specify indentation spacing -} diff --git a/org.nodeclipse.ui/templates/.npmignore b/org.nodeclipse.ui/templates/.npmignore deleted file mode 100644 index 61225458..00000000 --- a/org.nodeclipse.ui/templates/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -!common-templates/.gitignore -/.settings/ -/.jshintrc -/.project -.*.md.html -mongodb-replicaset -z_snippets -npm-debug.log -*.list diff --git a/org.nodeclipse.ui/templates/.project b/org.nodeclipse.ui/templates/.project deleted file mode 100644 index 9881275a..00000000 --- a/org.nodeclipse.ui/templates/.project +++ /dev/null @@ -1,24 +0,0 @@ - - - nodeclipse-cli - Nodeclipse CLI incl. Installer - - - - - com.eclipsesource.jshint.ui.builder - - - - - tern.eclipse.ide.core.ternBuilder - - - - - - org.nodeclipse.ui.NodeNature - org.eclipse.wst.jsdt.core.jsNature - tern.eclipse.ide.core.ternnature - - diff --git a/org.nodeclipse.ui/templates/.settings/.jsdtscope b/org.nodeclipse.ui/templates/.settings/.jsdtscope deleted file mode 100644 index 01deca64..00000000 --- a/org.nodeclipse.ui/templates/.settings/.jsdtscope +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.nodeclipse.ui/templates/.settings/com.eclipsesource.jshint.ui.prefs b/org.nodeclipse.ui/templates/.settings/com.eclipsesource.jshint.ui.prefs deleted file mode 100644 index 8cf3f3f7..00000000 --- a/org.nodeclipse.ui/templates/.settings/com.eclipsesource.jshint.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -excluded=//*.json\:bower_components//*\:node_lib//*\:node_modules//* -included=//*.jjs\://*.js\://*.jshintrc\://*.mjs\://*.njs\://*.pjs\://*.vjs -projectSpecificOptions=true diff --git a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.core.prefs b/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.core.prefs deleted file mode 100644 index feebde56..00000000 --- a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -semanticValidation=disabled diff --git a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container b/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 49c8cd4f..00000000 --- a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.JRE_CONTAINER \ No newline at end of file diff --git a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name b/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 11006e2a..00000000 --- a/org.nodeclipse.ui/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Global \ No newline at end of file diff --git a/org.nodeclipse.ui/templates/.sublime-project b/org.nodeclipse.ui/templates/.sublime-project deleted file mode 100644 index 24db3031..00000000 --- a/org.nodeclipse.ui/templates/.sublime-project +++ /dev/null @@ -1,8 +0,0 @@ -{ - "folders": - [ - { - "path": "." - } - ] -} diff --git a/org.nodeclipse.ui/templates/.tern-project b/org.nodeclipse.ui/templates/.tern-project deleted file mode 100644 index 8bc4c501..00000000 --- a/org.nodeclipse.ui/templates/.tern-project +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugins": { - "outline": { - - }, - "node": { - - } - }, - "libs": [ - "ecma5", - "ecma6" - ] -} diff --git a/org.nodeclipse.ui/templates/README.md b/org.nodeclipse.ui/templates/README.md deleted file mode 100644 index cff7d6d9..00000000 --- a/org.nodeclipse.ui/templates/README.md +++ /dev/null @@ -1,207 +0,0 @@ - - -# Nodeclipse CLI & Installer - -[![NPM version](https://badge.fury.io/js/nodeclipse.png)](http://badge.fury.io/js/nodeclipse) - -## Node.js Development with Eclipse or Enide Studio - -Install with `npm install -g nodeclipse` - -Usage: just run `nodeclipse -p` to add needed `.project` file to current directory - -In Eclipse `File -> Import -> General / Existing Projects into Workspace` - -Check on how to get Nodeclipse or Enide Studio - -## Nodeclipse CLI Commands - -`nodeclipse -h` - - Usage: nodeclipse [arguments] - - Arguments: - -c, --create create project folder [using template] and prepare it - -u, --use