Examples of IWatchExpression


Examples of org.eclipse.debug.core.model.IWatchExpression

        public void done(final String errorMessage) {
          if (errorMessage == null) {
            if (addWatchExpression) {
              IExpressionManager expressionManager =
                  DebugPlugin.getDefault().getExpressionManager();
              IWatchExpression watchExpression =
                  expressionManager.newWatchExpression(expression.getWatchExpression());
              expressionManager.addExpression(watchExpression);
            }
          } else {
            parentShell.getDisplay().asyncExec(new Runnable() {
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

      public void run() {
        String expression = "Object.getOwnPropertyDescriptor(" + qualifiedName + ", \"" +
            jsVariable.getName() + "\")";

        IExpressionManager expressionManager = DebugPlugin.getDefault().getExpressionManager();
        IWatchExpression watchExpression = expressionManager.newWatchExpression(expression);
        expressionManager.addExpression(watchExpression);
      }
    };
  }
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

        String expression = "Object.getOwnPropertyDescriptor(" + subExpression + ", \"" +
            jsVariable.getName() + "\")";

        IExpressionManager expressionManager = DebugPlugin.getDefault().getExpressionManager();
        IWatchExpression watchExpression = expressionManager.newWatchExpression(expression);
        expressionManager.addExpression(watchExpression);
      }
    };
  }
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

        public void done(final String errorMessage) {
          if (errorMessage == null) {
            if (addWatchExpression) {
              IExpressionManager expressionManager =
                  DebugPlugin.getDefault().getExpressionManager();
              IWatchExpression watchExpression =
                  expressionManager.newWatchExpression(expression.getWatchExpression());
              expressionManager.addExpression(watchExpression);
            }
          } else {
            parentShell.getDisplay().asyncExec(new Runnable() {
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

        } else if (element instanceof PyVariableCollection || element instanceof PyVariable) {
            return null; // defaults are fine

        } else if (element instanceof IWatchExpression) {
            try {
                IWatchExpression watch_expression = (IWatchExpression) element;
                IValue value = watch_expression.getValue();
                if (value != null) {
                    return "\"" + watch_expression.getExpressionText() + "\"= " + value.getValueString();
                } else {
                    return null;
                }
            } catch (DebugException e) {
                return null;
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

public class PyVariableContentProviderHack extends VariableContentProvider {

    protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor)
            throws CoreException {
        if (element instanceof IWatchExpression) {
            IWatchExpression watchExpression = (IWatchExpression) element;
            return super.hasChildren(watchExpression.getValue(), context, monitor);
        }
        if (element instanceof PyVariableCollection) {
            PyVariableCollection pyVariableCollection = (PyVariableCollection) element;
            return pyVariableCollection.hasVariables();
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

    }

    @Override
    protected Object[] getAllChildren(Object parent, IPresentationContext context) throws CoreException {
        if (parent instanceof IWatchExpression) {
            IWatchExpression watchExpression = (IWatchExpression) parent;
            return super.getAllChildren(watchExpression.getValue(), context);
        }
        if (parent instanceof PyVariableCollection) {
            PyVariableCollection pyVariableCollection = (PyVariableCollection) parent;
            return pyVariableCollection.getVariables();
        }
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

        }

    }

    private void createExpression(String variable) {
        IWatchExpression expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(variable);

        DebugPlugin.getDefault().getExpressionManager().addExpression(expression);
        IAdaptable object = DebugUITools.getDebugContext();
        IDebugElement context = null;
        if (object instanceof IDebugElement) {
            context = (IDebugElement) object;
        } else if (object instanceof ILaunch) {
            context = ((ILaunch) object).getDebugTarget();
        }
        expression.setExpressionContext(context);
        showExpressionsView();
    }
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

     * This is simple, since the watch functionality is already there.
     *
     * @see WatchExpressionAction#createExpression
     */
    private void eval(final String expr) {
        final IWatchExpression expression = createWatchExpression(expr);

        final Shell shell = PydevDebugPlugin.getActiveWorkbenchWindow().getShell();
        Display display = PydevDebugPlugin.getDefault().getWorkbench().getDisplay();
        final Point point = display.getCursorLocation();

        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                expression.evaluate();
                waitForExpressionEvaluation(expression);
                try {
                    IValue value = expression.getValue();
                    String result = null;
                    if (value != null) {
                        result = expr + "\n" + value.getValueString();
                        DisplayPopup popup = new DisplayPopup(shell, point, result);
                        popup.open();
View Full Code Here

Examples of org.eclipse.debug.core.model.IWatchExpression

     *
     * @param expr the expression that should be evaluated in the current context
     * @return the created expression.
     */
    public static IWatchExpression createWatchExpression(final String expr) {
        final IWatchExpression expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(expr);
        IAdaptable object = DebugUITools.getDebugContext();
        IDebugElement context = null;
        if (object instanceof IDebugElement) {
            context = (IDebugElement) object;
        } else if (object instanceof ILaunch) {
            context = ((ILaunch) object).getDebugTarget();
        }

        expression.setExpressionContext(context);
        return expression;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.