-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper Newlines in Hover #1918
Merged
Merged
Proper Newlines in Hover #1918
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
2f9c784
Added the changes for structured documentation
akshita31 cc22739
Merge remote-tracking branch 'rchande/testImprovements' into typelook…
akshita31 0df87fa
Test
akshita31 27f5dde
First Test Running Properly
akshita31 50aa8e8
Integration Test Running
akshita31 007dba8
Test Commit
akshita31 b66e5f1
Add new test files next to the csproj, not in the root of the workspace
6873f90
Make it possible for tests to await restore
882d13b
Enable tests to wait for the omnisharp request queue to be empty
ccc21a6
Wait for queue empty in hover test
d0acf84
Removed debug statements
akshita31 eebb979
Removed Unnecessary space
akshita31 0207222
Added braces for if-else
akshita31 66f5b7e
Added conditions for each field individually
akshita31 2e96efc
Merge branch 'master' into typelookup_changed
c07a4ca
Aligned parameters
akshita31 c621872
Merge branch 'typelookup_changed' of https://github.com/akshita31/omn…
akshita31 05ed4bd
Changes for parameter as an object
akshita31 47129b7
Add missing line
akshita31 e289fb1
Changed to DocumentationItem
akshita31 d7e0f35
Merge remote-tracking branch 'upstream/master' into typelookup_changed
akshita31 c2a32f7
Extracted Documentation helper as a function in a separate file
akshita31 9e61bc9
Removed unnecessary using
akshita31 b57e7a9
Merge remote-tracking branch 'upstream/master' into typelookup_changed
akshita31 ecec82c
Code Clean up
akshita31 cbfde53
Clean up
akshita31 62e6c2e
Fixed spacing
akshita31 5fe5694
Merge branch 'master' into typelookup_changed
akshita31 5e69bcb
Removed unused variable
akshita31 3e4b01a
Merge branch 'typelookup_changed' of https://github.com/akshita31/omn…
akshita31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as fs from 'async-file'; | ||
import * as vscode from 'vscode'; | ||
|
||
import poll from './poll'; | ||
import { should, expect } from 'chai'; | ||
import testAssetWorkspace from './testAssets/testAssetWorkspace'; | ||
import { RequestQueueCollection } from '../../src/omnisharp/requestQueue'; | ||
import { OmniSharpServer } from '../../src/omnisharp/server'; | ||
import { omnisharp } from '../../src/omnisharp/extension'; | ||
|
||
const chai = require('chai'); | ||
chai.use(require('chai-arrays')); | ||
chai.use(require('chai-fs')); | ||
|
||
suite(`Tasks generation: ${testAssetWorkspace.description}`, function() { | ||
suiteSetup(async function() { | ||
should(); | ||
|
||
let csharpExtension = vscode.extensions.getExtension("ms-vscode.csharp"); | ||
if (!csharpExtension.isActive) { | ||
await csharpExtension.activate(); | ||
} | ||
|
||
await testAssetWorkspace.cleanupWorkspace(); | ||
|
||
await csharpExtension.exports.initializationFinished; | ||
|
||
await vscode.commands.executeCommand("dotnet.generateAssets"); | ||
|
||
await poll(async () => await fs.exists(testAssetWorkspace.launchJsonPath), 10000, 100); | ||
|
||
}); | ||
|
||
|
||
test("Hover returns structured documentation with proper newlines", async function () { | ||
|
||
let program = | ||
`using System; | ||
namespace Test | ||
{ | ||
class testissue | ||
{ | ||
///<summary>Checks if object is tagged with the tag.</summary> | ||
/// <param name="gameObject">The game object.</param> | ||
/// <param name="tagName">Name of the tag.</param> | ||
/// <returns>Returns <c> true</c> if object is tagged with tag.</returns> | ||
|
||
public static bool Compare(int gameObject,string tagName) | ||
{ | ||
return true; | ||
} | ||
} | ||
}`; | ||
let fileUri = await testAssetWorkspace.projects[0].addFileWithContents("test1.cs", program); | ||
|
||
await omnisharp.waitForEmptyEventQueue(); | ||
|
||
await vscode.commands.executeCommand("vscode.open", fileUri); | ||
|
||
let c = await vscode.commands.executeCommand("vscode.executeHoverProvider", fileUri,new vscode.Position(10,29)); | ||
|
||
let answer:string = | ||
`Checks if object is tagged with the tag. | ||
|
||
Parameters: | ||
|
||
\t\tgameObject: The game object. | ||
\t\ttagName: Name of the tag. | ||
|
||
Returns trueif object is tagged with tag.`; | ||
expect(c[0].contents[0].value).to.equal(answer); | ||
}); | ||
|
||
teardown(async() => | ||
{ | ||
await testAssetWorkspace.cleanupWorkspace(); | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth extracting out a little helper method that adds the newline for you.