-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FUSETOOLS2-2299: Display variables values during debugging for Exchan…
…ge scope Signed-off-by: Dominik Jelinek <[email protected]>
- Loading branch information
Showing
13 changed files
with
146 additions
and
4 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
41 changes: 41 additions & 0 deletions
41
...b/cameltooling/dap/internal/model/variables/message/MessageExchangeVariablesVariable.java
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,41 @@ | ||
package com.github.cameltooling.dap.internal.model.variables.message; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.eclipse.lsp4j.debug.Variable; | ||
|
||
import com.github.cameltooling.dap.internal.IdUtils; | ||
import com.github.cameltooling.dap.internal.types.ExchangeVariable; | ||
|
||
public class MessageExchangeVariablesVariable extends Variable { | ||
|
||
private final List<ExchangeVariable> exchangeVariables; | ||
|
||
public MessageExchangeVariablesVariable(int parentVariablesReference, List<ExchangeVariable> exchangeVariables) { | ||
this.exchangeVariables = exchangeVariables; | ||
setName("Variables"); | ||
setValue(""); | ||
int headerVarRefId = IdUtils.getPositiveIntFromHashCode((parentVariablesReference+"@ExchangeVariables@").hashCode()); | ||
setVariablesReference(headerVarRefId); | ||
} | ||
|
||
public Collection<Variable> createVariables() { | ||
Collection<Variable> variables = new ArrayList<>(); | ||
if (exchangeVariables != null) { | ||
for (ExchangeVariable exchangeVariable : exchangeVariables) { | ||
variables.add(createVariable(exchangeVariable.getKey(), exchangeVariable.getValue())); | ||
} | ||
} | ||
return variables; | ||
} | ||
|
||
private Variable createVariable(String key, String value) { | ||
Variable variable = new Variable(); | ||
variable.setName(key); | ||
variable.setValue(value); | ||
return variable ; | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/com/github/cameltooling/dap/internal/types/ExchangeVariable.java
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,45 @@ | ||
package com.github.cameltooling.dap.internal.types; | ||
|
||
import java.io.Serializable; | ||
|
||
import jakarta.xml.bind.annotation.XmlAttribute; | ||
import jakarta.xml.bind.annotation.XmlRootElement; | ||
import jakarta.xml.bind.annotation.XmlValue; | ||
|
||
@XmlRootElement(name = "exchangeVariable") | ||
public class ExchangeVariable implements Serializable { | ||
|
||
private static final long serialVersionUID = 4693511937508953820L; | ||
|
||
private String type; | ||
private String key; | ||
private String value; | ||
|
||
@XmlAttribute(name = "type") | ||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@XmlAttribute(name = "key") | ||
public String getKey() { | ||
return key; | ||
} | ||
|
||
public void setKey(String key) { | ||
this.key = key; | ||
} | ||
|
||
@XmlValue | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
} |
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
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