-
Notifications
You must be signed in to change notification settings - Fork 673
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables some basic DJango intellisense for templates, still more to go… Adds new DjangoCompletionSource, DjangoCompletionSourceProvider, DjangoIntellisenseControllerProvider, DjangoIntellisenseController The intellisense controller is still greatly lacking – e.g. there's no real way to commit yet. DjangoProject now specializes the appropriate DJango functions and participates in their analysis. This enables it to pick up the available filters and tags both from the core Django project as well as any extensions defined in a user's own app. Html Completions should only be available in the HTML section of the file, not in the template section Adds new AnalysisValue base class which allows 3rd-party code to interact w/ the analysis engine Adds CallInfo class which allows 3rd-party code to analyze calls Force modules to load before getting their locations Make ProjectAnalyzer public, rename to VsProjectAnalyzer, reduce its public API to only the APIs we want to support Increase the default cross module analysis limit
- Loading branch information
Dino Viehland
committed
May 8, 2012
1 parent
133c052
commit b380c8a
Showing
48 changed files
with
1,195 additions
and
202 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* **************************************************************************** | ||
* | ||
* Copyright (c) Microsoft Corporation. | ||
* | ||
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A | ||
* copy of the license can be found in the License.html file at the root of this distribution. If | ||
* you cannot locate the Apache License, Version 2.0, please send an email to | ||
* vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound | ||
* by the terms of the Apache License, Version 2.0. | ||
* | ||
* You must not remove this notice, or any other, from this software. | ||
* | ||
* ***************************************************************************/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.PythonTools.Analysis { | ||
/// <summary> | ||
/// Base class for all analysis values. Exposes the public API of the analysis engine. | ||
/// | ||
/// New in 1.5. | ||
/// </summary> | ||
public class AnalysisValue { | ||
internal AnalysisValue() { | ||
} | ||
|
||
/// <summary> | ||
/// Gets a list of locations where this value is defined. | ||
/// </summary> | ||
public virtual IEnumerable<LocationInfo> Locations { | ||
get { return LocationInfo.Empty; } | ||
} | ||
|
||
/// <summary> | ||
/// Gets the constant value that this object represents, if it's a constant. | ||
/// | ||
/// Returns Type.Missing if the value is not constant (because it returns null | ||
/// if the type is None). | ||
/// </summary> | ||
/// <returns></returns> | ||
public virtual object GetConstantValue() { | ||
return Type.Missing; | ||
} | ||
} | ||
} |
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,36 @@ | ||
/* **************************************************************************** | ||
* | ||
* Copyright (c) Microsoft Corporation. | ||
* | ||
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A | ||
* copy of the license can be found in the License.html file at the root of this distribution. If | ||
* you cannot locate the Apache License, Version 2.0, please send an email to | ||
* vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound | ||
* by the terms of the Apache License, Version 2.0. | ||
* | ||
* You must not remove this notice, or any other, from this software. | ||
* | ||
* ***************************************************************************/ | ||
|
||
using System.Collections.Generic; | ||
using Microsoft.PythonTools.Analysis.Values; | ||
|
||
namespace Microsoft.PythonTools.Analysis { | ||
public struct CallInfo { | ||
private readonly ISet<Namespace>[] _args; | ||
|
||
internal CallInfo(ISet<Namespace>[] args) { | ||
_args = args; | ||
} | ||
|
||
public int NormalArgumentCount { | ||
get { | ||
return _args.Length; | ||
} | ||
} | ||
|
||
public IEnumerable<AnalysisValue> GetArgument(int arg) { | ||
return _args[arg]; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.