Quantcast
Channel: SCN : Popular Discussions - ABAP in Eclipse
Viewing all articles
Browse latest Browse all 1215

Eclipse Debugger Plugin: Determination of Values of Variables?

$
0
0

Hello,

 

I want to write an little Debugger Plugin for the Abap in Eclipse.

The Debugger Plugin should determine some Variables, match the values, and show the results.

 

My Problem is: How can i get the value of an Variable. (e.g. ZCL_CLASS=>GV_MESSAGE )

I tried something but i didn't find a solution.

 

For Example:
In the ADT i found the Package: com.sap.adt.debugger.variables

In this Package are Interfaces like: "IAbapVariable".

But i didn't find a documentation about this package and this interfaces.

 

My Question: How can i get Instances to these Interfaces??

 

 

In the Internet i found a Solution to get the Values of the Variables which are current shown in the VariablesView of the Debugger.

This is the Coding:

 

VariablesView variablesView = (VariablesView) PlatformUI.getWorkbench().getActiveWorkbenchWindow()

                .getActivePage().findView(IDebugUIConstants.ID_VARIABLE_VIEW );

       

        IVariable[] variables = null;

        Object input;

        if (variablesView != null) {

            input = (variablesView.getViewer()).getInput();

            if (input instanceof IStackFrame) {

 

                try {

                    variables = ((IStackFrame) input).getVariables();

                    for (IVariable iVariable : variables) {

                       

                        IValue value = iVariable.getValue();

                        System.out.println(iVariable.getName() + "-----" + value.getValueString());

}

                catch (DebugException e) {

                    e.printStackTrace();

                }

            }

 

My Problem: My Variables which i need are not always shown in the Variables View. (e.g. Static Class Attributes)

When i use this way, someone have to enter the Variables in the Variables View before he can use my debugger plugin. Thats not really nice. .

I didn't find a way, to add some Variables in the VariablesView via coding of my Plugin?

 

I hope someone can give me some hints.

 

Thank you very much.

 

Regards

Stefan


Viewing all articles
Browse latest Browse all 1215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>