├── open-source-licenses.txt ├── .gitignore ├── icon.png ├── README.adoc ├── readme-imgs ├── ca1.png ├── ca2.png ├── hovers.png ├── linting.png └── outline_view.png ├── lib ├── main.ts └── concourse-ci-yaml-client.ts ├── properties.json ├── grammars ├── concourse-task-yaml.cson └── concourse-pipeline-yaml.cson ├── .travis.yml ├── settings ├── language-concourse-task-yaml.cson └── language-concourse-pipeline-yaml.cson ├── tsconfig.json ├── appveyor.yml ├── coffeelint.json ├── tslint.json ├── script.js ├── package.json ├── README.md └── LICENSE /open-source-licenses.txt: -------------------------------------------------------------------------------- 1 | work-in-progress -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /node_modules 3 | /server 4 | *.tgz 5 | *iml 6 | *.log -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/icon.png -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | # atom-concourse is no longer actively maintained by VMware, Inc. 2 | 3 | -------------------------------------------------------------------------------- /readme-imgs/ca1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/readme-imgs/ca1.png -------------------------------------------------------------------------------- /readme-imgs/ca2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/readme-imgs/ca2.png -------------------------------------------------------------------------------- /readme-imgs/hovers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/readme-imgs/hovers.png -------------------------------------------------------------------------------- /readme-imgs/linting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/readme-imgs/linting.png -------------------------------------------------------------------------------- /readme-imgs/outline_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/atom-concourse/master/readme-imgs/outline_view.png -------------------------------------------------------------------------------- /lib/main.ts: -------------------------------------------------------------------------------- 1 | import {ConcourseCiYamlClient} from './concourse-ci-yaml-client'; 2 | 3 | module.exports = new ConcourseCiYamlClient(); -------------------------------------------------------------------------------- /properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "jarUrl": "https://s3-us-west-1.amazonaws.com/s3-test.spring.io/sts4/fatjars/snapshots/concourse-language-server-1.20.0-202007202158-exec.jar" 3 | } 4 | -------------------------------------------------------------------------------- /grammars/concourse-task-yaml.cson: -------------------------------------------------------------------------------- 1 | 'scopeName': 'source.concourse-task-yaml' 2 | 'name': 'Concourse-Task-YAML' 3 | 'fileTypes': [ 4 | 'task.yml' 5 | ] 6 | 'patterns': [ 7 | { 'include': 'source.yaml' } 8 | ] -------------------------------------------------------------------------------- /grammars/concourse-pipeline-yaml.cson: -------------------------------------------------------------------------------- 1 | 'scopeName': 'source.concourse-pipeline-yaml' 2 | 'name': 'Concourse-Pipeline-YAML' 3 | 'fileTypes': [ 4 | 'pipeline.yml' 5 | ] 6 | 'patterns': [ 7 | { 'include': 'source.yaml' } 8 | ] 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | 3 | notifications: 4 | email: 5 | on_success: never 6 | on_failure: change 7 | 8 | script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh' 9 | 10 | git: 11 | depth: 10 12 | 13 | branches: 14 | only: 15 | - master -------------------------------------------------------------------------------- /settings/language-concourse-task-yaml.cson: -------------------------------------------------------------------------------- 1 | '.source.concourse-task-yaml': 2 | 'editor': 3 | 'autoIndentOnPaste': false 4 | 'commentStart': '# ' 5 | 'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)' 6 | 'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$' 7 | 'decreaseIndentPattern': '^\\s+\\}$' 8 | 'tabType': 'soft' -------------------------------------------------------------------------------- /settings/language-concourse-pipeline-yaml.cson: -------------------------------------------------------------------------------- 1 | '.source.concourse-pipeline-yaml': 2 | 'editor': 3 | 'autoIndentOnPaste': false 4 | 'commentStart': '# ' 5 | 'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)' 6 | 'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$' 7 | 'decreaseIndentPattern': '^\\s+\\}$' 8 | 'tabType': 'soft' -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": "build", 6 | "lib": ["es7", "dom"], 7 | "declaration": true, 8 | "inlineSources": true, 9 | "inlineSourceMap": true, 10 | "strictNullChecks": true, 11 | "noImplicitAny": true, 12 | "baseUrl": "./" 13 | }, 14 | "include": [ 15 | "lib/**/*.ts" 16 | ] 17 | } -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | platform: x64 4 | 5 | branches: 6 | only: 7 | - master 8 | 9 | clone_depth: 10 10 | 11 | skip_tags: true 12 | 13 | environment: 14 | APM_TEST_PACKAGES: 15 | 16 | matrix: 17 | - ATOM_CHANNEL: stable 18 | - ATOM_CHANNEL: beta 19 | 20 | install: 21 | - ps: Install-Product node 6 22 | 23 | build_script: 24 | - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1')) 25 | 26 | test: off 27 | deploy: off -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "max_line_length": { 3 | "level": "ignore" 4 | }, 5 | "no_empty_param_list": { 6 | "level": "error" 7 | }, 8 | "arrow_spacing": { 9 | "level": "error" 10 | }, 11 | "no_interpolation_in_single_quotes": { 12 | "level": "error" 13 | }, 14 | "no_debugger": { 15 | "level": "error" 16 | }, 17 | "prefer_english_operator": { 18 | "level": "error" 19 | }, 20 | "colon_assignment_spacing": { 21 | "spacing": { 22 | "left": 0, 23 | "right": 1 24 | }, 25 | "level": "error" 26 | }, 27 | "braces_spacing": { 28 | "spaces": 0, 29 | "level": "error" 30 | }, 31 | "spacing_after_comma": { 32 | "level": "error" 33 | }, 34 | "no_stand_alone_at": { 35 | "level": "error" 36 | } 37 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "jsRules": {}, 7 | "rules": { 8 | "quotemark": false, 9 | "object-literal-sort-keys": false, 10 | "ordered-imports": false, 11 | "member-ordering": false, 12 | "one-line": false, 13 | "interface-name": false, 14 | "variable-name": false, 15 | "max-classes-per-file": false, 16 | "no-unused-expression": false, 17 | "no-empty": false, 18 | "one-variable-per-declaration": false, 19 | "whitespace": [ 20 | true, 21 | "check-branch", 22 | "check-decl", 23 | "check-operator", 24 | "check-separator", 25 | "check-type", 26 | "check-typecast", 27 | "check-module" 28 | ] 29 | }, 30 | "rulesDirectory": [] 31 | } -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | const download = require('download'); 4 | const PROPERTIES = require('./properties.json'); 5 | 6 | let fileExists = function(path) { 7 | return new Promise((resolve, reject) => { 8 | fs.access(path, fs.R_OK, error => { 9 | resolve(!error || error.code !== 'ENOENT'); 10 | }) 11 | }); 12 | }; 13 | 14 | const serverDownloadUrl = PROPERTIES.jarUrl; 15 | 16 | const serverHome = path.join(__dirname, 'server'); 17 | 18 | const localFileName = path.join(serverHome, 'concourse-language-server.jar'); 19 | 20 | fileExists(localFileName).then(exists => { 21 | if (!exists) { 22 | console.log(`Downloading ${serverDownloadUrl} to ${localFileName}`); 23 | fileExists(serverHome) 24 | .then(doesExist => { 25 | if (!doesExist) 26 | fs.mkdir(serverHome, err => { 27 | if (err) console.error('Failed to create folder: ' + JSON.stringify(err)); 28 | }); 29 | }) 30 | .then(() => download(serverDownloadUrl)) 31 | .then(data => fs.writeFileSync(localFileName, data)) 32 | .then(() => fileExists(localFileName)) 33 | .then(doesExist => { if (!doesExist) throw Error(`Failed to install the ${this.getServerName()} language server`) }) 34 | .then(() => console.log(`Successfully downloaded ${serverDownloadUrl}`)); 35 | } 36 | }); 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/concourse-ci-yaml-client.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import { JavaProcessLanguageClient, JavaOptions } from '@pivotal-tools/atom-languageclient-commons'; 3 | import {JVM} from '@pivotal-tools/jvm-launch-utils'; 4 | 5 | export class ConcourseCiYamlClient extends JavaProcessLanguageClient { 6 | 7 | constructor() { 8 | //noinspection JSAnnotator 9 | super( 10 | path.join(__dirname, '..', 'server'), 11 | 'concourse-language-server.jar' 12 | ); 13 | } 14 | 15 | getGrammarScopes() { 16 | return ['source.concourse-pipeline-yaml','source.concourse-task-yaml']; 17 | } 18 | 19 | getLanguageName() { 20 | return 'Concourse-Pipeline-YAML'; 21 | } 22 | 23 | getServerName() { 24 | return 'Concourse-Pipeline-YAML'; 25 | } 26 | 27 | activate() { 28 | // replace the example argument 'linter-ruby' with the name of this Atom package 29 | require('atom-package-deps') 30 | .install('concourse-pipeline-yaml') 31 | .then(() => console.debug('All dependencies installed, good to go')); 32 | super.activate(); 33 | } 34 | 35 | launchVmArgs(jvm: JVM) { 36 | return Promise.resolve([ 37 | '-Dorg.slf4j.simpleLogger.logFile=concourse-ci-yaml.log' 38 | ]); 39 | 40 | } 41 | 42 | getJavaOptions(): JavaOptions { 43 | const home = atom.config.get('concourse-pipeline-yaml.java.home'); 44 | const vmargs = atom.config.get('concourse-pipeline-yaml.java.vmargs'); 45 | return { 46 | home: typeof home === 'string' ? home : undefined, 47 | vmargs: Array.isArray(vmargs) ? vmargs : undefined 48 | }; 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "concourse-pipeline-yaml", 3 | "version": "1.20.0", 4 | "description": "Provides validation and content assist for Concourse CI pipeline and task configuration yml files", 5 | "repository": "https://github.com/spring-projects/atom-concourse", 6 | "icon": "icon.png", 7 | "license": "EPL-1.0", 8 | "engines": { 9 | "atom": ">=1.24.0" 10 | }, 11 | "main": "./build/main", 12 | "types": "./build/main.d.ts", 13 | "files": [ 14 | "grammars/", 15 | "settings/", 16 | "build/", 17 | "lib/", 18 | "server/", 19 | "properties.json" 20 | ], 21 | "configSchema": { 22 | "java": { 23 | "type": "object", 24 | "description": "JVM settings for starting the Language Server", 25 | "properties": { 26 | "vmargs": { 27 | "type": "array", 28 | "items": { 29 | "type": "string" 30 | }, 31 | "description": "Custom VM arguments to start the Language Server" 32 | }, 33 | "home": { 34 | "type": "string", 35 | "description": "Java home folder to use to start the Language Server" 36 | } 37 | } 38 | } 39 | }, 40 | "dependencies": { 41 | "atom-package-deps": "^4.6.0", 42 | "download": "^6.2.5", 43 | "@pivotal-tools/atom-languageclient-commons": "0.0.15" 44 | }, 45 | "devDependencies": { 46 | "typescript": "^2.7.2", 47 | "tslint": "^5.9.1", 48 | "coffeelint": "^1.10.1" 49 | }, 50 | "scripts": { 51 | "clean": "rm -fr build", 52 | "compile": "tsc", 53 | "build": "npm run clean && npm run compile ", 54 | "watch": "tsc -watch", 55 | "lint": "tslint -c tslint.json 'lib/**/*.ts'", 56 | "postinstall": "node script.js" 57 | }, 58 | "package-deps": [ 59 | "atom-ide-ui" 60 | ], 61 | "consumedServices": { 62 | "linter-indie": { 63 | "versions": { 64 | "2.0.0": "consumeLinterV2" 65 | } 66 | }, 67 | "datatip": { 68 | "versions": { 69 | "0.1.0": "consumeDatatip" 70 | } 71 | } 72 | }, 73 | "providedServices": { 74 | "autocomplete.provider": { 75 | "versions": { 76 | "2.0.0": "provideAutocomplete" 77 | } 78 | }, 79 | "code-actions": { 80 | "versions": { 81 | "0.1.0": "provideCodeActions" 82 | } 83 | }, 84 | "code-format.range": { 85 | "versions": { 86 | "0.1.0": "provideCodeFormat" 87 | } 88 | }, 89 | "code-highlight": { 90 | "versions": { 91 | "0.1.0": "provideCodeHighlight" 92 | } 93 | }, 94 | "definitions": { 95 | "versions": { 96 | "0.1.0": "provideDefinitions" 97 | } 98 | }, 99 | "find-references": { 100 | "versions": { 101 | "0.1.0": "provideFindReferences" 102 | } 103 | }, 104 | "outline-view": { 105 | "versions": { 106 | "0.1.0": "provideOutlines" 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Concourse CI YAML Editor for Atom 2 | [![macOS Build Status](https://travis-ci.org/spring-projects/atom-concourse.svg?branch=master)](https://travis-ci.org/spring-projects/atom-concourse) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1jvknxt9jhykgrxo?svg=true)](https://ci.appveyor.com/project/spring-projects/atom-concourse/branch/master) [![Dependency Status](https://david-dm.org/spring-projects/atom-concourse.svg)](https://david-dm.org/spring-projects/atom-concourse) 3 | 4 | This extension provides basic validation, content assist and hover infos 5 | for editing Concourse [Pipeline](https://concourse-ci.org/pipelines.html) and [Task Configuration](https://concourse-ci.org/running-tasks.html) Files. 6 | 7 | It is recommended to use this extension package when `atom-ide-ui` atom extension package is installed. Thus, reconciling (error/warning markers) and hover support is fully functional. 8 | 9 | ## Usage 10 | 11 | The Concourse editor automatically activates when the name of the file you are editing is `pipeline.yml` or `task.yml`. Alternately, you can select the grammar for your file by doing these steps: 12 | 13 | - Open the file, and it will most likely open with the default Atom YAML editor. 14 | - In the bottom-right of the editor, click on YAML. 15 | - This opens the Grammar Selection dialogue. Search and select `Concourse-Pipeline-YAML` for pipeline files, or `Concourse-Task-YAML` for task files. 16 | 17 | If you find an issue please raise it here: https://github.com/spring-projects/sts4/issues 18 | 19 | ## Functionality 20 | 21 | ### Validation 22 | 23 | (Requires `atom-ide-ui` package) As you type the file is parsed and checked for basic syntactic and structural correctness. Hover over an error marker to see an explanation. 24 | 25 | ![Linting Screenshot][linting] 26 | 27 | ### Content Assist 28 | 29 | Having trouble remembering all the names of the attributes, and their spelling? Or can't remember 30 | which resource properties to set in the `get` task params versus its `source` attributes? Or 31 | don't remember what 'special' values are acceptable for a certain property? Content assist 32 | to the rescue: 33 | 34 | ![Content Assist Screenshot][ca1] 35 | 36 | ![Content Assist Screenshot][ca2] 37 | 38 | ### Documentation Hovers 39 | 40 | (Requires `atom-ide-ui` package) Having trouble remembering exactly what the meaning of each attribute is? Hover over any attribute and 41 | read its detailed documentation. 42 | 43 | ![Hover Docs Screenshot][hovers] 44 | 45 | ### Navigate to Symbol in File 46 | 47 | Is your Pipeline yaml file getting larger and it is becoming harder to find a particular Job, Resource or 48 | Resource Type declaration? The Atom Outline View (View -> Toggle Outline View) helps you quickly jump to a specific definition. 49 | 50 | ![Outline View][outline_view] 51 | 52 | # Releases: 53 | 54 | Released versions of this package can be installed directly from the Atom package installer. 55 | 56 | There are also development snapshots available with the latest fixes and improvements from release git repository: https://github.com/spring-projects/atom-concourse 57 | 1. Clone the release repository for Atom package if not already cloned and navigate to `atom-concourse` folder 58 | 2. Run `git clean -fxd` - necessary to delete out of date LS JAR file and dependency packages 59 | 3. Run `git pull` - get the latest changes 60 | 3. Run `npm install` - Install latest dependecnies and download proper LS JAR 61 | 4. Run `apm link .` - Link the package to Atom 62 | 5. Either start Atom or Reload Window in Atom 63 | 64 | [linting]: 65 | https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/linting.png 66 | 67 | [ca1]: 68 | https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/ca1.png 69 | 70 | [ca2]: 71 | https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/ca2.png 72 | 73 | [hovers]: 74 | https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/hovers.png 75 | 76 | [outline_view]: 77 | https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/outline_view.png 78 | 79 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The content of this package is provided under the EPL v1.0 license (see below). 3 | For a detailed overview of embedded third-party components and their OSS licenses, please take a look at: https://github.com/spring-projects/sts4/blob/master/atom-extensions/atom-concourse/open-source-licenses.txt 4 | 5 | === 6 | 7 | Eclipse Public License - v 1.0 8 | 9 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 10 | 11 | 1. DEFINITIONS 12 | 13 | "Contribution" means: 14 | 15 | a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and 16 | b) in the case of each subsequent Contributor: 17 | i) changes to the Program, and 18 | ii) additions to the Program; 19 | where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. 20 | "Contributor" means any person or entity that distributes the Program. 21 | 22 | "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. 23 | 24 | "Program" means the Contributions distributed in accordance with this Agreement. 25 | 26 | "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 27 | 28 | 2. GRANT OF RIGHTS 29 | 30 | a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. 31 | b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. 32 | c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. 33 | d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 34 | 3. REQUIREMENTS 35 | 36 | A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: 37 | 38 | a) it complies with the terms and conditions of this Agreement; and 39 | b) its license agreement: 40 | i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; 41 | ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; 42 | iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and 43 | iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. 44 | When the Program is made available in source code form: 45 | 46 | a) it must be made available under this Agreement; and 47 | b) a copy of this Agreement must be included with each copy of the Program. 48 | Contributors may not remove or alter any copyright notices contained within the Program. 49 | 50 | Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 51 | 52 | 4. COMMERCIAL DISTRIBUTION 53 | 54 | Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. 55 | 56 | For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 57 | 58 | 5. NO WARRANTY 59 | 60 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 61 | 62 | 6. DISCLAIMER OF LIABILITY 63 | 64 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 65 | 66 | 7. GENERAL 67 | 68 | If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. 69 | 70 | If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. 71 | 72 | All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. 73 | 74 | Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. 75 | 76 | This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. 77 | --------------------------------------------------------------------------------