-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Structure View #243
Merged
Merged
Structure View #243
Conversation
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
Detect `Kernel.defmodule/2` macro in files or nested in Modules. This commit involves a huge changes to how `Call` interface is structured to allow general {module, function, arity} querying. It drops a few rules (or makes them private), so other code that depended on those rule's interfaces had to change too.
Rename the old Function classes to FunctionClause. Have a new Function that has the name and arity of the function and has the FunctionClauses as children.
An element for the defdelegate call itself with the `:append_first` and `:to` shared options, then under that an element for each name in first argument to defdelegate showing the fake implementation.
Use the regex matching so that new methods can be added more quickly.
If an `exception/1` or `message/1` override callback is in the method after `defexception/1` is called, then those functions are grouped under the Exception element in the Structure view.
* Fixed bug with ordering of clauses with `when` operations so that `when/2` doesn't appear as the function name / arity. * Icons now go: Compile/Run, Type, PackageLocal?, Visibility. defs are "Run, Function, Public" while defmacros are "Compile, Function, Public"
Use `CallDefinition` for `Function` and `Macro` and `CallDefinitionClause` for `FunctionClause` and `MacroClause`. Functions and macros are differentiated by this `CallDefinition.Time`, which is `RUN` for functions and `COMPILE` for macros.
Includes generic support for visibility on call definitions and call definition clauses.
Quote calls are treated as anonymous Modules and any structure that can occur in a Module before can now also appear in a quote or its pseudo-Module.
So name/arity under defoverridable element.
Take all the CallReferences from Overridables and use them to make the function CallDefinitions with the same {name, arity} as overridable.
NameArity gains anothere required flag, callback, that will add Callback icon if true.
Protocol gets Anonymous,Overridden and so Implementation is changed from just Anonymous to Anonymous,Overriding.
Thanks to @YannCebron's answer ( https://intellij-support.jetbrains.com/hc/en-us/community/posts/206492689-Scroll-From-Source-not-working-when-implementing-StructureViewTreeElement?page=1#community_comment_207538009 ), which let me know I needed to override `#getSuitableClasses()` in my Model.
Don't just override `#getSuitableClasses`, but also `#isSuitable`, so that the class can be checked with `#is` static functions, which ensures that clicking in the body of Call scrolls to the clause, which was not the case previously because the inner most Call would be used.
KronicDeth
force-pushed
the
97-structure-view-factory
branch
from
February 25, 2016 03:13
c7acf42
to
f693070
Compare
KronicDeth
added a commit
that referenced
this pull request
Feb 25, 2016
KronicDeth
added a commit
that referenced
this pull request
Feb 25, 2016
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolved #97
Changelog
def
,macro
, etc] vs private [defp
,macrop
and@typep
])use Alias
call's__using__
'squote
into the call site Structure@callback
) show their name/arity and then a nest specdef
,defp
,macro
, andmacrop
) shows the head of each definition under the CallDefinition.@spec
) show the type specification for a CallDefinitionname: arity
shows the name/arity for adefoverridable
.:append_first
and:to
options with the implied Function Delegation nested underneathdefexception
) show the implicit struct and nest any callback functions, such asexception/1
ormessage/1
.defoverridable
tracks overridable functions and is used to mark CallDefinitions are overrides.quote do end
models quote blocks so they can be injecteduse Alias
sites.use Alias
showuse
calls.