Skip to content

Commit

Permalink
Adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLooman committed Dec 1, 2024
1 parent 5daf2c6 commit b2198f4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ public void setCapabilities(final ServerCapabilities capabilities) {
capabilities.setCallHierarchyProvider(true);
}

/**
* Prepare call hierarchy.
*
* @param magikFile Magik file.
* @param position Position.
* @return Call hierarchy items.
*/
public List<CallHierarchyItem> prepareCallHierarchy(
final MagikTypedFile magikFile, final Position position) {
final AstNode node = magikFile.getTopNode();
Expand Down Expand Up @@ -103,6 +110,12 @@ public List<CallHierarchyItem> prepareCallHierarchy(
return List.of(item);
}

/**
* Call hierarchy incoming calls.
*
* @param item Call hierarchy item.
* @return Call hierarchy incoming calls.
*/
public List<CallHierarchyIncomingCall> callHierarchyIncomingCalls(final CallHierarchyItem item) {
final JsonElement element = (JsonElement) item.getData();
final JsonObject object = element.getAsJsonObject();
Expand Down Expand Up @@ -189,6 +202,12 @@ private CallHierarchyIncomingCall createIncomingCallForProcedure(
fromItem, List.of(Lsp4jConversion.rangeToLsp4j(fromRange)));
}

/**
* Call hierarchy outgoing calls.
*
* @param item Call hierarchy item.
* @return Call hierarchy outgoing calls.
*/
public List<CallHierarchyOutgoingCall> callHierarchyOutgoingCalls(final CallHierarchyItem item) {
final JsonElement element = (JsonElement) item.getData();
final JsonObject object = element.getAsJsonObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public String getMethodName() {
return this.methodName;
}

/**
* Get method name with parameters.
*
* @return Method name with parameters.
*/
public String getMethodNameWithParameters() {
final StringBuilder builder = new StringBuilder();

Expand Down Expand Up @@ -198,6 +203,11 @@ public String getMethodNameWithParameters() {
return builder.toString();
}

/**
* Get name with parameters.
*
* @return Name with parameters.
*/
public String getNameWithParameters() {
final StringBuilder builder = new StringBuilder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public String getString() {
/**
* Get full string.
*
* @return
* @return Full string.
*/
public String getFullString() {
if (this.isCombined()) {
Expand Down Expand Up @@ -406,7 +406,7 @@ public List<TypeString> getGenerics() {
/**
* Get the reference of the generic.
*
* @return
* @return Generic reference.
*/
public TypeString getGenericReference() {
if (!this.isGenericReference() && !this.isGenericDefinition()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
* Conditional body handler.
*
* <p>Sets tested types for variables in the body after a conditional expression, such as an: -
* `_is`/`_isnt` `_unset`/`_maybe` (singleton types) - `_is`/`_isnt` <value> -
* `kind_of?()`/`class_of?()` - `_not` <above>
* `_is`/`_isnt` `_unset`/`_maybe` (singleton types) - `_is`/`_isnt` &lt;value&gt; -
* `kind_of?()`/`class_of?()` - `_not` &lt;above&gt;.
*
* <p>Note that combinations (`_and`/`_or` etc) aren't supported, as reasoning/determining about the
* types of variables in the body after a conditional expression with combinations of these is often
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected List<MagikIssue> runCheck(
* @param check Check to run.
* @return List with issues.
* @throws IllegalArgumentException -
* @throws IOException
* @throws IOException -
*/
protected List<MagikIssue> runCheck(
final Path path, final IDefinitionKeeper definitionKeeper, final MagikTypedCheck check)
Expand Down

0 comments on commit b2198f4

Please sign in to comment.