diff --git a/htmlContent/console-template.html b/htmlContent/console-template.html index 734f2d1..4e3a4c1 100644 --- a/htmlContent/console-template.html +++ b/htmlContent/console-template.html @@ -6,9 +6,9 @@ Omnisharp Output - + × diff --git a/install.cmd b/install.cmd new file mode 100644 index 0000000..25364c5 --- /dev/null +++ b/install.cmd @@ -0,0 +1,7 @@ +@echo off +CALL npm install +SET TMPFOLDER=%TEMP%\%RANDOM% +CALL git clone https://github.com/OmniSharp/omnisharp-server-roslyn-binaries.git %TMPFOLDER% +RD /S /Q node\server +xcopy /S /E /Y /I %TMPFOLDER%\lib\server %CD%\node\server +RD /S /Q %TMPFOLDER% \ No newline at end of file diff --git a/build.sh b/install.sh similarity index 100% rename from build.sh rename to install.sh diff --git a/main.js b/main.js index 02ea877..f2d86b9 100644 --- a/main.js +++ b/main.js @@ -33,6 +33,7 @@ define(function (require, exports, module) { //CommandManager.get(OmniCommands.FIX_USINGS).setEnabled(true); CommandManager.get(OmniCommands.FORMAT_DOCUMENT).setEnabled(true); CommandManager.get(OmniCommands.FIND_SYMBOLS).setEnabled(true); + CommandManager.get(OmniCommands.RELOAD_REFERENCE_DISPLAY).setEnabled(true); } function disable() { @@ -41,6 +42,7 @@ define(function (require, exports, module) { //CommandManager.get(OmniCommands.FIX_USINGS).setEnabled(false); CommandManager.get(OmniCommands.FORMAT_DOCUMENT).setEnabled(false); CommandManager.get(OmniCommands.FIND_SYMBOLS).setEnabled(false); + CommandManager.get(OmniCommands.RELOAD_REFERENCE_DISPLAY).setEnabled(false); } function createMenu() { @@ -53,6 +55,7 @@ define(function (require, exports, module) { menu.addMenuItem(OmniCommands.FORMAT_DOCUMENT, prefs.get('formatDocument')); menu.addMenuItem(OmniCommands.FIND_SYMBOLS, prefs.get('findSymbols')); menu.addMenuItem(OmniCommands.RELOAD_REFERENCE_DISPLAY); + menu.addMenuItem(OmniCommands.SHOW_CONSOLE); disable(); } diff --git a/modules/console.js b/modules/console.js index 1ad2b50..72ab419 100644 --- a/modules/console.js +++ b/modules/console.js @@ -18,11 +18,11 @@ define(function (require, exports, module) { } function render() { - var $console = _panel.$panel.find(".console"), + var $console = _panel.$panel.find(".console"), $element = "", - i = 0; + i = 0; - for (i = 0; i < _logData.length; i++) { + for (i = 0; i < _logData.length; i++) { if (_logData[i].text === '' || _logData[i].type !== _currentPanel) { continue; } @@ -32,25 +32,24 @@ define(function (require, exports, module) { $element.val(_logData[i].text); $element.addClass(_logData[i].type); - $console.append($element); - } + $console.append($element); + } $console.animate({ scrollTop: $console[0].scrollHeight }, 20); - } + } function add(msg, type) { - var texts = msg.toString().split('\n'), - i = 0; + var texts = msg.toString().split('\n'), + i = 0; - for (i = 0; i < texts.length; i++) { - _logData.push({type: type, text: texts[i]}); - } + for (i = 0; i < texts.length; i++) { + _logData.push({type: type, text: texts[i]}); + } render(); } exports.init = function() { _panel = WorkspaceManager.createBottomPanel('omnisharp.console', $(ConsoleTemplate)); - _panel.show(); _panel.$panel.find(".close").on("click", function () { _panel.hide(); @@ -72,4 +71,8 @@ define(function (require, exports, module) { add(data, 'omnisharp'); }); }; + + exports.show = function() { + _panel.show(); + }; }); diff --git a/modules/goToDefinition.js b/modules/goToDefinition.js index 7e7f8dc..9f40612 100644 --- a/modules/goToDefinition.js +++ b/modules/goToDefinition.js @@ -8,8 +8,6 @@ define(function (require, exports, module) { Helpers = require('modules/helpers'); exports.exec = function () { - var req = Helpers.buildRequest(); - Omnisharp.gotoDefinition() .done(function (res) { if (res.FileName === null) { diff --git a/modules/intellisense.js b/modules/intellisense.js index b06f903..2d41d34 100644 --- a/modules/intellisense.js +++ b/modules/intellisense.js @@ -94,7 +94,7 @@ define(function (require, exports, module) { hints: completions, match: null, selectInitial: true, - handleWideResults: true + handleWideResults: false }); }) .fail(deferred.reject); diff --git a/modules/klr.js b/modules/klr.js new file mode 100644 index 0000000..9d7440a --- /dev/null +++ b/modules/klr.js @@ -0,0 +1,10 @@ +/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ +/*global define, $, brackets, window, Mustache */ + +define(function (require, exports, module) { + 'use strict'; + + exports.showKLRProjects = function() { + + }; +}); diff --git a/modules/omniCommands.js b/modules/omniCommands.js index c929258..3dff584 100644 --- a/modules/omniCommands.js +++ b/modules/omniCommands.js @@ -15,5 +15,5 @@ define(function (require, exports, module) { exports.FIX_CODE_ISSUE = packageString + 'fixCodeIssue'; exports.RELOAD_REFERENCE_DISPLAY = packageString + 'reloadReferenceDisplay'; exports.FIND_SYMBOLS = packageString + 'findSymbols'; - + exports.SHOW_CONSOLE = packageString + 'showConsole'; }); diff --git a/modules/omniHandlers.js b/modules/omniHandlers.js index a9dd481..6742232 100644 --- a/modules/omniHandlers.js +++ b/modules/omniHandlers.js @@ -13,7 +13,8 @@ define(function (require, exports, module) { GoToDefinitionCommand = require('modules/goToDefinition'), FindSymbols = require('modules/findSymbols'), FormatCode = require('modules/formatCode'), - ReferenceDisplay = require('modules/referenceDisplay'); + ReferenceDisplay = require('modules/referenceDisplay'), + Console = require('modules/console'); // function fixCodeIssue() { // Helpers.makeRequestAndRefreshDocument('fixcodeissue'); @@ -33,6 +34,7 @@ define(function (require, exports, module) { //CommandManager.register(OmniStrings.CMD_FIX_CODE_ISSUE, OmniCommands.FIX_CODE_ISSUE, fixCodeIssue); CommandManager.register(OmniStrings.CMD_RELOAD_REFERENCE_DISPLAY, OmniCommands.RELOAD_REFERENCE_DISPLAY, ReferenceDisplay.reload); CommandManager.register(OmniStrings.CMD_FIND_SYMBOLS, OmniCommands.FIND_SYMBOLS, FindSymbols.exec); + CommandManager.register(OmniStrings.CMD_SHOW_CONSOLE, OmniCommands.SHOW_CONSOLE, Console.show); } exports.init = init; diff --git a/modules/omniStrings.js b/modules/omniStrings.js index 435ab28..7b95baf 100644 --- a/modules/omniStrings.js +++ b/modules/omniStrings.js @@ -13,4 +13,6 @@ define(function (require, exports, module) { //exports.CMD_FIX_CODE_ISSUE = 'Fix Code Issue'; exports.CMD_RELOAD_REFERENCE_DISPLAY = 'Reload References Display'; exports.CMD_FIND_SYMBOLS = 'Find Symbols'; + exports.CMD_SHOW_CONSOLE = 'Show Console'; + }); diff --git a/modules/rename.js b/modules/rename.js index db876a6..a5d6704 100644 --- a/modules/rename.js +++ b/modules/rename.js @@ -19,9 +19,6 @@ define(function (require, exports, module) { var renameTo = $input.val(); if (buttonId === 'renameOk' && renameTo !== undefined) { - var data = Helpers.buildRequest(); - data.renameto = renameTo; - Omnisharp.rename({renameTo: renameTo}) .done(function (res) { res.Changes.forEach(function (change) { diff --git a/package.json b/package.json index 33cc169..980ae14 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "omnisharp-brackets", "title": "omnisharp-brackets", - "description": "C# IDE plugin for brackets.io.\nOmniSharp is a family of Open Source projects, each with one goal - To enable great .NET development in YOUR editor of choice.", + "description": "C# IDE plugin for brackets.io.\nOmniSharp is a family of Open Source projects, each with one goal - To enable great .NET development in YOUR editor of choice.\n\n IMPORTANT: You must run the install script in the extension directory for the plugin to work.\n\nThis is because of a limitation on the size of the extensions size", "homepage": "https://github.com/OmniSharp/omnisharp-brackets", - "version": "0.0.3", + "version": "0.3.0", + "private": true, "author": "Mathew McLoughlin mathew.mcloughlin@gmail.com (http://omnisharp.net)", "license": "MIT", "engines": { diff --git a/package.sh b/package.sh index 9c2cd33..f9b88e9 100755 --- a/package.sh +++ b/package.sh @@ -1,3 +1,4 @@ -./build.sh -rm../omnisharp-brackets.zip -zip -r ../omnisharp-brackets.zip ../omnisharp-brackets -x "*.DS_Store .git" +rm -rf node_modules +rm -rf node/server +rm ../omnisharp-brackets.zip +zip -r ../omnisharp-brackets.zip ../omnisharp-brackets -x *.DS_Store *.git* *README.md* diff --git a/styles/omnisharp.css b/styles/omnisharp.css index 8dc8b8f..f1c5196 100644 --- a/styles/omnisharp.css +++ b/styles/omnisharp.css @@ -100,6 +100,10 @@ span.Parameter { background-image: url('images/icons/autocomplete_field.png'); } +span.Struct { + background-image: url('images/icons/autocomplete_struct.png'); +} + span.intellisense { line-height: 16px !important; display: inline-block; @@ -164,19 +168,6 @@ omnisharp-references .inline-editor-header { color: rgb(112, 112, 0); } - -#editor-console-icon { - background: url("../assets/icon.png"); - background-size: 22px; - background-position: center; -} - -#editor-console-icon.on { - background: url("../assets/icon-on.png"); - background-size: 22px; - background-position: center; -} - #editor-console .label { text-shadow: none; margin-left: 4px;