private IDebugElement getContext() { IAdaptable object = DebugUITools.getDebugContext(); IDebugElement context = null; if (object instanceof IDebugElement) { context = (IDebugElement) object; } else if (object instanceof ILaunch) { context = ((ILaunch) object).getDebugTarget(); } return context; }
/** * Returns the stack frame in which to search for properties, or <code>null</code> if none. * * @return the stack frame in which to search for properties, or <code>null</code> if none */ private AntStackFrame getFrame() { IAdaptable adaptable = DebugUITools.getDebugContext(); if (adaptable != null) { return adaptable.getAdapter(AntStackFrame.class); } return null; }
/** * Finds the currently selected context in the UI. * @return the current debug context */ protected IDebugElement getContext() { IAdaptable object = DebugUITools.getDebugContext(); IDebugElement context = null; if (object instanceof IDebugElement) { context = (IDebugElement) object; } else if (object instanceof ILaunch) { context = ((ILaunch) object).getDebugTarget(); } return context; }
/** * Finds the currently selected context in the UI. * @return the current debug context */ protected IDebugElement getContext() { IAdaptable object = DebugUITools.getDebugContext(); IDebugElement context = null; if (object instanceof IDebugElement) { context = (IDebugElement) object; } else if (object instanceof ILaunch) { context = ((ILaunch) object).getDebugTarget(); } return context; }
/** * Returns the stack frame in which to search for variables, or <code>null</code> * if none. * * @return the stack frame in which to search for variables, or <code>null</code> * if none */ protected IJavaStackFrame getFrame() { IAdaptable adaptable = DebugUITools.getDebugContext(); if (adaptable != null) { return (IJavaStackFrame)adaptable.getAdapter(IJavaStackFrame.class); } return null; }
/** * Returns the currently active stack frame, or <code>null</code> * if none. * * @return the currently active stack frame, or <code>null</code> */ protected IJavaStackFrame getStackFrame() { IAdaptable debugContext = DebugUITools.getDebugContext(); IJavaStackFrame frame = null; if (debugContext != null) { frame = (IJavaStackFrame) debugContext.getAdapter(IJavaStackFrame.class); } return frame; }
private IAdaptable getDebugContext() { if (fView != null) { return DebugUITools.getPartDebugContext(fView.getSite()); } else { return DebugUITools.getDebugContext(); } } }
/** * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (property.equals(IJDIPreferencesConstants.PREF_DETAIL_FORMATTERS_LIST) || property.equals(IJDIPreferencesConstants.PREF_SHOW_DETAILS) || property.equals(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH)) { populateDetailFormattersMap(); fCacheMap.clear(); // If a Java stack frame is selected in the Debug view, fire a change event on // it so the variables view will update for any formatter changes. IAdaptable selected = DebugUITools.getDebugContext(); if (selected != null) { IJavaStackFrame frame= (IJavaStackFrame) selected.getAdapter(IJavaStackFrame.class); if (frame != null) { DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] { new DebugEvent(frame, DebugEvent.CHANGE) }); } } } } /**
/** * Refreshes the variables view by firing a change event on a stack frame (active * debug context). */ protected void variableViewSettingsChanged() { // If a Java stack frame is selected in the Debug view, fire a change event on // it so the variables view will update for any structure changes. IAdaptable selected = DebugUITools.getDebugContext(); if (selected != null) { IJavaStackFrame frame= (IJavaStackFrame) selected.getAdapter(IJavaStackFrame.class); if (frame != null) { DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] { new DebugEvent(frame, DebugEvent.CHANGE) }); } } }
IAdaptable adaptable = DebugUITools.getDebugContext(); IJavaStackFrame frame= (IJavaStackFrame) adaptable.getAdapter(IJavaStackFrame.class); if (frame != null) {
private void createWatchExpression(String snippet) { IWatchExpression expression= DebugPlugin.getDefault().getExpressionManager().newWatchExpression(snippet); 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); }
IAdaptable adapt = DebugUITools.getDebugContext(); if(adapt != null) { IDebugTarget adapter = (IDebugTarget) adapt.getAdapter(IDebugTarget.class);
IAdaptable context = getDebugContext(); if (context == null) { ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(expressionString); DebugPlugin.getDefault().getExpressionManager().addExpression(expression); IAdaptable object = DebugUITools.getDebugContext(); IDebugElement context = null; if (object instanceof IDebugElement) {
ISourceLocator locator = null; ILaunch launch = null; IAdaptable selection = DebugUITools.getDebugContext(); if(selection == null) { new MessageDialog(getSite().getShell(),
IAdaptable adapt = DebugUITools.getDebugContext(); if(adapt != null) { IJavaDebugTarget target = (IJavaDebugTarget) adapt.getAdapter(IJavaDebugTarget.class);