├── .babelrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── .travis.yml ├── .vscode ├── settings.json └── tasks.json ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── appveyor.yml ├── build-package.sh ├── disable-other-packages.js ├── dist ├── atom │ ├── dock.js │ ├── feature-buttons.js │ ├── framework-selector.js │ ├── generator-aspnet.js │ ├── menu.js │ ├── server-information.js │ ├── settings-button.js │ ├── solution-information.js │ ├── status-bar.js │ └── update-projects.js ├── features │ ├── code-action.js │ ├── code-check.js │ ├── code-format.js │ ├── code-lens.js │ ├── find-symbols.js │ ├── find-usages.js │ ├── go-to-definition.js │ ├── highlight-v1.9.js │ ├── intellisense.js │ ├── lookup.js │ ├── navigate-up-down.js │ ├── notification-handler.js │ ├── package-restore.js │ ├── project-lock.js │ ├── reload-workspace.js │ ├── rename.js │ ├── run-tests.js │ └── signature-help.js ├── omnisharp-atom.js ├── omnisharp.js ├── operators │ └── bufferFor.js ├── server │ ├── atom-projects.js │ ├── composite-solution.js │ ├── metadata-editor.js │ ├── omni.js │ ├── omnisharp-configuration.js │ ├── omnisharp-text-editor.js │ ├── project-view-model.js │ ├── solution-manager.js │ ├── solution.js │ └── view-model.js ├── services │ ├── ansi-to-html.js │ ├── apply-changes.js │ ├── completion-provider.js │ ├── framework-provider.js │ ├── linter-provider.js │ ├── omni-select-list-view.js │ └── project-provider.js └── views │ ├── build-output-pane-view.js │ ├── code-actions-view.js │ ├── codecheck-output-pane-view.js │ ├── command-output-window.js │ ├── dock-window.js │ ├── find-pane-view.js │ ├── find-symbols-view.js │ ├── framework-selector-view.js │ ├── generic-list-view.js │ ├── highlight-element.js │ ├── omni-output-pane-view.js │ ├── output-component.js │ ├── output-message-element.js │ ├── rename-view.js │ ├── signature-help-view.js │ ├── solution-status-view.js │ ├── status-bar-view.js │ ├── test-results-window.js │ ├── text-editor-pool.js │ └── tooltip-view.js ├── gulpfile.js ├── index.js ├── keymaps ├── omnisharp-atom.cson ├── omnisharp-code-actions.cson └── omnisharp-file-new.cson ├── lib ├── atom │ ├── dock.ts │ ├── feature-buttons.ts │ ├── framework-selector.ts │ ├── generator-aspnet.ts │ ├── menu.ts │ ├── server-information.ts │ ├── settings-button.ts │ ├── solution-information.ts │ ├── status-bar.ts │ └── update-projects.ts ├── features │ ├── code-action.ts │ ├── code-check.ts │ ├── code-format.ts │ ├── code-lens.ts │ ├── find-symbols.ts │ ├── find-usages.ts │ ├── go-to-definition.ts │ ├── highlight-v1.9.ts │ ├── intellisense.ts │ ├── lookup.ts │ ├── navigate-up-down.ts │ ├── notification-handler.ts │ ├── package-restore.ts │ ├── project-lock.ts │ ├── reload-workspace.ts │ ├── rename.ts │ ├── run-tests.ts │ └── signature-help.ts ├── omnisharp-atom.ts ├── omnisharp.ts ├── operators │ └── bufferFor.ts ├── server │ ├── atom-projects.ts │ ├── composite-solution.ts │ ├── metadata-editor.ts │ ├── omni.ts │ ├── omnisharp-configuration.ts │ ├── omnisharp-text-editor.ts │ ├── project-view-model.ts │ ├── solution-manager.ts │ ├── solution.ts │ └── view-model.ts ├── services │ ├── ansi-to-html.ts │ ├── apply-changes.ts │ ├── completion-provider.ts │ ├── framework-provider.ts │ ├── linter-provider.ts │ ├── omni-select-list-view.ts │ └── project-provider.ts ├── typings.d.ts └── views │ ├── build-output-pane-view.ts │ ├── code-actions-view.ts │ ├── codecheck-output-pane-view.ts │ ├── command-output-window.ts │ ├── dock-window.ts │ ├── find-pane-view.ts │ ├── find-symbols-view.ts │ ├── framework-selector-view.ts │ ├── generic-list-view.ts │ ├── highlight-element.ts │ ├── omni-output-pane-view.ts │ ├── output-component.ts │ ├── output-message-element.ts │ ├── rename-view.ts │ ├── signature-help-view.ts │ ├── solution-status-view.ts │ ├── status-bar-view.ts │ ├── test-results-window.ts │ ├── text-editor-pool.ts │ └── tooltip-view.ts ├── menus ├── atom-sharper.cson └── omnisharp-menu.json ├── package.json ├── restore-other-packages.js ├── spec ├── atom │ ├── dock-spec.ts │ ├── framework-selector-spec.ts │ ├── solution-information-spec.ts │ ├── status-bar-spec.ts │ └── update-project-spec.ts ├── features │ ├── code-format-spec.ts │ ├── code-lens-spec.ts │ ├── find-symbols-spec.ts │ ├── find-usages-spec.ts │ ├── go-to-definition-spec.ts │ ├── highlight-spec.ts │ ├── intellisense-spec.ts │ ├── log-spec.ts │ ├── lookup-spec.ts │ ├── navigate-up-down-spec.ts │ ├── package-restore-spec.ts │ ├── project-lock-spec.ts │ ├── rename-spec.ts │ ├── run-tests-spec.ts │ ├── server-information-spec.ts │ └── signature-help-spec.ts ├── fixtures │ ├── commands │ │ ├── project.json │ │ └── project.lock.json │ ├── simple │ │ ├── code-format │ │ │ └── UnformattedClass.cs │ │ ├── code-lens │ │ │ ├── CodeLens.cs │ │ │ └── CodeLens2.cs │ │ ├── project.json │ │ ├── rename │ │ │ └── ClassToRename.cs │ │ └── syntax-errors │ │ │ ├── MissingSemiColon.cs │ │ │ └── NeverEndingClass.cs │ ├── simple2 │ │ ├── code-format │ │ │ └── UnformattedClass.cs │ │ ├── project.json │ │ └── syntax-errors │ │ │ ├── MissingSemiColon.cs │ │ │ └── NeverEndingClass.cs │ ├── single-cs │ │ └── class.cs │ └── two-solution │ │ ├── class.cs │ │ ├── something.sln │ │ └── somethingelse.sln ├── omnisharp-atom-spec.ts ├── server │ └── solution-manager-spec.ts ├── test-helpers.ts ├── test-runner.ts └── tsd.d.ts ├── styles ├── card.less ├── codeactions-overlay.less ├── font-awesome.less ├── icons │ ├── autocomplete_class.png │ ├── autocomplete_class@2x.png │ ├── autocomplete_class@3x.png │ ├── autocomplete_class_friend.png │ ├── autocomplete_class_friend@2x.png │ ├── autocomplete_class_friend@3x.png │ ├── autocomplete_class_private.png │ ├── autocomplete_class_private@2x.png │ ├── autocomplete_class_private@3x.png │ ├── autocomplete_class_protected.png │ ├── autocomplete_class_protected@2x.png │ ├── autocomplete_class_protected@3x.png │ ├── autocomplete_class_sealed.png │ ├── autocomplete_class_sealed@2x.png │ ├── autocomplete_class_sealed@3x.png │ ├── autocomplete_delegate.png │ ├── autocomplete_delegate@2x.png │ ├── autocomplete_delegate@3x.png │ ├── autocomplete_enum.png │ ├── autocomplete_enum@2x.png │ ├── autocomplete_enum@3x.png │ ├── autocomplete_enum_friend.png │ ├── autocomplete_enum_friend@2x.png │ ├── autocomplete_enum_friend@3x.png │ ├── autocomplete_enum_private.png │ ├── autocomplete_enum_private@2x.png │ ├── autocomplete_enum_private@3x.png │ ├── autocomplete_enum_protected.png │ ├── autocomplete_enum_protected@2x.png │ ├── autocomplete_enum_protected@3x.png │ ├── autocomplete_enum_sealed.png │ ├── autocomplete_enum_sealed@2x.png │ ├── autocomplete_enum_sealed@3x.png │ ├── autocomplete_enumitem.png │ ├── autocomplete_enumitem@2x.png │ ├── autocomplete_enumitem@3x.png │ ├── autocomplete_enumitem_friend.png │ ├── autocomplete_enumitem_friend@2x.png │ ├── autocomplete_enumitem_friend@3x.png │ ├── autocomplete_enumitem_private.png │ ├── autocomplete_enumitem_private@2x.png │ ├── autocomplete_enumitem_private@3x.png │ ├── autocomplete_enumitem_protected.png │ ├── autocomplete_enumitem_protected@2x.png │ ├── autocomplete_enumitem_protected@3x.png │ ├── autocomplete_enumitem_sealed.png │ ├── autocomplete_enumitem_sealed@2x.png │ ├── autocomplete_enumitem_sealed@3x.png │ ├── autocomplete_event.png │ ├── autocomplete_event@2x.png │ ├── autocomplete_event@3x.png │ ├── autocomplete_event_friend.png │ ├── autocomplete_event_friend@2x.png │ ├── autocomplete_event_friend@3x.png │ ├── autocomplete_event_private.png │ ├── autocomplete_event_private@2x.png │ ├── autocomplete_event_private@3x.png │ ├── autocomplete_event_protected.png │ ├── autocomplete_event_protected@2x.png │ ├── autocomplete_event_protected@3x.png │ ├── autocomplete_event_sealed.png │ ├── autocomplete_event_sealed@2x.png │ ├── autocomplete_event_sealed@3x.png │ ├── autocomplete_field.png │ ├── autocomplete_field@2x.png │ ├── autocomplete_field@3x.png │ ├── autocomplete_field_friend.png │ ├── autocomplete_field_friend@2x.png │ ├── autocomplete_field_friend@3x.png │ ├── autocomplete_field_private.png │ ├── autocomplete_field_private@2x.png │ ├── autocomplete_field_private@3x.png │ ├── autocomplete_interface.png │ ├── autocomplete_interface@2x.png │ ├── autocomplete_interface@3x.png │ ├── autocomplete_keyword.png │ ├── autocomplete_keyword@2x.png │ ├── autocomplete_keyword@3x.png │ ├── autocomplete_local@3x.png │ ├── autocomplete_method.png │ ├── autocomplete_method@2x.png │ ├── autocomplete_method@3x.png │ ├── autocomplete_method_friend.png │ ├── autocomplete_method_friend@2x.png │ ├── autocomplete_method_friend@3x.png │ ├── autocomplete_method_private.png │ ├── autocomplete_method_private@2x.png │ ├── autocomplete_method_private@3x.png │ ├── autocomplete_method_protected.png │ ├── autocomplete_method_protected@2x.png │ ├── autocomplete_method_protected@3x.png │ ├── autocomplete_method_sealed.png │ ├── autocomplete_method_sealed@2x.png │ ├── autocomplete_method_sealed@3x.png │ ├── autocomplete_namespace.png │ ├── autocomplete_namespace@2x.png │ ├── autocomplete_namespace@3x.png │ ├── autocomplete_parameter@3x.png │ ├── autocomplete_property.png │ ├── autocomplete_property@2x.png │ ├── autocomplete_property@3x.png │ ├── autocomplete_property_friend.png │ ├── autocomplete_property_friend@2x.png │ ├── autocomplete_property_friend@3x.png │ ├── autocomplete_property_private.png │ ├── autocomplete_property_private@2x.png │ ├── autocomplete_property_private@3x.png │ ├── autocomplete_struct.png │ ├── autocomplete_struct@2x.png │ ├── autocomplete_struct@3x.png │ ├── autocomplete_struct_friend.png │ ├── autocomplete_struct_friend@2x.png │ ├── autocomplete_struct_friend@3x.png │ ├── autocomplete_struct_private.png │ ├── autocomplete_struct_private@2x.png │ ├── autocomplete_struct_private@3x.png │ ├── autocomplete_struct_protected.png │ ├── autocomplete_struct_protected@2x.png │ ├── autocomplete_struct_protected@3x.png │ ├── autocomplete_struct_sealed.png │ ├── autocomplete_struct_sealed@2x.png │ ├── autocomplete_struct_sealed@3x.png │ ├── codecheck-error.png │ ├── codecheck-error@2x.png │ ├── codecheck-warning.png │ └── codecheck-warning@2x.png ├── light-bulb.png ├── omnisharp-atom.less ├── wiggle-blue.png ├── wiggle-green.png └── wiggle.png ├── tsconfig.json ├── tsd.d.ts ├── tslint.json ├── tslint.types.json ├── typings.json └── typingsTemp ├── atom-keymap └── atom-keymap.d.ts ├── atom-space-pen-views └── atom-space-pen-views.d.ts ├── atom └── atom.d.ts ├── event-kit └── event-kit.d.ts ├── first-mate └── first-mate.d.ts ├── linter └── linter.d.ts ├── pathwatcher └── pathwatcher.d.ts ├── property-accessors └── property-accessors.d.ts ├── scandal └── scandal.d.ts ├── scoped-property-store └── scoped-property-store.d.ts ├── serializable └── serializable.d.ts ├── space-pen └── space-pen.d.ts ├── status-bar └── status-bar.d.ts └── text-buffer └── text-buffer.d.ts /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-3"], 3 | "plugins": ["transform-es2015-modules-commonjs"] 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 4 9 | insert_final_newline = true 10 | charset = utf-8 11 | 12 | [*.json] 13 | indent_size = 2 14 | trim_trailing_whitespace = true 15 | 16 | [*.{ts,js}] 17 | trim_trailing_whitespace = true 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | typings 5 | lib/**/*.js 6 | lib/**/*.js.map 7 | spec/**/*.js 8 | spec/**/*.js.map 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | server 5 | typings 6 | lib 7 | spec 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | sudo: required 3 | dist: trusty 4 | notifications: 5 | email: 6 | on_success: change 7 | on_failure: change 8 | script: 9 | - travis_retry ./build-package.sh 10 | os: 11 | - linux 12 | - osx 13 | env: 14 | global: 15 | - APM_TEST_PACKAGES='atom-yeoman linter json-schema advanced-open-file' 16 | matrix: 17 | - ATOM_CHANNEL=stable 18 | - ATOM_CHANNEL=beta 19 | addons: 20 | apt: 21 | packages: 22 | - build-essential 23 | - git 24 | - libgnome-keyring-dev 25 | - fakeroot 26 | - libstdc++6 27 | notifications: 28 | slack: omnisharp:UN1OlhsHD8hUXy8SEr1L6Zar 29 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "**/.git": true, 5 | "**/node_modules": true, 6 | "**/**.js.map": true, 7 | "**/lib/**/*.js": true, 8 | "**/spec/**/*.js": true, 9 | "**/.DS_Store": true 10 | } 11 | , 12 | "typescript.tsdk": "./node_modules/typescript/lib" 13 | } 14 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "0.1.0", 5 | "command": "npm", 6 | "isShellCommand": true, 7 | "args": [ 8 | "run" 9 | ], 10 | "tasks": [ 11 | { 12 | "taskName": "tsc:w", 13 | "isBuildCommand": true, 14 | "isWatching": true, 15 | "problemMatcher": "$tsc-watch", 16 | "showOutput": "always" 17 | }, 18 | { 19 | "taskName": "test", 20 | "isTestCommand": true, 21 | "problemMatcher": "$eslint-stylish", 22 | "showOutput": "always" 23 | }, 24 | { 25 | "taskName": "lint", 26 | "problemMatcher": "$eslint-compact", 27 | "showOutput": "always" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.0 - First Release 2 | * Every feature added 3 | * Every bug fixed 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWAR IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # omnisharp-atom package [![build status](https://travis-ci.org/OmniSharp/omnisharp-atom.svg)](https://travis-ci.org/OmniSharp/omnisharp-atom/) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/OmniSharp/omnisharp-atom?branch=master&svg=true)](https://ci.appveyor.com/project/nosami/omnisharp-atom) 2 | 3 | ###(The hackable IDE) 4 | 5 | ![omnisharp-atom](https://cloud.githubusercontent.com/assets/667194/7758038/8ad7bdfa-fffe-11e4-98be-74e0c660aabd.gif) 6 | 7 | ## Runtime prerequisites 8 | 9 | Please ensure you've got [Mono](http://www.mono-project.com/) 4.0.1 or later installed if you're on OS X/Linux. Or .NET 4.5.1 on Windows. 10 | 11 | If you want to work on a DNX application then you will also need to have dnvm installed. Please refer to the instructions detailed in the [aspnet/home](https://github.com/aspnet/home/#minimum-requirements) repository. 12 | ## Installation 13 | From the packages settings inside Atom: 14 | 15 | * install omnisharp-atom 16 | 17 | From the command-line: 18 | 19 | ``` 20 | apm install omnisharp-atom 21 | ``` 22 | 23 | ## To use 24 | 25 | - Open a c# file 26 | 27 | - or open a scriptcs file 28 | 29 | When the flame icon in the bottom left corner turns green, the server has started! 30 | 31 | # Features 32 | 33 | - `F12` or `cmd-d` Go to definition - can also ctrl-click or cmd-click 34 | `shift-alt-t` or `ctrl-,` Find type 35 | - `ctrl-F12` Go to implementation 36 | - `shift-F12` Find usages 37 | - `F8, shift-F8` Go to next/previous usage 38 | - `ctrl-k, ctrl-d` Format document 39 | - `ctrl-k ctrl-c` Comment selection 40 | - `f2` Rename 41 | - `ctrl-alt-down` Navigate downwards through methods 42 | - `ctrl-alt-up` Navigate upwards through methods 43 | - Completions appear as you type. To select an item, press Return or the TAB key. 44 | - Type lookup on mouse over or from cursor (`f1`). 45 | - Editor adornments (squigglies) appear for errors and code hints as you type. 46 | - Automatic Package restore for DNX applications when you save `project.json` files 47 | - Enjoy! 48 | 49 | ## Test Runner 50 | 51 | - ctrl-r ctrl-a Run all tests 52 | - ctrl-r ctrl-f Run all fixture tests 53 | - ctrl-r ctrl-t Run single test 54 | - ctrl-r ctrl-l Run last test 55 | 56 | # Wiki 57 | 58 | https://github.com/OmniSharp/omnisharp-atom/wiki 59 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | install: 6 | - appveyor DownloadFile https://atom.io/download/windows -FileName AtomSetup.exe 7 | - AtomSetup.exe /silent 8 | - set PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;c:\go\bin;%PATH% 9 | - ps: "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" 10 | - dnvm install 1.0.0-beta4 11 | - dnvm upgrade 12 | - apm install atom-yeoman 13 | - apm install linter 14 | - apm install json-schema 15 | - apm install advanced-open-file 16 | 17 | # to run your custom scripts instead of automatic MSBuild 18 | build_script: 19 | - cd %APPVEYOR_BUILD_FOLDER% 20 | - SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH% 21 | - apm clean 22 | - apm install 23 | - apm test 24 | 25 | test: off 26 | deploy: off 27 | -------------------------------------------------------------------------------- /build-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #!/bin/sh 3 | 4 | echo "Downloading latest Atom release..." 5 | ATOM_CHANNEL="${ATOM_CHANNEL:=stable}" 6 | 7 | if [ "$TRAVIS_OS_NAME" = "osx" ]; then 8 | curl -s -L "https://atom.io/download/mac?channel=$ATOM_CHANNEL" \ 9 | -H 'Accept: application/octet-stream' \ 10 | -o "atom.zip" 11 | mkdir atom 12 | unzip -q atom.zip -d atom 13 | if [ "$ATOM_CHANNEL" = "stable" ]; then 14 | export ATOM_APP_NAME="Atom.app" 15 | export ATOM_SCRIPT_NAME="atom.sh" 16 | export ATOM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh" 17 | else 18 | export ATOM_APP_NAME="Atom ${ATOM_CHANNEL}.app" 19 | export ATOM_SCRIPT_NAME="atom-${ATOM_CHANNEL}" 20 | export ATOM_SCRIPT_PATH="./atom-${ATOM_CHANNEL}" 21 | ln -s "./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh" "${ATOM_SCRIPT_PATH}" 22 | fi 23 | export PATH="$PWD/atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/bin:$PATH" 24 | export ATOM_PATH="./atom" 25 | export APM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/node_modules/.bin/apm" 26 | else 27 | curl -s -L "https://atom.io/download/deb?channel=$ATOM_CHANNEL" \ 28 | -H 'Accept: application/octet-stream' \ 29 | -o "atom.deb" 30 | /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 31 | export DISPLAY=":99" 32 | dpkg-deb -x atom.deb "$HOME/atom" 33 | if [ "$ATOM_CHANNEL" = "stable" ]; then 34 | export ATOM_SCRIPT_NAME="atom" 35 | export APM_SCRIPT_NAME="apm" 36 | else 37 | export ATOM_SCRIPT_NAME="atom-$ATOM_CHANNEL" 38 | export APM_SCRIPT_NAME="apm-$ATOM_CHANNEL" 39 | fi 40 | export ATOM_SCRIPT_PATH="$HOME/atom/usr/bin/$ATOM_SCRIPT_NAME" 41 | export APM_SCRIPT_PATH="$HOME/atom/usr/bin/$APM_SCRIPT_NAME" 42 | fi 43 | 44 | echo "Using Atom version:" 45 | "$ATOM_SCRIPT_PATH" -v 46 | echo "Using APM version:" 47 | "$APM_SCRIPT_PATH" -v 48 | 49 | echo "Downloading package dependencies..." 50 | "$APM_SCRIPT_PATH" clean 51 | "$APM_SCRIPT_PATH" install 52 | "$APM_SCRIPT_PATH" link 53 | 54 | TEST_PACKAGES="${APM_TEST_PACKAGES:=none}" 55 | 56 | if [ "$TEST_PACKAGES" != "none" ]; then 57 | echo "Installing atom package dependencies..." 58 | for pack in $TEST_PACKAGES ; do 59 | "$APM_SCRIPT_PATH" install $pack 60 | done 61 | fi 62 | 63 | echo "Running specs..." 64 | "$ATOM_SCRIPT_PATH" --test spec 65 | exit 66 | -------------------------------------------------------------------------------- /disable-other-packages.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var season = require('season'); 4 | var ATOM_HOME = path.join(process.env.HOME, '.atom'); 5 | 6 | if (fs.existsSync(path.join(ATOM_HOME, 'config.cson.bak'))) { 7 | throw new Error('backup exists, stopping, you might want to restore it!'); 8 | } 9 | 10 | var config = season.readFileSync(path.join(ATOM_HOME, 'config.cson')); 11 | // Store a backup 12 | season.writeFileSync(path.join(ATOM_HOME, 'config.cson.bak'), config); 13 | 14 | var disabledPackages = config['*'].core.disabledPackages; 15 | 16 | var requiredPackages = require('./package.json')['package-deps']; 17 | fs.readdirSync(path.join(ATOM_HOME, 'packages')).forEach(function(package) { 18 | if (requiredPackages.indexOf(package) === -1 && disabledPackages.indexOf(package) === -1 && package !== "atom-typescript" && package !== "omnisharp-atom") { 19 | disabledPackages.push(package); 20 | } 21 | }); 22 | 23 | season.writeFileSync(path.join(ATOM_HOME, 'config.cson'), config); 24 | -------------------------------------------------------------------------------- /dist/atom/menu.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.topMenu = undefined; 7 | 8 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 9 | 10 | var _fs = require('fs'); 11 | 12 | var _path = require('path'); 13 | 14 | var _tsDisposables = require('ts-disposables'); 15 | 16 | var _omni = require('../server/omni'); 17 | 18 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19 | 20 | var Menu = function () { 21 | function Menu() { 22 | _classCallCheck(this, Menu); 23 | 24 | this.required = false; 25 | this.title = 'Show OmniSharp Menu'; 26 | this.description = 'Shows the Omnisharp Menu at the top of the window.'; 27 | this.default = true; 28 | } 29 | 30 | _createClass(Menu, [{ 31 | key: 'activate', 32 | value: function activate() { 33 | var _this = this; 34 | 35 | this.disposable = new _tsDisposables.CompositeDisposable(); 36 | if (!this._json) { 37 | var menuJsonFile = (0, _path.join)(_omni.Omni.packageDir, 'omnisharp-atom/menus/omnisharp-menu.json'); 38 | this._json = JSON.parse((0, _fs.readFileSync)(menuJsonFile, 'utf8')).menu; 39 | } 40 | this.disposable.add(_omni.Omni.switchActiveSolution(function (solution, cd) { 41 | if (solution) { 42 | cd.add(atom.menu.add(_this._json)); 43 | } 44 | })); 45 | } 46 | }, { 47 | key: 'dispose', 48 | value: function dispose() { 49 | this.disposable.dispose(); 50 | } 51 | }]); 52 | 53 | return Menu; 54 | }(); 55 | 56 | var topMenu = exports.topMenu = new Menu(); 57 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9hdG9tL21lbnUudHMiXSwibmFtZXMiOlsiTWVudSIsInJlcXVpcmVkIiwidGl0bGUiLCJkZXNjcmlwdGlvbiIsImRlZmF1bHQiLCJkaXNwb3NhYmxlIiwiX2pzb24iLCJtZW51SnNvbkZpbGUiLCJwYWNrYWdlRGlyIiwiSlNPTiIsInBhcnNlIiwibWVudSIsImFkZCIsInN3aXRjaEFjdGl2ZVNvbHV0aW9uIiwic29sdXRpb24iLCJjZCIsImF0b20iLCJkaXNwb3NlIiwidG9wTWVudSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7O0FBQ0E7Ozs7SUFFQUEsSTtBQUFBLG9CQUFBO0FBQUE7O0FBc0JXLGFBQUFDLFFBQUEsR0FBVyxLQUFYO0FBQ0EsYUFBQUMsS0FBQSxHQUFRLHFCQUFSO0FBQ0EsYUFBQUMsV0FBQSxHQUFjLG9EQUFkO0FBQ0EsYUFBQUMsT0FBQSxHQUFVLElBQVY7QUFDVjs7OzttQ0F0QmtCO0FBQUE7O0FBQ1gsaUJBQUtDLFVBQUwsR0FBa0Isd0NBQWxCO0FBQ0EsZ0JBQUksQ0FBQyxLQUFLQyxLQUFWLEVBQWlCO0FBQ2Isb0JBQU1DLGVBQWUsZ0JBQUssV0FBS0MsVUFBVixFQUFzQiwwQ0FBdEIsQ0FBckI7QUFDQSxxQkFBS0YsS0FBTCxHQUFhRyxLQUFLQyxLQUFMLENBQVcsc0JBQWFILFlBQWIsRUFBMkIsTUFBM0IsQ0FBWCxFQUErQ0ksSUFBNUQ7QUFDSDtBQUVELGlCQUFLTixVQUFMLENBQWdCTyxHQUFoQixDQUFvQixXQUFLQyxvQkFBTCxDQUEwQixVQUFDQyxRQUFELEVBQVdDLEVBQVgsRUFBYTtBQUN2RCxvQkFBSUQsUUFBSixFQUFjO0FBQ1ZDLHVCQUFHSCxHQUFILENBQU9JLEtBQUtMLElBQUwsQ0FBVUMsR0FBVixDQUFtQixNQUFLTixLQUF4QixDQUFQO0FBQ0g7QUFDSixhQUptQixDQUFwQjtBQUtIOzs7a0NBRWE7QUFDVixpQkFBS0QsVUFBTCxDQUFnQlksT0FBaEI7QUFDSDs7Ozs7O0FBUUUsSUFBTUMsNEJBQVUsSUFBSWxCLElBQUosRUFBaEIiLCJmaWxlIjoibGliL2F0b20vbWVudS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7cmVhZEZpbGVTeW5jfSBmcm9tICdmcyc7XHJcbmltcG9ydCB7am9pbn0gZnJvbSAncGF0aCc7XHJcbmltcG9ydCB7Q29tcG9zaXRlRGlzcG9zYWJsZX0gZnJvbSAndHMtZGlzcG9zYWJsZXMnO1xyXG5pbXBvcnQge09tbml9IGZyb20gJy4uL3NlcnZlci9vbW5pJztcclxuXHJcbmNsYXNzIE1lbnUgaW1wbGVtZW50cyBJRmVhdHVyZSB7XHJcbiAgICBwcml2YXRlIGRpc3Bvc2FibGU6IENvbXBvc2l0ZURpc3Bvc2FibGU7XHJcbiAgICBwcml2YXRlIF9qc29uOiBzdHJpbmc7XHJcblxyXG4gICAgcHVibGljIGFjdGl2YXRlKCkge1xyXG4gICAgICAgIHRoaXMuZGlzcG9zYWJsZSA9IG5ldyBDb21wb3NpdGVEaXNwb3NhYmxlKCk7XHJcbiAgICAgICAgaWYgKCF0aGlzLl9qc29uKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IG1lbnVKc29uRmlsZSA9IGpvaW4oT21uaS5wYWNrYWdlRGlyLCAnb21uaXNoYXJwLWF0b20vbWVudXMvb21uaXNoYXJwLW1lbnUuanNvbicpO1xyXG4gICAgICAgICAgICB0aGlzLl9qc29uID0gSlNPTi5wYXJzZShyZWFkRmlsZVN5bmMobWVudUpzb25GaWxlLCAndXRmOCcpKS5tZW51O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5kaXNwb3NhYmxlLmFkZChPbW5pLnN3aXRjaEFjdGl2ZVNvbHV0aW9uKChzb2x1dGlvbiwgY2QpID0+IHtcclxuICAgICAgICAgICAgaWYgKHNvbHV0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICBjZC5hZGQoYXRvbS5tZW51LmFkZCg8YW55PnRoaXMuX2pzb24pKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZGlzcG9zZSgpIHtcclxuICAgICAgICB0aGlzLmRpc3Bvc2FibGUuZGlzcG9zZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyByZXF1aXJlZCA9IGZhbHNlO1xyXG4gICAgcHVibGljIHRpdGxlID0gJ1Nob3cgT21uaVNoYXJwIE1lbnUnO1xyXG4gICAgcHVibGljIGRlc2NyaXB0aW9uID0gJ1Nob3dzIHRoZSBPbW5pc2hhcnAgTWVudSBhdCB0aGUgdG9wIG9mIHRoZSB3aW5kb3cuJztcclxuICAgIHB1YmxpYyBkZWZhdWx0ID0gdHJ1ZTtcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IHRvcE1lbnUgPSBuZXcgTWVudSgpO1xyXG4iXX0= 58 | -------------------------------------------------------------------------------- /dist/features/find-symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.findSymbols = undefined; 7 | 8 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 9 | 10 | var _tsDisposables = require('ts-disposables'); 11 | 12 | var _omni = require('../server/omni'); 13 | 14 | var _findSymbolsView = require('../views/find-symbols-view'); 15 | 16 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17 | 18 | var FindSymbols = function () { 19 | function FindSymbols() { 20 | _classCallCheck(this, FindSymbols); 21 | 22 | this.required = true; 23 | this.title = 'Find Symbols'; 24 | this.description = 'Adds commands to find symbols through the UI.'; 25 | } 26 | 27 | _createClass(FindSymbols, [{ 28 | key: 'activate', 29 | value: function activate() { 30 | var _this = this; 31 | 32 | this.disposable = new _tsDisposables.CompositeDisposable(); 33 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:find-symbols', function () { 34 | _this.view = new _findSymbolsView.FindSymbolsView(); 35 | })); 36 | this.disposable.add(_omni.Omni.listener.findsymbols.subscribe(function (data) { 37 | _this.view.addToList(data.response.QuickFixes); 38 | })); 39 | } 40 | }, { 41 | key: 'dispose', 42 | value: function dispose() { 43 | this.disposable.dispose(); 44 | } 45 | }]); 46 | 47 | return FindSymbols; 48 | }(); 49 | 50 | var findSymbols = exports.findSymbols = new FindSymbols(); 51 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9mZWF0dXJlcy9maW5kLXN5bWJvbHMudHMiXSwibmFtZXMiOlsiRmluZFN5bWJvbHMiLCJyZXF1aXJlZCIsInRpdGxlIiwiZGVzY3JpcHRpb24iLCJkaXNwb3NhYmxlIiwiYWRkIiwiYXRvbSIsImNvbW1hbmRzIiwidmlldyIsImxpc3RlbmVyIiwiZmluZHN5bWJvbHMiLCJzdWJzY3JpYmUiLCJhZGRUb0xpc3QiLCJkYXRhIiwicmVzcG9uc2UiLCJRdWlja0ZpeGVzIiwiZGlzcG9zZSIsImZpbmRTeW1ib2xzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7OztJQUVBQSxXO0FBQUEsMkJBQUE7QUFBQTs7QUFtQlcsYUFBQUMsUUFBQSxHQUFXLElBQVg7QUFDQSxhQUFBQyxLQUFBLEdBQVEsY0FBUjtBQUNBLGFBQUFDLFdBQUEsR0FBYywrQ0FBZDtBQUNWOzs7O21DQWxCa0I7QUFBQTs7QUFDWCxpQkFBS0MsVUFBTCxHQUFrQix3Q0FBbEI7QUFDQSxpQkFBS0EsVUFBTCxDQUFnQkMsR0FBaEIsQ0FBb0JDLEtBQUtDLFFBQUwsQ0FBY0YsR0FBZCxDQUFrQixnQkFBbEIsRUFBb0MsNkJBQXBDLEVBQW1FLFlBQUE7QUFDbkYsc0JBQUtHLElBQUwsR0FBWSxzQ0FBWjtBQUNILGFBRm1CLENBQXBCO0FBSUEsaUJBQUtKLFVBQUwsQ0FBZ0JDLEdBQWhCLENBQW9CLFdBQUtJLFFBQUwsQ0FBY0MsV0FBZCxDQUEwQkMsU0FBMUIsQ0FBb0MsZ0JBQUk7QUFDeEQsc0JBQUtILElBQUwsQ0FBVUksU0FBVixDQUFvQkMsS0FBS0MsUUFBTCxDQUFjQyxVQUFsQztBQUNILGFBRm1CLENBQXBCO0FBR0g7OztrQ0FFYTtBQUNWLGlCQUFLWCxVQUFMLENBQWdCWSxPQUFoQjtBQUNIOzs7Ozs7QUFPRSxJQUFNQyxvQ0FBYyxJQUFJakIsV0FBSixFQUFwQiIsImZpbGUiOiJsaWIvZmVhdHVyZXMvZmluZC1zeW1ib2xzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtDb21wb3NpdGVEaXNwb3NhYmxlfSBmcm9tICd0cy1kaXNwb3NhYmxlcyc7XHJcbmltcG9ydCB7T21uaX0gZnJvbSAnLi4vc2VydmVyL29tbmknO1xyXG5pbXBvcnQge0ZpbmRTeW1ib2xzVmlld30gZnJvbSAnLi4vdmlld3MvZmluZC1zeW1ib2xzLXZpZXcnO1xyXG5cclxuY2xhc3MgRmluZFN5bWJvbHMgaW1wbGVtZW50cyBJRmVhdHVyZSB7XHJcbiAgICBwcml2YXRlIGRpc3Bvc2FibGU6IENvbXBvc2l0ZURpc3Bvc2FibGU7XHJcbiAgICBwcml2YXRlIHZpZXc6IEZpbmRTeW1ib2xzVmlldztcclxuXHJcbiAgICBwdWJsaWMgYWN0aXZhdGUoKSB7XHJcbiAgICAgICAgdGhpcy5kaXNwb3NhYmxlID0gbmV3IENvbXBvc2l0ZURpc3Bvc2FibGUoKTtcclxuICAgICAgICB0aGlzLmRpc3Bvc2FibGUuYWRkKGF0b20uY29tbWFuZHMuYWRkKCdhdG9tLXdvcmtzcGFjZScsICdvbW5pc2hhcnAtYXRvbTpmaW5kLXN5bWJvbHMnLCAoKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMudmlldyA9IG5ldyBGaW5kU3ltYm9sc1ZpZXcoKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgIHRoaXMuZGlzcG9zYWJsZS5hZGQoT21uaS5saXN0ZW5lci5maW5kc3ltYm9scy5zdWJzY3JpYmUoZGF0YSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMudmlldy5hZGRUb0xpc3QoZGF0YS5yZXNwb25zZS5RdWlja0ZpeGVzKTtcclxuICAgICAgICB9KSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGRpc3Bvc2UoKSB7XHJcbiAgICAgICAgdGhpcy5kaXNwb3NhYmxlLmRpc3Bvc2UoKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgcmVxdWlyZWQgPSB0cnVlO1xyXG4gICAgcHVibGljIHRpdGxlID0gJ0ZpbmQgU3ltYm9scyc7XHJcbiAgICBwdWJsaWMgZGVzY3JpcHRpb24gPSAnQWRkcyBjb21tYW5kcyB0byBmaW5kIHN5bWJvbHMgdGhyb3VnaCB0aGUgVUkuJztcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IGZpbmRTeW1ib2xzID0gbmV3IEZpbmRTeW1ib2xzO1xyXG4iXX0= 52 | -------------------------------------------------------------------------------- /dist/features/package-restore.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.packageRestore = undefined; 7 | 8 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 9 | 10 | var _tsDisposables = require('ts-disposables'); 11 | 12 | var _omni = require('../server/omni'); 13 | 14 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15 | 16 | var PackageRestore = function () { 17 | function PackageRestore() { 18 | _classCallCheck(this, PackageRestore); 19 | 20 | this.required = true; 21 | this.title = 'Package Restore'; 22 | this.description = 'Initializes a package restore, when an project.json file is saved.'; 23 | } 24 | 25 | _createClass(PackageRestore, [{ 26 | key: 'activate', 27 | value: function activate() { 28 | this.disposable = new _tsDisposables.CompositeDisposable(); 29 | this.disposable.add(_omni.Omni.eachConfigEditor(function (editor, cd) { 30 | cd.add(editor.getBuffer().onDidSave(function () { 31 | _omni.Omni.request(function (solution) { 32 | return solution.filesChanged([{ FileName: editor.getPath() }]); 33 | }); 34 | })); 35 | })); 36 | } 37 | }, { 38 | key: 'dispose', 39 | value: function dispose() { 40 | this.disposable.dispose(); 41 | } 42 | }]); 43 | 44 | return PackageRestore; 45 | }(); 46 | 47 | var packageRestore = exports.packageRestore = new PackageRestore(); 48 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9mZWF0dXJlcy9wYWNrYWdlLXJlc3RvcmUudHMiXSwibmFtZXMiOlsiUGFja2FnZVJlc3RvcmUiLCJyZXF1aXJlZCIsInRpdGxlIiwiZGVzY3JpcHRpb24iLCJkaXNwb3NhYmxlIiwiYWRkIiwiZWFjaENvbmZpZ0VkaXRvciIsImVkaXRvciIsImNkIiwiZ2V0QnVmZmVyIiwib25EaWRTYXZlIiwicmVxdWVzdCIsInNvbHV0aW9uIiwiZmlsZXNDaGFuZ2VkIiwiRmlsZU5hbWUiLCJnZXRQYXRoIiwiZGlzcG9zZSIsInBhY2thZ2VSZXN0b3JlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7QUFDQTs7OztJQUVBQSxjO0FBQUEsOEJBQUE7QUFBQTs7QUFnQlcsYUFBQUMsUUFBQSxHQUFXLElBQVg7QUFDQSxhQUFBQyxLQUFBLEdBQVEsaUJBQVI7QUFDQSxhQUFBQyxXQUFBLEdBQWMsb0VBQWQ7QUFDVjs7OzttQ0FoQmtCO0FBQ1gsaUJBQUtDLFVBQUwsR0FBa0Isd0NBQWxCO0FBQ0EsaUJBQUtBLFVBQUwsQ0FBZ0JDLEdBQWhCLENBQW9CLFdBQUtDLGdCQUFMLENBQXNCLFVBQUNDLE1BQUQsRUFBU0MsRUFBVCxFQUFXO0FBQ2pEQSxtQkFBR0gsR0FBSCxDQUFPRSxPQUFPRSxTQUFQLEdBQW1CQyxTQUFuQixDQUE2QixZQUFBO0FBQ2hDLCtCQUFLQyxPQUFMLENBQWE7QUFBQSwrQkFBWUMsU0FBU0MsWUFBVCxDQUFzQixDQUFDLEVBQUVDLFVBQVVQLE9BQU9RLE9BQVAsRUFBWixFQUFELENBQXRCLENBQVo7QUFBQSxxQkFBYjtBQUNILGlCQUZNLENBQVA7QUFHSCxhQUptQixDQUFwQjtBQUtIOzs7a0NBRWE7QUFDVixpQkFBS1gsVUFBTCxDQUFnQlksT0FBaEI7QUFDSDs7Ozs7O0FBT0UsSUFBTUMsMENBQWlCLElBQUlqQixjQUFKLEVBQXZCIiwiZmlsZSI6ImxpYi9mZWF0dXJlcy9wYWNrYWdlLXJlc3RvcmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0NvbXBvc2l0ZURpc3Bvc2FibGV9IGZyb20gJ3RzLWRpc3Bvc2FibGVzJztcclxuaW1wb3J0IHtPbW5pfSBmcm9tICcuLi9zZXJ2ZXIvb21uaSc7XHJcblxyXG5jbGFzcyBQYWNrYWdlUmVzdG9yZSBpbXBsZW1lbnRzIElGZWF0dXJlIHtcclxuICAgIHByaXZhdGUgZGlzcG9zYWJsZTogQ29tcG9zaXRlRGlzcG9zYWJsZTtcclxuXHJcbiAgICBwdWJsaWMgYWN0aXZhdGUoKSB7XHJcbiAgICAgICAgdGhpcy5kaXNwb3NhYmxlID0gbmV3IENvbXBvc2l0ZURpc3Bvc2FibGUoKTtcclxuICAgICAgICB0aGlzLmRpc3Bvc2FibGUuYWRkKE9tbmkuZWFjaENvbmZpZ0VkaXRvcigoZWRpdG9yLCBjZCkgPT4ge1xyXG4gICAgICAgICAgICBjZC5hZGQoZWRpdG9yLmdldEJ1ZmZlcigpLm9uRGlkU2F2ZSgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBPbW5pLnJlcXVlc3Qoc29sdXRpb24gPT4gc29sdXRpb24uZmlsZXNDaGFuZ2VkKFt7IEZpbGVOYW1lOiBlZGl0b3IuZ2V0UGF0aCgpIH1dKSk7XHJcbiAgICAgICAgICAgIH0pKTtcclxuICAgICAgICB9KSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGRpc3Bvc2UoKSB7XHJcbiAgICAgICAgdGhpcy5kaXNwb3NhYmxlLmRpc3Bvc2UoKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgcmVxdWlyZWQgPSB0cnVlO1xyXG4gICAgcHVibGljIHRpdGxlID0gJ1BhY2thZ2UgUmVzdG9yZSc7XHJcbiAgICBwdWJsaWMgZGVzY3JpcHRpb24gPSAnSW5pdGlhbGl6ZXMgYSBwYWNrYWdlIHJlc3RvcmUsIHdoZW4gYW4gcHJvamVjdC5qc29uIGZpbGUgaXMgc2F2ZWQuJztcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IHBhY2thZ2VSZXN0b3JlID0gbmV3IFBhY2thZ2VSZXN0b3JlO1xyXG4iXX0= 49 | -------------------------------------------------------------------------------- /dist/omnisharp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsaWIvb21uaXNoYXJwLmpzIiwic291cmNlc0NvbnRlbnQiOltdfQ== 3 | -------------------------------------------------------------------------------- /dist/operators/bufferFor.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsaWIvb3BlcmF0b3JzL2J1ZmZlckZvci5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= 3 | -------------------------------------------------------------------------------- /dist/server/omnisharp-configuration.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsaWIvc2VydmVyL29tbmlzaGFycC1jb25maWd1cmF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOltdfQ== 3 | -------------------------------------------------------------------------------- /dist/views/output-message-element.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.OutputMessageElement = undefined; 7 | 8 | var _ansiToHtml = require('../services/ansi-to-html'); 9 | 10 | var convert = new _ansiToHtml.Convert(); 11 | var props = { 12 | set: function message(value) { 13 | if (value.message) { 14 | this.innerHTML = convert.toHtml(value.message).trim(); 15 | } 16 | this.classList.add(value.logLevel); 17 | } 18 | }; 19 | var OutputMessageElement = exports.OutputMessageElement = undefined; 20 | (function (OutputMessageElement) { 21 | function create(value) { 22 | var pre = document.createElement('pre'); 23 | Object.defineProperty(pre, 'message', props); 24 | pre.message = value; 25 | return pre; 26 | } 27 | OutputMessageElement.create = create; 28 | })(OutputMessageElement || (exports.OutputMessageElement = OutputMessageElement = {})); 29 | ; 30 | //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi92aWV3cy9vdXRwdXQtbWVzc2FnZS1lbGVtZW50LnRzIl0sIm5hbWVzIjpbImNvbnZlcnQiLCJwcm9wcyIsInNldCIsIm1lc3NhZ2UiLCJ2YWx1ZSIsImlubmVySFRNTCIsInRvSHRtbCIsInRyaW0iLCJjbGFzc0xpc3QiLCJhZGQiLCJsb2dMZXZlbCIsIk91dHB1dE1lc3NhZ2VFbGVtZW50IiwiY3JlYXRlIiwicHJlIiwiZG9jdW1lbnQiLCJjcmVhdGVFbGVtZW50IiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQSxJQUFNQSxVQUFVLHlCQUFoQjtBQUVBLElBQU1DLFFBQVE7QUFDVkMsU0FBSyxTQUFBQyxPQUFBLENBQWlCQyxLQUFqQixFQUFxQztBQUN0QyxZQUFJQSxNQUFNRCxPQUFWLEVBQW1CO0FBQ2YsaUJBQUtFLFNBQUwsR0FBaUJMLFFBQVFNLE1BQVIsQ0FBZUYsTUFBTUQsT0FBckIsRUFBOEJJLElBQTlCLEVBQWpCO0FBQ0g7QUFDRCxhQUFLQyxTQUFMLENBQWVDLEdBQWYsQ0FBbUJMLE1BQU1NLFFBQXpCO0FBQ0g7QUFOUyxDQUFkO0FBU00sSUFBV0MsK0RBQVg7QUFBTixDQUFBLFVBQWlCQSxvQkFBakIsRUFBcUM7QUFDakMsYUFBQUMsTUFBQSxDQUF1QlIsS0FBdkIsRUFBMkM7QUFDdkMsWUFBTVMsTUFBTUMsU0FBU0MsYUFBVCxDQUF1QixLQUF2QixDQUFaO0FBQ0FDLGVBQU9DLGNBQVAsQ0FBc0JKLEdBQXRCLEVBQTJCLFNBQTNCLEVBQXNDWixLQUF0QztBQUNDWSxZQUFZVixPQUFaLEdBQXNCQyxLQUF0QjtBQUVELGVBQU9TLEdBQVA7QUFDSDtBQU5lRix5QkFBQUMsTUFBQSxHQUFNQSxNQUFOO0FBT25CLENBUkQsRUFBaUJELGlDQUFBQSxvQkFBQSxHQUFBQSx1QkFBb0IsRUFBcEIsQ0FBakI7QUFRQyIsImZpbGUiOiJsaWIvdmlld3Mvb3V0cHV0LW1lc3NhZ2UtZWxlbWVudC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbnZlcnQgfSBmcm9tICcuLi9zZXJ2aWNlcy9hbnNpLXRvLWh0bWwnO1xyXG5jb25zdCBjb252ZXJ0ID0gbmV3IENvbnZlcnQoKTtcclxuXHJcbmNvbnN0IHByb3BzID0ge1xyXG4gICAgc2V0OiBmdW5jdGlvbiBtZXNzYWdlKHZhbHVlOiBPdXRwdXRNZXNzYWdlKSB7XHJcbiAgICAgICAgaWYgKHZhbHVlLm1lc3NhZ2UpIHtcclxuICAgICAgICAgICAgdGhpcy5pbm5lckhUTUwgPSBjb252ZXJ0LnRvSHRtbCh2YWx1ZS5tZXNzYWdlKS50cmltKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuY2xhc3NMaXN0LmFkZCh2YWx1ZS5sb2dMZXZlbCk7XHJcbiAgICB9XHJcbn07XHJcblxyXG5leHBvcnQgbmFtZXNwYWNlIE91dHB1dE1lc3NhZ2VFbGVtZW50IHtcclxuICAgIGV4cG9ydCBmdW5jdGlvbiBjcmVhdGUodmFsdWU6IE91dHB1dE1lc3NhZ2UpIHtcclxuICAgICAgICBjb25zdCBwcmUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdwcmUnKTtcclxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocHJlLCAnbWVzc2FnZScsIHByb3BzKTtcclxuICAgICAgICAocHJlIGFzIGFueSkubWVzc2FnZSA9IHZhbHVlO1xyXG5cclxuICAgICAgICByZXR1cm4gcHJlO1xyXG4gICAgfVxyXG59O1xyXG4iXX0= 31 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var through = require('through2'); 3 | var gutil = require('gulp-util'); 4 | var merge = require('merge-stream'); 5 | var del = require('del'); 6 | var fs = require('fs'); 7 | var path = require('path'); 8 | var _ = require('lodash'); 9 | var win32 = process.platform === "win32"; 10 | var spawn = require('child_process').spawn; 11 | var babel = require("gulp-babel"); 12 | var tslint = require("gulp-tslint"); 13 | var sourcemaps = require("gulp-sourcemaps"); 14 | var gulpPath = path.join(__dirname, 'node_modules/.bin/gulp' + (win32 && '.cmd' || '')); 15 | var typescript = require('typescript'); 16 | var ts = require('gulp-typescript'); 17 | var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, typescript: typescript }); 18 | 19 | var metadata = { 20 | lib: ['lib/**/*.ts', '!lib/**/*.d.ts'], 21 | spec: ['spec/**/*.ts', '!spec/**/*.d.ts'], 22 | }; 23 | 24 | gulp.task('typescript', ['clean'], function () { 25 | return tsProject.src() 26 | // .pipe(tslint({ 27 | // formatter: "verbose" 28 | // })) 29 | // .pipe(tslint.report()) 30 | .pipe(sourcemaps.init()) 31 | .pipe(tsProject()) 32 | .pipe(babel()) 33 | .pipe(sourcemaps.write()) 34 | .pipe(gulp.dest('.')); 35 | }); 36 | 37 | gulp.task('dist', ['typescript'], function () { 38 | return gulp.src(['lib/**/*.js']) 39 | .pipe(gulp.dest('dist')); 40 | }); 41 | 42 | gulp.task('clean', ['clean:lib', 'clean:dist', 'clean:spec']); 43 | 44 | gulp.task('clean:dist', function (done) { 45 | del(['dist/**/*.js']).then(function (paths) { 46 | _.each(paths, function (path) { 47 | gutil.log(gutil.colors.red('Deleted ') + gutil.colors.magenta(path.replace(__dirname, '').substring(1))); 48 | }); 49 | done(); 50 | }); 51 | }); 52 | 53 | gulp.task('clean:lib', function (done) { 54 | del(metadata.lib.map(function (z) { 55 | return gutil.replaceExtension(z, '.js'); 56 | })).then(function (paths) { 57 | _.each(paths, function (path) { 58 | gutil.log(gutil.colors.red('Deleted ') + gutil.colors.magenta(path.replace(__dirname, '').substring(1))); 59 | }); 60 | done(); 61 | }); 62 | }); 63 | 64 | gulp.task('clean:spec', function (done) { 65 | del(metadata.spec.map(function (z) { 66 | return gutil.replaceExtension(z, '.js'); 67 | })).then(function (paths) { 68 | _.each(paths, function (path) { 69 | gutil.log(gutil.colors.red('Deleted ') + gutil.colors.magenta(path.replace(__dirname, '').substring(1))); 70 | }); 71 | done(); 72 | }); 73 | }); 74 | 75 | gulp.task('watch', function () { 76 | // Watch is not installed by default if you want to use it 77 | // you need to install manually but don't save it as it causes CI issues. 78 | var watch = require('gulp-watch'); 79 | // Auto restart watch when gulpfile is changed. 80 | var p = spawn(gulpPath, ['file-watch'], { 81 | stdio: 'inherit' 82 | }); 83 | return watch('gulpfile.js', function () { 84 | p.kill(); 85 | p = spawn(gulpPath, ['file-watch'], { 86 | stdio: 'inherit' 87 | }); 88 | }); 89 | }); 90 | 91 | gulp.task('npm-postinstall', []); 92 | gulp.task('npm-prepublish', ['dist']); 93 | 94 | // The default task (called when you run `gulp` from CLI) 95 | gulp.task('default', ['typescript']); 96 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'), path = require('path'); 2 | if (fs.existsSync(path.resolve(__dirname, 'lib/omnisharp-atom.js'))) { 3 | module.exports = require(path.join(__dirname, 'lib/omnisharp-atom')); 4 | } else { 5 | module.exports = require(path.join(__dirname, 'dist/omnisharp-atom')); 6 | } 7 | -------------------------------------------------------------------------------- /keymaps/omnisharp-atom.cson: -------------------------------------------------------------------------------- 1 | # Keybindings require three things to be fully defined: A selector that is 2 | # matched against the focused element, the keystroke and the command to 3 | # execute. 4 | # 5 | # Below is a basic keybinding which registers on all platforms by applying to 6 | # the root workspace element. 7 | # 8 | # For more detailed documentation see 9 | # https://atom.io/docs/latest/advanced/keymaps 10 | 'atom-workspace': 11 | 'esc': 'omnisharp-atom:hide' 12 | 'ctrl-alt-o': 'omnisharp-atom:toggle' 13 | 'ctrl-alt-x': 'omnisharp-atom:dock-show-output' 14 | 'ctrl-alt-e': 'omnisharp-atom:dock-show-errors' 15 | #'ctrl-alt-b': 'omnisharp-atom:show-build' 16 | #'ctrl-shift-b': 'omnisharp-atom:build' 17 | 18 | 'atom-text-editor:not([mini]).omnisharp-editor': 19 | 'f12': 'omnisharp-atom:go-to-definition' 20 | 'shift-f12': 'omnisharp-atom:find-usages' 21 | 'ctrl-alt-u': 'omnisharp-atom:fix-usings' 22 | 'ctrl-k ctrl-d': 'omnisharp-atom:code-format' 23 | 'ctrl-k ctrl-c': 'editor:toggle-line-comments' 24 | 'ctrl-k ctrl-u': 'editor:toggle-line-comments' 25 | 'alt-r': 'omnisharp-atom:rename' 26 | 'f2': 'omnisharp-atom:rename' 27 | 'ctrl-r ctrl-r': 'omnisharp-atom:rename' 28 | 'ctrl-f12': 'omnisharp-atom:go-to-implementation' 29 | 'f1': 'omnisharp-atom:type-lookup' 30 | 'ctrl-alt-up': 'omnisharp-atom:navigate-up' 31 | 'ctrl-alt-down': 'omnisharp-atom:navigate-down' 32 | 'ctrl-.': 'omnisharp-atom:get-code-actions' 33 | 'alt-enter': 'omnisharp-atom:get-code-actions' 34 | 'alt-shift-t': 'omnisharp-atom:find-symbols' 35 | 'ctrl-,': 'omnisharp-atom:find-symbols' 36 | 'f8': 'omnisharp-atom:go-to-next-usage' 37 | 'shift-f8,': 'omnisharp-atom:go-to-previous-usage' 38 | 'cmd-r cmd-a': 'omnisharp-atom:run-all-tests' 39 | 'cmd-r cmd-f': 'omnisharp-atom:run-fixture-tests' 40 | 'cmd-r cmd-t': 'omnisharp-atom:run-single-test' 41 | 'cmd-r cmd-l': 'omnisharp-atom:run-last-test' 42 | 'ctrl-r ctrl-a': 'omnisharp-atom:run-all-tests' 43 | 'ctrl-r ctrl-f': 'omnisharp-atom:run-fixture-tests' 44 | 'ctrl-r ctrl-t': 'omnisharp-atom:run-single-test' 45 | 'ctrl-r ctrl-l': 'omnisharp-atom:run-last-test' 46 | 47 | 48 | '.platform-darwin atom-text-editor:not([mini]).omnisharp-editor': 49 | 'cmd-d': 'omnisharp-atom:go-to-definition' 50 | 51 | '.autocomplete-active:not([mini]).omnisharp-editor': 52 | 'enter': 'autocomplete-plus:confirm' 53 | -------------------------------------------------------------------------------- /keymaps/omnisharp-code-actions.cson: -------------------------------------------------------------------------------- 1 | '.code-actions-overlay': 2 | 'alt-enter': '!unset' 3 | 'ctrl-.': '!unset' 4 | -------------------------------------------------------------------------------- /keymaps/omnisharp-file-new.cson: -------------------------------------------------------------------------------- 1 | '.platform-win32 atom-text-editor:not([mini]).omnisharp-editor': 2 | 'ctrl-n': 'advanced-open-file:toggle' 3 | ':not(.platform-win32) atom-text-editor:not([mini]).omnisharp-editor': 4 | 'cmd-n': 'advanced-open-file:toggle' 5 | -------------------------------------------------------------------------------- /lib/atom/dock.ts: -------------------------------------------------------------------------------- 1 | import {CompositeDisposable, Disposable, IDisposable} from 'ts-disposables'; 2 | import {DockWindow, DocButtonOptions, PaneButtonOptions} from '../views/dock-window'; 3 | 4 | 5 | function fromDock(key?: string) { 6 | return function fromDock(target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor) { 7 | const internalKey = `${key || propertyKey}`; 8 | descriptor.value = function () { 9 | return this.dock[internalKey].apply(this.dock, arguments); 10 | }; 11 | }; 12 | } 13 | 14 | class Dock implements IAtomFeature { 15 | private disposable: CompositeDisposable; 16 | private view: Element; 17 | private dock: DockWindow = new DockWindow; 18 | 19 | public activate() { 20 | this.disposable = new CompositeDisposable(); 21 | 22 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:toggle-dock', () => this.toggle())); 23 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:show-dock', () => this.show())); 24 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:hide-dock', () => this.hide())); 25 | this.disposable.add(atom.commands.add('atom-workspace', 'core:close', () => this.hide())); 26 | this.disposable.add(atom.commands.add('atom-workspace', 'core:cancel', () => this.hide())); 27 | } 28 | 29 | public attach() { 30 | const p = atom.workspace.addBottomPanel({ 31 | item: document.createElement('span'), 32 | visible: false, 33 | priority: 1000 34 | }); 35 | 36 | this.view = p.item.parentElement; 37 | this.view.classList.add('omnisharp-atom-pane'); 38 | this.dock.setPanel(p); 39 | 40 | this.view.appendChild(this.dock); 41 | 42 | this.disposable.add(Disposable.create(() => { 43 | p.destroy(); 44 | this.view.remove(); 45 | })); 46 | } 47 | 48 | public dispose() { 49 | this.disposable.dispose(); 50 | } 51 | 52 | public get isOpen() { return this.dock.isOpen; } 53 | public get selected() { return this.dock.selected; } 54 | public set selected(value) { this.dock.selected = value; } 55 | 56 | @fromDock('toggleView') 57 | public toggle() { /* */ } 58 | 59 | @fromDock('showView') 60 | public show() { /* */ }; 61 | 62 | @fromDock('hideView') 63 | public hide() { /* */ }; 64 | 65 | @fromDock() 66 | public addWindow(id: string, title: string, view: Element, options: PaneButtonOptions = { priority: 1000 }, parentDisposable?: IDisposable): IDisposable { throw new Error(''); } 67 | 68 | @fromDock() 69 | public toggleWindow(selected: string) { /* */ } 70 | 71 | @fromDock() 72 | public selectWindow(selected: string) { /* */ } 73 | 74 | @fromDock() 75 | public addButton(id: string, title: string, view: Element, options: DocButtonOptions = { priority: 1000 }, parentDisposable?: IDisposable): IDisposable { throw new Error(''); } 76 | 77 | public required = true; 78 | public title = 'Dock'; 79 | public description = 'The dock window used to show logs and diagnostics and other things.'; 80 | } 81 | 82 | export const dock = new Dock; 83 | -------------------------------------------------------------------------------- /lib/atom/framework-selector.ts: -------------------------------------------------------------------------------- 1 | import { Models } from 'omnisharp-client'; 2 | import { CompositeDisposable, Disposable } from 'ts-disposables'; 3 | import { Omni } from '../server/omni'; 4 | import { ProjectViewModel } from '../server/project-view-model'; 5 | import { FrameworkSelectorComponent } from '../views/framework-selector-view'; 6 | 7 | class FrameworkSelector implements IAtomFeature { 8 | private disposable: CompositeDisposable; 9 | private view: HTMLSpanElement; 10 | private statusBar: any; 11 | private _active = false; 12 | public project: ProjectViewModel; 13 | private _component: FrameworkSelectorComponent; 14 | 15 | public activate() { 16 | this.disposable = new CompositeDisposable(); 17 | } 18 | 19 | public setup(statusBar: any) { 20 | this.statusBar = statusBar; 21 | 22 | if (this._active) { 23 | this._attach(); 24 | } 25 | } 26 | 27 | public attach() { 28 | if (this.statusBar) { this._attach(); } 29 | this._active = true; 30 | } 31 | 32 | private _attach() { 33 | this.view = document.createElement('span'); 34 | this.view.classList.add('inline-block'); 35 | this.view.classList.add('framework-selector'); 36 | this.view.style.display = 'none'; 37 | 38 | let tile: any; 39 | if (atom.config.get('grammar-selector.showOnRightSideOfStatusBar')) { 40 | tile = this.statusBar.addRightTile({ 41 | item: this.view, 42 | priority: 9 43 | }); 44 | } else { 45 | tile = this.statusBar.addLeftTile({ 46 | item: this.view, 47 | priority: 11 48 | }); 49 | } 50 | 51 | this._component = new FrameworkSelectorComponent; 52 | this._component.alignLeft = !atom.config.get('grammar-selector.showOnRightSideOfStatusBar'); 53 | this.view.appendChild(this._component); 54 | 55 | this.disposable.add(Disposable.create(() => { 56 | tile.destroy(); 57 | this.view.remove(); 58 | })); 59 | 60 | this.disposable.add(Omni.activeEditor 61 | .filter(z => !z) 62 | .subscribe(() => this.view.style.display = 'none')); 63 | 64 | this.disposable.add(Omni.activeProject 65 | .filter(z => z.frameworks.length === 1) 66 | .subscribe(() => this.view.style.display = 'none')); 67 | 68 | this.disposable.add(Omni.activeProject 69 | .subscribe(project => { 70 | this.view.style.display = ''; 71 | 72 | const {frameworks, activeFramework} = project; 73 | this.project = project; 74 | this._component.frameworks = frameworks; 75 | this._component.activeFramework = activeFramework; 76 | })); 77 | 78 | this.disposable.add(Omni.activeFramework 79 | .subscribe(ctx => { 80 | this.view.style.display = ''; 81 | 82 | const {project, framework} = ctx; 83 | this.project = project; 84 | this._component.frameworks = project.frameworks; 85 | this._component.activeFramework = framework; 86 | })); 87 | } 88 | 89 | public dispose() { 90 | this.disposable.dispose(); 91 | } 92 | 93 | public setActiveFramework(framework: Models.DotNetFramework) { 94 | if (this.project) { 95 | this.project.activeFramework = framework; 96 | this._component.activeFramework = framework; 97 | } 98 | } 99 | 100 | public required = true; 101 | public title = 'Framework Selector'; 102 | public description = 'Lets you select the framework you\"re currently targeting.'; 103 | } 104 | 105 | export const frameworkSelector = new FrameworkSelector; 106 | -------------------------------------------------------------------------------- /lib/atom/generator-aspnet.ts: -------------------------------------------------------------------------------- 1 | import {each, endsWith, filter} from 'lodash'; 2 | import * as path from 'path'; 3 | import {Observable} from 'rxjs'; 4 | import {CompositeDisposable} from 'ts-disposables'; 5 | 6 | // TODO: Make sure it stays in sync with 7 | const commands = [ 8 | 'AngularController', 9 | 'AngularControllerAs', 10 | 'AngularDirective', 11 | 'AngularFactory', 12 | 'AngularModule', 13 | 'BowerJson', 14 | 'Class', 15 | 'CoffeeScript', 16 | 'Config', 17 | 'gitignore', 18 | 'Gruntfile', 19 | 'Gulpfile', 20 | 'HTMLPage', 21 | 'Interface', 22 | 'JavaScript', 23 | 'JScript', 24 | 'JSON', 25 | 'JSONSchema', 26 | 'JSX', 27 | 'Middleware', 28 | 'MvcController', 29 | 'MvcView', 30 | 'PackageJson', 31 | 'StartupClass', 32 | 'StyleSheet', 33 | 'StyleSheetLess', 34 | 'StyleSheetSCSS', 35 | 'TagHelper', 36 | 'TextFile', 37 | 'TypeScript', 38 | 'TypeScriptConfig', 39 | 'WebApiController' 40 | ]; 41 | 42 | module Yeoman { 43 | export interface IMessages { 44 | cwd?: string; 45 | skip: string[]; 46 | force: string[]; 47 | create: string[]; 48 | invoke: string[]; 49 | conflict: string[]; 50 | identical: string[]; 51 | info: string[]; 52 | } 53 | } 54 | 55 | class GeneratorAspnet implements IFeature { 56 | private disposable: CompositeDisposable; 57 | private generator: { 58 | run(generator: string, path?: string, options?: any): Promise; start(prefix: string, path?: string, options?: any): Promise; 59 | list(prefix?: string, path?: string, options?: any): Promise<{ displayName: string; name: string; resolved: string; }[]> 60 | }; 61 | 62 | public activate() { 63 | this.disposable = new CompositeDisposable(); 64 | 65 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:new-project', () => this.newProject())); 66 | this.disposable.add(atom.commands.add('atom-workspace', 'c#:new-project', () => this.newProject())); 67 | 68 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:new-class', () => this.run('aspnet:Class'))); 69 | this.disposable.add(atom.commands.add('atom-workspace', 'C#:new-class', () => this.run('aspnet:Class'))); 70 | 71 | each(commands, command => { 72 | this.disposable.add(atom.commands.add('atom-workspace', `omnisharp-atom:aspnet-${command}`, () => this.loadCsFile(this.run(`aspnet:${command}`)))); 73 | }); 74 | } 75 | 76 | private loadCsFile(promise: Promise) { 77 | return promise.then((messages: Yeoman.IMessages) => { 78 | const allMessages = messages.skip 79 | .concat(messages.create) 80 | .concat(messages.identical) 81 | .concat(messages.force); 82 | 83 | return Observable.from(['Startup.cs', 'Program.cs', '.cs']) 84 | .concatMap(file => filter(allMessages, message => endsWith(message, file))) 85 | .take(1) 86 | .map(file => path.join(messages.cwd, file)) 87 | .toPromise(); 88 | }) 89 | .then(file => atom.workspace.open(file)); 90 | } 91 | 92 | private newProject() { 93 | return this.loadCsFile(this.run('aspnet:app --createInDirectory')) 94 | .then(() => Observable.timer(2000).toPromise()) 95 | .then(() => { 96 | atom.commands.dispatch(atom.views.getView(atom.workspace), 'omnisharp-atom:restart-server'); 97 | }); 98 | } 99 | 100 | private run(command: string) { 101 | return this.generator.run(command, undefined, { promptOnZeroDirectories: true }); 102 | } 103 | 104 | public setup(generator: any) { 105 | this.generator = generator; 106 | } 107 | 108 | public dispose() { 109 | this.disposable.dispose(); 110 | } 111 | 112 | public required = true; 113 | public title = 'Aspnet Yeoman Generator'; 114 | public description = 'Enables the aspnet yeoman generator.'; 115 | } 116 | 117 | export const generatorAspnet = new GeneratorAspnet; 118 | -------------------------------------------------------------------------------- /lib/atom/menu.ts: -------------------------------------------------------------------------------- 1 | import {readFileSync} from 'fs'; 2 | import {join} from 'path'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {Omni} from '../server/omni'; 5 | 6 | class Menu implements IFeature { 7 | private disposable: CompositeDisposable; 8 | private _json: string; 9 | 10 | public activate() { 11 | this.disposable = new CompositeDisposable(); 12 | if (!this._json) { 13 | const menuJsonFile = join(Omni.packageDir, 'omnisharp-atom/menus/omnisharp-menu.json'); 14 | this._json = JSON.parse(readFileSync(menuJsonFile, 'utf8')).menu; 15 | } 16 | 17 | this.disposable.add(Omni.switchActiveSolution((solution, cd) => { 18 | if (solution) { 19 | cd.add(atom.menu.add(this._json)); 20 | } 21 | })); 22 | } 23 | 24 | public dispose() { 25 | this.disposable.dispose(); 26 | } 27 | 28 | public required = false; 29 | public title = 'Show OmniSharp Menu'; 30 | public description = 'Shows the Omnisharp Menu at the top of the window.'; 31 | public default = true; 32 | } 33 | 34 | export const topMenu = new Menu(); 35 | -------------------------------------------------------------------------------- /lib/atom/server-information.ts: -------------------------------------------------------------------------------- 1 | import { IOmnisharpClientStatus } from 'omnisharp-client'; 2 | import { Observable } from 'rxjs'; 3 | import { CompositeDisposable } from 'ts-disposables'; 4 | import { dock } from '../atom/dock'; 5 | import { IProjectViewModel } from '../omnisharp'; 6 | import { Omni } from '../server/omni'; 7 | import { ViewModel } from '../server/view-model'; 8 | import { OutputWindow } from '../views/omni-output-pane-view'; 9 | 10 | class ServerInformation implements IFeature { 11 | private disposable: CompositeDisposable; 12 | public observe: { 13 | status: Observable; 14 | output: Observable; 15 | outputElement: Observable; 16 | projects: Observable; 17 | model: Observable; 18 | }; 19 | 20 | public model: ViewModel; 21 | 22 | public activate() { 23 | this.disposable = new CompositeDisposable(); 24 | 25 | const status = this.setupStatus(); 26 | const output = this.setupOutput(); 27 | const outputElement = this.setupOutputElement(); 28 | const projects = this.setupProjects(); 29 | 30 | this.disposable.add(Omni.activeModel.subscribe(z => this.model = z)); 31 | this.observe = { status, output, outputElement, projects, model: Omni.activeModel }; 32 | 33 | this.disposable.add(dock.addWindow('output', 'Omnisharp output', new OutputWindow, {})); 34 | dock.selected = 'output'; 35 | } 36 | 37 | private setupStatus() { 38 | // Stream the status from the active model 39 | return Omni.activeModel 40 | .switchMap(model => model.observe.status) 41 | .share(); 42 | } 43 | 44 | private setupOutput() { 45 | // As the active model changes (when we go from an editor for ClientA to an editor for ClientB) 46 | // We want to make sure that the output field is 47 | return Omni.activeModel 48 | .switchMap(z => z.observe.output) 49 | .startWith([]) 50 | .share(); 51 | } 52 | 53 | private setupOutputElement() { 54 | return Omni.activeModel 55 | .map(z => z.outputElement) 56 | .startWith(document.createElement('div')) 57 | .share(); 58 | } 59 | 60 | private setupProjects() { 61 | return Omni.activeModel 62 | .switchMap(model => model.observe.projects) 63 | .share(); 64 | } 65 | 66 | public dispose() { 67 | this.disposable.dispose(); 68 | } 69 | 70 | public required = true; 71 | public title = 'Server Information'; 72 | public description = 'Monitors server output and status.'; 73 | } 74 | 75 | export const server = new ServerInformation; 76 | -------------------------------------------------------------------------------- /lib/atom/settings-button.ts: -------------------------------------------------------------------------------- 1 | import {CompositeDisposable, IDisposable} from 'ts-disposables'; 2 | import {dock} from '../atom/dock'; 3 | 4 | class SettingsButton implements IFeature { 5 | private disposable: CompositeDisposable; 6 | 7 | public activate() { 8 | this.disposable = new CompositeDisposable(); 9 | let tooltip :IDisposable; 10 | 11 | const htmlButton = document.createElement('a'); 12 | htmlButton.classList.add('btn','icon-gear'); 13 | 14 | htmlButton.onclick = () => atom.commands.dispatch(atom.views.getView(atom.workspace), 'omnisharp-atom:settings'); 15 | htmlButton.onmouseenter = e => { 16 | tooltip = atom.tooltips.add(e.currentTarget, { title: this.tooltip }); 17 | this.disposable.add(tooltip); 18 | }; 19 | htmlButton.onmouseleave = e => { 20 | if (tooltip) { 21 | this.disposable.remove(tooltip); 22 | tooltip.dispose(); 23 | } 24 | }; 25 | 26 | this.disposable.add(dock.addButton( 27 | 'settings-button', 28 | 'Settings', 29 | htmlButton, 30 | { priority: 999 } 31 | )); 32 | } 33 | 34 | public dispose() { 35 | this.disposable.dispose(); 36 | } 37 | 38 | public required = true; 39 | public title = 'Show Settings button'; 40 | public tooltip = 'Show Settings'; 41 | public description = 'Shows the settings button on the OmniSharp Dock'; 42 | public default = true; 43 | } 44 | 45 | export const settingsButton = new SettingsButton(); 46 | -------------------------------------------------------------------------------- /lib/atom/status-bar.ts: -------------------------------------------------------------------------------- 1 | import {CompositeDisposable, Disposable} from 'ts-disposables'; 2 | import {StatusBarElement} from '../views/status-bar-view'; 3 | 4 | class StatusBar implements IAtomFeature { 5 | private disposable: CompositeDisposable; 6 | private view: StatusBarElement; 7 | private statusBar: any; 8 | private _active = false; 9 | 10 | public activate() { 11 | this.disposable = new CompositeDisposable(); 12 | this.disposable.add(Disposable.create(() => this._active = false)); 13 | } 14 | 15 | public setup(statusBar: any) { 16 | this.statusBar = statusBar; 17 | 18 | if (this._active) { 19 | this._attach(); 20 | } 21 | } 22 | 23 | public attach() { 24 | if (this.statusBar) { this._attach(); } 25 | this._active = true; 26 | } 27 | 28 | private _attach() { 29 | this.view = new StatusBarElement(); 30 | const tile = this.statusBar.addLeftTile({ 31 | item: this.view, 32 | priority: -10000 33 | }); 34 | this.disposable.add(this.view); 35 | this.disposable.add(Disposable.create(() => { 36 | tile.destroy(); 37 | this.view.remove(); 38 | })); 39 | } 40 | 41 | public dispose() { 42 | this.disposable.dispose(); 43 | } 44 | 45 | public required = true; 46 | public title = 'Status Bar'; 47 | public description = 'Adds the OmniSharp status icon to the status bar.'; 48 | } 49 | 50 | export const statusBar = new StatusBar; 51 | -------------------------------------------------------------------------------- /lib/features/code-check.ts: -------------------------------------------------------------------------------- 1 | import {filter} from 'lodash'; 2 | import {Models} from 'omnisharp-client'; 3 | import {Observable, Subject} from 'rxjs'; 4 | import {CompositeDisposable} from 'ts-disposables'; 5 | import {dock} from '../atom/dock'; 6 | import {Omni} from '../server/omni'; 7 | import {CodeCheckOutputElement} from '../views/codecheck-output-pane-view'; 8 | import {reloadWorkspace} from './reload-workspace'; 9 | 10 | class CodeCheck implements IFeature { 11 | private disposable: CompositeDisposable; 12 | 13 | public displayDiagnostics: Models.DiagnosticLocation[] = []; 14 | public selectedIndex: number = 0; 15 | private scrollTop: number = 0; 16 | private _fullCodeCheck: Subject; 17 | private _window = new CodeCheckOutputElement; 18 | 19 | public activate() { 20 | this.disposable = new CompositeDisposable(); 21 | 22 | this._fullCodeCheck = new Subject(); 23 | this.disposable.add(this._fullCodeCheck); 24 | 25 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:next-diagnostic', () => { 26 | this._window.next(); 27 | })); 28 | 29 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:go-to-diagnostic', () => { 30 | Omni.navigateTo(this._window.current); 31 | })); 32 | 33 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:previous-diagnostic', () => { 34 | this._window.prev(); 35 | })); 36 | 37 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:go-to-next-diagnostic', () => { 38 | this._window.next(); 39 | Omni.navigateTo(this._window.current); 40 | })); 41 | 42 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:go-to-previous-diagnostic', () => { 43 | this._window.prev(); 44 | Omni.navigateTo(this._window.current); 45 | })); 46 | 47 | this.disposable.add(Omni.diagnostics 48 | .subscribe(diagnostics => { 49 | this.displayDiagnostics = this.filterOnlyWarningsAndErrors(diagnostics); 50 | })); 51 | 52 | this.disposable.add(Omni.diagnostics.subscribe(s => { 53 | this.scrollTop = 0; 54 | this.selectedIndex = 0; 55 | })); 56 | 57 | this.disposable.add(Omni.diagnostics 58 | .delay(100) 59 | .subscribe(diagnostics => this._window.update(diagnostics))); 60 | 61 | this.disposable.add(dock.addWindow('errors', 'Errors & Warnings', this._window)); 62 | 63 | let started = 0, finished = 0; 64 | this.disposable.add(Observable.combineLatest( 65 | Omni.listener.packageRestoreStarted.map(x => started++), 66 | Omni.listener.packageRestoreFinished.map(x => finished++), 67 | (s, f) => s === f) 68 | .filter(r => r) 69 | .debounceTime(2000) 70 | .subscribe(() => { 71 | started = 0; 72 | finished = 0; 73 | this.doFullCodeCheck(); 74 | })); 75 | 76 | this.disposable.add(Omni.listener.packageRestoreFinished.debounceTime(3000).subscribe(() => this.doFullCodeCheck())); 77 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:code-check', () => this.doFullCodeCheck())); 78 | 79 | this.disposable.add(this._fullCodeCheck 80 | .concatMap(() => reloadWorkspace.reloadWorkspace() 81 | .toArray() 82 | .concatMap(x => Omni.solutions) 83 | .concatMap(solution => solution.whenConnected() 84 | .do(() => solution.diagnostics({ FileName: null }))) 85 | ) 86 | .subscribe()); 87 | 88 | Omni.registerConfiguration(solution => solution 89 | .whenConnected() 90 | .delay(1000) 91 | .subscribe(() => this._fullCodeCheck.next(true))); 92 | } 93 | 94 | public doFullCodeCheck() { 95 | this._fullCodeCheck.next(true); 96 | } 97 | 98 | public filterOnlyWarningsAndErrors(quickFixes: Models.DiagnosticLocation[]): Models.DiagnosticLocation[] { 99 | return filter(quickFixes, x => x.LogLevel !== 'Hidden'); 100 | } 101 | 102 | public dispose() { 103 | this.disposable.dispose(); 104 | } 105 | 106 | public required = true; 107 | public title = 'Diagnostics'; 108 | public description = 'Support for diagnostic errors.'; 109 | } 110 | 111 | export const codeCheck = new CodeCheck; 112 | -------------------------------------------------------------------------------- /lib/features/code-format.ts: -------------------------------------------------------------------------------- 1 | import {Models} from 'omnisharp-client'; 2 | import {CompositeDisposable} from 'ts-disposables'; 3 | import {Omni} from '../server/omni'; 4 | import {applyChanges} from '../services/apply-changes'; 5 | 6 | class CodeFormat implements IFeature { 7 | private disposable: CompositeDisposable; 8 | 9 | public activate() { 10 | this.disposable = new CompositeDisposable(); 11 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:code-format', () => this.format())); 12 | 13 | this.disposable.add(Omni.switchActiveEditor((editor, cd) => { 14 | cd.add(editor.onDidInsertText(event => { 15 | if (event.text.length > 1) return; 16 | 17 | if (event.text === ';' || event.text === '}' || event.text === '{' || event.text.charCodeAt(0) === 10) { 18 | Omni.request(editor, solution => solution.formatAfterKeystroke({ Character: event.text })) 19 | .subscribe(data => applyChanges(editor, data)); 20 | } 21 | })); 22 | })); 23 | } 24 | 25 | public dispose() { 26 | this.disposable.dispose(); 27 | } 28 | 29 | public format() { 30 | const editor = atom.workspace.getActiveTextEditor(); 31 | if (editor) { 32 | const buffer = editor.getBuffer(); 33 | Omni.request(editor, solution => { 34 | const request = { 35 | Line: 0, 36 | Column: 0, 37 | EndLine: buffer.getLineCount() - 1, 38 | EndColumn: 0, 39 | }; 40 | 41 | return solution 42 | .formatRange(request) 43 | .do(data => applyChanges(editor, data)); 44 | }); 45 | } 46 | } 47 | 48 | public required = false; 49 | public title = 'Code Format'; 50 | public description = 'Support for code formatting.'; 51 | } 52 | export const codeFormat = new CodeFormat; 53 | -------------------------------------------------------------------------------- /lib/features/find-symbols.ts: -------------------------------------------------------------------------------- 1 | import {CompositeDisposable} from 'ts-disposables'; 2 | import {Omni} from '../server/omni'; 3 | import {FindSymbolsView} from '../views/find-symbols-view'; 4 | 5 | class FindSymbols implements IFeature { 6 | private disposable: CompositeDisposable; 7 | private view: FindSymbolsView; 8 | 9 | public activate() { 10 | this.disposable = new CompositeDisposable(); 11 | this.disposable.add(atom.commands.add('atom-workspace', 'omnisharp-atom:find-symbols', () => { 12 | this.view = new FindSymbolsView(); 13 | })); 14 | 15 | this.disposable.add(Omni.listener.findsymbols.subscribe(data => { 16 | this.view.addToList(data.response.QuickFixes); 17 | })); 18 | } 19 | 20 | public dispose() { 21 | this.disposable.dispose(); 22 | } 23 | 24 | public required = true; 25 | public title = 'Find Symbols'; 26 | public description = 'Adds commands to find symbols through the UI.'; 27 | } 28 | 29 | export const findSymbols = new FindSymbols; 30 | -------------------------------------------------------------------------------- /lib/features/intellisense.ts: -------------------------------------------------------------------------------- 1 | import {defer} from 'lodash'; 2 | import {CompositeDisposable} from 'ts-disposables'; 3 | import {Omni} from '../server/omni'; 4 | 5 | class Intellisense implements IFeature { 6 | private disposable: CompositeDisposable; 7 | 8 | public activate() { 9 | this.disposable = new CompositeDisposable(); 10 | 11 | this.disposable.add(Omni.switchActiveEditor((editor, cd) => { 12 | cd.add(editor.onWillInsertText(event => { 13 | if (event.text.length > 1) return; 14 | 15 | if (event.text === ';' || event.text === '.') { 16 | atom.commands.dispatch(atom.views.getView(editor), 'autocomplete-plus:confirm'); 17 | } 18 | })); 19 | 20 | cd.add(editor.onDidInsertText(event => { 21 | if (event.text.length > 1) return; 22 | 23 | if (event.text === '.') { 24 | defer(() => atom.commands.dispatch(atom.views.getView(editor), 'autocomplete-plus:activate')); 25 | } 26 | })); 27 | })); 28 | } 29 | 30 | public dispose() { 31 | this.disposable.dispose(); 32 | } 33 | 34 | public required = false; 35 | public default = true; 36 | public title = 'Intellisense'; 37 | public description = 'Augments some of the issues with Atoms autocomplete-plus package'; 38 | } 39 | export const intellisense = new Intellisense; 40 | -------------------------------------------------------------------------------- /lib/features/navigate-up-down.ts: -------------------------------------------------------------------------------- 1 | import {Models} from 'omnisharp-client'; 2 | import {CompositeDisposable} from 'ts-disposables'; 3 | import {Omni} from '../server/omni'; 4 | 5 | class Navigate implements IFeature { 6 | private disposable: CompositeDisposable; 7 | 8 | public activate() { 9 | this.disposable = new CompositeDisposable(); 10 | 11 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:navigate-up', () => { 12 | return this.navigateUp(); 13 | })); 14 | 15 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:navigate-down', () => { 16 | return this.navigateDown(); 17 | })); 18 | 19 | this.disposable.add(Omni.listener.navigateup.subscribe(data => this.navigateTo(data.response))); 20 | this.disposable.add(Omni.listener.navigatedown.subscribe(data => this.navigateTo(data.response))); 21 | } 22 | 23 | public dispose() { 24 | this.disposable.dispose(); 25 | } 26 | 27 | public navigateUp() { 28 | Omni.request(solution => solution.navigateup({})); 29 | } 30 | 31 | public navigateDown() { 32 | Omni.request(solution => solution.navigatedown({})); 33 | } 34 | 35 | private navigateTo(data: Models.NavigateResponse) { 36 | const editor = atom.workspace.getActiveTextEditor(); 37 | Omni.navigateTo({ FileName: editor.getURI(), Line: data.Line, Column: data.Column }); 38 | } 39 | 40 | public required = true; 41 | public title = 'Navigate'; 42 | public description = 'Adds server based navigation support'; 43 | } 44 | export const navigate = new Navigate; 45 | -------------------------------------------------------------------------------- /lib/features/package-restore.ts: -------------------------------------------------------------------------------- 1 | import {CompositeDisposable} from 'ts-disposables'; 2 | import {Omni} from '../server/omni'; 3 | 4 | class PackageRestore implements IFeature { 5 | private disposable: CompositeDisposable; 6 | 7 | public activate() { 8 | this.disposable = new CompositeDisposable(); 9 | this.disposable.add(Omni.eachConfigEditor((editor, cd) => { 10 | cd.add(editor.getBuffer().onDidSave(() => { 11 | Omni.request(solution => solution.filesChanged([{ FileName: editor.getPath() }])); 12 | })); 13 | })); 14 | } 15 | 16 | public dispose() { 17 | this.disposable.dispose(); 18 | } 19 | 20 | public required = true; 21 | public title = 'Package Restore'; 22 | public description = 'Initializes a package restore, when an project.json file is saved.'; 23 | } 24 | 25 | export const packageRestore = new PackageRestore; 26 | -------------------------------------------------------------------------------- /lib/features/project-lock.ts: -------------------------------------------------------------------------------- 1 | import { File } from 'atom'; 2 | import * as fs from 'fs'; 3 | import { delay, each, groupBy, map, uniq } from 'lodash'; 4 | import * as path from 'path'; 5 | import { Observable, Subject } from 'rxjs'; 6 | import { CompositeDisposable, IDisposable } from 'ts-disposables'; 7 | import { Omni } from '../server/omni'; 8 | import { ProjectViewModel } from '../server/project-view-model'; 9 | import { Solution } from '../server/solution'; 10 | 11 | function projectLock(solution: Solution, project: ProjectViewModel, filePath: string) { 12 | const disposable = new CompositeDisposable(); 13 | const subject = new Subject(); 14 | const file = new File(filePath); 15 | let onDidChange = file.onDidChange(() => subject.next(filePath)); 16 | const onWillThrowWatchError = file.onWillThrowWatchError(() => { 17 | subject.next(filePath); 18 | disposable.remove(onDidChange); 19 | onDidChange.dispose(); 20 | delay(() => { 21 | onDidChange = file.onDidChange(() => subject.next(filePath)); 22 | disposable.add(onDidChange); 23 | }, 5000); 24 | }); 25 | 26 | disposable.add(onDidChange); 27 | disposable.add(onWillThrowWatchError); 28 | 29 | return { 30 | observable: subject.throttleTime(30000), 31 | dispose: () => disposable.dispose() 32 | }; 33 | } 34 | 35 | class FileMonitor implements IFeature { 36 | public required = false; 37 | public title = 'Project Monitor'; 38 | public description = 'Monitors project.lock.json files for changes outside of atom, and keeps the running solution in sync'; 39 | 40 | private disposable: CompositeDisposable; 41 | private filesMap = new WeakMap, IDisposable>(); 42 | 43 | public activate() { 44 | this.disposable = new CompositeDisposable(); 45 | 46 | const changes = Observable.merge(Omni.listener.model.projectAdded, Omni.listener.model.projectChanged) 47 | .map(project => ({ project, filePath: path.join(project.path, 'project.lock.json') })) 48 | .filter(({ filePath }) => fs.existsSync(filePath)) 49 | .flatMap(({ project, filePath }) => 50 | Omni.getSolutionForProject(project).map(solution => ({ solution, project, filePath }))) 51 | .filter(x => !!x.solution) 52 | .flatMap(({ solution, project, filePath }) => { 53 | if (this.filesMap.has(project)) { 54 | const v = this.filesMap.get(project); 55 | v.dispose(); 56 | } 57 | 58 | const lock = projectLock(solution, project, filePath); 59 | this.disposable.add(lock); 60 | this.filesMap.set(project, lock); 61 | return lock.observable.map(path => ({ solution, filePath })); 62 | }) 63 | .share(); 64 | 65 | this.disposable.add(changes 66 | .subscribe(change => { 67 | const solution = change[0].solution; 68 | solution.filesChanged({ FileName: change }); 69 | })); 70 | 71 | this.disposable.add(Omni.listener.model.projectRemoved 72 | .subscribe(project => { 73 | const removedItem = this.filesMap.get(project); 74 | if (removedItem) { 75 | this.filesMap.delete(project); 76 | removedItem.dispose(); 77 | } 78 | })); 79 | } 80 | 81 | public dispose() { 82 | this.disposable.dispose(); 83 | } 84 | } 85 | 86 | // tslint:disable-next-line:export-name 87 | export const fileMonitor = new FileMonitor(); 88 | -------------------------------------------------------------------------------- /lib/features/reload-workspace.ts: -------------------------------------------------------------------------------- 1 | import {exists} from 'fs'; 2 | import {Observable} from 'rxjs'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {Omni} from '../server/omni'; 5 | import {ProjectViewModel} from '../server/project-view-model'; 6 | const oexists = Observable.bindCallback(exists); 7 | 8 | class ReloadWorkspace implements IFeature { 9 | private disposable: CompositeDisposable; 10 | 11 | public activate() { 12 | this.disposable = new CompositeDisposable(); 13 | 14 | this.disposable.add(atom.commands.add(atom.views.getView(atom.workspace), 'omnisharp-atom:reload-workspace', () => this.reloadWorkspace().toPromise())); 15 | } 16 | 17 | public reloadWorkspace() { 18 | return Omni.solutions 19 | .flatMap(solution => { 20 | return Observable.from>(solution.model.projects) 21 | .flatMap(x => x.sourceFiles) 22 | .concatMap(file => oexists(file).filter(x => !x) 23 | .flatMap(() => solution.updatebuffer({ FileName: file, Buffer: '' }))); 24 | }); 25 | } 26 | 27 | public dispose() { 28 | this.disposable.dispose(); 29 | } 30 | 31 | public required = true; 32 | public title = 'Reload Workspace'; 33 | public description = 'Reloads the workspace, to make sure all the files are in sync.'; 34 | } 35 | 36 | export const reloadWorkspace = new ReloadWorkspace; 37 | -------------------------------------------------------------------------------- /lib/features/rename.ts: -------------------------------------------------------------------------------- 1 | import { trimEnd } from 'lodash'; 2 | import { CompositeDisposable } from 'ts-disposables'; 3 | import { Omni } from '../server/omni'; 4 | import { applyAllChanges } from '../services/apply-changes'; 5 | import { RenameView } from '../views/rename-view'; 6 | 7 | class Rename implements IFeature { 8 | public required = true; 9 | public title = 'Rename'; 10 | public description = 'Adds command to rename symbols.'; 11 | 12 | private disposable: CompositeDisposable; 13 | private renameView: RenameView; 14 | 15 | public activate() { 16 | this.disposable = new CompositeDisposable(); 17 | this.renameView = new RenameView(); 18 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:rename', e => { 19 | e.stopImmediatePropagation(); 20 | e.stopPropagation(); 21 | e.preventDefault(); 22 | this.rename(); 23 | })); 24 | 25 | this.disposable.add(Omni.listener.rename.subscribe(data => { 26 | applyAllChanges(data.response.Changes); 27 | })); 28 | } 29 | 30 | public dispose() { 31 | this.disposable.dispose(); 32 | } 33 | 34 | public rename() { 35 | const editor = atom.workspace.getActiveTextEditor(); 36 | let wordToRename: string; 37 | if (editor) { 38 | wordToRename = editor.getWordUnderCursor(); 39 | // Word under cursor can sometimes return the open bracket if the word is selected. 40 | wordToRename = trimEnd(wordToRename, '('); 41 | atom.workspace.addTopPanel({ 42 | item: this.renameView 43 | }); 44 | } 45 | return this.renameView.configure(wordToRename); 46 | } 47 | } 48 | export const rename = new Rename(); 49 | -------------------------------------------------------------------------------- /lib/features/run-tests.ts: -------------------------------------------------------------------------------- 1 | import * as childProcess from 'child_process'; 2 | import {Models} from 'omnisharp-client'; 3 | import {Observable, Subject} from 'rxjs'; 4 | import {CompositeDisposable, Disposable} from 'ts-disposables'; 5 | import {dock} from '../atom/dock'; 6 | import {Omni} from '../server/omni'; 7 | import {TestResultsWindow} from '../views/test-results-window'; 8 | 9 | // Using this enum as the Omnisharp one is freaking out. 10 | enum TestCommandType { 11 | All = 0, 12 | Fixture = 1, 13 | Single = 2 14 | } 15 | 16 | class RunTests implements IFeature { 17 | public required = true; 18 | public title = 'Test Runner'; 19 | public description = 'Adds support for running tests within atom.'; 20 | 21 | public testResults: OutputMessage[] = []; 22 | public observe: { 23 | output: Observable; 24 | }; 25 | 26 | private disposable: CompositeDisposable; 27 | private window: CompositeDisposable; 28 | private lastRun: Models.GetTestCommandResponse; 29 | private _testWindow: TestResultsWindow; 30 | 31 | public activate() { 32 | this.disposable = new CompositeDisposable(); 33 | this._testWindow = new TestResultsWindow(); 34 | 35 | const output = new Subject(); 36 | this.observe = { 37 | output: >output 38 | }; 39 | 40 | this.disposable.add(Omni.listener.gettestcontext.subscribe(data => { 41 | this._ensureWindowIsCreated(); 42 | this._executeTests(data.response); 43 | })); 44 | 45 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:run-all-tests', () => { 46 | this._makeRequest(TestCommandType.All); 47 | })); 48 | 49 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:run-fixture-tests', () => { 50 | this._makeRequest(TestCommandType.Fixture); 51 | })); 52 | 53 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:run-single-test', () => { 54 | this._makeRequest(TestCommandType.Single); 55 | })); 56 | 57 | this.disposable.add(Omni.addTextEditorCommand('omnisharp-atom:run-last-test', () => { 58 | this._executeTests(this.lastRun); 59 | })); 60 | } 61 | 62 | public dispose() { 63 | this.disposable.dispose(); 64 | } 65 | 66 | private _makeRequest(type: TestCommandType) { 67 | Omni.request(solution => solution.gettestcontext({ Type: type })); 68 | } 69 | 70 | private _executeTests(response: Models.GetTestCommandResponse) { 71 | this.testResults.length = 0; 72 | this.lastRun = response; 73 | 74 | this._testWindow.clear(); 75 | 76 | const child = childProcess.exec(response.TestCommand, { cwd: response.Directory }); 77 | 78 | child.stdout.on('data', (data: any) => { 79 | this._testWindow.addMessage({ message: data, logLevel: '' }); 80 | }); 81 | 82 | child.stderr.on('data', (data: any) => { 83 | this._testWindow.addMessage({ message: data, logLevel: 'fail' }); 84 | }); 85 | 86 | dock.selectWindow('test-output'); 87 | } 88 | 89 | private _ensureWindowIsCreated() { 90 | if (!this.window) { 91 | this.window = new CompositeDisposable(); 92 | 93 | const windowDisposable = dock.addWindow('test-output', 'Test output', this._testWindow, { priority: 2000, closeable: true }, this.window); 94 | this.window.add(windowDisposable); 95 | this.window.add(Disposable.create(() => { 96 | this.disposable.remove(this.window); 97 | this.window = null; 98 | })); 99 | this.disposable.add(this.window); 100 | } 101 | } 102 | } 103 | 104 | // tslint:disable-next-line:export-name 105 | export const runTests = new RunTests(); 106 | -------------------------------------------------------------------------------- /lib/omnisharp.ts: -------------------------------------------------------------------------------- 1 | import {Api, Models} from 'omnisharp-client'; 2 | import {Observable} from 'rxjs'; 3 | 4 | export interface ExtendApi extends Api.V2 { 5 | request(path: string, request: TRequest): Observable; 6 | path: string; 7 | whenConnected(): Observable; 8 | } 9 | 10 | export interface IProjectViewModel { 11 | name: string; 12 | path: string; 13 | activeFramework: Models.DotNetFramework; 14 | frameworks: Models.DotNetFramework[]; 15 | configurations: string[]; 16 | } 17 | -------------------------------------------------------------------------------- /lib/operators/bufferFor.ts: -------------------------------------------------------------------------------- 1 | // import {Observable} from 'rxjs/Observable'; 2 | // import {Operator} from 'rxjs/Operator'; 3 | // import {Scheduler} from 'rxjs/Scheduler'; 4 | // import {Subscriber} from 'rxjs/Subscriber'; 5 | // import {async} from 'rxjs/scheduler/async'; 6 | 7 | // export function bufferFor(observable: Observable, bufferDuration: number, scheduler = async): Observable { 8 | // return observable.lift(new BufferForOperator(bufferDuration, scheduler)); 9 | // } 10 | 11 | // class BufferForOperator implements Operator { 12 | // constructor(private bufferDuration: number, private scheduler: Scheduler) { 13 | // } 14 | 15 | // public call(subscriber: Subscriber, source: any): Subscriber { 16 | // return source._subscribe(new BufferForSubscriber(subscriber, this.bufferDuration, this.scheduler)); 17 | // } 18 | // } 19 | 20 | // class BufferForSubscriber extends Subscriber { 21 | // private buffer: T[]; 22 | // private open = false; 23 | 24 | // constructor(destination: Subscriber, private bufferDuration: number, private scheduler: Scheduler) { 25 | // super(destination); 26 | // } 27 | 28 | // protected _next(value: T) { 29 | // if (!this.open) { 30 | // this.openBuffer(); 31 | // } 32 | // this.buffer.push(value); 33 | // } 34 | 35 | // protected _complete() { 36 | // const buffer = this.buffer; 37 | // if (buffer) { 38 | // this.destination.next(buffer); 39 | // } 40 | // super._complete(); 41 | // } 42 | 43 | // protected _unsubscribe() { 44 | // this.buffer = null; 45 | // } 46 | 47 | // public closeBuffer() { 48 | // this.open = false; 49 | 50 | // const buffer = this.buffer; 51 | // if (this.buffer) { 52 | // this.destination.next(buffer); 53 | // } 54 | 55 | // this.buffer = null; 56 | // } 57 | 58 | // public openBuffer() { 59 | // const schedule = this.scheduler.schedule(() => { 60 | // this.remove(schedule); 61 | // this.closeBuffer(); 62 | // }, this.bufferDuration); 63 | // this.add(schedule); 64 | 65 | // this.open = true; 66 | // this.buffer = []; 67 | // } 68 | // } 69 | -------------------------------------------------------------------------------- /lib/server/atom-projects.ts: -------------------------------------------------------------------------------- 1 | import {difference} from 'lodash'; 2 | import {Subject} from 'rxjs'; 3 | import {CompositeDisposable, IDisposable} from 'ts-disposables'; 4 | 5 | export class AtomProjectTracker implements IDisposable { 6 | private _disposable = new CompositeDisposable(); 7 | private _projectPaths: string[] = []; 8 | private _addedSubject = new Subject(); 9 | private _removedSubject = new Subject(); 10 | 11 | public get added() { return this._addedSubject; } 12 | public get removed() { return this._removedSubject; } 13 | public get paths() { return this._projectPaths.slice(); } 14 | 15 | public activate() { 16 | // monitor atom project paths 17 | this.updatePaths(atom.project.getPaths()); 18 | this._disposable.add(atom.project.onDidChangePaths((paths: string[]) => this.updatePaths(paths))); 19 | } 20 | 21 | private updatePaths(paths: string[]) { 22 | const addedPaths = difference(paths, this._projectPaths); 23 | const removedPaths = difference(this._projectPaths, paths); 24 | 25 | for (const project of addedPaths) this._addedSubject.next(project); 26 | for (const project of removedPaths) this._removedSubject.next(project); 27 | 28 | this._projectPaths = paths; 29 | } 30 | 31 | public dispose() { 32 | this._disposable.dispose(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/server/composite-solution.ts: -------------------------------------------------------------------------------- 1 | import {ReactiveCombinationClient, ReactiveObservationClient} from 'omnisharp-client'; 2 | import {Solution} from './solution'; 3 | import {ViewModel} from './view-model'; 4 | 5 | export class SolutionObserver extends ReactiveObservationClient { 6 | public model: typeof ViewModel.prototype.observe; 7 | 8 | constructor(solutions: Solution[] = []) { 9 | super(solutions); 10 | 11 | this.model = { 12 | diagnostics: this.makeObservable((solution: Solution) => solution.model.observe.diagnostics), 13 | diagnosticsCounts: this.makeObservable((solution: Solution) => solution.model.observe.diagnosticsCounts), 14 | diagnosticsByFile: this.makeObservable((solution: Solution) => solution.model.observe.diagnosticsByFile), 15 | output: this.makeObservable((solution: Solution) => solution.model.observe.output), 16 | status: this.makeObservable((solution: Solution) => solution.model.observe.status), 17 | state: this.makeObservable((solution: Solution) => solution.model.observe.state), 18 | projectAdded: this.makeObservable((solution: Solution) => solution.model.observe.projectAdded), 19 | projectRemoved: this.makeObservable((solution: Solution) => solution.model.observe.projectRemoved), 20 | projectChanged: this.makeObservable((solution: Solution) => solution.model.observe.projectChanged), 21 | projects: this.makeObservable((solution: Solution) => solution.model.observe.projects) 22 | }; 23 | } 24 | } 25 | 26 | export class SolutionAggregateObserver extends ReactiveCombinationClient { } 27 | -------------------------------------------------------------------------------- /lib/server/metadata-editor.ts: -------------------------------------------------------------------------------- 1 | import {TextEditor} from 'atom'; 2 | import {startsWith} from 'lodash'; 3 | import {IDisposable} from 'ts-disposables'; 4 | import {OmnisharpEditorContext, IOmnisharpTextEditor} from './omnisharp-text-editor'; 5 | import {Solution} from './solution'; 6 | import {SolutionManager} from './solution-manager'; 7 | 8 | const metadataUri = 'omnisharp://metadata/'; 9 | export function metadataOpener(): IDisposable { 10 | function createEditorView(assemblyName: string, typeName: string) { 11 | function issueRequest(solution: Solution) { 12 | return solution.request('metadata', { AssemblyName: assemblyName, TypeName: typeName }) 13 | .map(response => ({ source: response.Source, path: response.SourceName, solution })); 14 | } 15 | 16 | function setupEditor({solution, path, source}: { solution: Solution; source: string; path: string }) { 17 | const editor = new TextEditor({}); 18 | editor.setText(source); 19 | editor.onWillInsertText(e => e.cancel()); 20 | editor.getBuffer().setPath(path); 21 | 22 | const context = new OmnisharpEditorContext(editor, solution); 23 | context.metadata = true; 24 | const result: IOmnisharpTextEditor = editor; 25 | result.omnisharp = context; 26 | 27 | editor.save = function () { /* */ }; 28 | editor.saveAs = function () { /* */ }; 29 | 30 | return editor; 31 | } 32 | 33 | return SolutionManager.activeSolution 34 | .take(1) 35 | .flatMap(issueRequest, (_z, z) => setupEditor(z)) 36 | .toPromise(); 37 | } 38 | 39 | return atom.workspace.addOpener((uri: string) => { 40 | if (startsWith(uri, metadataUri)) { 41 | const url = uri.substr(metadataUri.length); 42 | const [assemblyName, typeName] = url.split('/'); 43 | return createEditorView(assemblyName, typeName); 44 | } 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /lib/server/omnisharp-configuration.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/lib/server/omnisharp-configuration.ts -------------------------------------------------------------------------------- /lib/services/apply-changes.ts: -------------------------------------------------------------------------------- 1 | import {Models} from 'omnisharp-client'; 2 | /* tslint:disable:variable-name */ 3 | const Range = require('atom').Range; 4 | /* tslint:enable:variable-name */ 5 | import {Observable} from 'rxjs'; 6 | 7 | export function applyChanges(editor: Atom.TextEditor, response: { Changes?: Models.LinePositionSpanTextChange[]; Buffer?: string; }) { 8 | if (!response) return; 9 | if (response.Changes) { 10 | const buffer = editor.getBuffer(); 11 | const checkpoint = buffer.createCheckpoint(); 12 | 13 | response.Changes.forEach(change => { 14 | const range = new Range([change.StartLine, change.StartColumn], [change.EndLine, change.EndColumn]); 15 | buffer.setTextInRange(range, change.NewText); 16 | }); 17 | 18 | buffer.groupChangesSinceCheckpoint(checkpoint); 19 | } else if (response.Buffer) { 20 | editor.setText(response.Buffer); 21 | } 22 | } 23 | 24 | // If you have preview tabs enabled, 25 | // they will actually try to close 26 | // with changes still. 27 | function resetPreviewTab() { 28 | const pane: HTMLElement = atom.views.getView(atom.workspace.getActivePane()); 29 | if (pane) { 30 | const title = pane.querySelector('.title.temp'); 31 | if (title) { 32 | title.classList.remove('temp'); 33 | } 34 | 35 | const tab = pane.querySelector('.preview-tab.active'); 36 | if (tab) { 37 | tab.classList.remove('preview-tab'); 38 | (tab).isPreviewTab = false; 39 | } 40 | } 41 | } 42 | 43 | export function applyAllChanges(changes: Models.ModifiedFileResponse[]) { 44 | resetPreviewTab(); 45 | return Observable.from(changes) 46 | .concatMap(change => >atom.workspace.open(change.FileName, undefined) 47 | .then(editor => { 48 | resetPreviewTab(); 49 | applyChanges(editor, change); 50 | })) 51 | .subscribe(); 52 | } 53 | -------------------------------------------------------------------------------- /lib/services/framework-provider.ts: -------------------------------------------------------------------------------- 1 | import { ajax } from 'jquery'; 2 | import { keys } from 'lodash'; 3 | import { Observable } from 'rxjs'; 4 | const filter = require('fuzzaldrin').filter; 5 | 6 | const frameworkCache = new Map(); 7 | 8 | function fetchFrameworkFromGithub(framework: string) { 9 | if (frameworkCache.has(framework)) { 10 | return Observable.of<{ [key: string]: string }>(frameworkCache.get(framework)); 11 | } 12 | 13 | // Get the file from github 14 | const result = ajax(`https://raw.githubusercontent.com/OmniSharp/omnisharp-nuget/resources/frameworks/${framework.toLowerCase()}.json`).then(res => JSON.parse(res)); 15 | 16 | return Observable.fromPromise<{ [key: string]: string }>(result); 17 | } 18 | 19 | interface IAutocompleteProviderOptions { 20 | editor: Atom.TextEditor; 21 | bufferPosition: TextBuffer.Point; // the position of the cursor 22 | prefix: string; 23 | scopeDescriptor: { scopes: string[] }; 24 | activatedManually: boolean; 25 | path: string; 26 | replacementPrefix: string; 27 | } 28 | 29 | interface IAutocompleteProvider { 30 | fileMatchs: string[]; 31 | pathMatch: (path: string) => boolean; 32 | getSuggestions: (options: IAutocompleteProviderOptions) => Promise; 33 | dispose(): void; 34 | } 35 | 36 | function makeSuggestion(item: string, replacementPrefix: string) { 37 | const type = 'package'; 38 | 39 | return { 40 | _search: item, 41 | text: item, 42 | snippet: item, 43 | type: type, 44 | displayText: item, 45 | replacementPrefix, 46 | className: 'autocomplete-project-json', 47 | }; 48 | } 49 | 50 | const nameRegex = /\/((?:dnx|net)[0-9]{2,3})\/frameworkAssemblies$/; 51 | const versionRegex = /\/((?:dnx|net)[0-9]{2,3})\/frameworkAssemblies\/([a-zA-Z0-9\._]*?)(?:\/version)?$/; 52 | 53 | class NugetNameProvider implements IAutocompleteProvider { 54 | public getSuggestions(options: IAutocompleteProviderOptions) { 55 | const framework = options.path.match(nameRegex)[1]; 56 | 57 | return fetchFrameworkFromGithub(framework) 58 | .map(keys) 59 | .map(z => z.map(x => makeSuggestion(x, options.replacementPrefix))) 60 | .map(s => filter(s, options.prefix, { key: '_search' })) 61 | .toPromise(); 62 | } 63 | public fileMatchs = ['project.json']; 64 | public pathMatch(path: string) { 65 | return path && !!path.match(nameRegex); 66 | } 67 | public dispose() { /* */ } 68 | } 69 | 70 | class NugetVersionProvider implements IAutocompleteProvider { 71 | public getSuggestions(options: IAutocompleteProviderOptions) { 72 | const match = options.path.match(versionRegex); 73 | const framework = match[1]; 74 | const name = match[2]; 75 | 76 | return fetchFrameworkFromGithub(framework) 77 | .map(x => [makeSuggestion(x[name], options.replacementPrefix)]) 78 | .toPromise(); 79 | } 80 | public fileMatchs = ['project.json']; 81 | public pathMatch(path: string) { 82 | return path && !!path.match(versionRegex); 83 | } 84 | public dispose() { /* */ } 85 | } 86 | 87 | const providers = [new NugetNameProvider, new NugetVersionProvider]; 88 | module.exports = providers; 89 | -------------------------------------------------------------------------------- /lib/services/linter-provider.ts: -------------------------------------------------------------------------------- 1 | import { Models } from 'omnisharp-client'; 2 | import { Omni } from '../server/omni'; 3 | /* tslint:disable:variable-name */ 4 | const Range = require('atom').Range; 5 | /* tslint:enable:variable-name */ 6 | import { each } from 'lodash'; 7 | import { CompositeDisposable } from 'ts-disposables'; 8 | 9 | interface LinterMessage { 10 | type: string; // "error" | "warning" 11 | text?: string; 12 | html?: string; 13 | filePath?: string; 14 | range?: Range; 15 | [key: string]: any; 16 | } 17 | 18 | interface IndieRegistry { 19 | register(options: { name: string; }): Indie; 20 | has(indie: any): Boolean; 21 | unregister(indie: any): void; 22 | } 23 | 24 | interface Indie { 25 | setMessages(messages: LinterMessage[]): void; 26 | deleteMessages(): void; 27 | dispose(): void; 28 | } 29 | 30 | function mapIndieValues(error: Models.DiagnosticLocation): LinterMessage { 31 | const level = error.LogLevel.toLowerCase(); 32 | 33 | return { 34 | type: level, 35 | text: `${error.Text} [${Omni.getFrameworks(error.Projects)}] `, 36 | filePath: error.FileName, 37 | range: new Range([error.Line, error.Column], [error.EndLine, error.EndColumn]) 38 | }; 39 | } 40 | 41 | function showLinter() { 42 | each(document.querySelectorAll('linter-bottom-tab'), (element: HTMLElement) => { element.style.display = ''; }); 43 | each(document.querySelectorAll('linter-bottom-status'), (element: HTMLElement) => { element.style.display = ''; }); 44 | const panel = document.querySelector('linter-panel'); 45 | if (panel) 46 | panel.style.display = ''; 47 | } 48 | 49 | function hideLinter() { 50 | each(document.querySelectorAll('linter-bottom-tab'), (element: HTMLElement) => { element.style.display = 'none'; }); 51 | each(document.querySelectorAll('linter-bottom-status'), (element: HTMLElement) => { element.style.display = 'none'; }); 52 | const panel = document.querySelector('linter-panel'); 53 | if (panel) 54 | panel.style.display = 'none'; 55 | } 56 | 57 | let showHiddenDiagnostics = true; 58 | 59 | export function init(linter: { getEditorLinter: (editor: Atom.TextEditor) => { lint: (shouldLint: boolean) => void } }) { 60 | const disposable = new CompositeDisposable(); 61 | let cd: CompositeDisposable; 62 | disposable.add(atom.config.observe('omnisharp-atom.hideLinterInterface', hidden => { 63 | if (hidden) { 64 | cd = new CompositeDisposable(); 65 | disposable.add(cd); 66 | 67 | // show linter buttons 68 | cd.add(Omni.activeEditor 69 | .filter(z => !z) 70 | .subscribe(showLinter)); 71 | 72 | // hide linter buttons 73 | cd.add(Omni.activeEditor 74 | .filter(z => !!z) 75 | .subscribe(hideLinter)); 76 | } else { 77 | if (cd) { 78 | disposable.remove(cd); 79 | cd.dispose(); 80 | } 81 | showLinter(); 82 | } 83 | })); 84 | 85 | disposable.add(atom.config.observe('omnisharp-atom.showHiddenDiagnostics', show => { 86 | showHiddenDiagnostics = show; 87 | atom.workspace.getTextEditors().forEach(editor => { 88 | const editorLinter = linter.getEditorLinter(editor); 89 | if (editorLinter) { 90 | editorLinter.lint(true); 91 | } 92 | }); 93 | })); 94 | 95 | disposable.add(Omni.activeEditor.filter(z => !!z).take(1).delay(1000).subscribe(e => { 96 | Omni.whenEditorConnected(e).subscribe(() => { 97 | atom.workspace.getTextEditors().forEach(editor => { 98 | const editorLinter = linter.getEditorLinter(editor); 99 | if (editorLinter) { 100 | editorLinter.lint(true); 101 | } 102 | }); 103 | }); 104 | })); 105 | 106 | return disposable; 107 | } 108 | 109 | export function registerIndie(registry: IndieRegistry, disposable: CompositeDisposable) { 110 | const linter = registry.register({ name: 'c#' }); 111 | disposable.add( 112 | linter, 113 | Omni.diagnostics 114 | .subscribe(diagnostics => { 115 | const messages: LinterMessage[] = []; 116 | for (const item of diagnostics) { 117 | if (showHiddenDiagnostics || item.LogLevel !== 'Hidden') { 118 | messages.push(mapIndieValues(item)); 119 | } 120 | } 121 | 122 | linter.setMessages(messages); 123 | }) 124 | ); 125 | } 126 | 127 | -------------------------------------------------------------------------------- /lib/services/omni-select-list-view.ts: -------------------------------------------------------------------------------- 1 | import * as SpacePen from 'atom-space-pen-views'; 2 | import {Models} from 'omnisharp-client'; 3 | const $ : JQueryStatic = require('jquery'); 4 | 5 | export class OmniSelectListView extends SpacePen.SelectListView { 6 | public panel: Atom.Panel; 7 | private items: any[] = []; 8 | private list: any; 9 | 10 | constructor(placeholderText : string) { 11 | super({ placeholderText: placeholderText }); 12 | this.setItems([]); 13 | this.storeFocusedElement(); 14 | this.panel = atom.workspace.addModalPanel({ item: this }); 15 | this.focusFilterEditor(); 16 | } 17 | 18 | public addToList(symbols : Models.QuickFix[]) : void { 19 | this.list.empty(); 20 | 21 | if (symbols.length > 0) { 22 | this.setError(null); 23 | 24 | for (let i = 0; i < Math.min(symbols.length, this.maxItems); i++) { 25 | const item = symbols[i]; 26 | const itemView = $(this.viewForItem(item)); 27 | itemView.data('select-list-item', item); 28 | this.list.append(itemView); 29 | } 30 | 31 | this.selectItemView(this.list.find('li:first')); 32 | } 33 | } 34 | 35 | public populateList() { 36 | if (this.items === null) { 37 | return; 38 | } 39 | 40 | const filterQuery = this.getFilterQuery(); 41 | 42 | if (filterQuery.length >= this.getMinQueryLength()) { 43 | this.onFilter(filterQuery); 44 | } else { 45 | this.list.empty(); 46 | } 47 | } 48 | 49 | public onFilter(filter : string) : void { 50 | throw new Error('Subclass must implement an onFilter(filter) method'); 51 | } 52 | 53 | public getMinQueryLength() : number { 54 | return 0; 55 | } 56 | 57 | public cancelled() { 58 | this.panel.destroy(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/typings.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface IFeature { 4 | activate(): void; 5 | dispose(): void; 6 | required: boolean; 7 | title: string; 8 | description: string; 9 | default?: boolean; 10 | } 11 | 12 | interface IAtomFeature extends IFeature { 13 | attach(): void; 14 | } 15 | 16 | interface ICompletionResult { 17 | word: string; 18 | prefix: string; 19 | renderLabelAsHtml: boolean; 20 | label: string; 21 | } 22 | 23 | interface OutputMessage { 24 | message: string; 25 | logLevel?: string; 26 | } 27 | 28 | interface WebComponent { 29 | createdCallback?: () => void; 30 | attachedCallback?: () => void; 31 | detachedCallback?: () => void; 32 | attributeChangedCallback?: (attrName: string, oldVal: any, newVal: any) => void; 33 | } 34 | 35 | declare module Fastdom { 36 | export function measure(cb: Function): any; 37 | export function mutate(cb: Function): any; 38 | export function clear(caller: any): void; 39 | } 40 | -------------------------------------------------------------------------------- /lib/views/build-output-pane-view.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-string-literal */ 2 | import { each } from 'lodash'; 3 | import { CompositeDisposable } from 'ts-disposables'; 4 | import { server } from '../atom/server-information'; 5 | import { Convert } from '../services/ansi-to-html'; 6 | 7 | // tslint:disable-next-line:export-name 8 | export class BuildOutputWindow extends HTMLDivElement implements WebComponent { 9 | public displayName = 'BuildOutputWindow'; 10 | private _convert: any; 11 | private _output: OutputMessage[]; 12 | private disposable: CompositeDisposable; 13 | 14 | public createdCallback() { 15 | this._convert = new Convert(); 16 | this._output = []; 17 | 18 | this.classList.add('build-output-pane-view', 'native-key-bindings'); 19 | this.tabIndex = -1; 20 | } 21 | 22 | public attachedCallback() { 23 | this.disposable = new CompositeDisposable(); 24 | this.disposable.add(server.observe.outputElement.subscribe(element => { 25 | each(this.children, child => child.remove()); 26 | this.appendChild(element); 27 | })); 28 | this.disposable.add(server.observe.output.delay(100).subscribe(() => this.scrollToBottom())); 29 | this.scrollToBottom(); 30 | } 31 | 32 | public detachedCallback() { 33 | this.disposable.dispose(); 34 | } 35 | 36 | private scrollToBottom() { 37 | const item = (this.lastElementChild && this.lastElementChild.lastElementChild); 38 | if (item) item.scrollIntoViewIfNeeded(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/views/code-actions-view.ts: -------------------------------------------------------------------------------- 1 | import * as SpacePen from 'atom-space-pen-views'; 2 | 3 | export interface SelectListViewOptions { 4 | items: T[]; 5 | confirmed: (item: T) => any; 6 | } 7 | 8 | export function factory (options: SelectListViewOptions, editor: Atom.TextEditor): CodeActionsView { 9 | let codeActionView = (editor).codeActionView; 10 | if (!codeActionView) { 11 | (editor).codeActionView = codeActionView = new CodeActionsView(options, editor); 12 | } else { 13 | codeActionView.options = options; 14 | } 15 | 16 | codeActionView.setItems(); 17 | codeActionView.show(); 18 | return codeActionView; 19 | } 20 | 21 | class CodeActionsView extends SpacePen.SelectListView { 22 | 23 | private _overlayDecoration: any; 24 | private _vimMode: boolean; 25 | private _editorElement: any; 26 | 27 | constructor(public options: SelectListViewOptions, public editor: Atom.TextEditor) { 28 | super(); 29 | this._editorElement = atom.views.getView(editor); 30 | this._vimMode = atom.packages.isPackageActive('vim-mode'); 31 | this.$.addClass('code-actions-overlay'); 32 | (this).filterEditorView.model.placeholderText = 'Filter list'; 33 | } 34 | 35 | get $(): JQuery { 36 | return this; 37 | } 38 | 39 | public setItems() { 40 | //super.setItems(this.options.items) 41 | SpacePen.SelectListView.prototype.setItems.call(this, this.options.items); 42 | } 43 | 44 | public confirmed(item: any): any { 45 | this.cancel(); //will close the view 46 | 47 | this.options.confirmed(item); 48 | 49 | this.enableVimMode(); 50 | return null; 51 | } 52 | 53 | public show() { 54 | this.storeFocusedElement(); 55 | this.disableVimMode(); 56 | this.destroyOverlay(); 57 | this._overlayDecoration = this.editor.decorateMarker(this.editor.getLastCursor().getMarker(), 58 | { type: 'overlay', position: 'tail', item: this }); 59 | 60 | setTimeout(() => this.focusFilterEditor(), 100); 61 | } 62 | 63 | public hide() { 64 | this.restoreFocus(); 65 | this.enableVimMode(); 66 | this.destroyOverlay(); 67 | } 68 | 69 | public destroyOverlay() { 70 | if (this._overlayDecoration) 71 | this._overlayDecoration.destroy(); 72 | } 73 | 74 | 75 | public cancelled() { 76 | this.hide(); 77 | } 78 | 79 | public enableVimMode() { 80 | if (this._vimMode) { 81 | this._editorElement.classList.add('vim-mode'); 82 | } 83 | } 84 | 85 | public disableVimMode() { 86 | if (this._vimMode) { 87 | this._editorElement.classList.remove('vim-mode'); 88 | } 89 | } 90 | 91 | public getFilterKey() { return 'Name'; } 92 | 93 | public viewForItem(item: any) { 94 | 95 | return SpacePen.$$(function () { 96 | return this.li({ 97 | 'class': 'event', 98 | 'data-event-name': item.Name 99 | }, () => { 100 | return this.span(item.Name, { 101 | title: item.Name 102 | }); 103 | }); 104 | }); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/views/command-output-window.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-string-literal */ 2 | import { throttle, defer } from 'lodash'; 3 | 4 | export class CommandOutputWindow extends HTMLDivElement implements WebComponent { 5 | public displayName = 'CommandOutputWindow'; 6 | private _container: HTMLDivElement; 7 | private _scrollToBottom: () => void; 8 | 9 | public createdCallback() { 10 | this.classList.add('omni-output-pane-view', 'native-key-bindings'); 11 | this.tabIndex = -1; 12 | 13 | this._container = document.createElement('div'); 14 | this._container.classList.add('messages-container'); 15 | this.appendChild(this._container); 16 | 17 | this._scrollToBottom = throttle(() => { 18 | const item = (this.lastElementChild && this.lastElementChild.lastElementChild); 19 | if (item) item.scrollIntoViewIfNeeded(); 20 | }, 100, { trailing: true }); 21 | } 22 | 23 | public attachedCallback() { 24 | defer(this._scrollToBottom, this); 25 | } 26 | 27 | public addMessage(item: { message: string }) { 28 | const pre = document.createElement('pre'); 29 | pre.innerText = item.message.trim(); 30 | 31 | this._container.appendChild(pre); 32 | this._scrollToBottom(); 33 | } 34 | } 35 | 36 | (exports).CommandOutputWindow = (document).registerElement('omnisharp-command-output', { prototype: CommandOutputWindow.prototype }); 37 | -------------------------------------------------------------------------------- /lib/views/find-pane-view.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-string-literal */ 2 | import {Models} from 'omnisharp-client'; 3 | import * as path from 'path'; 4 | import {Omni} from '../server/omni'; 5 | import {HighlightElement} from './highlight-element'; 6 | import {MessageElement, OutputElement} from './output-component'; 7 | 8 | export interface FindMessageElement extends MessageElement { } 9 | 10 | const getMessageElement = (function () { 11 | const selectedProps = { 12 | get: function selected() { return this.classList.contains('selected'); }, 13 | set: function selected(value: boolean) { if (value) this.classList.add('selected'); else this.classList.remove('selected'); } 14 | }; 15 | 16 | const keyProps = { 17 | get: function key() { return this._key; } 18 | }; 19 | 20 | const inviewProps = { 21 | get: function inview() { return this._inview; }, 22 | set: function inview(value: boolean) { 23 | if (!this._inview && value) { 24 | this._text.enhance(); 25 | } 26 | this._inview = value; 27 | } 28 | }; 29 | 30 | function setMessage(key: string, item: Models.DiagnosticLocation) { 31 | this._key = key; 32 | this._inview = false; 33 | 34 | this.classList.add(item.LogLevel); 35 | this._usage = item; 36 | this._text.usage = item; 37 | this._location.innerText = `${path.basename(item.FileName)}(${item.Line},${item.Column})`; 38 | this._filename.innerText = path.dirname(item.FileName); 39 | } 40 | 41 | function attached() { 42 | this._text.usage = this._usage; 43 | } 44 | 45 | function detached() { this._inview = false; } 46 | 47 | return function getMessageElement(): FindMessageElement { 48 | const element: FindMessageElement = document.createElement('li'); 49 | element.classList.add('find-usages'); 50 | 51 | const text = (element as any)._text = new HighlightElement(); 52 | text.classList.add('text-highlight'); 53 | element.appendChild(text); 54 | 55 | const location = (element as any)._location = document.createElement('pre'); 56 | location.classList.add('inline-block'); 57 | element.appendChild(location); 58 | 59 | const filename = (element as any)._filename = document.createElement('pre'); 60 | filename.classList.add('text-subtle', 'inline-block'); 61 | element.appendChild(filename); 62 | 63 | Object.defineProperty(element, 'key', keyProps); 64 | Object.defineProperty(element, 'selected', selectedProps); 65 | Object.defineProperty(element, 'inview', inviewProps); 66 | element.setMessage = setMessage; 67 | element.attached = attached; 68 | element.detached = detached; 69 | 70 | return element; 71 | }; 72 | })(); 73 | 74 | export class FindWindow extends HTMLDivElement implements WebComponent { 75 | public displayName = 'FindPaneWindow'; 76 | private _list: OutputElement; 77 | 78 | public createdCallback() { 79 | this.classList.add('find-output-pane'); 80 | this._list = new OutputElement(); 81 | this.appendChild(this._list); 82 | this._list.getKey = (usage: Models.QuickFix) => { 83 | return `quick-fix-${usage.FileName}-(${usage.Line}-${usage.Column})-(${usage.EndLine}-${usage.EndColumn})-(${usage.Projects.join('-')})`; 84 | }; 85 | this._list.handleClick = (item: Models.QuickFix) => { 86 | this.gotoUsage(item); 87 | }; 88 | this._list.eventName = 'usage'; 89 | this._list.elementFactory = getMessageElement; 90 | } 91 | 92 | public attachedCallback() { 93 | this._list.attached(); 94 | } 95 | 96 | public detachedCallback() { 97 | this._list.detached(); 98 | } 99 | 100 | public update(output: Models.QuickFix[]) { 101 | this._list.updateOutput(output); 102 | } 103 | 104 | public next() { 105 | this._list.next(); 106 | } 107 | 108 | public prev() { 109 | this._list.prev(); 110 | } 111 | 112 | public get selectedIndex() { return this._list.selectedIndex; } 113 | public set selectedIndex(value) { this._list.selectedIndex = value; } 114 | public get current() { return this._list.current; } 115 | 116 | private gotoUsage(quickfix: Models.QuickFix) { 117 | Omni.navigateTo(quickfix); 118 | } 119 | } 120 | 121 | (exports).FindWindow = (document).registerElement('omnisharp-find-window', { prototype: FindWindow.prototype }); 122 | -------------------------------------------------------------------------------- /lib/views/find-symbols-view.ts: -------------------------------------------------------------------------------- 1 | import {Models} from 'omnisharp-client'; 2 | import {Omni} from '../server/omni'; 3 | import {OmniSelectListView} from '../services/omni-select-list-view'; 4 | 5 | export class FindSymbolsView extends OmniSelectListView { 6 | constructor() { 7 | super('Find Symbols'); 8 | 9 | this.setMaxItems(50); 10 | } 11 | 12 | public viewForItem(item: Models.SymbolLocation) { 13 | return `
  • 14 | 15 | 16 | ${ item.Text } 17 | 18 |
    19 | ${ atom.project.relativizePath(item.FileName)[1] }: ${item.Line} 20 |
  • `; 21 | } 22 | 23 | public getFilterKey() { 24 | return 'Text'; 25 | } 26 | 27 | public confirmed(item: any): any { 28 | this.cancel(); 29 | this.hide(); 30 | 31 | Omni.navigateTo(item); 32 | return null; 33 | } 34 | 35 | public onFilter(filter: string) { 36 | Omni.request(solution => solution.findsymbols({ Filter: filter })); 37 | } 38 | 39 | public getMinQueryLength() { 40 | return 1; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/views/framework-selector-view.ts: -------------------------------------------------------------------------------- 1 | import * as SpacePen from 'atom-space-pen-views'; 2 | import {Models} from 'omnisharp-client'; 3 | import {frameworkSelector} from '../atom/framework-selector'; 4 | const $: JQueryStatic = require('jquery'); 5 | 6 | interface FrameworkSelectorState { 7 | frameworks?: Models.DotNetFramework[]; 8 | activeFramework?: Models.DotNetFramework; 9 | alignLeft?: boolean; 10 | } 11 | 12 | export class FrameworkSelectorComponent extends HTMLAnchorElement implements WebComponent { 13 | public frameworks: Models.DotNetFramework[]; 14 | private _activeFramework: Models.DotNetFramework; 15 | public get activeFramework() { return this._activeFramework; } 16 | public set activeFramework(value) { this._activeFramework = value; this.innerText = this.activeFramework.FriendlyName; } 17 | 18 | public alignLeft: boolean; 19 | 20 | public createdCallback() { 21 | this.onclick = e => { 22 | const view = new FrameworkSelectorSelectListView(atom.workspace.getActiveTextEditor(), { 23 | attachTo: '.framework-selector', 24 | alignLeft: this.alignLeft, 25 | items: this.frameworks, 26 | save: (framework: Models.DotNetFramework) => { 27 | frameworkSelector.setActiveFramework(framework); 28 | view.hide(); 29 | } 30 | }); 31 | view.appendTo(atom.views.getView(atom.workspace)); 32 | view.setItems(); 33 | view.show(); 34 | }; 35 | } 36 | } 37 | 38 | (exports).FrameworkSelectorComponent = (document).registerElement('omnisharp-framework-selector', { prototype: FrameworkSelectorComponent.prototype }); 39 | 40 | export class FrameworkSelectorSelectListView extends SpacePen.SelectListView { 41 | constructor(public editor: Atom.TextEditor, private options: { alignLeft: boolean; attachTo: string; items: Models.DotNetFramework[]; save(item: any): void }) { 42 | super(); 43 | this.$.addClass('code-actions-overlay'); 44 | (this).filterEditorView.model.placeholderText = 'Filter list'; 45 | } 46 | 47 | get $(): JQuery { 48 | return this; 49 | } 50 | 51 | public setItems() { 52 | SpacePen.SelectListView.prototype.setItems.call(this, this.options.items); 53 | } 54 | 55 | public confirmed(item: any): any { 56 | this.cancel(); //will close the view 57 | 58 | this.options.save(item); 59 | return null; 60 | } 61 | 62 | public show() { 63 | this.storeFocusedElement(); 64 | setTimeout(() => this.focusFilterEditor(), 100); 65 | const width = 180; 66 | const node = this[0]; 67 | const attachTo = $(document.querySelectorAll(this.options.attachTo)); 68 | const offset = attachTo.offset(); 69 | if (offset) { 70 | if (this.options.alignLeft) { 71 | $(node).css({ 72 | position: 'fixed', 73 | top: offset.top - node.clientHeight - 18, 74 | left: offset.left, 75 | width: width 76 | }); 77 | } else { 78 | $(node).css({ 79 | position: 'fixed', 80 | top: offset.top - node.clientHeight - 18, 81 | left: offset.left - width + attachTo[0].clientWidth, 82 | width: width 83 | }); 84 | } 85 | } 86 | } 87 | 88 | public hide() { 89 | this.restoreFocus(); 90 | this.remove(); 91 | } 92 | 93 | public cancelled() { 94 | this.hide(); 95 | } 96 | 97 | public getFilterKey() { return 'Name'; } 98 | 99 | public viewForItem(item: any) { 100 | return SpacePen.$$(function () { 101 | return this.li({ 102 | 'class': 'event', 103 | 'data-event-name': item.Name 104 | }, () => { 105 | return this.span(item.FriendlyName, { 106 | title: item.FriendlyName 107 | }); 108 | }); 109 | }); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/views/generic-list-view.ts: -------------------------------------------------------------------------------- 1 | import * as spacePen from 'atom-space-pen-views'; 2 | import { sortBy } from 'lodash'; 3 | import { AsyncSubject } from 'rxjs'; 4 | 5 | export class GenericSelectListView extends spacePen.SelectListView { 6 | public static content() { 7 | return this.div({}, () => { 8 | this.p({ 9 | outlet: 'message' 10 | }, ''); 11 | 12 | (spacePen.SelectListView).content.call(this); 13 | }); 14 | } 15 | 16 | private panel: Atom.Panel; 17 | private previouslyFocusedElement: Node; 18 | private eventElement: any; 19 | private _onClosed = new AsyncSubject(); 20 | public get onClosed() { return this._onClosed; } 21 | 22 | public message: JQuery; 23 | 24 | constructor(private messageText: string, public _items: { displayName: string; name: string; }[], public onConfirm: (result: any) => void, public onCancel: () => void) { 25 | super(); 26 | } 27 | 28 | public keyBindings: any = null; 29 | 30 | public initialize() { 31 | (spacePen.SelectListView).prototype.initialize.call(this); 32 | this.addClass('generic-list'); 33 | this.message.text(this.messageText); 34 | 35 | return false; 36 | } 37 | 38 | public getFilterKey() { 39 | return 'displayName'; 40 | } 41 | 42 | public cancelled() { 43 | this.onCancel(); 44 | return this.hide(); 45 | } 46 | 47 | public toggle() { 48 | if (this.panel && this.panel.isVisible()) { 49 | this.cancel(); 50 | } else { 51 | this.show(); 52 | } 53 | } 54 | 55 | public show() { 56 | if (this.panel == null) { 57 | this.panel = atom.workspace.addModalPanel({ item: this }); 58 | } 59 | this.panel.show(); 60 | this.storeFocusedElement(); 61 | 62 | if (this.previouslyFocusedElement[0] && this.previouslyFocusedElement[0] !== document.body) { 63 | this.eventElement = this.previouslyFocusedElement[0]; 64 | } else { 65 | this.eventElement = atom.views.getView(atom.workspace); 66 | } 67 | 68 | this.keyBindings = atom.keymaps.findKeyBindings({ 69 | target: this.eventElement 70 | }); 71 | 72 | // infer the generator somehow? based on the project information? store in the project system?? 73 | const commands = sortBy(this._items, x => x.displayName); 74 | this.setItems(commands); 75 | this.focusFilterEditor(); 76 | } 77 | 78 | public hide() { 79 | this._onClosed.next(true); 80 | this._onClosed.complete(); 81 | 82 | if (this.panel) { 83 | this.panel.hide(); 84 | } 85 | this.panel.destroy(); 86 | this.panel = null; 87 | } 88 | 89 | public viewForItem(item: { displayName: string; name: string; }) { 90 | return spacePen.$$(function () { 91 | return this.li({ 92 | 'class': 'event', 93 | 'data-event-name': item.name 94 | }, () => { 95 | return this.span(item.displayName, { 96 | title: item.name 97 | }); 98 | }); 99 | }); 100 | } 101 | 102 | public confirmed(item?: any): spacePen.View { 103 | this.onConfirm(item.name); 104 | this.cancel(); 105 | 106 | return null; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/views/highlight-element.ts: -------------------------------------------------------------------------------- 1 | import {Models} from 'omnisharp-client'; 2 | import {EditorElement} from './text-editor-pool'; 3 | 4 | export class HighlightElement extends HTMLElement implements WebComponent { 5 | private _editor: EditorElement; 6 | 7 | public createdCallback() { 8 | this._editor = new EditorElement; 9 | } 10 | 11 | public attachedCallback() { 12 | this.appendChild(this._editor); 13 | } 14 | 15 | public detachedCallback() { 16 | this.removeChild(this._editor); 17 | } 18 | 19 | public revert() { 20 | this._editor.revert(); 21 | } 22 | 23 | public enhance() { 24 | this._editor.enhance(); 25 | } 26 | 27 | public set usage(usage: Models.QuickFix) { 28 | this._editor.usage = usage; 29 | } 30 | } 31 | 32 | (exports).HighlightElement = (document).registerElement('omnisharp-highlight-element', { prototype: HighlightElement.prototype }); 33 | -------------------------------------------------------------------------------- /lib/views/omni-output-pane-view.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-string-literal */ 2 | import {each} from 'lodash'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {server} from '../atom/server-information'; 5 | import {Convert} from '../services/ansi-to-html'; 6 | 7 | export class OutputWindow extends HTMLDivElement implements WebComponent { 8 | public displayName = 'OutputWindow'; 9 | private disposable: CompositeDisposable; 10 | private _convert: any; 11 | private _output: OutputMessage[]; 12 | 13 | public createdCallback() { 14 | this._convert = new Convert(); 15 | this._output = []; 16 | 17 | this.classList.add('omni-output-pane-view', 'native-key-bindings'); 18 | this.tabIndex = -1; 19 | } 20 | 21 | public attachedCallback() { 22 | this.disposable = new CompositeDisposable(); 23 | this.disposable.add(server.observe.outputElement.subscribe(element => { 24 | each(this.children, child => child.remove()); 25 | this.appendChild(element); 26 | })); 27 | this.disposable.add(server.observe.output.delay(100).subscribe(() => this.scrollToBottom())); 28 | this.scrollToBottom(); 29 | } 30 | 31 | public detachedCallback() { 32 | this.disposable.dispose(); 33 | } 34 | 35 | private scrollToBottom() { 36 | const item = (this.lastElementChild && this.lastElementChild.lastElementChild); 37 | if (item) item.scrollIntoViewIfNeeded(); 38 | } 39 | } 40 | 41 | (exports).OutputWindow = (document).registerElement('omnisharp-output-window', { prototype: OutputWindow.prototype }); 42 | -------------------------------------------------------------------------------- /lib/views/output-message-element.ts: -------------------------------------------------------------------------------- 1 | import { Convert } from '../services/ansi-to-html'; 2 | const convert = new Convert(); 3 | 4 | const props = { 5 | set: function message(value: OutputMessage) { 6 | if (value.message) { 7 | this.innerHTML = convert.toHtml(value.message).trim(); 8 | } 9 | this.classList.add(value.logLevel); 10 | } 11 | }; 12 | 13 | export namespace OutputMessageElement { 14 | export function create(value: OutputMessage) { 15 | const pre = document.createElement('pre'); 16 | Object.defineProperty(pre, 'message', props); 17 | (pre as any).message = value; 18 | 19 | return pre; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /lib/views/rename-view.ts: -------------------------------------------------------------------------------- 1 | import * as spacePenViews from 'atom-space-pen-views'; 2 | import {Omni} from '../server/omni'; 3 | 4 | export class RenameView extends spacePenViews.View { 5 | public static content() { 6 | return this.div({ 7 | class: 'rename overlay from-top' 8 | }, () => { 9 | this.p({ 10 | outlet: 'message', 11 | class: 'icon icon-diff-renamed' 12 | }, 'Rename to:'); 13 | return this.subview('miniEditor', 14 | new spacePenViews.TextEditorView({ 15 | mini: true 16 | })); 17 | }); 18 | } 19 | 20 | public miniEditor: spacePenViews.TextEditorView; 21 | 22 | public initialize() { 23 | atom.commands.add(this[0], 'core:confirm', () => this.rename()); 24 | atom.commands.add(this[0], 'core:cancel', () => this.destroy()); 25 | } 26 | 27 | public configure(wordToRename: string) { 28 | this.miniEditor.setText(wordToRename); 29 | return this.miniEditor.focus(); 30 | } 31 | 32 | public rename() { 33 | Omni.request(solution => solution.rename({ 34 | RenameTo: this.miniEditor.getText(), 35 | WantsTextChanges: true, 36 | ApplyTextChanges: false 37 | })); 38 | return this.destroy(); 39 | } 40 | 41 | public destroy() { 42 | this.miniEditor.setText(''); 43 | return this.detach(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/views/test-results-window.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-string-literal */ 2 | import {Convert} from '../services/ansi-to-html'; 3 | const convert = new Convert(); 4 | import {throttle, defer} from 'lodash'; 5 | 6 | // ctrl-r. ctrl-t run test 7 | // ctrl-r, ctrl-f run fixture 8 | // ctrl-r, ctrl-a run all 9 | // ctrl-r, ctrl-l run last 10 | 11 | export class TestResultsWindow extends HTMLDivElement implements WebComponent { 12 | public displayName = 'CommandOutputWindow'; 13 | private _container: HTMLDivElement; 14 | private _scrollToBottom: () => void; 15 | 16 | public createdCallback() { 17 | this.classList.add('omni-output-pane-view', 'native-key-bindings'); 18 | this.tabIndex = -1; 19 | 20 | this._container = document.createElement('div'); 21 | this._container.classList.add('messages-container'); 22 | this.appendChild(this._container); 23 | 24 | this._scrollToBottom = throttle(() => { 25 | const item = (this.lastElementChild && this.lastElementChild.lastElementChild); 26 | if (item) item.scrollIntoViewIfNeeded(); 27 | }, 100, { trailing: true }); 28 | } 29 | 30 | public attachedCallback() { 31 | defer(this._scrollToBottom, this); 32 | } 33 | 34 | public addMessage(item: OutputMessage) { 35 | const pre = document.createElement('pre'); 36 | pre.classList.add(item.logLevel); 37 | pre.innerText = convert.toHtml(item.message).trim(); 38 | 39 | this._container.appendChild(pre); 40 | this._scrollToBottom(); 41 | } 42 | 43 | public clear() { 44 | this._container.innerHTML = ''; 45 | } 46 | } 47 | 48 | (exports).TestResultsWindow = (document).registerElement('omnisharp-test-results', { prototype: TestResultsWindow.prototype }); 49 | -------------------------------------------------------------------------------- /lib/views/tooltip-view.ts: -------------------------------------------------------------------------------- 1 | import * as spacePen from 'atom-space-pen-views'; 2 | const $ = spacePen.jQuery; 3 | 4 | interface Rect { 5 | left: number; 6 | right: number; 7 | top: number; 8 | bottom: number; 9 | } 10 | 11 | export class TooltipView extends spacePen.View { 12 | 13 | public static content() { 14 | return this.div({ class: 'atom-typescript-tooltip tooltip' }, () => { 15 | this.div({ class: 'tooltip-inner', outlet: 'inner' }); 16 | }); 17 | } 18 | 19 | constructor(public rect: Rect) { 20 | super(); 21 | $(document.body).append(this[0]); 22 | this.updatePosition(); 23 | } 24 | 25 | private inner: JQuery; 26 | 27 | public updateText(text: string) { 28 | this.inner.html(text); 29 | this.inner.css({ 'white-space': 'pre', 'text-align': 'left' }); 30 | this.updatePosition(); 31 | (this).fadeTo(300, 1); 32 | } 33 | 34 | public updatePosition() { 35 | const offset = 10; 36 | let left = this.rect.right; 37 | let top = this.rect.bottom; 38 | let right: number = undefined; 39 | 40 | // X axis adjust 41 | if (left + this[0].offsetWidth >= $(document.body).width()) 42 | left = $(document.body).width() - this[0].offsetWidth - offset; 43 | if (left < 0) { 44 | this.css({ 'white-space': 'pre-wrap' }); 45 | left = offset; 46 | right = offset; 47 | } 48 | 49 | // Y axis adjust 50 | if (top + this[0].offsetHeight >= $(document.body).height()) { 51 | top = this.rect.top - this[0].offsetHeight; 52 | } 53 | 54 | this.css({ left, top, right }); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /menus/atom-sharper.cson: -------------------------------------------------------------------------------- 1 | # See https://atom.io/docs/latest/creating-a-package#menus for more details 2 | 'context-menu': 3 | 'atom-text-editor': [ 4 | { 5 | label: 'OmniSharp' 6 | submenu: [ 7 | { 'label': 'New Project', 'command': 'omnisharp-atom:new-project' } 8 | { "label": "Settings", "command": "omnisharp-atom:settings" } 9 | { 'label': 'Toggle', 'command': 'omnisharp-atom:toggle' } 10 | { 'label': 'Find Usages', 'command': 'omnisharp-atom:find-usages' } 11 | { 'label': 'Go to Definition', 'command': 'omnisharp-atom:go-to-definition' } 12 | { 'label': 'Go to Implementation', 'command': 'omnisharp-atom:go-to-implementation' } 13 | { 'label': 'Rename', 'command': 'omnisharp-atom:rename'} 14 | { 'label': 'Code Format', 'command': 'omnisharp-atom:code-format' } 15 | { 'label': 'Lookup type', 'command': 'omnisharp-atom:type-lookup' } 16 | { "label": "Find Symbols", "command": "omnisharp-atom:find-symbols" } 17 | ] 18 | } 19 | ] 20 | 21 | 'menu': [ 22 | { 23 | 'label': 'Packages' 24 | 'submenu': [ 25 | 'label': 'OmniSharp' 26 | 'submenu': [ 27 | { 'label': 'New Project', 'command': 'omnisharp-atom:new-project' } 28 | { "label": "Settings", "command": "omnisharp-atom:settings" } 29 | { "label": "Toggle", "command": "omnisharp-atom:toggle" } 30 | ] 31 | ] 32 | } 33 | ] 34 | -------------------------------------------------------------------------------- /menus/omnisharp-menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu": [{ 3 | "label": "&OmniSharp", 4 | "submenu": [ 5 | { "label": "New Project", "command": "omnisharp-atom:new-project" }, 6 | { "label": "Toggle", "command": "omnisharp-atom:toggle" }, 7 | { "label": "Find Usages", "command": "omnisharp-atom:find-usages" }, 8 | { "label": "Go to Definition", "command": "omnisharp-atom:go-to-definition" }, 9 | { "label": "Go to Implementation", "command": "omnisharp-atom:go-to-implementation" }, 10 | { "label": "Rename", "command": "omnisharp-atom:rename"}, 11 | { "label": "Code Format", "command": "omnisharp-atom:code-format" }, 12 | { "label": "Lookup Type", "command": "omnisharp-atom:type-lookup" }, 13 | { "label": "Find Symbols", "command": "omnisharp-atom:find-symbols" } 14 | ] 15 | }] 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "omnisharp-atom", 3 | "main": "./index.js", 4 | "atomTestRunner": "./spec/test-runner", 5 | "version": "0.31.2", 6 | "description": "Brings the wonderful OmniSharp server to powercharge Atom's C# development experience", 7 | "keywords": [ 8 | "c#", 9 | ".net", 10 | "asp.net", 11 | "omnisharp" 12 | ], 13 | "repository": "https://github.com/OmniSharp/omnisharp-atom", 14 | "author": { 15 | "name": "Omnisharp Atom Team", 16 | "url": "https://github.com/OmniSharp/graphs/contributors" 17 | }, 18 | "contributors": [ 19 | { 20 | "name": "Martijn Laarman", 21 | "url": "http://localghost.io" 22 | }, 23 | { 24 | "name": "Stephen James", 25 | "url": "http://stephenjamescode.blogspot.co.uk/" 26 | }, 27 | { 28 | "name": "Chad Tolkien", 29 | "url": "http://chad.tolkien.id.au/" 30 | }, 31 | { 32 | "name": "David Driscoll", 33 | "url": "https://twitter.com/david_blacklite" 34 | }, 35 | { 36 | "name": "Sam Williamson", 37 | "url": "https://twitter.com/sgwill" 38 | }, 39 | { 40 | "name": "William Luu", 41 | "url": "https://twitter.com/willl" 42 | }, 43 | { 44 | "name": "Jason Imison", 45 | "url": "https://twitter.com/jasonimison" 46 | } 47 | ], 48 | "license": "MIT", 49 | "engines": { 50 | "atom": ">=0.199.0 <2.0.0" 51 | }, 52 | "activationCommands": [], 53 | "menus": [ 54 | "atom-sharper.cson" 55 | ], 56 | "scripts": { 57 | "prepublish": "typings install && gulp npm-prepublish", 58 | "test": "apm test", 59 | "lint": "tslint lib/**/*.ts test/**/*.ts", 60 | "tsc:w": "tsc -w" 61 | }, 62 | "dependencies": { 63 | "atom-package-deps": "^4.3.1", 64 | "atom-space-pen-views": "^2.2.0", 65 | "entities": "^1.1.1", 66 | "escape-html": "^1.0.1", 67 | "fastdom": "^1.0.5", 68 | "font-awesome": "^4.7.0", 69 | "fuzzaldrin": "^2.1.0", 70 | "globby": "^6.1.0", 71 | "jquery": "^3.1.1", 72 | "lodash": "^4.17.4", 73 | "omnisharp-client": "^7.0.5", 74 | "rxjs": "^5.1.0", 75 | "semver": "^5.0.3", 76 | "ts-disposables": "^2.2.3" 77 | }, 78 | "devDependencies": { 79 | "babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", 80 | "babel-preset-es2015": "^6.22.0", 81 | "babel-preset-stage-3": "^6.22.0", 82 | "chai": "^3.5.0", 83 | "del": "^2.2.1", 84 | "gulp": "^3.9.1", 85 | "gulp-babel": "^6.1.2", 86 | "gulp-sourcemap": "^1.0.1", 87 | "gulp-sourcemaps": "^2.4.0", 88 | "gulp-tslint": "^7.0.1", 89 | "gulp-typescript": "^3.1.4", 90 | "gulp-util": "^3.0.8", 91 | "merge-stream": "^1.0.1", 92 | "mocha": "^3.2.0", 93 | "mocha-unfunk-reporter": "^0.4.0", 94 | "through2": "^2.0.3", 95 | "tslint": "^4.4.2", 96 | "tslint-eslint-rules": "^3.2.3", 97 | "tslint-microsoft-contrib": "^4.0.0", 98 | "typescript": "^2.2.0", 99 | "typings": "^2.1.0" 100 | }, 101 | "consumedServices": { 102 | "status-bar": { 103 | "versions": { 104 | "^1.0.0": "consumeStatusBar" 105 | } 106 | }, 107 | "yeoman-environment": { 108 | "versions": { 109 | "^1.0.0": "consumeYeomanEnvironment" 110 | } 111 | }, 112 | "linter-plus-self": { 113 | "versions": { 114 | "0.1.0": "consumeLinter" 115 | } 116 | }, 117 | "linter-indie": { 118 | "versions": { 119 | "1.0.0": "consumeIndieLinter" 120 | } 121 | } 122 | }, 123 | "providedServices": { 124 | "autocomplete.provider": { 125 | "description": "A C# Roslyn powered autocomplete-plus provider.", 126 | "versions": { 127 | "2.0.0": "provideAutocomplete" 128 | } 129 | }, 130 | "linter": { 131 | "versions": { 132 | "1.0.0": "provideLinter" 133 | } 134 | }, 135 | "jsonschema.provider": { 136 | "versions": { 137 | "0.1.0": "provideProjectJson" 138 | } 139 | } 140 | }, 141 | "package-deps": [ 142 | "linter" 143 | ] 144 | } 145 | -------------------------------------------------------------------------------- /restore-other-packages.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var season = require('season'); 4 | var ATOM_HOME = path.join(process.env.HOME, '.atom'); 5 | 6 | if (!fs.existsSync(path.join(ATOM_HOME, 'config.cson.bak'))) { 7 | throw new Error('backup does not exist, stopping, you might want to backup first!'); 8 | } 9 | 10 | var config = season.readFileSync(path.join(ATOM_HOME, 'config.cson.bak')); 11 | season.writeFileSync(path.join(ATOM_HOME, 'config.cson'), config); 12 | fs.unlinkSync(path.join(ATOM_HOME, 'config.cson.bak')); 13 | -------------------------------------------------------------------------------- /spec/atom/dock-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/atom/framework-selector-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/atom/solution-information-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Solution Information', () => { 7 | setupFeature(['atom/solution-information']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | 12 | const commands: any = atom.commands; 13 | 14 | expect(commands.registeredCommands['omnisharp-atom:next-solution-status']).to.be.true; 15 | expect(commands.registeredCommands['omnisharp-atom:solution-status']).to.be.true; 16 | expect(commands.registeredCommands['omnisharp-atom:previous-solution-status']).to.be.true; 17 | expect(commands.registeredCommands['omnisharp-atom:stop-server']).to.be.true; 18 | expect(commands.registeredCommands['omnisharp-atom:start-server']).to.be.true; 19 | expect(commands.registeredCommands['omnisharp-atom:restart-server']).to.be.true; 20 | disposable.dispose(); 21 | }); 22 | 23 | // TODO: Test functionality 24 | }); 25 | -------------------------------------------------------------------------------- /spec/atom/status-bar-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/atom/update-project-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/features/code-format-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {codeFormat} from '../../lib/features/code-format'; 5 | import {Omni} from '../../lib/server/omni'; 6 | import {restoreBuffers, setupFeature} from '../test-helpers'; 7 | 8 | describe('Code Format', () => { 9 | setupFeature(['features/code-format']); 10 | 11 | it('adds commands', () => { 12 | const disposable = new CompositeDisposable(); 13 | 14 | const commands: any = atom.commands; 15 | 16 | expect(commands.registeredCommands['omnisharp-atom:code-format']).to.be.true; 17 | 18 | disposable.dispose(); 19 | }); 20 | 21 | it('formats code', () => { 22 | const d = restoreBuffers(); 23 | const disposable = new CompositeDisposable(); 24 | disposable.add(d); 25 | 26 | let tries = 5; 27 | return atom.workspace.open('simple/code-format/UnformattedClass.cs') 28 | .then(editor => { 29 | return execute(editor); 30 | }); 31 | 32 | function execute(editor: Atom.TextEditor): any { 33 | const promise = Omni.listener.formatRange 34 | .take(1) 35 | .toPromise() 36 | .then(({request}) => { 37 | expect(editor.getPath()).to.be.eql(request.FileName); 38 | const expected = `public class UnformattedClass{ public const int TheAnswer = 42;}`; 39 | const result = editor.getText().replace(/\r|\n/g, ''); 40 | try { 41 | expect(result).to.contain(expected); 42 | tries = 0; 43 | } catch (e) { 44 | if (tries > 0) { 45 | return execute(editor); 46 | } else { 47 | tries = -1; 48 | throw e; 49 | } 50 | } finally { 51 | if (tries === -1) { 52 | disposable.dispose(); 53 | throw new Error('Failed!'); 54 | } else if (tries === 0) { 55 | disposable.dispose(); 56 | } 57 | tries--; 58 | } 59 | }); 60 | codeFormat.format(); 61 | return promise; 62 | } 63 | }); 64 | }); 65 | -------------------------------------------------------------------------------- /spec/features/code-lens-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {Observable} from 'rxjs'; 4 | import {Lens} from '../../lib/features/code-lens'; 5 | import {Omni} from '../../lib/server/omni'; 6 | import {openEditor, setupFeature} from '../test-helpers'; 7 | 8 | describe('Code Lens', () => { 9 | setupFeature(['features/code-lens']); 10 | 11 | (Lens.prototype)._isVisible = () => true; 12 | 13 | it('should add code lens', () => { 14 | return Observable.zip( 15 | openEditor('simple/code-lens/CodeLens.cs'), 16 | Omni.listener.currentfilemembersasflat, 17 | (x, z) => <[typeof x, typeof z]>[x, z] 18 | ) 19 | .take(1) 20 | .delay(300) 21 | .do(ctx => { 22 | expect(ctx[1].response.length).to.be.eql(15); 23 | }) 24 | .toPromise(); 25 | }); 26 | 27 | xit('should handle editor switching', () => { 28 | return openEditor('simple/code-lens/CodeLens.cs') 29 | .flatMap(({solution}) => solution.observe.currentfilemembersasflat.take(1)) 30 | .delay(300) 31 | .flatMap(() => openEditor('simple/code-lens/CodeLens2.cs')) 32 | .flatMap(({solution}) => solution.observe.currentfilemembersasflat.take(1)) 33 | .delay(300) 34 | .flatMap(() => openEditor('simple/code-lens/CodeLens.cs')) 35 | .flatMap(({solution}) => solution.observe.currentfilemembersasflat.take(1), ({editor}) => editor) 36 | .delay(1000) 37 | .do(editor => { 38 | expect(editor.getDecorations().length).to.be.greaterThan(9); 39 | }) 40 | .toPromise(); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /spec/features/find-symbols-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Find Symbols', () => { 7 | setupFeature(['features/find-symbols']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:find-symbols']).to.be.true; 14 | disposable.dispose(); 15 | }); 16 | 17 | // TODO: Test functionality 18 | }); 19 | -------------------------------------------------------------------------------- /spec/features/find-usages-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Find Usages', () => { 7 | setupFeature(['features/find-usages']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:find-usages']).to.be.true; 14 | expect(commands.registeredCommands['omnisharp-atom:go-to-implementation']).to.be.true; 15 | expect(commands.registeredCommands['omnisharp-atom:next-usage']).to.be.true; 16 | expect(commands.registeredCommands['omnisharp-atom:go-to-usage']).to.be.true; 17 | expect(commands.registeredCommands['omnisharp-atom:previous-usage']).to.be.true; 18 | expect(commands.registeredCommands['omnisharp-atom:go-to-next-usage']).to.be.true; 19 | expect(commands.registeredCommands['omnisharp-atom:go-to-previous-usage']).to.be.true; 20 | disposable.dispose(); 21 | }); 22 | 23 | // TODO: Test functionality 24 | }); 25 | -------------------------------------------------------------------------------- /spec/features/go-to-definition-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Go To Definition', () => { 7 | setupFeature(['features/go-to-definition']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:go-to-definition']).to.be.true; 14 | disposable.dispose(); 15 | }); 16 | 17 | // TODO: Test functionality 18 | }); 19 | -------------------------------------------------------------------------------- /spec/features/highlight-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {setupFeature} from '../test-helpers'; 3 | 4 | describe('Highlight', () => { 5 | setupFeature(['features/highlight']); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/features/intellisense-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | //import {expect} from "chai"; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Intellisense', () => { 7 | setupFeature(['features/intellisense']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | //const commands: any = atom.commands; 12 | 13 | disposable.dispose(); 14 | }); 15 | 16 | // TODO: Test functionality 17 | }); 18 | -------------------------------------------------------------------------------- /spec/features/log-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/features/lookup-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Lookup', () => { 7 | setupFeature(['features/lookup']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:type-lookup']).to.be.true; 14 | disposable.dispose(); 15 | }); 16 | 17 | // TODO: Test functionality 18 | }); 19 | -------------------------------------------------------------------------------- /spec/features/navigate-up-down-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Navigation', () => { 7 | setupFeature(['features/navigate-up-down']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:navigate-up']).to.be.true; 14 | expect(commands.registeredCommands['omnisharp-atom:navigate-down']).to.be.true; 15 | disposable.dispose(); 16 | }); 17 | 18 | // TODO: Test functionality 19 | }); 20 | -------------------------------------------------------------------------------- /spec/features/package-restore-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/features/project-lock-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/features/rename-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {Observable} from 'rxjs'; 5 | import {RenameView} from '../../lib/views/rename-view'; 6 | import {openEditor, setupFeature} from '../test-helpers'; 7 | const a = require('atom'); 8 | /* tslint:disable:variable-name */ 9 | const Range: typeof TextBuffer.Range = a.Range; 10 | /* tslint:enable:variable-name */ 11 | 12 | describe('Rename', () => { 13 | setupFeature(['features/rename']); 14 | 15 | it('adds commands', () => { 16 | const disposable = new CompositeDisposable(); 17 | const commands: any = atom.commands; 18 | 19 | expect(commands.registeredCommands['omnisharp-atom:rename']).to.be.true; 20 | disposable.dispose(); 21 | }); 22 | 23 | it('should select rename text appropriately with selection', () => { 24 | openEditor('simple/rename/ClassToRename.cs') 25 | .subscribe(({editor}) => { 26 | editor.setSelectedBufferRange(new Range([4, 16], [4, 22])); 27 | atom.commands.dispatch(atom.views.getView(editor), 'omnisharp-atom:rename'); 28 | }); 29 | 30 | function checkPanel(): any { 31 | const panels = atom.workspace.getTopPanels(); 32 | if (panels.length) { 33 | const panel: RenameView = panels[0].item; 34 | expect(panel.miniEditor.getText()).to.be.eql('Method'); 35 | } else { 36 | return Observable.timer(100).toPromise().then(() => checkPanel()); 37 | } 38 | } 39 | return checkPanel(); 40 | }); 41 | 42 | it('should select rename text appropriately with cursor', () => { 43 | openEditor('simple/rename/ClassToRename.cs') 44 | .subscribe(({editor}) => { 45 | editor.setCursorBufferPosition([4, 18]); 46 | atom.commands.dispatch(atom.views.getView(editor), 'omnisharp-atom:rename'); 47 | }); 48 | 49 | function checkPanel(): any { 50 | const panels = atom.workspace.getTopPanels(); 51 | if (panels.length) { 52 | const panel: RenameView = panels[0].item; 53 | expect(panel.miniEditor.getText()).to.be.eql('Method'); 54 | } else { 55 | return Observable.timer(100).toPromise().then(() => checkPanel()); 56 | } 57 | } 58 | return checkPanel(); 59 | }); 60 | 61 | }); 62 | -------------------------------------------------------------------------------- /spec/features/run-tests-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Run Tests', () => { 7 | setupFeature(['features/run-tests']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:run-all-tests']).to.be.true; 14 | expect(commands.registeredCommands['omnisharp-atom:run-fixture-tests']).to.be.true; 15 | expect(commands.registeredCommands['omnisharp-atom:run-single-test']).to.be.true; 16 | expect(commands.registeredCommands['omnisharp-atom:run-last-test']).to.be.true; 17 | disposable.dispose(); 18 | }); 19 | 20 | // TODO: Test functionality 21 | }); 22 | -------------------------------------------------------------------------------- /spec/features/server-information-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /spec/features/signature-help-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {CompositeDisposable} from 'ts-disposables'; 4 | import {setupFeature} from '../test-helpers'; 5 | 6 | describe('Signature Help', () => { 7 | setupFeature(['features/signature-help']); 8 | 9 | it('adds commands', () => { 10 | const disposable = new CompositeDisposable(); 11 | const commands: any = atom.commands; 12 | 13 | expect(commands.registeredCommands['omnisharp-atom:signature-help']).to.be.true; 14 | disposable.dispose(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /spec/fixtures/commands/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "warningsAsErrors": true 5 | }, 6 | "commands": { 7 | "run": "", 8 | "web": "Microsoft.AspNet.Hosting--server Microsoft.AspNet.Server.WebListener", 9 | "kestrel": "Microsoft.AspNet.Hosting--server Kestrel" 10 | }, 11 | "frameworks": { 12 | "dnx451": {} 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spec/fixtures/commands/project.lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "locked": false, 3 | "version": -9998, 4 | "projectFileDependencyGroups": { 5 | "": [], 6 | "DNX,Version=v4.5.1": [] 7 | }, 8 | "libraries": {} 9 | } -------------------------------------------------------------------------------- /spec/fixtures/simple/code-format/UnformattedClass.cs: -------------------------------------------------------------------------------- 1 | // use ctrl+alt+m to reformat... 2 | 3 | public class UnformattedClass { 4 | public const int TheAnswer = 42; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple/code-lens/CodeLens.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | public class A 4 | { 5 | public A Parent { get; set; } 6 | } 7 | 8 | public class B 9 | { 10 | public A a1 { get; set; } 11 | public A a2 { get; set; } 12 | public C c { get; set; } 13 | public B Parent { get; set; } 14 | } 15 | 16 | public class C 17 | { 18 | public A a1 { get; set; } 19 | public A a2 { get; set; } 20 | public C c { get; set; } 21 | public B Parent { get; set; } 22 | } 23 | 24 | public static class Extension 25 | { 26 | public static void Method(this A @class) 27 | { 28 | var parent = @class.Parent; 29 | var a1 = nameof(B.a1); 30 | var a2 = nameof(B.a2) + a1; 31 | var c = nameof(C.c) + a2; 32 | var b = nameof(B.Parent) + c; 33 | var d = c + b; 34 | } 35 | 36 | public static void Method2() { 37 | new A().Method(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /spec/fixtures/simple/code-lens/CodeLens2.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | public class D 4 | { 5 | public A Parent { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/simple/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "warningsAsErrors": true 5 | }, 6 | "frameworks": { 7 | "dnx451": {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/simple/rename/ClassToRename.cs: -------------------------------------------------------------------------------- 1 | public class ClassToRename 2 | { 3 | public const int TheAnswer = 42; 4 | 5 | public void Method(int param1) 6 | { 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/simple/syntax-errors/MissingSemiColon.cs: -------------------------------------------------------------------------------- 1 | public class MissingSemiColon 2 | { 3 | var x = "" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/simple/syntax-errors/NeverEndingClass.cs: -------------------------------------------------------------------------------- 1 | public class NeverEndingClass 2 | { 3 | int luckDragon; 4 | string story = "blah blah blah"; 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/simple2/code-format/UnformattedClass.cs: -------------------------------------------------------------------------------- 1 | // use ctrl+alt+m to reformat... 2 | 3 | public class UnformattedClass { public const int TheAnswer = 42; } 4 | -------------------------------------------------------------------------------- /spec/fixtures/simple2/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "warningsAsErrors": true 5 | }, 6 | "frameworks": { 7 | "dnx451": {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/simple2/syntax-errors/MissingSemiColon.cs: -------------------------------------------------------------------------------- 1 | public class MissingSemiColon 2 | { 3 | var x = "" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/simple2/syntax-errors/NeverEndingClass.cs: -------------------------------------------------------------------------------- 1 | public class NeverEndingClass 2 | { 3 | int luckDragon; 4 | string story = "blah blah blah"; 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/single-cs/class.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | -------------------------------------------------------------------------------- /spec/fixtures/two-solution/class.cs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/two-solution/something.sln: -------------------------------------------------------------------------------- 1 | .csproj 2 | -------------------------------------------------------------------------------- /spec/fixtures/two-solution/somethingelse.sln: -------------------------------------------------------------------------------- 1 | .csproj 2 | -------------------------------------------------------------------------------- /spec/omnisharp-atom-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {DriverState} from 'omnisharp-client'; 4 | import {Observable} from 'rxjs'; 5 | import {SolutionManager} from '../lib/server/solution-manager'; 6 | import {setupFeature} from './test-helpers'; 7 | 8 | describe('OmniSharp Atom', () => { 9 | setupFeature([]); 10 | 11 | describe('when the package is activated', () => { 12 | it('connect', () => { 13 | return Observable.fromPromise(atom.workspace.open('simple/code-lens/CodeLens.cs')) 14 | .flatMap(editor => SolutionManager.getSolutionForEditor(editor)) 15 | .flatMap(x => x.state.startWith(x.currentState)) 16 | .filter(z => z === DriverState.Connected) 17 | .take(1) 18 | .do(() => { 19 | expect(SolutionManager.connected).to.be.true; 20 | }) 21 | .toPromise(); 22 | }); 23 | 24 | xit('connect-simple2', () => { 25 | return Observable.fromPromise( 26 | Promise.all([ 27 | atom.workspace.open('simple/code-lens/CodeLens.cs'), 28 | atom.workspace.open('simple2/project.json') 29 | ]) 30 | ) 31 | .flatMap(x => x) 32 | .flatMap(editor => SolutionManager.getSolutionForEditor(editor)) 33 | .flatMap(x => x.state.startWith(x.currentState)) 34 | .filter(z => z === DriverState.Connected) 35 | .take(1) 36 | .do(null, null, () => { 37 | expect(SolutionManager.connected).to.be.true; 38 | expect(SolutionManager.activeSolutions.length).to.be.eql(2); 39 | }) 40 | .toPromise(); 41 | }); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /spec/server/solution-manager-spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import {expect} from 'chai'; 3 | import {DriverState} from 'omnisharp-client'; 4 | import {Observable} from 'rxjs'; 5 | import {SolutionManager} from '../../lib/server/solution-manager'; 6 | import {GenericSelectListView} from '../../lib/views/generic-list-view'; 7 | import {openEditor, setupFeature} from '../test-helpers'; 8 | 9 | describe('Solution Manager', () => { 10 | setupFeature([], false); 11 | 12 | xit('Works with single cs files', function () { 13 | return openEditor('single-cs/class.cs') 14 | .do(({solution}) => { 15 | expect(solution.currentState).to.be.eql(DriverState.Connected); 16 | }) 17 | .toPromise(); 18 | }); 19 | 20 | it('shows a list of solutions when it detects many sln files', function () { 21 | const p = atom.workspace.open('two-solution/class.cs') 22 | .then(editor => SolutionManager.getSolutionForEditor(editor).toPromise()); 23 | 24 | function checkPanel(): any { 25 | const panels = atom.workspace.getModalPanels(); 26 | if (panels.length) { 27 | const panelItem: GenericSelectListView = panels[0].item; 28 | expect(panelItem._items.length).to.be.eql(2); 29 | 30 | panelItem.onConfirm(panelItem._items[0].name); 31 | 32 | return p; 33 | } else { 34 | return Observable.timer(100).toPromise() 35 | .then(() => checkPanel()); 36 | } 37 | } 38 | return checkPanel(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /spec/test-helpers.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { CompositeDisposable, Disposable } from 'ts-disposables'; 3 | import { DriverState } from 'omnisharp-client'; 4 | import { Observable } from 'rxjs'; 5 | import { SolutionManager } from '../lib/server/solution-manager'; 6 | 7 | export function setupFeature(features: string[], unitTestMode = true) { 8 | let cd: CompositeDisposable; 9 | beforeEach(function () { 10 | cd = new CompositeDisposable(); 11 | SolutionManager._unitTestMode_ = unitTestMode; 12 | SolutionManager._kick_in_the_pants_ = true; 13 | 14 | atom.config.set('omnisharp-atom:feature-white-list', true); 15 | atom.config.set('omnisharp-atom:feature-list', features); 16 | 17 | return atom.packages.activatePackage('language-csharp') 18 | .then(() => atom.packages.activatePackage('omnisharp-atom')) 19 | .then((pack: Atom.Package) => pack.mainModule._activated.delay(200).toPromise()); 20 | }); 21 | 22 | afterEach(function () { 23 | atom.packages.deactivatePackage('omnisharp-atom'); 24 | atom.packages.deactivatePackage('language-csharp'); 25 | atom.config.set('omnisharp-atom:feature-white-list', undefined); 26 | atom.config.set('omnisharp-atom:feature-list', undefined); 27 | SolutionManager._unitTestMode_ = false; 28 | SolutionManager._kick_in_the_pants_ = false; 29 | cd.dispose(); 30 | }); 31 | } 32 | 33 | export function restoreBuffers() { 34 | return Disposable.empty; 35 | /* 36 | let disposable = new CompositeDisposable(); 37 | const buffers = new Map(); 38 | 39 | if (SolutionManager._unitTestMode_) { 40 | disposable.add(SolutionManager.solutionObserver.responses 41 | .filter(z => 42 | z.request.FileName && z.request.Buffer) 43 | .map(z => 44 | ({ fileName: z.request.FileName, buffer: z.request.Buffer })) 45 | .filter(({fileName}) => 46 | !buffers.has(fileName)) 47 | .subscribe(({fileName, buffer}) => { 48 | buffers.set(fileName, buffer); 49 | })); 50 | } 51 | 52 | return Disposable.create(() => { 53 | disposable.dispose(); 54 | // Reset the buffers to their original state 55 | if (SolutionManager._unitTestMode_) { 56 | const results: Observable[] = []; 57 | const iterator = buffers.entries(); 58 | const iteratee = iterator.next(); 59 | while (!iteratee.done) { 60 | const [path, buffer] = iteratee.value; 61 | 62 | results.push( 63 | SolutionManager.getSolutionForPath(path) 64 | .map(z => z.updatebuffer({ 65 | Line: 0, 66 | Column: 0, 67 | Buffer: buffer, 68 | FileName: path 69 | })) 70 | ); 71 | 72 | iteratee = iterator.next(); 73 | } 74 | } 75 | });*/ 76 | } 77 | 78 | export function openEditor(file: string) { 79 | return Observable.fromPromise(atom.workspace.open(file)) 80 | .flatMap(editor => 81 | SolutionManager.getSolutionForEditor(editor).map(solution => ({ editor, solution })) 82 | ) 83 | .flatMap(({editor, solution}) => solution.state.startWith(solution.currentState) 84 | .map(state => ({ editor, solution, state: state }))) 85 | .filter(z => z.state === DriverState.Connected) 86 | .take(1) 87 | .delay(350); 88 | } 89 | -------------------------------------------------------------------------------- /spec/test-runner.ts: -------------------------------------------------------------------------------- 1 | import {readFileSync} from 'fs'; 2 | import {CompositeDisposable} from 'ts-disposables'; 3 | import {join} from 'path'; 4 | 5 | module.exports = function ( 6 | {testPaths, buildAtomEnvironment, buildDefaultApplicationDelegate, headless}: { 7 | testPaths: string[]; 8 | buildAtomEnvironment: (opts: any) => Atom.Atom; 9 | applicationDelegate: any; 10 | window: Window; 11 | document: Document; 12 | enablePersistence: boolean; 13 | buildDefaultApplicationDelegate: any; 14 | logFile: string; 15 | headless: boolean 16 | }): Promise { 17 | console.log(testPaths); 18 | const fixtures = testPaths.map(x => join(x, 'fixtures')); 19 | 20 | const applicationDelegate = buildDefaultApplicationDelegate(); 21 | 22 | applicationDelegate.setRepresentedFilename = () => {/* */ }; 23 | applicationDelegate.setWindowDocumentEdited = () => {/* */ }; 24 | 25 | const mochaCtor: typeof Mocha = require('mocha'); 26 | const globby: (paths: string[]) => Promise = require('globby'); 27 | 28 | const atom = buildAtomEnvironment({ 29 | applicationDelegate: applicationDelegate, 30 | window, document, 31 | configDirPath: process.env.ATOM_HOME, 32 | enablePersistence: false 33 | }); 34 | 35 | (document as any).atom = atom; 36 | (window as any).atom = atom; 37 | (global as any).atom = atom; 38 | 39 | const atomDiv = document.createElement('div'); 40 | atomDiv.style.display = 'none'; 41 | document.body.appendChild(atomDiv); 42 | atomDiv.appendChild(atom.views.getView(atom.workspace)); 43 | 44 | const mochaDiv = document.createElement('div'); 45 | mochaDiv.id = 'mocha'; 46 | document.body.appendChild(mochaDiv); 47 | 48 | const mochaCss = document.createElement('style'); 49 | mochaCss.innerHTML = `html, body { overflow: inherit; }\n` + readFileSync(join(__dirname, '..', 'node_modules', 'mocha', 'mocha.css')).toString(); 50 | document.head.appendChild(mochaCss); 51 | 52 | const mocha = new mochaCtor({ 53 | ui: 'bdd', 54 | reporter: headless ? 'mocha-unfunk-reporter' : 'html', 55 | timeout: 60000, 56 | //grep: new RegExp("editor switch") 57 | }); 58 | 59 | let cd: CompositeDisposable; 60 | 61 | /* tslint:disable:variable-name */ 62 | const {SolutionManager} = require('../lib/server/solution-manager'); 63 | /* tslint:enable:variable-name */ 64 | 65 | (mocha).suite.beforeEach(() => { 66 | cd = new CompositeDisposable(); 67 | 68 | cd.add(SolutionManager.solutionObserver.errors.subscribe((error: any) => console.error(JSON.stringify(error)))); 69 | cd.add(SolutionManager.solutionObserver.events.subscribe((event: any) => console.info(`server event: ${JSON.stringify(event)}`))); 70 | cd.add(SolutionManager.solutionObserver.requests.subscribe((r: any) => console.info(`request: ${JSON.stringify(r)}`))); 71 | cd.add(SolutionManager.solutionObserver.responses.subscribe((r: any) => console.info(`response: ${JSON.stringify(r)}`))); 72 | 73 | process.chdir(fixtures[0]); 74 | atom.project.setPaths(fixtures); 75 | }); 76 | 77 | (mocha).suite.afterEach(() => { 78 | cd.dispose(); 79 | atom.packages.deactivatePackages(); 80 | (atom as any).reset(); 81 | }); 82 | 83 | return Promise.all(testPaths.map(path => globby([join(path, '**/*-spec.js')]) 84 | .then(fs => fs.forEach(f => mocha.addFile(f))))) 85 | .then(() => { 86 | return new Promise(resolve => mocha.run(resolve)); 87 | }); 88 | }; 89 | -------------------------------------------------------------------------------- /spec/tsd.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /styles/card.less: -------------------------------------------------------------------------------- 1 | @import "octicon-mixins"; 2 | @import "ui-variables"; 3 | @omnisharp-card-background-color: lighten(@tool-panel-background-color, 8%); 4 | @omnisharp-card-disabled-background-color: darken(@omnisharp-card-background-color, 3%); 5 | 6 | // TODO: Somehow unify the "omnisharp-card". 7 | .omnisharp-card { 8 | padding: (@component-padding); 9 | margin-bottom: @component-padding; 10 | list-style-type: none; 11 | border-radius: @component-border-radius*2; 12 | border: 1px solid @base-border-color; 13 | background-color: @omnisharp-card-background-color; 14 | overflow: hidden; 15 | -webkit-user-select: none; 16 | max-height: 126px; 17 | max-width: 530px; 18 | display: flex; 19 | position: relative; 20 | .name { 21 | text-overflow: ellipsis; 22 | white-space: nowrap; 23 | width: 100%; 24 | color: @text-color-highlight; 25 | overflow: hidden; 26 | margin-top: 4px; 27 | margin-bottom: 4px; 28 | margin: 5px 0; 29 | margin: 0 0 0.2em; 30 | } 31 | .description { 32 | color: @text-color; 33 | overflow: hidden; 34 | text-overflow: ellipsis; 35 | display: -webkit-box; 36 | -webkit-line-clamp: 2; 37 | /* number of lines to show */ 38 | -webkit-box-orient: vertical; 39 | font-style: italic; 40 | font-size: 10px; 41 | line-height: 1; 42 | } 43 | .selector + .body .name { 44 | margin-left: 42px; 45 | } 46 | .selector { 47 | position: absolute; 48 | top: 12px; 49 | left: 8px; 50 | .btn { 51 | height: 18px; 52 | padding: 0; 53 | &:before { 54 | margin-right: 0; 55 | } 56 | } 57 | } 58 | .stats-item { 59 | margin-left: 0; 60 | margin-right: 4px; 61 | display: block; 62 | line-height: 24px; 63 | vertical-align: top; 64 | color: @text-color-subtle; 65 | .btn { 66 | cursor: default; 67 | } 68 | &.connected { 69 | color: @text-color-success; 70 | } 71 | &.disconnected { 72 | color: @text-color-subtle; 73 | } 74 | &.error { 75 | color: @text-color-error; 76 | } 77 | &.connecting { 78 | color: @text-color-warning; 79 | } 80 | } 81 | .body { 82 | width: 300px; 83 | display: flex; 84 | flex-direction: column; 85 | flex: 7; 86 | .css-truncate-target { 87 | max-width: 100%; 88 | } 89 | } 90 | .description { 91 | white-space: normal; 92 | line-height: 1.4; 93 | } 94 | .meta { 95 | width: 230px; 96 | flex: 5; 97 | a.linked-octicon { 98 | text-decoration: none; 99 | &:hover { 100 | .octicon { 101 | color: $greenDark; 102 | } 103 | .value { 104 | color: $greenDark; 105 | } 106 | } 107 | } 108 | .action { 109 | border-radius: 3px; 110 | padding: 3px 6px; 111 | &:hover { 112 | background-color: #eaeaea; 113 | } 114 | } 115 | .value, .header { 116 | color: #999; 117 | } 118 | th { 119 | font-weight: bold; 120 | } 121 | overflow-y: auto; 122 | tbody { 123 | 124 | } 125 | } 126 | .meta-projects { 127 | .project { 128 | border-top: 1px solid @text-color-subtle; 129 | display: block; 130 | width: 100%; 131 | } 132 | .name { 133 | 134 | } 135 | .path { 136 | text-align: left; 137 | font-weight: normal; 138 | } 139 | } 140 | .meta-controls { 141 | button { 142 | vertical-align: middle; 143 | } 144 | .fa { 145 | margin-right: 4px; 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /styles/codeactions-overlay.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | .code-actions-overlay { 3 | background: rgba(0,0,0,0.9); 4 | border: 9px solid rgba(0,0,0,0.9); 5 | li { 6 | padding: 5px; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /styles/font-awesome.less: -------------------------------------------------------------------------------- 1 | @import "../node_modules/font-awesome/less/font-awesome.less"; 2 | @fa-font-path: "atom://omnisharp-atom/node_modules/font-awesome/fonts"; 3 | 4 | @font-face { 5 | font-family: 'Font Awesome'; 6 | font-weight: normal; 7 | font-style: normal; 8 | src: url('@{fa-font-path}/fontawesome-webfont.woff') format('woff'); 9 | } 10 | .fa { 11 | font-family: 'Font Awesome'; 12 | } 13 | status-bar .fa, .status-bar .fa { 14 | font-size: 14px; 15 | } 16 | -------------------------------------------------------------------------------- /styles/icons/autocomplete_class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_class_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_class_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_delegate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_delegate.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_delegate@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_delegate@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_delegate@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_delegate@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enum_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enum_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_enumitem_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_enumitem_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_event_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_event_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_field_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_field_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_interface.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_interface@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_interface@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_interface@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_interface@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_keyword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_keyword.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_keyword@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_keyword@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_keyword@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_keyword@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_local@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_local@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_method_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_method_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_namespace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_namespace.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_namespace@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_namespace@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_namespace@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_namespace@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_parameter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_parameter@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_property_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_property_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_friend.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_friend@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_friend@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_private.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_private@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_private@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_private@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_private@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_protected.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_protected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_protected@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_protected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_protected@3x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_sealed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_sealed.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_sealed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_sealed@2x.png -------------------------------------------------------------------------------- /styles/icons/autocomplete_struct_sealed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/autocomplete_struct_sealed@3x.png -------------------------------------------------------------------------------- /styles/icons/codecheck-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/codecheck-error.png -------------------------------------------------------------------------------- /styles/icons/codecheck-error@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/codecheck-error@2x.png -------------------------------------------------------------------------------- /styles/icons/codecheck-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/codecheck-warning.png -------------------------------------------------------------------------------- /styles/icons/codecheck-warning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/icons/codecheck-warning@2x.png -------------------------------------------------------------------------------- /styles/light-bulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/light-bulb.png -------------------------------------------------------------------------------- /styles/wiggle-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/wiggle-blue.png -------------------------------------------------------------------------------- /styles/wiggle-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/wiggle-green.png -------------------------------------------------------------------------------- /styles/wiggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OmniSharp/omnisharp-atom/e86f0fa8d8d5fb077dbf27440dad7b298badd4bb/styles/wiggle.png -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "lib": [ 5 | "es5", 6 | "dom", 7 | "es2015.core", 8 | "es2015.collection", 9 | "es2015.generator", 10 | "es2015.iterable", 11 | "es2015.promise", 12 | "es2015.reflect", 13 | "es2015.symbol", 14 | "es2015.symbol.wellknown" 15 | ], 16 | "baseUrl": "", 17 | "paths": { 18 | "rxjs": [ 19 | "node_modules/rxjs" 20 | ] 21 | }, 22 | "moduleResolution": "node", 23 | "diagnostics": true, 24 | "noEmitOnError": false, 25 | "preserveConstEnums": true, 26 | "noImplicitAny": true, 27 | "skipLibCheck": true, 28 | "emitDecoratorMetadata": true, 29 | "experimentalDecorators": true, 30 | "declaration": false, 31 | "removeComments": true, 32 | "noLib": false, 33 | "suppressImplicitAnyIndexErrors": true, 34 | "allowSyntheticDefaultImports": true, 35 | "sourceMap": true 36 | }, 37 | "compileOnSave": true, 38 | "formatCodeOptions": { 39 | "indentSize": 4, 40 | "tabSize": 4, 41 | "indentStyle": "smart", 42 | "convertTabsToSpaces": true, 43 | "insertSpaceAfterCommaDelimiter": true, 44 | "insertSpaceAfterSemicolonInForStatements": true, 45 | "insertSpaceBeforeAndAfterBinaryOperators": true, 46 | "insertSpaceAfterKeywordsInControlFlowStatements": true, 47 | "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, 48 | "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, 49 | "placeOpenBraceOnNewLineForFunctions": false, 50 | "placeOpenBraceOnNewLineForControlBlocks": false 51 | }, 52 | "exclude": [ 53 | "node_modules", 54 | "typingsTemp", 55 | "typings" 56 | ], 57 | "atom": { 58 | "rewriteTsconfig": true 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tsd.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | /// 8 | /// 9 | /// 10 | /// 11 | /// 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | 22 | -------------------------------------------------------------------------------- /tslint.types.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/tslint-microsoft-contrib", 4 | "node_modules/tslint-eslint-rules/dist/rules" 5 | ], 6 | "extends": "./tslint.json", 7 | "rules": { 8 | "promise-function-async": true, 9 | "no-for-in-array": true, 10 | "no-inferred-empty-object-type": true, 11 | "no-void-expression": true, 12 | "restrict-plus-operands": true, 13 | "strict-boolean-expressions": true, 14 | "completed-docs": [ 15 | true, 16 | "classes", 17 | "functions", 18 | "methods", 19 | "properties" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "omnisharp-atom", 3 | "dependencies": { 4 | "lodash": "github:david-driscoll/lodash-ts", 5 | "semver": "registry:npm/semver#5.0.0+20160211003958" 6 | }, 7 | "globalDependencies": { 8 | "assertion-error": "registry:dt/assertion-error#1.0.0+20160316155526", 9 | "jquery": "registry:dt/jquery#1.10.0+20160417213236", 10 | "mixto": "registry:dt/mixto#0.0.0+20160317120654", 11 | "node": "registry:env/node#4.0.0+20160507210304", 12 | "q": "registry:dt/q#0.0.0+20160417152954" 13 | }, 14 | "devDependencies": { 15 | "chai": "registry:npm/chai#3.5.0+20160415060238" 16 | }, 17 | "globalDevDependencies": { 18 | "mocha": "registry:env/mocha#2.2.5+20160321223601" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /typingsTemp/property-accessors/property-accessors.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for property-accessors (v1.1.3) 2 | // Project: https://github.com/atom/property-accessors 3 | // Definitions by: david-driscoll 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | // Generated by: https://github.com/david-driscoll/atom-typescript-generator 7 | // Generation tool by david-driscoll 8 | declare module PropertyAccessors { 9 | /** 10 | * PropertyAccessors 11 | * This class was not documented by atomdoc, assume it is private. Use with caution. 12 | */ 13 | class PropertyAccessors { 14 | /** 15 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 16 | */ 17 | accessor(name? : string, definition? : any) : any; 18 | 19 | /** 20 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 21 | */ 22 | advisedAccessor(name? : string, definition? : any) : any; 23 | 24 | /** 25 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 26 | */ 27 | lazyAccessor(name? : string, definition? : any) : any; 28 | 29 | } 30 | 31 | } 32 | declare module "property-accessors" { 33 | export = PropertyAccessors.PropertyAccessors; 34 | } 35 | -------------------------------------------------------------------------------- /typingsTemp/serializable/serializable.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for serializable (v1.0.3) 2 | // Project: https://github.com/atom/serializable 3 | // Definitions by: david-driscoll 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | // Generated by: https://github.com/david-driscoll/atom-typescript-generator 7 | // Generation tool by david-driscoll 8 | declare module Serializable { 9 | /** 10 | * Serializable 11 | * This class was not documented by atomdoc, assume it is private. Use with caution. 12 | */ 13 | class Serializable { 14 | /** 15 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 16 | */ 17 | static registerDeserializers(deserializers? : any) : any; 18 | 19 | /** 20 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 21 | */ 22 | static registerDeserializer(deserializer? : any) : any; 23 | 24 | /** 25 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 26 | */ 27 | static deserialize(state? : any, params? : any) : any; 28 | 29 | /** 30 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 31 | */ 32 | deserializers: any /* default */; 33 | 34 | /** 35 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 36 | */ 37 | serialize() : any; 38 | 39 | /** 40 | * This field or method was not documented by atomdoc, assume it is private. Use with caution. 41 | */ 42 | testSerialization(params? : any) : any; 43 | 44 | } 45 | 46 | } 47 | declare module "serializable" { 48 | } 49 | --------------------------------------------------------------------------------