Remove Theia and Atom extensions
1
atom-extensions/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/**/.idea
|
||||
7
atom-extensions/atom-bosh/.gitignore
vendored
@@ -1,7 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
/build
|
||||
*.tgz
|
||||
*.iml
|
||||
*.log
|
||||
@@ -1,6 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
*.tgz
|
||||
*.iml
|
||||
*.log
|
||||
@@ -1,15 +0,0 @@
|
||||
language: objective-c
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -1,76 +0,0 @@
|
||||
|
||||
The content of this package is provided under the EPL v1.0 license (see below).
|
||||
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-bosh/open-source-licenses.txt
|
||||
|
||||
===
|
||||
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
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.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
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.
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"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.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
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;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
|
||||
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.
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained within the Program.
|
||||
|
||||
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.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
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.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
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.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -1,177 +0,0 @@
|
||||
# Bosh Deployment Manifest Editor for Atom
|
||||
[](https://travis-ci.org/spring-projects/atom-bosh) [](https://ci.appveyor.com/project/spring-projects/atom-bosh/branch/master) [](https://david-dm.org/spring-projects/atom-bosh)
|
||||
|
||||
This extension provides basic validation, content assist and hover infos
|
||||
for editing Bosh [Deployment Manifest](https://bosh.io/docs/deployment-manifest.html) and [Cloud Config](https://bosh.io/docs/cloud-config.html) Files.
|
||||
|
||||
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.
|
||||
|
||||
## Usage
|
||||
|
||||
The Bosh editor automatically activates when the name of the file you are editing is `deployment.yml`or `cloud-config.yml`. Alternately, you can select the grammar for your file by doing these steps:
|
||||
|
||||
- Open the file, and it will most likely open with the default Atom YAML editor.
|
||||
- In the bottom-right of the editor, click on YAML.
|
||||
- This opens the Grammar Selection dialogue. Search and select `Bosh-Deployment-Manifest` for deployment files, or `Bosh-Cloud-Config` for Cloud Config files.
|
||||
|
||||
If you find an issue please raise it here: https://github.com/spring-projects/sts4/issues
|
||||
|
||||
## Functionality
|
||||
|
||||
This extension provides validation, content assist and documentation hovers
|
||||
for editing [Bosh](https://bosh.io/) Deployment Manifest files and
|
||||
Cloud Configs.
|
||||
|
||||
### Validation
|
||||
|
||||
As you type the text is parsed and checked for basic syntactic and structural correctness. Hover over
|
||||
an error marker to see an explanation:
|
||||
|
||||
![Linting Screenshot][linting]
|
||||
|
||||
### Content assist
|
||||
|
||||
Having trouble remembering all the names of the attributes, and their spelling? Or can't remember
|
||||
the exact name/version of the stemcell you just uploaded to your bosh environment? Content assist
|
||||
to the rescue:
|
||||
|
||||
![Content Assist Screenshot][ca1]
|
||||
|
||||
![Content Assist Screenshot][ca2]
|
||||
|
||||
### Documentation Hovers
|
||||
|
||||
Having trouble remembering exactly what the meaning of each attribute is? Hover over an attribute and
|
||||
read its detailed documentation:
|
||||
|
||||
![Hover Docs Screenshot][hovers]
|
||||
|
||||
### Navigate to Symbol in File
|
||||
|
||||
Is your deployment manifest file getting larger and it is becoming harder to find a particular Instance Group, Release, or Stemcell definition? The Atom Outline View (View -> Toggle Outline View) helps you quickly jump to a specific definition.
|
||||
|
||||
![Outline View][outline_view]
|
||||
|
||||
### V2 versus V1 Schema
|
||||
|
||||
The editor is intended primarily to support editing manifests in the [V2 schema](https://bosh.io/docs/manifest-v2.html).
|
||||
When you use attributes from the V1 schema the editor will detect this however and switch to 'V1 tolerance' mode.
|
||||
|
||||
In this mode, V1 properties are accepted but marked with deprecation warnings and V2 properties are marked as (unknown property)
|
||||
errors.
|
||||
|
||||
### Targetting a specific Director
|
||||
|
||||
Some of the Validations and Content Assist depend on information dymanically retrieved from an active Bosh director.
|
||||
The editor retreives information by executing commands using the Bosh CLI. For this to work the CLI (V2
|
||||
CLI is required) and editor have to be installed and configured correctly.
|
||||
|
||||
There are two ways to set things up to make this work:
|
||||
|
||||
#### Explicitly Configure the CLI:
|
||||
|
||||
From Atom, press `CTRL-SHIFT-P` and type `config`. Then enter or edit:
|
||||
|
||||
```
|
||||
"bosh-yaml":
|
||||
bosh:
|
||||
cli:
|
||||
# Path to an executable to launch the bosh cli V2. A V2 cli is required!
|
||||
# Set this to null to completely disable all editor features that require access to the bosh director
|
||||
command: "bosh"
|
||||
# Specifies the director/environment to target when executing bosh cli commands.
|
||||
# I.e. this value is passed to the CLI via `-e` parameter.
|
||||
target: "mytarget"
|
||||
# Number of seconds before CLI commands are terminated with a timeout
|
||||
timeout: 3
|
||||
```
|
||||
The Bosh CLI is configured by specifying these keys as shown above: `command`, `target`, and `timeout`. The comments in the example above describe what
|
||||
each key does.
|
||||
|
||||
Note that these key settings do not allow you to provide credentials to connect to the director.
|
||||
The editor assumes that you are providing the credentials implicitly by using the `bosh login` command from a terminal.
|
||||
The Bosh CLI will persist the credentials in `~/.bosh/config` and read them from there. A typical sequence of commands to store the credentials would be something like the following:
|
||||
|
||||
First, create an alias for your environment:
|
||||
|
||||
```
|
||||
$ bosh alias-env my-env -e 10.194.4.35 --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
|
||||
Using environment '10.194.4.35' as anonymous user
|
||||
...
|
||||
Succeeded
|
||||
$
|
||||
```
|
||||
|
||||
Second, obtain username/password for your director. For example:
|
||||
|
||||
```
|
||||
$ bosh int ./creds.yml --path /admin_password
|
||||
very-secret-admin-password
|
||||
|
||||
Succeeded
|
||||
```
|
||||
|
||||
Now use `bosh login` to establish a session and store the credentials:
|
||||
|
||||
```
|
||||
$ bosh login -e my-env
|
||||
Username (): admin
|
||||
Password (): very-secret-admin-password
|
||||
|
||||
Using environment '10.194.4.35' as client 'admin'
|
||||
|
||||
Logged in to '10.194.4.35'
|
||||
|
||||
Succeeded
|
||||
```
|
||||
|
||||
You can verify that CLI is setup correctly by executing a command like:
|
||||
|
||||
```
|
||||
$ bosh -e my-env cloud-config
|
||||
...
|
||||
Succeeded
|
||||
```
|
||||
|
||||
#### Implictly Configure the CLI:
|
||||
|
||||
If the Bosh CLI is not explicitly configured, the editor will, by default, try to execute commands like `bosh cloud-config --json`
|
||||
and `bosh stemcells --json` without an explicit `-e ...` argument. This works only if you ensure that the editor
|
||||
process executes with a proper set of OS environment variables:
|
||||
|
||||
- `PATH`: must be set so that `bosh` cli executable can be found and refers to the V2 CLI.
|
||||
- `BOSH_ENVIRONMENT`: must be set to point to the bosh director you want to target.
|
||||
|
||||
If you start Atom from a terminal, you can verify that things are setup correctly by executing command:
|
||||
|
||||
bosh cloud-config
|
||||
|
||||
If that command executes without any errors and returns the cloud-config you expected, then things are setup correctly.
|
||||
If you subsequently launch Atom from that same terminal the dynamic CA and linting should work correctly.
|
||||
|
||||
# Releases:
|
||||
|
||||
Released versions of this package can be installed directly from the Atom package installer.
|
||||
|
||||
There are also development snapshots available with the latest fixes and improvements from release git repository: https://github.com/spring-projects/atom-bosh
|
||||
1. Clone the release repository for Atom package if not already cloned and navigate to `atom-bosh` folder
|
||||
2. Run `git clean -fxd` - necessary to delete out of date LS JAR file and dependency packages
|
||||
3. Run `git pull` - get the latest changes
|
||||
3. Run `npm install` - Install latest dependecnies and download proper LS JAR
|
||||
4. Run `apm link .` - Link the package to Atom
|
||||
5. Either start Atom or Reload Window in Atom
|
||||
|
||||
[linting]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-bosh/readme-imgs/linting.png
|
||||
|
||||
[ca1]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-bosh/readme-imgs/ca1.png
|
||||
|
||||
[ca2]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-bosh/readme-imgs/ca2.png
|
||||
|
||||
[hovers]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-bosh/readme-imgs/hovers.png
|
||||
|
||||
[outline_view]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-bosh/readme-imgs/outline_view.png
|
||||
@@ -1,27 +0,0 @@
|
||||
version: "{build}"
|
||||
|
||||
platform: x64
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
APM_TEST_PACKAGES:
|
||||
|
||||
matrix:
|
||||
- ATOM_CHANNEL: stable
|
||||
- ATOM_CHANNEL: beta
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 6
|
||||
|
||||
build_script:
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
|
||||
|
||||
test: off
|
||||
deploy: off
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"max_line_length": {
|
||||
"level": "ignore"
|
||||
},
|
||||
"no_empty_param_list": {
|
||||
"level": "error"
|
||||
},
|
||||
"arrow_spacing": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_interpolation_in_single_quotes": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_debugger": {
|
||||
"level": "error"
|
||||
},
|
||||
"prefer_english_operator": {
|
||||
"level": "error"
|
||||
},
|
||||
"colon_assignment_spacing": {
|
||||
"spacing": {
|
||||
"left": 0,
|
||||
"right": 1
|
||||
},
|
||||
"level": "error"
|
||||
},
|
||||
"braces_spacing": {
|
||||
"spaces": 0,
|
||||
"level": "error"
|
||||
},
|
||||
"spacing_after_comma": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_stand_alone_at": {
|
||||
"level": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.bosh-cloud-config'
|
||||
'name': 'Bosh-Cloud-Config'
|
||||
'fileTypes': [
|
||||
'cloud-config.yml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.bosh-deployment-manifest'
|
||||
'name': 'Bosh-Deployment-Manifest'
|
||||
'fileTypes': [
|
||||
'deployment.yml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
|
Before Width: | Height: | Size: 55 KiB |
@@ -1,62 +0,0 @@
|
||||
import * as path from 'path';
|
||||
import {JavaProcessLanguageClient, JavaOptions} from '@pivotal-tools/atom-languageclient-commons';
|
||||
import {ActiveServer} from 'atom-languageclient';
|
||||
import {JVM} from '@pivotal-tools/jvm-launch-utils';
|
||||
|
||||
|
||||
export class BoshYamlClient extends JavaProcessLanguageClient {
|
||||
|
||||
constructor() {
|
||||
//noinspection JSAnnotator
|
||||
super(
|
||||
path.join(__dirname, '..', 'server'),
|
||||
'bosh-language-server.jar'
|
||||
);
|
||||
}
|
||||
|
||||
postInitialization(server: ActiveServer) {
|
||||
this.sendConfig(server);
|
||||
(<any>this)._disposable.add(atom.config.observe('bosh-yaml', () => this.sendConfig(server)));
|
||||
}
|
||||
|
||||
getGrammarScopes() {
|
||||
return ['source.bosh-deployment-manifest', 'source.bosh-cloud-config'];
|
||||
}
|
||||
|
||||
getLanguageName() {
|
||||
return 'Bosh-YAML';
|
||||
}
|
||||
|
||||
getServerName() {
|
||||
return 'Bosh-YAML';
|
||||
}
|
||||
|
||||
activate() {
|
||||
require('atom-package-deps')
|
||||
.install('bosh-yaml')
|
||||
.then(() => console.debug('All dependencies installed, good to go'));
|
||||
super.activate();
|
||||
}
|
||||
|
||||
launchVmArgs(jvm: JVM): Promise<string[]> {
|
||||
return Promise.resolve([
|
||||
'-Dorg.slf4j.simpleLogger.logFile=bosh-yaml.log'
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
sendConfig(server: ActiveServer) {
|
||||
server.connection.didChangeConfiguration({ settings: atom.config.get('bosh-yaml') });
|
||||
}
|
||||
|
||||
getJavaOptions(): JavaOptions {
|
||||
const home = atom.config.get('bosh-yaml.java.home');
|
||||
const vmargs = atom.config.get('bosh-yaml.java.vmargs');
|
||||
return {
|
||||
home: typeof home === 'string' ? home : undefined,
|
||||
vmargs: Array.isArray(vmargs) ? vmargs : undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import {BoshYamlClient} from './bosh-yaml-client';
|
||||
|
||||
module.exports = new BoshYamlClient();
|
||||
@@ -1 +0,0 @@
|
||||
work-in-progress
|
||||
@@ -1,137 +0,0 @@
|
||||
{
|
||||
"name": "bosh-yaml",
|
||||
"version": "1.20.0",
|
||||
"description": "Provides validation and content assist for various Bosh configuration files",
|
||||
"repository": "https://github.com/spring-projects/atom-bosh",
|
||||
"icon": "icon.png",
|
||||
"license": "EPL-1.0",
|
||||
"engines": {
|
||||
"atom": ">=1.24.0"
|
||||
},
|
||||
"main": "./build/main",
|
||||
"types": "./build/main.d.ts",
|
||||
"files": [
|
||||
"grammars/",
|
||||
"settings/",
|
||||
"lib/",
|
||||
"build/",
|
||||
"server/",
|
||||
"properties.json"
|
||||
],
|
||||
"configSchema": {
|
||||
"bosh": {
|
||||
"type": "object",
|
||||
"title": "Bosh CLI Configuration",
|
||||
"properties": {
|
||||
"cli.command": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": "bosh",
|
||||
"description": "Path to an executable to launch the bosh cli V2. A V2 cli is required! Set this to null to completely disable all editor features that require access to the bosh director"
|
||||
},
|
||||
"cli.target": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null,
|
||||
"description": "Specifies the director/environment to target when executing bosh cli commands. I.e. this value is passed to the CLI via `-e` parameter."
|
||||
},
|
||||
"cli.timeout": {
|
||||
"type": "integer",
|
||||
"default": 3,
|
||||
"description": "Number of seconds before CLI commands are terminated with a timeout"
|
||||
}
|
||||
}
|
||||
},
|
||||
"java": {
|
||||
"type": "object",
|
||||
"description": "JVM settings for starting the Language Server",
|
||||
"properties": {
|
||||
"vmargs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Custom VM arguments to start the Language Server"
|
||||
},
|
||||
"home": {
|
||||
"type": "string",
|
||||
"description": "Java home folder to use to start the Language Server"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"atom-package-deps": "^4.6.0",
|
||||
"download": "^6.2.5",
|
||||
"@pivotal-tools/atom-languageclient-commons": "0.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.7.2",
|
||||
"tslint": "^5.9.1",
|
||||
"coffeelint": "^1.10.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -fr build",
|
||||
"compile": "tsc",
|
||||
"build": "npm run clean && npm run compile ",
|
||||
"watch": "tsc -watch",
|
||||
"lint": "tslint -c tslint.json 'lib/**/*.ts'",
|
||||
"postinstall": "node script.js"
|
||||
},
|
||||
"package-deps": [
|
||||
"atom-ide-ui"
|
||||
],
|
||||
"consumedServices": {
|
||||
"linter-indie": {
|
||||
"versions": {
|
||||
"2.0.0": "consumeLinterV2"
|
||||
}
|
||||
},
|
||||
"datatip": {
|
||||
"versions": {
|
||||
"0.1.0": "consumeDatatip"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providedServices": {
|
||||
"autocomplete.provider": {
|
||||
"versions": {
|
||||
"2.0.0": "provideAutocomplete"
|
||||
}
|
||||
},
|
||||
"code-actions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeActions"
|
||||
}
|
||||
},
|
||||
"code-format.range": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeFormat"
|
||||
}
|
||||
},
|
||||
"code-highlight": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeHighlight"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideDefinitions"
|
||||
}
|
||||
},
|
||||
"find-references": {
|
||||
"versions": {
|
||||
"0.1.0": "provideFindReferences"
|
||||
}
|
||||
},
|
||||
"outline-view": {
|
||||
"versions": {
|
||||
"0.1.0": "provideOutlines"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"jarUrl": "https://s3.amazonaws.com/dist.springsource.com/release/STS4/fatjars/bosh-language-server-1.8.0-201906191802-exec.jar"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 219 KiB |
@@ -1,39 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const download = require('download');
|
||||
const PROPERTIES = require('./properties.json');
|
||||
|
||||
let fileExists = function(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.access(path, fs.R_OK, error => {
|
||||
resolve(!error || error.code !== 'ENOENT');
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
const serverDownloadUrl = PROPERTIES.jarUrl;
|
||||
|
||||
const serverHome = path.join(__dirname, 'server');
|
||||
|
||||
const localFileName = path.join(serverHome, 'bosh-language-server.jar');
|
||||
|
||||
fileExists(localFileName).then(exists => {
|
||||
if (!exists) {
|
||||
console.log(`Downloading ${serverDownloadUrl} to ${localFileName}`);
|
||||
fileExists(serverHome)
|
||||
.then(doesExist => {
|
||||
if (!doesExist)
|
||||
fs.mkdir(serverHome, err => {
|
||||
if (err) console.error('Failed to create folder: ' + JSON.stringify(err));
|
||||
});
|
||||
})
|
||||
.then(() => download(serverDownloadUrl))
|
||||
.then(data => fs.writeFileSync(localFileName, data))
|
||||
.then(() => fileExists(localFileName))
|
||||
.then(doesExist => { if (!doesExist) throw Error(`Failed to install the ${this.getServerName()} language server`) })
|
||||
.then(() => console.log(`Successfully downloaded ${serverDownloadUrl}`));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
'.source.bosh-cloud-config':
|
||||
'editor':
|
||||
'autoIndentOnPaste': false
|
||||
'commentStart': '# '
|
||||
'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$'
|
||||
'decreaseIndentPattern': '^\\s+\\}$'
|
||||
'tabType': 'soft'
|
||||
@@ -1,8 +0,0 @@
|
||||
'.source.bosh-deployment-manifest':
|
||||
'editor':
|
||||
'autoIndentOnPaste': false
|
||||
'commentStart': '# '
|
||||
'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$'
|
||||
'decreaseIndentPattern': '^\\s+\\}$'
|
||||
'tabType': 'soft'
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": "build",
|
||||
"lib": ["es7", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": [
|
||||
"lib/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"member-ordering": false,
|
||||
"one-line": false,
|
||||
"interface-name": false,
|
||||
"variable-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"no-unused-expression": false,
|
||||
"no-empty": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast",
|
||||
"check-module"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
/build
|
||||
*.tgz
|
||||
*.iml
|
||||
*.log
|
||||
@@ -1,6 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
*.tgz
|
||||
*.iml
|
||||
*.log
|
||||
@@ -1,15 +0,0 @@
|
||||
language: objective-c
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -1,76 +0,0 @@
|
||||
|
||||
The content of this package is provided under the EPL v1.0 license (see below).
|
||||
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-cf-manifest-yaml/open-source-licenses.txt
|
||||
|
||||
===
|
||||
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
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.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
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.
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"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.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
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;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
|
||||
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.
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained within the Program.
|
||||
|
||||
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.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
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.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
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.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -1,64 +0,0 @@
|
||||
# Cloud Foundry Manifest YAML Editor for Atom
|
||||
[](https://travis-ci.org/spring-projects/atom-cf-manifest-yaml) [](https://ci.appveyor.com/project/spring-projects/atom-cf-manifest-yaml/branch/master) [](https://david-dm.org/spring-projects/atom-cf-manifest-yaml)
|
||||
|
||||
This extension provides basic validation, content assist and hover infos
|
||||
for editing Cloud Foundry [Manifest](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html) Files.
|
||||
|
||||
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.
|
||||
|
||||
## Usage
|
||||
|
||||
The CF manifest editor automatically activates when the name of the file you are editing is `manifest.yml` or editor grammar is set to `Manifest-YAML`
|
||||
|
||||
If you find an issue please raise it here: https://github.com/spring-projects/sts4/issues
|
||||
|
||||
## Functionality
|
||||
|
||||
### Validation
|
||||
|
||||
(Requires `atom-ide-ui` package) As you type the manifest is parsed and checked for basic syntactic and structural correctness. Hover over
|
||||
an error marker to see an explanation.
|
||||
|
||||
![Linting Screenshot][linting]
|
||||
|
||||
### Content Assist
|
||||
|
||||
Having trouble remembering all the names of the attributes, and their spelling? Content assist to the
|
||||
rescue:
|
||||
|
||||
![Content Assist Screenshot][ca]
|
||||
|
||||
### Dynamic Cloud Foundry Content Assist
|
||||
|
||||
Would you like to see actual Cloud Foundry values for attributes like `services`, `buildpack`, `domain`, and `stack`? If you have [cf CLI](https://docs.cloudfoundry.org/cf-cli/) installed and connected to a Cloud target, the extension will automatically display values for certain manifest attributes.
|
||||
|
||||
For example, if you are connected to a Cloud target that has services, and you invoke content assist in an entry under `services`, you will see the available service instances. In addition, service instances that do not exist in the Cloud target, like `redisserv` in the example below, are highlighted with a warning.
|
||||
|
||||
Dynamic content assist also shows which Cloud target you are connected to.
|
||||
|
||||
![Dynamic Cloud Foundry Content Assist Screenshot][dcfca]
|
||||
|
||||
### Documentation Hovers
|
||||
|
||||
(Requires `atom-ide-ui` package) Having trouble remembering exactly what the meaning of each attribute is? Hover over any attribute and
|
||||
read its detailed documentation.
|
||||
|
||||
![Hover Docs Screenshot][hovers]
|
||||
|
||||
# Releases:
|
||||
|
||||
Released versions of this package can be installed directly from the Atom package installer.
|
||||
|
||||
There are also development snapshots available with the latest fixes and improvements from release git repository: https://github.com/spring-projects/atom-cf-manifest-yaml
|
||||
1. Clone the release repository for Atom package if not already cloned and navigate to `atom-cf-manifest-yaml` folder
|
||||
2. Run `git clean -fxd` - necessary to delete out of date LS JAR file and dependency packages
|
||||
3. Run `git pull` - get the latest changes
|
||||
3. Run `npm install` - Install latest dependecnies and download proper LS JAR
|
||||
4. Run `apm link .` - Link the package to Atom
|
||||
5. Either start Atom or Reload Window in Atom
|
||||
|
||||
[linting]: https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-cf-manifest-yaml/readme-imgs/linting.png
|
||||
[ca]: https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-cf-manifest-yaml/readme-imgs/content-assist.png
|
||||
[dcfca]: https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-cf-manifest-yaml/readme-imgs/cf-dynamic-content-assist.png
|
||||
[hovers]: https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-cf-manifest-yaml/readme-imgs/hovers.png
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
version: "{build}"
|
||||
|
||||
platform: x64
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
APM_TEST_PACKAGES:
|
||||
|
||||
matrix:
|
||||
- ATOM_CHANNEL: stable
|
||||
- ATOM_CHANNEL: beta
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 6
|
||||
|
||||
build_script:
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
|
||||
|
||||
test: off
|
||||
deploy: off
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"max_line_length": {
|
||||
"level": "ignore"
|
||||
},
|
||||
"no_empty_param_list": {
|
||||
"level": "error"
|
||||
},
|
||||
"arrow_spacing": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_interpolation_in_single_quotes": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_debugger": {
|
||||
"level": "error"
|
||||
},
|
||||
"prefer_english_operator": {
|
||||
"level": "error"
|
||||
},
|
||||
"colon_assignment_spacing": {
|
||||
"spacing": {
|
||||
"left": 0,
|
||||
"right": 1
|
||||
},
|
||||
"level": "error"
|
||||
},
|
||||
"braces_spacing": {
|
||||
"spaces": 0,
|
||||
"level": "error"
|
||||
},
|
||||
"spacing_after_comma": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_stand_alone_at": {
|
||||
"level": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.cf-manifest-yaml'
|
||||
'name': 'Manifest-YAML'
|
||||
'fileTypes': [
|
||||
'manifest.yml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
|
Before Width: | Height: | Size: 55 KiB |
@@ -1,3 +0,0 @@
|
||||
import {ManifestYamlLanguageClient} from './manifest-yaml-language-client';
|
||||
|
||||
module.exports = new ManifestYamlLanguageClient();
|
||||
@@ -1,54 +0,0 @@
|
||||
import * as path from 'path';
|
||||
import { JavaProcessLanguageClient, JavaOptions } from '@pivotal-tools/atom-languageclient-commons';
|
||||
import {JVM} from '@pivotal-tools/jvm-launch-utils';
|
||||
|
||||
export class ManifestYamlLanguageClient extends JavaProcessLanguageClient {
|
||||
|
||||
constructor() {
|
||||
//noinspection JSAnnotator
|
||||
super(
|
||||
path.join(__dirname, '..', 'server'),
|
||||
'cf-manifest-language-server.jar'
|
||||
);
|
||||
// this.DEBUG = true;
|
||||
}
|
||||
|
||||
getGrammarScopes() {
|
||||
return ['source.cf-manifest-yaml']
|
||||
}
|
||||
|
||||
getLanguageName() {
|
||||
return 'Manifest-YAML'
|
||||
}
|
||||
|
||||
getServerName() {
|
||||
return 'CF Manifest YAML'
|
||||
}
|
||||
|
||||
activate() {
|
||||
// replace the example argument 'linter-ruby' with the name of this Atom package
|
||||
require('atom-package-deps')
|
||||
.install('cf-manifest-yaml')
|
||||
.then(() => console.debug('All dependencies installed, good to go'));
|
||||
super.activate();
|
||||
}
|
||||
|
||||
launchVmArgs(jvm: JVM) {
|
||||
return Promise.resolve([
|
||||
// '-Xdebug',
|
||||
// '-agentlib:jdwp=transport=dt_socket,server=y,address=7999,suspend=n',
|
||||
'-Dorg.slf4j.simpleLogger.logFile=manifest-yaml.log',
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
getJavaOptions(): JavaOptions {
|
||||
const home = atom.config.get('cf-manifest-yaml.java.home');
|
||||
const vmargs = atom.config.get('cf-manifest-yaml.java.vmargs');
|
||||
return {
|
||||
home: typeof home === 'string' ? home : undefined,
|
||||
vmargs: Array.isArray(vmargs) ? vmargs : undefined
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
work-in-progress
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"name": "cf-manifest-yaml",
|
||||
"version": "1.20.0",
|
||||
"description": "Cloud Foundry Deployment Manifest YAML support for Atom",
|
||||
"repository": "https://github.com/spring-projects/atom-cf-manifest-yaml",
|
||||
"icon": "icon.png",
|
||||
"license": "EPL-1.0",
|
||||
"engines": {
|
||||
"atom": ">=1.24.0"
|
||||
},
|
||||
"main": "./build/main",
|
||||
"types": "./build/main.d.ts",
|
||||
"files": [
|
||||
"grammars/",
|
||||
"settings/",
|
||||
"lib/",
|
||||
"build/",
|
||||
"server/",
|
||||
"properties.json"
|
||||
],
|
||||
"configSchema": {
|
||||
"java": {
|
||||
"type": "object",
|
||||
"description": "JVM settings for starting the Language Server",
|
||||
"properties": {
|
||||
"vmargs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Custom VM arguments to start the Language Server"
|
||||
},
|
||||
"home": {
|
||||
"type": "string",
|
||||
"description": "Java home folder to use to start the Language Server"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pivotal-tools/atom-languageclient-commons": "0.0.15",
|
||||
"atom-package-deps": "^4.6.0",
|
||||
"download": "^6.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.7.2",
|
||||
"tslint": "^5.9.1",
|
||||
"coffeelint": "^1.10.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -fr build",
|
||||
"compile": "tsc",
|
||||
"build": "npm run clean && npm run compile ",
|
||||
"watch": "tsc -watch",
|
||||
"lint": "tslint -c tslint.json 'lib/**/*.ts'",
|
||||
"postinstall": "node script.js"
|
||||
},
|
||||
"package-deps": [
|
||||
"atom-ide-ui"
|
||||
],
|
||||
"consumedServices": {
|
||||
"linter-indie": {
|
||||
"versions": {
|
||||
"2.0.0": "consumeLinterV2"
|
||||
}
|
||||
},
|
||||
"datatip": {
|
||||
"versions": {
|
||||
"0.1.0": "consumeDatatip"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providedServices": {
|
||||
"autocomplete.provider": {
|
||||
"versions": {
|
||||
"2.0.0": "provideAutocomplete"
|
||||
}
|
||||
},
|
||||
"code-actions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeActions"
|
||||
}
|
||||
},
|
||||
"code-format.range": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeFormat"
|
||||
}
|
||||
},
|
||||
"code-highlight": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeHighlight"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideDefinitions"
|
||||
}
|
||||
},
|
||||
"find-references": {
|
||||
"versions": {
|
||||
"0.1.0": "provideFindReferences"
|
||||
}
|
||||
},
|
||||
"outline-view": {
|
||||
"versions": {
|
||||
"0.1.0": "provideOutlines"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"jarUrl": "https://s3.amazonaws.com/dist.springsource.com/release/STS4/fatjars/manifest-yaml-language-server-1.8.0-201906191802-exec.jar"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 83 KiB |
@@ -1,39 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const download = require('download');
|
||||
const PROPERTIES = require('./properties.json');
|
||||
|
||||
let fileExists = function(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.access(path, fs.R_OK, error => {
|
||||
resolve(!error || error.code !== 'ENOENT');
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
const serverDownloadUrl = PROPERTIES.jarUrl;
|
||||
|
||||
const serverHome = path.join(__dirname, 'server');
|
||||
|
||||
const localFileName = path.join(serverHome, 'cf-manifest-language-server.jar');
|
||||
|
||||
fileExists(localFileName).then(exists => {
|
||||
if (!exists) {
|
||||
console.log(`Downloading ${serverDownloadUrl} to ${localFileName}`);
|
||||
fileExists(serverHome)
|
||||
.then(doesExist => {
|
||||
if (!doesExist)
|
||||
fs.mkdir(serverHome, err => {
|
||||
if (err) console.error('Failed to create folder: ' + JSON.stringify(err));
|
||||
});
|
||||
})
|
||||
.then(() => download(serverDownloadUrl))
|
||||
.then(data => fs.writeFileSync(localFileName, data))
|
||||
.then(() => fileExists(localFileName))
|
||||
.then(doesExist => { if (!doesExist) throw Error(`Failed to install the ${this.getServerName()} language server`) })
|
||||
.then(() => console.log(`Successfully downloaded ${serverDownloadUrl}`));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
'.source.cf-manifest-yaml':
|
||||
'editor':
|
||||
'autoIndentOnPaste': false
|
||||
'commentStart': '# '
|
||||
'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$'
|
||||
'decreaseIndentPattern': '^\\s+\\}$'
|
||||
'tabType': 'soft'
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": "build",
|
||||
"lib": ["es7", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": [
|
||||
"lib/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"member-ordering": false,
|
||||
"one-line": false,
|
||||
"interface-name": false,
|
||||
"variable-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"no-unused-expression": false,
|
||||
"no-empty": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast",
|
||||
"check-module"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
3
atom-extensions/atom-commons/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
/dist
|
||||
/node_modules
|
||||
/build
|
||||
@@ -1,190 +0,0 @@
|
||||
import * as path from 'path';
|
||||
import {getPort} from 'portfinder';
|
||||
import {Server, createServer, connect} from 'net';
|
||||
import {AtomEnvironment, Disposable} from 'atom';
|
||||
import {HighlightParams, ProgressParams, CursorMovementParams, StsAdapter} from './sts-adapter';
|
||||
import {ActiveServer, LanguageServerProcess} from 'atom-languageclient';
|
||||
import {AutoLanguageClient} from 'atom-languageclient';
|
||||
import {findJdk, findJvm, JVM} from '@pivotal-tools/jvm-launch-utils';
|
||||
import {Writable} from 'stream';
|
||||
|
||||
export class JavaProcessLanguageClient extends AutoLanguageClient {
|
||||
|
||||
DEBUG = false;
|
||||
|
||||
private server: Server;
|
||||
|
||||
constructor(protected serverHome: string, protected serverLauncherJar: string) {
|
||||
super();
|
||||
}
|
||||
|
||||
getServerJar(): string {
|
||||
return path.resolve(this.serverHome, this.serverLauncherJar);
|
||||
}
|
||||
|
||||
showErrorMessage(detail: string, desc?: string): Promise<any> {
|
||||
const atomEnv: AtomEnvironment = atom;
|
||||
const notification = atomEnv.notifications.addError('Cannot start Language Server', {
|
||||
dismissable: true,
|
||||
detail: detail,
|
||||
description: desc,
|
||||
buttons: [{
|
||||
text: 'OK',
|
||||
onDidClick: () => {
|
||||
notification.dismiss()
|
||||
},
|
||||
}]
|
||||
});
|
||||
return Promise.reject(new Error(detail));
|
||||
}
|
||||
|
||||
protected startServerProcess(projectPath: string): LanguageServerProcess | Promise<LanguageServerProcess> {
|
||||
// TODO: Remove when debugging is over
|
||||
const atomEnv: AtomEnvironment = atom;
|
||||
atomEnv.config.set('core.debugLSP', true);
|
||||
|
||||
let childProcess: LanguageServerProcess;
|
||||
|
||||
if (this.DEBUG) {
|
||||
return this.connectToLS();
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let basePort = Math.floor(Math.random() * 10000) + 40000;
|
||||
getPort({port: basePort}, (err, port) => {
|
||||
this.server = createServer(socket => {
|
||||
this.socket = socket;
|
||||
resolve(childProcess);
|
||||
});
|
||||
|
||||
this.server.listen(port, 'localhost', () => {
|
||||
this.launchProcess(port).then(p => childProcess = p);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private connectToLS(): LanguageServerProcess | Promise<LanguageServerProcess> {
|
||||
return new Promise(resolve => {
|
||||
this.socket = connect({
|
||||
port: 5007
|
||||
});
|
||||
const stdout: any = {
|
||||
setEncoding: () => {
|
||||
return stdout;
|
||||
},
|
||||
on: () => stdout
|
||||
};
|
||||
const process: LanguageServerProcess = {
|
||||
stdin: <Writable>{},
|
||||
stdout: stdout,
|
||||
stderr: stdout,
|
||||
pid: -1,
|
||||
kill: () => {
|
||||
console.log('fake shutdown');
|
||||
},
|
||||
on: () => process,
|
||||
addListener: () => process,
|
||||
prependListener: () => process,
|
||||
once: () => process,
|
||||
prependOnceListener: () => process,
|
||||
removeListener: () => process,
|
||||
removeAllListeners: () => process,
|
||||
setMaxListeners: () => process,
|
||||
getMaxListeners: () => 0,
|
||||
listeners: () => [],
|
||||
emit: () => false,
|
||||
eventNames: () => [],
|
||||
listenerCount: () => 0
|
||||
};
|
||||
resolve(process);
|
||||
});
|
||||
}
|
||||
|
||||
// Start adapters that are not shared between servers
|
||||
protected postInitialization(server: ActiveServer): void {
|
||||
const stsAdapter = this.createStsAdapter() || new StsAdapter();
|
||||
(<any>server.connection)._onRequest({method: 'sts/moveCursor'}, (params: CursorMovementParams) => stsAdapter.onMoveCursor(params));
|
||||
server.connection.onCustom('sts/progress', (params: ProgressParams) => stsAdapter.onProgress(params));
|
||||
server.connection.onCustom('sts/highlight', (params: HighlightParams) => stsAdapter.onHighlight(params));
|
||||
|
||||
server.disposable.add(new Disposable(() => {
|
||||
if (this.server) {
|
||||
this.server.close()
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
preferJdk(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
findJvm(): Promise<JVM | null> {
|
||||
const options = this.getJavaOptions();
|
||||
const javaHome = options ? this.getJavaOptions().home : '';
|
||||
return this.preferJdk() ? findJdk(javaHome) : findJvm(javaHome);
|
||||
}
|
||||
|
||||
private launchProcess(port: number): Promise<LanguageServerProcess> {
|
||||
return this.findJvm()
|
||||
.catch(error => {
|
||||
return this.showErrorMessage("Error trying to find JVM", ""+error);
|
||||
})
|
||||
.then(jvm => {
|
||||
if (!jvm) {
|
||||
return this.showErrorMessage("Couldn't locate java in $JAVA_HOME or $PATH");
|
||||
}
|
||||
let version = jvm.getMajorVersion();
|
||||
if (version<8) {
|
||||
return this.showErrorMessage(
|
||||
'No compatible Java Runtime Environment found',
|
||||
'The Java Runtime Environment is either below version "1.8" or is missing from the system'
|
||||
);
|
||||
}
|
||||
return this.launchVmArgs(jvm).then(args => {
|
||||
args.push(`-Dserver.port=${port}`);
|
||||
return this.doLaunchProcess(
|
||||
jvm,
|
||||
this.getServerJar(),
|
||||
args
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected launchVmArgs(jvm: JVM): Promise<string[]> {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
private doLaunchProcess(jvm: JVM, launcher: string, args: string[] =[]): LanguageServerProcess {
|
||||
let vmArgs = args.concat([
|
||||
'-Dsts.lsp.client=atom',
|
||||
// '-Dlsp.completions.indentation.enable=true', // Looks like Atom has magic indents same like VSCode - comment it out
|
||||
'-Dlsp.yaml.completions.errors.disable=true',
|
||||
]);
|
||||
|
||||
const javaOptions = this.getJavaOptions();
|
||||
if (javaOptions && javaOptions.vmargs) {
|
||||
vmArgs.push(...javaOptions.vmargs);
|
||||
}
|
||||
|
||||
this.logger.debug(`starting "${jvm.getJavaExecutable()} ${vmArgs.join('\n')}\n-jar ${launcher}"`);
|
||||
return jvm.jarLaunch(launcher, vmArgs, { cwd: this.serverHome });
|
||||
}
|
||||
|
||||
createStsAdapter(): StsAdapter | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected getJavaOptions(): JavaOptions {
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export interface JavaOptions {
|
||||
home?: string;
|
||||
vmargs?: string[];
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import {JavaProcessLanguageClient, JavaOptions} from './java-process-language-client';
|
||||
import {StsAdapter, CursorMovementParams, HighlightParams, ProgressParams} from './sts-adapter';
|
||||
|
||||
export {
|
||||
JavaProcessLanguageClient,
|
||||
JavaOptions,
|
||||
StsAdapter,
|
||||
CursorMovementParams,
|
||||
HighlightParams,
|
||||
ProgressParams
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import {Convert} from 'atom-languageclient';
|
||||
import {AtomEnvironment, TextEditor} from 'atom';
|
||||
import {Position, CodeLens, TextDocumentIdentifier} from 'vscode-languageserver-protocol';
|
||||
|
||||
export class StsAdapter {
|
||||
|
||||
constructor() {}
|
||||
|
||||
findEditors(uri: string): TextEditor[] {
|
||||
const atomEnv: AtomEnvironment = atom;
|
||||
return atomEnv.workspace.getTextEditors()
|
||||
.filter(e => e && e.getPath() && Convert.pathToUri(e.getPath() || '') === uri);
|
||||
}
|
||||
|
||||
onMoveCursor(params: CursorMovementParams): any {
|
||||
this.findEditors(params.uri).forEach(e => e.setCursorScreenPosition(Convert.positionToPoint(params.position)));
|
||||
return {applied: true};
|
||||
}
|
||||
|
||||
onProgress(params: ProgressParams): void {}
|
||||
|
||||
onHighlight(params: HighlightParams): void {}
|
||||
}
|
||||
|
||||
export interface CursorMovementParams {
|
||||
readonly uri: string;
|
||||
readonly position: Position;
|
||||
}
|
||||
|
||||
export interface ProgressParams {
|
||||
readonly id: string;
|
||||
readonly statusMsg: string;
|
||||
}
|
||||
|
||||
export interface HighlightParams {
|
||||
readonly doc: TextDocumentIdentifier;
|
||||
readonly codeLenses: CodeLens[];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "@pivotal-tools/atom-languageclient-commons",
|
||||
"version": "0.0.15",
|
||||
"description": "Atom language client commons for STS4 language servers",
|
||||
"repository": "https://github.com/spring-projects/sts4",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"atom": ">=1.24.0"
|
||||
},
|
||||
"main": "./build/main",
|
||||
"types": "./build/main.d.ts",
|
||||
"files": [
|
||||
"build/",
|
||||
"lib/"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rm -rf build",
|
||||
"compile": "tsc",
|
||||
"watch": "tsc -watch",
|
||||
"lint": "tslint -c tslint.json 'lib/**/*.ts'",
|
||||
"prepublish": "npm run clean && npm run compile"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pivotal-tools/jvm-launch-utils": "0.0.11",
|
||||
"atom-languageclient": "0.9.9",
|
||||
"portfinder": "^1.0.13",
|
||||
"@types/atom": "^1.24.1",
|
||||
"@types/node": "^8.0.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tslint": "^5.9.1",
|
||||
"typescript": "^2.7.2"
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": "build",
|
||||
"lib": ["es7", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": [
|
||||
"lib/**/*.ts",
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"member-ordering": false,
|
||||
"one-line": false,
|
||||
"interface-name": false,
|
||||
"variable-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"no-unused-expression": false,
|
||||
"no-empty": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast",
|
||||
"check-module"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
7
atom-extensions/atom-concourse/.gitignore
vendored
@@ -1,7 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
/build
|
||||
*.tgz
|
||||
*iml
|
||||
*.log
|
||||
@@ -1,6 +0,0 @@
|
||||
/.idea
|
||||
/node_modules
|
||||
/server
|
||||
*.tgz
|
||||
*iml
|
||||
*.log
|
||||
@@ -1,15 +0,0 @@
|
||||
language: objective-c
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -1,76 +0,0 @@
|
||||
|
||||
The content of this package is provided under the EPL v1.0 license (see below).
|
||||
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
|
||||
|
||||
===
|
||||
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
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.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
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.
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"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.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
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;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
|
||||
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.
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained within the Program.
|
||||
|
||||
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.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
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.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
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.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -1,78 +0,0 @@
|
||||
# Concourse CI YAML Editor for Atom
|
||||
[](https://travis-ci.org/spring-projects/atom-concourse) [](https://ci.appveyor.com/project/spring-projects/atom-concourse/branch/master) [](https://david-dm.org/spring-projects/atom-concourse)
|
||||
|
||||
This extension provides basic validation, content assist and hover infos
|
||||
for editing Concourse [Pipeline](https://concourse-ci.org/pipelines.html) and [Task Configuration](https://concourse-ci.org/running-tasks.html) Files.
|
||||
|
||||
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.
|
||||
|
||||
## Usage
|
||||
|
||||
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:
|
||||
|
||||
- Open the file, and it will most likely open with the default Atom YAML editor.
|
||||
- In the bottom-right of the editor, click on YAML.
|
||||
- This opens the Grammar Selection dialogue. Search and select `Concourse-Pipeline-YAML` for pipeline files, or `Concourse-Task-YAML` for task files.
|
||||
|
||||
If you find an issue please raise it here: https://github.com/spring-projects/sts4/issues
|
||||
|
||||
## Functionality
|
||||
|
||||
### Validation
|
||||
|
||||
(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.
|
||||
|
||||
![Linting Screenshot][linting]
|
||||
|
||||
### Content Assist
|
||||
|
||||
Having trouble remembering all the names of the attributes, and their spelling? Or can't remember
|
||||
which resource properties to set in the `get` task params versus its `source` attributes? Or
|
||||
don't remember what 'special' values are acceptable for a certain property? Content assist
|
||||
to the rescue:
|
||||
|
||||
![Content Assist Screenshot][ca1]
|
||||
|
||||
![Content Assist Screenshot][ca2]
|
||||
|
||||
### Documentation Hovers
|
||||
|
||||
(Requires `atom-ide-ui` package) Having trouble remembering exactly what the meaning of each attribute is? Hover over any attribute and
|
||||
read its detailed documentation.
|
||||
|
||||
![Hover Docs Screenshot][hovers]
|
||||
|
||||
### Navigate to Symbol in File
|
||||
|
||||
Is your Pipeline yaml file getting larger and it is becoming harder to find a particular Job, Resource or
|
||||
Resource Type declaration? The Atom Outline View (View -> Toggle Outline View) helps you quickly jump to a specific definition.
|
||||
|
||||
![Outline View][outline_view]
|
||||
|
||||
# Releases:
|
||||
|
||||
Released versions of this package can be installed directly from the Atom package installer.
|
||||
|
||||
There are also development snapshots available with the latest fixes and improvements from release git repository: https://github.com/spring-projects/atom-concourse
|
||||
1. Clone the release repository for Atom package if not already cloned and navigate to `atom-concourse` folder
|
||||
2. Run `git clean -fxd` - necessary to delete out of date LS JAR file and dependency packages
|
||||
3. Run `git pull` - get the latest changes
|
||||
3. Run `npm install` - Install latest dependecnies and download proper LS JAR
|
||||
4. Run `apm link .` - Link the package to Atom
|
||||
5. Either start Atom or Reload Window in Atom
|
||||
|
||||
[linting]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/linting.png
|
||||
|
||||
[ca1]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/ca1.png
|
||||
|
||||
[ca2]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/ca2.png
|
||||
|
||||
[hovers]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/hovers.png
|
||||
|
||||
[outline_view]:
|
||||
https://raw.githubusercontent.com/spring-projects/sts4/af715bad53bd6cf30a10a2dc6d34bfcc17968382/atom-extensions/atom-concourse/readme-imgs/outline_view.png
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
version: "{build}"
|
||||
|
||||
platform: x64
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
APM_TEST_PACKAGES:
|
||||
|
||||
matrix:
|
||||
- ATOM_CHANNEL: stable
|
||||
- ATOM_CHANNEL: beta
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 6
|
||||
|
||||
build_script:
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
|
||||
|
||||
test: off
|
||||
deploy: off
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
workdir=`pwd`
|
||||
cd ../atom-commons
|
||||
npm install
|
||||
cd $workdir
|
||||
npm install
|
||||
apm link .
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"max_line_length": {
|
||||
"level": "ignore"
|
||||
},
|
||||
"no_empty_param_list": {
|
||||
"level": "error"
|
||||
},
|
||||
"arrow_spacing": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_interpolation_in_single_quotes": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_debugger": {
|
||||
"level": "error"
|
||||
},
|
||||
"prefer_english_operator": {
|
||||
"level": "error"
|
||||
},
|
||||
"colon_assignment_spacing": {
|
||||
"spacing": {
|
||||
"left": 0,
|
||||
"right": 1
|
||||
},
|
||||
"level": "error"
|
||||
},
|
||||
"braces_spacing": {
|
||||
"spaces": 0,
|
||||
"level": "error"
|
||||
},
|
||||
"spacing_after_comma": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_stand_alone_at": {
|
||||
"level": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.concourse-pipeline-yaml'
|
||||
'name': 'Concourse-Pipeline-YAML'
|
||||
'fileTypes': [
|
||||
'pipeline.yml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.concourse-task-yaml'
|
||||
'name': 'Concourse-Task-YAML'
|
||||
'fileTypes': [
|
||||
'task.yml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
|
Before Width: | Height: | Size: 55 KiB |
@@ -1,51 +0,0 @@
|
||||
import * as path from 'path';
|
||||
import { JavaProcessLanguageClient, JavaOptions } from '@pivotal-tools/atom-languageclient-commons';
|
||||
import {JVM} from '@pivotal-tools/jvm-launch-utils';
|
||||
|
||||
export class ConcourseCiYamlClient extends JavaProcessLanguageClient {
|
||||
|
||||
constructor() {
|
||||
//noinspection JSAnnotator
|
||||
super(
|
||||
path.join(__dirname, '..', 'server'),
|
||||
'concourse-language-server.jar'
|
||||
);
|
||||
}
|
||||
|
||||
getGrammarScopes() {
|
||||
return ['source.concourse-pipeline-yaml','source.concourse-task-yaml'];
|
||||
}
|
||||
|
||||
getLanguageName() {
|
||||
return 'Concourse-Pipeline-YAML';
|
||||
}
|
||||
|
||||
getServerName() {
|
||||
return 'Concourse-Pipeline-YAML';
|
||||
}
|
||||
|
||||
activate() {
|
||||
// replace the example argument 'linter-ruby' with the name of this Atom package
|
||||
require('atom-package-deps')
|
||||
.install('concourse-pipeline-yaml')
|
||||
.then(() => console.debug('All dependencies installed, good to go'));
|
||||
super.activate();
|
||||
}
|
||||
|
||||
launchVmArgs(jvm: JVM) {
|
||||
return Promise.resolve([
|
||||
'-Dorg.slf4j.simpleLogger.logFile=concourse-ci-yaml.log'
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
getJavaOptions(): JavaOptions {
|
||||
const home = atom.config.get('concourse-pipeline-yaml.java.home');
|
||||
const vmargs = atom.config.get('concourse-pipeline-yaml.java.vmargs');
|
||||
return {
|
||||
home: typeof home === 'string' ? home : undefined,
|
||||
vmargs: Array.isArray(vmargs) ? vmargs : undefined
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import {ConcourseCiYamlClient} from './concourse-ci-yaml-client';
|
||||
|
||||
module.exports = new ConcourseCiYamlClient();
|
||||
@@ -1 +0,0 @@
|
||||
work-in-progress
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"name": "concourse-pipeline-yaml",
|
||||
"version": "1.20.0",
|
||||
"description": "Provides validation and content assist for Concourse CI pipeline and task configuration yml files",
|
||||
"repository": "https://github.com/spring-projects/atom-concourse",
|
||||
"icon": "icon.png",
|
||||
"license": "EPL-1.0",
|
||||
"engines": {
|
||||
"atom": ">=1.24.0"
|
||||
},
|
||||
"main": "./build/main",
|
||||
"types": "./build/main.d.ts",
|
||||
"files": [
|
||||
"grammars/",
|
||||
"settings/",
|
||||
"build/",
|
||||
"lib/",
|
||||
"server/",
|
||||
"properties.json"
|
||||
],
|
||||
"configSchema": {
|
||||
"java": {
|
||||
"type": "object",
|
||||
"description": "JVM settings for starting the Language Server",
|
||||
"properties": {
|
||||
"vmargs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Custom VM arguments to start the Language Server"
|
||||
},
|
||||
"home": {
|
||||
"type": "string",
|
||||
"description": "Java home folder to use to start the Language Server"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"atom-package-deps": "^4.6.0",
|
||||
"download": "^6.2.5",
|
||||
"@pivotal-tools/atom-languageclient-commons": "0.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.7.2",
|
||||
"tslint": "^5.9.1",
|
||||
"coffeelint": "^1.10.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -fr build",
|
||||
"compile": "tsc",
|
||||
"build": "npm run clean && npm run compile ",
|
||||
"watch": "tsc -watch",
|
||||
"lint": "tslint -c tslint.json 'lib/**/*.ts'",
|
||||
"postinstall": "node script.js"
|
||||
},
|
||||
"package-deps": [
|
||||
"atom-ide-ui"
|
||||
],
|
||||
"consumedServices": {
|
||||
"linter-indie": {
|
||||
"versions": {
|
||||
"2.0.0": "consumeLinterV2"
|
||||
}
|
||||
},
|
||||
"datatip": {
|
||||
"versions": {
|
||||
"0.1.0": "consumeDatatip"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providedServices": {
|
||||
"autocomplete.provider": {
|
||||
"versions": {
|
||||
"2.0.0": "provideAutocomplete"
|
||||
}
|
||||
},
|
||||
"code-actions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeActions"
|
||||
}
|
||||
},
|
||||
"code-format.range": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeFormat"
|
||||
}
|
||||
},
|
||||
"code-highlight": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeHighlight"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideDefinitions"
|
||||
}
|
||||
},
|
||||
"find-references": {
|
||||
"versions": {
|
||||
"0.1.0": "provideFindReferences"
|
||||
}
|
||||
},
|
||||
"outline-view": {
|
||||
"versions": {
|
||||
"0.1.0": "provideOutlines"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"jarUrl": "https://s3.amazonaws.com/dist.springsource.com/release/STS4/fatjars/concourse-language-server-1.8.0-201906191802-exec.jar"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 263 KiB |
@@ -1,39 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const download = require('download');
|
||||
const PROPERTIES = require('./properties.json');
|
||||
|
||||
let fileExists = function(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.access(path, fs.R_OK, error => {
|
||||
resolve(!error || error.code !== 'ENOENT');
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
const serverDownloadUrl = PROPERTIES.jarUrl;
|
||||
|
||||
const serverHome = path.join(__dirname, 'server');
|
||||
|
||||
const localFileName = path.join(serverHome, 'concourse-language-server.jar');
|
||||
|
||||
fileExists(localFileName).then(exists => {
|
||||
if (!exists) {
|
||||
console.log(`Downloading ${serverDownloadUrl} to ${localFileName}`);
|
||||
fileExists(serverHome)
|
||||
.then(doesExist => {
|
||||
if (!doesExist)
|
||||
fs.mkdir(serverHome, err => {
|
||||
if (err) console.error('Failed to create folder: ' + JSON.stringify(err));
|
||||
});
|
||||
})
|
||||
.then(() => download(serverDownloadUrl))
|
||||
.then(data => fs.writeFileSync(localFileName, data))
|
||||
.then(() => fileExists(localFileName))
|
||||
.then(doesExist => { if (!doesExist) throw Error(`Failed to install the ${this.getServerName()} language server`) })
|
||||
.then(() => console.log(`Successfully downloaded ${serverDownloadUrl}`));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
'.source.concourse-pipeline-yaml':
|
||||
'editor':
|
||||
'autoIndentOnPaste': false
|
||||
'commentStart': '# '
|
||||
'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$'
|
||||
'decreaseIndentPattern': '^\\s+\\}$'
|
||||
'tabType': 'soft'
|
||||
@@ -1,8 +0,0 @@
|
||||
'.source.concourse-task-yaml':
|
||||
'editor':
|
||||
'autoIndentOnPaste': false
|
||||
'commentStart': '# '
|
||||
'foldEndPattern': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
'increaseIndentPattern': '^\\s*.*(:|-) ?(&\\w+)?(\\{[^}"\']*|\\([^)"\']*)?$'
|
||||
'decreaseIndentPattern': '^\\s+\\}$'
|
||||
'tabType': 'soft'
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": "build",
|
||||
"lib": ["es7", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": [
|
||||
"lib/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"quotemark": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"member-ordering": false,
|
||||
"one-line": false,
|
||||
"interface-name": false,
|
||||
"variable-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"no-unused-expression": false,
|
||||
"no-empty": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast",
|
||||
"check-module"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
4
atom-extensions/atom-spring-boot/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
.idea/
|
||||
server/
|
||||
node_modules/
|
||||
build/
|
||||
@@ -1,3 +0,0 @@
|
||||
.idea/
|
||||
server/
|
||||
node_modules/
|
||||
@@ -1,15 +0,0 @@
|
||||
language: objective-c
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -1,51 +0,0 @@
|
||||
# Atom package for Spring Boot Application Properties
|
||||
|
||||
Atom package and Language Server providing support for Spring Boot applications development. Beans data for `.java` file, and editing support for `application.properties`, `application.yml` files.
|
||||
|
||||
## Installation:
|
||||
|
||||
Install it from Atom `Install Packages`, search for `spring-boot`
|
||||
|
||||
## Usage:
|
||||
|
||||
The extension will automatically activate when you edit files with the following
|
||||
name patterns:
|
||||
|
||||
- `.java` => activates spring beans data support
|
||||
- `application.properties` => activates support for .properties file format.
|
||||
- `application.yml` => activates support for .yml file format.
|
||||
|
||||
For all other files containing boot properties select grammar to be `Spring-Boot-Properties` for `properties` file format or `Spring-Boot-Properties-YAML` for 'YAML' file format
|
||||
|
||||
# Developer notes
|
||||
|
||||
## Bulding and Running
|
||||
|
||||
To build all these pieces you normally only need to run:
|
||||
|
||||
npm install && npm run build
|
||||
|
||||
Now you can link it to Atom:
|
||||
|
||||
apm link .
|
||||
|
||||
Open Atom or execute `Refresh Window` in the opened instance (Packages -> Command Palette -> Toggle then search for the command).
|
||||
|
||||
## Debugging
|
||||
|
||||
**Client Side Debugging**: Open Atom's `Developer Tools` view - View -> Developer -> Toggle Developer Tools
|
||||
|
||||
**Server Side Debugging**: Change `launchVmArgs(jvm)` implementation in `lib/main.js` to be:
|
||||
```
|
||||
launchVmArgs(jvm) {
|
||||
return Promise.resolve([
|
||||
'-Xdebug',
|
||||
'-agentlib:jdwp=transport=dt_socket,server=y,address=7999,suspend=n',
|
||||
'-Dorg.slf4j.simpleLogger.logFile=boot-properties.log',
|
||||
'-Dorg.slf4j.simpleLogger.defaultLogLevel=debug',
|
||||
]);
|
||||
}
|
||||
|
||||
```
|
||||
(Then setup the remote debugger from your IDE on the same port `7999`)
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
|
||||
The content of this package is provided under the EPL v1.0 license (see below).
|
||||
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-spring-boot/open-source-licenses.txt
|
||||
|
||||
===
|
||||
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
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.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
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.
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"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.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
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;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
|
||||
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.
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained within the Program.
|
||||
|
||||
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.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
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.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
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.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -1,128 +0,0 @@
|
||||
# Atom package for Spring Boot projects
|
||||
|
||||
[](https://travis-ci.org/spring-projects/atom-spring-boot) [](https://ci.appveyor.com/project/spring-projects/atom-spring-boot/branch/master) [](https://david-dm.org/spring-projects/atom-spring-boot)
|
||||
|
||||
Atom package and Language Server providing support for working with Spring Boot apps.
|
||||
|
||||
# Java Support
|
||||
|
||||
## Usage:
|
||||
|
||||
The extension will automatically activate when you edit files with the following
|
||||
name patterns:
|
||||
|
||||
- `*.java` => activates support for Java files
|
||||
|
||||
If you find an issue please raise it here: https://github.com/spring-projects/sts4/issues
|
||||
|
||||
## Functionality
|
||||
|
||||
### Navigating the source code - Go to symbol in file
|
||||
Easy navigation to Spring-specific elements of your source code. Open `.java` file then open Atom's `Outline View` - View -> Toggle Outline View
|
||||
|
||||
![Go to Symbol in file][screenshot-navigation]
|
||||
|
||||
### Live application information hovers
|
||||
Show information from running Spring Boot apps on your machine in the source code. This allows you to run the Spring Boot app locally on your machine and visualizes information from those running apps in your source code.
|
||||
|
||||
#### Visualization
|
||||
Once the tooling detects a running Spring Boot app on your local machine, it automatically shows hints in the source code where data from the running app can be inspected. Then hovering over that area (with the mouse pointer), the data from the running app shows up.
|
||||
|
||||
If there are multiple instances of the app running on your machine, the live data from all those instances will show up in the hover information.
|
||||
|
||||
![live data from running apps as hover on source code][screenshot-live-hovers]
|
||||
|
||||
#### Examples
|
||||
* `@Profile`: shows information about the active profiles on the running apps
|
||||
* `@Component`, `@Bean`, `@Autowired`: shows detailed information about the beans and their wiring from the live app
|
||||
* `@ContidionalOn...`: shows information about the conditions and their evaluation at runtime
|
||||
* `RequestMapping`: show information about the request mapping for running apps
|
||||
|
||||
#### Configuration
|
||||
You can enable/disable this feature via workspace preferences by adding the following:
|
||||
```
|
||||
"boot-java":
|
||||
"boot-hints":
|
||||
on: false
|
||||
|
||||
```
|
||||
|
||||
### Smart code completions
|
||||
Additional code completions for Spring-specific annotations
|
||||
|
||||
![Smart code completion for boot properties][screenshot-code-completion]
|
||||
|
||||
#### Examples
|
||||
* `@Value`: code completion for Spring Boot property keys
|
||||
* `@Scope`: code completion for standard scope names
|
||||
|
||||
# Properties Support
|
||||
|
||||
Atom package and Language Server providing support for working with Spring Boot
|
||||
`application.properties` and `application.yml` files.
|
||||
|
||||
## Usage:
|
||||
|
||||
The package will automatically activate when you edit files with the following
|
||||
name patterns:
|
||||
|
||||
- `application.properties` => activates support for Spring Boot properties in `.properties`format.
|
||||
- `application.yml` => activates support for Spring Boot properties in `.yml` format.
|
||||
|
||||
For all other files select grammar to be `Spring-Boot-Properties` for `properties` file format or `Spring-Boot-Properties-YAML` for 'YAML' file format
|
||||
|
||||
## Functionality
|
||||
|
||||
This package analyzes your project's classpath and parses and indexes any [Spring Boot
|
||||
Properties Metadata](https://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html) it finds. Both Maven and Gradle projects are supported.
|
||||
|
||||
The data in the index is used to provide validation, code completions and information
|
||||
hovers while editing Spring Boot Properties in either `.properties` or `.yml` format.
|
||||
|
||||
### Validation
|
||||
|
||||
Property keys as well as property values are validated. Property keys are validated for being known properties and values are checked for being of expected type as well being a valid value
|
||||
|
||||
![application-yaml-validation][yaml-validation]
|
||||
![application-properties-validation][properties-validation]
|
||||
|
||||
### Code Completions
|
||||
|
||||
Both YAML and Properties formats have support for Content Assist on property keys and values helping to write valid Spring Boot configuration files right from the start.
|
||||
|
||||
![application-yaml-completions][yaml-completion]
|
||||
|
||||
![application-properties-completions][properties-completion]
|
||||
|
||||
### Information Hovers
|
||||
|
||||
Hovering over property keys provide valuable documentation about the purpose of the property and expected type for its value in a small popup window.
|
||||
|
||||
![application-yaml-hovers][yaml-hovers]
|
||||
|
||||
# Issues and Feature Requests
|
||||
|
||||
Please report bugs, issues and feature requests on the [Github STS4 issue tracker](https://github.com/spring-projects/sts4/issues).
|
||||
|
||||
|
||||
# Releases:
|
||||
|
||||
Released versions of this package can be installed directly from the Atom package installer.
|
||||
|
||||
There are also development snapshots available with the latest fixes and improvements from release git repository: https://github.com/spring-projects/atom-spring-boot
|
||||
1. Clone the release repository for Atom package if not already cloned and navigate to `atom-spring-boot` folder
|
||||
2. Run `git clean -fxd` - necessary to delete out of date LS JAR file and dependency packages
|
||||
3. Run `git pull` - get the latest changes
|
||||
3. Run `npm install` - Install latest dependecnies and download proper LS JAR
|
||||
4. Run `apm link .` - Link the package to Atom
|
||||
5. Either start Atom or Reload Window in Atom
|
||||
|
||||
[screenshot-live-hovers]: https://raw.githubusercontent.com/spring-projects/sts4/4167094ab94a05657fe4b495770bf93ce3a1585f/atom-extensions/atom-spring-boot/readme-imgs/screenshot-live-hovers.png
|
||||
[screenshot-code-completion]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/screenshot-code-completion.png
|
||||
[screenshot-navigation]: https://raw.githubusercontent.com/spring-projects/sts4/4167094ab94a05657fe4b495770bf93ce3a1585f/atom-extensions/atom-spring-boot/readme-imgs/screenshot-navigation-in-file.png
|
||||
|
||||
[yaml-completion]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/yaml-completion.png
|
||||
[properties-completion]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/properties-completion.png
|
||||
[yaml-validation]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/yaml-validation.png
|
||||
[properties-validation]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/properties-validation.png
|
||||
[yaml-hovers]: https://raw.githubusercontent.com/spring-projects/sts4/874c74f3bae0dd08250aeceb46ae5cc2ca720096/atom-extensions/atom-spring-boot/readme-imgs/yaml-hovers.png
|
||||
@@ -1,27 +0,0 @@
|
||||
version: "{build}"
|
||||
|
||||
platform: x64
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
APM_TEST_PACKAGES:
|
||||
|
||||
matrix:
|
||||
- ATOM_CHANNEL: stable
|
||||
- ATOM_CHANNEL: beta
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 6
|
||||
|
||||
build_script:
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
|
||||
|
||||
test: off
|
||||
deploy: off
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
workdir=`pwd`
|
||||
|
||||
# Cleanup old jars
|
||||
rm -rf server
|
||||
mkdir server
|
||||
|
||||
# Build fat jar and copy it over into
|
||||
cd ../../headless-services/spring-boot-language-server
|
||||
./build.sh
|
||||
cp -f target/spring-boot-language-server-*-exec.jar $workdir/server/spring-boot-language-server.jar
|
||||
|
||||
# Installs atom-commons from source rather than npm registry
|
||||
# cd ../atom-commons
|
||||
# npm install
|
||||
|
||||
cd $workdir
|
||||
npm install
|
||||
npm run build
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"max_line_length": {
|
||||
"level": "ignore"
|
||||
},
|
||||
"no_empty_param_list": {
|
||||
"level": "error"
|
||||
},
|
||||
"arrow_spacing": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_interpolation_in_single_quotes": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_debugger": {
|
||||
"level": "error"
|
||||
},
|
||||
"prefer_english_operator": {
|
||||
"level": "error"
|
||||
},
|
||||
"colon_assignment_spacing": {
|
||||
"spacing": {
|
||||
"left": 0,
|
||||
"right": 1
|
||||
},
|
||||
"level": "error"
|
||||
},
|
||||
"braces_spacing": {
|
||||
"spaces": 0,
|
||||
"level": "error"
|
||||
},
|
||||
"spacing_after_comma": {
|
||||
"level": "error"
|
||||
},
|
||||
"no_stand_alone_at": {
|
||||
"level": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
'scopeName': 'source.boot-properties-yaml'
|
||||
'name': 'Spring-Boot-Properties-YAML'
|
||||
'fileTypes': [
|
||||
'application.yml',
|
||||
'application.yaml'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.yaml' }
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
'scopeName': 'source.boot-properties'
|
||||
'name': 'Spring-Boot-Properties'
|
||||
'fileTypes': [
|
||||
'application.properties'
|
||||
]
|
||||
'patterns': [
|
||||
{ 'include': 'source.java-properties' }
|
||||
]
|
||||
@@ -1,60 +0,0 @@
|
||||
import {StsAdapter, HighlightParams} from '@pivotal-tools/atom-languageclient-commons';
|
||||
import {Convert} from 'atom-languageclient';
|
||||
import { Range, CodeLens } from 'vscode-languageserver-protocol';
|
||||
import {TextEditor, DecorationOptions } from 'atom';
|
||||
|
||||
const BOOT_HINT_GUTTER_NAME = 'boot-hint-gutter';
|
||||
|
||||
const DECORATION_OPTIONS: DecorationOptions = {
|
||||
type: 'highlight',
|
||||
class: 'boot-hint',
|
||||
gutterName: BOOT_HINT_GUTTER_NAME
|
||||
};
|
||||
|
||||
export class BootStsAdapter extends StsAdapter {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
onHighlight(params: HighlightParams) {
|
||||
this.findEditors(params.doc.uri).forEach(editor => this.markHintsForEditor(editor, params.codeLenses));
|
||||
}
|
||||
|
||||
private markHintsForEditor(editor: TextEditor, codeLenses: CodeLens[]) {
|
||||
editor.getDecorations(DECORATION_OPTIONS).map(decoration => decoration.getMarker()).forEach(m => m.destroy());
|
||||
const ranges = codeLenses.map(cl => cl.range);
|
||||
if (Array.isArray(ranges)) {
|
||||
ranges.forEach(range => this.createHintMarker(editor, range));
|
||||
}
|
||||
// const gutter = editor.gutterWithName(BOOT_HINT_GUTTER_NAME);
|
||||
// if (gutter) {
|
||||
// if (!ranges || !ranges.length) {
|
||||
// gutter.hide();
|
||||
// } else if (!gutter.isVisible()) {
|
||||
// gutter.show();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private createHintMarker(editor: TextEditor, range: Range) {
|
||||
// Create marker model
|
||||
const marker = editor.markBufferRange(Convert.lsRangeToAtomRange(range));
|
||||
|
||||
// Marker around the text in the editor
|
||||
editor.decorateMarker(marker, DECORATION_OPTIONS);
|
||||
|
||||
// Marker in the diagnostic gutter
|
||||
// let gutter = editor.gutterWithName(BOOT_HINT_GUTTER_NAME);
|
||||
// if (!gutter) {
|
||||
// gutter = editor.addGutter({
|
||||
// name: BOOT_HINT_GUTTER_NAME,
|
||||
// visible: false,
|
||||
// });
|
||||
// }
|
||||
// const iconElement = document.createElement('span');
|
||||
// iconElement.setAttribute('class', 'gutter-boot-hint');
|
||||
// gutter.decorateMarker(marker, {item: iconElement});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import {SpringBootLanguageClient} from './spring-boot-language-client';
|
||||
|
||||
module.exports = new SpringBootLanguageClient();
|
||||
@@ -1,83 +0,0 @@
|
||||
import * as path from 'path';
|
||||
import {JavaProcessLanguageClient, JavaOptions} from '@pivotal-tools/atom-languageclient-commons';
|
||||
import {BootStsAdapter} from './boot-sts-adapter';
|
||||
import {ActiveServer} from 'atom-languageclient';
|
||||
import {JVM} from '@pivotal-tools/jvm-launch-utils';
|
||||
|
||||
export class SpringBootLanguageClient extends JavaProcessLanguageClient {
|
||||
|
||||
constructor() {
|
||||
//noinspection JSAnnotator
|
||||
super(
|
||||
path.join(__dirname, '..', 'server'),
|
||||
'spring-boot-language-server.jar'
|
||||
);
|
||||
// this.DEBUG = true;
|
||||
}
|
||||
|
||||
protected postInitialization(server: ActiveServer) {
|
||||
super.postInitialization(server);
|
||||
this.sendConfig(server);
|
||||
(<any>this)._disposable.add(atom.config.observe('spring-boot', () => this.sendConfig(server)));
|
||||
}
|
||||
|
||||
private sendConfig(server: ActiveServer) {
|
||||
server.connection.didChangeConfiguration({ settings: {'boot-java': atom.config.get('spring-boot') }});
|
||||
}
|
||||
|
||||
getGrammarScopes() {
|
||||
return ['source.java', 'source.boot-properties', 'source.boot-properties-yaml', 'text.xml'];
|
||||
}
|
||||
|
||||
getLanguageName() {
|
||||
return 'spring-boot';
|
||||
}
|
||||
|
||||
getServerName() {
|
||||
return 'Spring Boot';
|
||||
}
|
||||
|
||||
activate() {
|
||||
require('atom-package-deps')
|
||||
.install('spring-boot')
|
||||
.then(() => console.debug('All dependencies installed, good to go'));
|
||||
super.activate();
|
||||
}
|
||||
|
||||
preferJdk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
launchVmArgs(jvm: JVM) {
|
||||
let vmargs = [
|
||||
// '-Xdebug',
|
||||
// '-agentlib:jdwp=transport=dt_socket,server=y,address=7999,suspend=y',
|
||||
'-Dorg.slf4j.simpleLogger.logFile=boot-java.log'
|
||||
];
|
||||
if (!jvm.isJdk()) {
|
||||
this.showErrorMessage(
|
||||
'"Boot-Java" Package Functionality Limited',
|
||||
'JAVA_HOME or PATH environment variable seems to point to a JRE. A JDK is required, hence Boot Hints are unavailable.'
|
||||
);
|
||||
}
|
||||
return Promise.resolve(vmargs);
|
||||
}
|
||||
|
||||
createStsAdapter() {
|
||||
return new BootStsAdapter();
|
||||
}
|
||||
|
||||
filterChangeWatchedFiles(filePath: string) {
|
||||
return filePath.endsWith('.gradle') || filePath.endsWith(path.join('', 'pom.xml'));
|
||||
}
|
||||
|
||||
getJavaOptions(): JavaOptions {
|
||||
const home = atom.config.get('spring-boot.java.home');
|
||||
const vmargs = atom.config.get('spring-boot.java.vmargs');
|
||||
return {
|
||||
home: typeof home === 'string' ? home : undefined,
|
||||
vmargs: Array.isArray(vmargs) ? vmargs : undefined
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
work-in-progress
|
||||
@@ -1,163 +0,0 @@
|
||||
{
|
||||
"name": "spring-boot",
|
||||
"version": "1.20.0",
|
||||
"description": "Spring Boot support for Atom",
|
||||
"repository": "https://github.com/spring-projects/atom-spring-boot",
|
||||
"icon": "icon.png",
|
||||
"license": "EPL-1.0",
|
||||
"engines": {
|
||||
"atom": ">=1.24.0"
|
||||
},
|
||||
"main": "./build/main",
|
||||
"types": "./build/main.d.ts",
|
||||
"files": [
|
||||
"grammars/",
|
||||
"settings/",
|
||||
"build/",
|
||||
"lib/",
|
||||
"server/",
|
||||
"styles/",
|
||||
"properties.json"
|
||||
],
|
||||
"configSchema": {
|
||||
"boot-hints.on": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable/Disable Spring running Boot application live hints decorators in the source code"
|
||||
},
|
||||
"scan-java-test-sources.on": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable/Disable Java test sources files scanning"
|
||||
},
|
||||
"support-spring-xml-config.on": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable/Disable Support for Spring XML Config files"
|
||||
},
|
||||
"support-spring-xml-config.hyperlinks": {
|
||||
"type": "boolean",
|
||||
"description": "Enable/Disable Hyperlinks in Spring XML Config file editor",
|
||||
"default": true
|
||||
},
|
||||
"support-spring-xml-config.content-assist": {
|
||||
"type": "boolean",
|
||||
"description": "Enable/Disable Content Assist in Spring XML Config file editor",
|
||||
"default": true
|
||||
},
|
||||
"support-spring-xml-config.scan-folders-globs": {
|
||||
"type": "string",
|
||||
"default": "**/src/main/**",
|
||||
"description": "Scan Spring XML in folders"
|
||||
},
|
||||
"change-detection.on": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable/Disable detecting changes of running Spring Boot applications"
|
||||
},
|
||||
"remote-apps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"jmxurl": {
|
||||
"type": "string"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Array of jmx urls pointing to remote spring boot applications to poll for live hover information. A typical url looks something like this: `service:jmx:rmi://localhost:9111/jndi/rmi://localhost:9111/jmxrmi`"
|
||||
},
|
||||
"java": {
|
||||
"type": "object",
|
||||
"description": "JVM settings for starting the Language Server",
|
||||
"properties": {
|
||||
"vmargs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Custom VM arguments to start the Language Server"
|
||||
},
|
||||
"home": {
|
||||
"type": "string",
|
||||
"description": "Java home folder to use to start the Language Server"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@pivotal-tools/atom-languageclient-commons": "0.0.15",
|
||||
"vscode-languageserver-protocol": "3.12.0",
|
||||
"atom-package-deps": "^4.6.0",
|
||||
"download": "^6.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.7.2",
|
||||
"tslint": "^5.9.1",
|
||||
"coffeelint": "^1.10.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf build",
|
||||
"compile": "tsc",
|
||||
"build": "npm run clean && npm run compile ",
|
||||
"watch": "tsc -watch",
|
||||
"lint": "tslint -c tslint.json 'lib/**/*.ts'",
|
||||
"postinstall": "node script.js"
|
||||
},
|
||||
"package-deps": [
|
||||
"atom-ide-ui",
|
||||
"ide-java"
|
||||
],
|
||||
"consumedServices": {
|
||||
"linter-indie": {
|
||||
"versions": {
|
||||
"2.0.0": "consumeLinterV2"
|
||||
}
|
||||
},
|
||||
"datatip": {
|
||||
"versions": {
|
||||
"0.1.0": "consumeDatatip"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providedServices": {
|
||||
"autocomplete.provider": {
|
||||
"versions": {
|
||||
"2.0.0": "provideAutocomplete"
|
||||
}
|
||||
},
|
||||
"code-actions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeActions"
|
||||
}
|
||||
},
|
||||
"code-format.range": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeFormat"
|
||||
}
|
||||
},
|
||||
"code-highlight": {
|
||||
"versions": {
|
||||
"0.1.0": "provideCodeHighlight"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"versions": {
|
||||
"0.1.0": "provideDefinitions"
|
||||
}
|
||||
},
|
||||
"find-references": {
|
||||
"versions": {
|
||||
"0.1.0": "provideFindReferences"
|
||||
}
|
||||
},
|
||||
"outline-view": {
|
||||
"versions": {
|
||||
"0.1.0": "provideOutlines"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"jarUrl": "https://s3.amazonaws.com/dist.springsource.com/release/STS4/fatjars/spring-boot-language-server-1.8.0-201906191802-exec.jar"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 24 KiB |