/** * */ private void updateRetrieval() { Object context = DebugUITools.getPartDebugContext(fParent.getSite()); fRetrieval = MemoryViewUtil.getMemoryBlockRetrieval(context); }
@Override protected IJavaStackFrame getStackFrame(ITextViewer viewer, ITextEditor textEditor) { IAdaptable adaptable = DebugUITools.getPartDebugContext(textEditor.getSite()); if (adaptable != null) { return adaptable.getAdapter(IJavaStackFrame.class); } return null; }
protected IDebugElement getContext() { IAdaptable object = DebugUITools.getPartDebugContext(getSite()); IDebugElement context = null; if (object instanceof IDebugElement) { context = (IDebugElement) object; } else if (object instanceof ILaunch) { context = ((ILaunch) object).getDebugTarget(); } return context; }
private IAdaptable getDebugContext() { if (fView != null) { return DebugUITools.getPartDebugContext(fView.getSite()); } else { return DebugUITools.getDebugContext(); } } }
@Override public void debugContextChanged(DebugContextEvent event) { if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) { IAdaptable context = DebugUITools.getPartDebugContext(fSite.getSite()); updateAction(context); fCurrentContext = context; } } }
Object context = DebugUITools.getPartDebugContext(fParent.getSite()); if (context != null) { IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(context);
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IAdaptable context = DebugUITools.getPartDebugContext(getSite()); if (context != null && MemoryViewUtil.isValidSelection(new StructuredSelection(context))) { RetargetAddMemoryBlockAction action = new RetargetAddMemoryBlockAction(MemoryView.this); action.run(); action.dispose(); } return null; } };
/** * Creates a new watch expression from a string using the default expression manager. * * @param exp the string to use to create the expression */ private IExpression createExpression(String exp) { IWatchExpression expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(exp); IAdaptable object = DebugUITools.getPartDebugContext(fSite); IDebugElement context = null; if (object instanceof IDebugElement) { context = (IDebugElement) object; } else if (object instanceof ILaunch) { context = ((ILaunch) object).getDebugTarget(); } expression.setExpressionContext(context); return expression; }
IAdaptable context = DebugUITools.getPartDebugContext(fParent.getSite()); if (context != null) { IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(context);
@Override public void run() { // get current selection from Debug View Object debugContext = DebugUITools.getPartDebugContext(fSite.getSite()); IAddMemoryBlocksTarget target = getAddMemoryBlocksTarget(debugContext); if (target != null) { try { if (target.supportsAddMemoryBlocks(getMemoryView())) { target.addMemoryBlocks(getMemoryView(), getMemoryView().getSite().getSelectionProvider().getSelection()); } else super.run(); } catch (CoreException e) { DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.RetargetAddMemoryBlockAction_0, ActionMessages.RetargetAddMemoryBlockAction_1, e); } } else { super.run(); } }
IAdaptable context = DebugUITools.getPartDebugContext(fSite.getSite());
/** * @param site the site to initialize */ private void doInitialization(IMemoryRenderingSite site) { fSite = site; setToolTipText(DebugUIMessages.AddMemoryBlockAction_tooltip); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_MONITOR_EXPRESSION)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_ADD)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_MONITOR_EXPRESSION)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugUIConstants.PLUGIN_ID + ".addMemoryMonitorAction_context"); //$NON-NLS-1$ // listen for context changed DebugUITools.addPartDebugContextListener(fSite.getSite(), this); // get current context fCurrentContext = DebugUITools.getPartDebugContext(site.getSite()); // set up enablement based on current selection updateAction(fCurrentContext); DebugPlugin.getDefault().addDebugEventListener(this); }
private void addNewMemoryBlock(String expression, IMemoryBlockRetrievalExtension retrieval) Object elem = DebugUITools.getPartDebugContext(fContainer.getMemoryRenderingSite().getSite());
fTreeViewer = new MemoryViewTreeViewer(parent, style, fPresentationContext); IAdaptable context = DebugUITools.getPartDebugContext(fParent.getSite()); IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(context); if (retrieval != null) {