public void actionPerformed (ActionEvent e) { DebuggerEngine engine = org.netbeans.api.debugger.DebuggerManager.getDebuggerManager().getCurrentEngine(); if (engine != null) { engine.getActionsManager().doAction(ActionsManager.ACTION_NEW_WATCH); } } };
setCurrentDebugger(DebuggerManager.getDebuggerManager().getCurrentEngine());
setCurrentDebugger(DebuggerManager.getDebuggerManager().getCurrentEngine());
private void annotate (JspLineBreakpoint b) { // remove old annotation Object annotation = breakpointToAnnotation.get (b); if (annotation != null) Context.removeAnnotation (annotation); if (b.isHidden ()) return; // add new one annotation = Context.annotate (b); if (annotation == null) return; breakpointToAnnotation.put (b, annotation); DebuggerEngine de = DebuggerManager.getDebuggerManager (). getCurrentEngine (); Object timeStamp = null; if (de != null) timeStamp = de.lookupFirst (null, JPDADebugger.class); update (b, timeStamp); }
private void annotate (LineBreakpoint b) { // remove old annotation Object annotation = breakpointToAnnotation.get (b); if (annotation != null) { Context.removeAnnotation (annotation); } if (b.isHidden ()) { return; } // add new one annotation = Context.annotate (b); if (annotation == null) { return; } breakpointToAnnotation.put (b, annotation); DebuggerEngine de = DebuggerManager.getDebuggerManager().getCurrentEngine (); Object timeStamp = null; if (de != null) { timeStamp = de.lookupFirst (null, JPDADebugger.class); } update (b, timeStamp); }
public String getShortDescription () { // [TODO] hack for org.netbeans.modules.debugger.jpda.actions.MethodChooser that disables tooltips if ("true".equals(System.getProperty("org.netbeans.modules.debugger.jpda.doNotShowTooltips"))) { // NOI18N return null; } DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager (). getCurrentEngine (); if (currentEngine == null) return null; JPDADebugger d = currentEngine.lookupFirst(null, JPDADebugger.class); if (d == null) return null; Part lp = (Part) getAttachedAnnotatable(); if (lp == null) return null; Line line = lp.getLine (); DataObject dob = DataEditorSupport.findDataObject (line); if (dob == null) return null; EditorCookie ec = dob.getCookie(EditorCookie.class); if (ec == null) return null; // Only for editable dataobjects this.lp = lp; this.ec = ec; RequestProcessor.getDefault ().post (this); return null; }
private void breakpointOutput(Breakpoint.VALIDITY newValidity) { List<? extends LazyActionsManagerListener> lamls = DebuggerManager.getDebuggerManager().getCurrentEngine(). lookup(null, LazyActionsManagerListener.class); for (LazyActionsManagerListener lam : lamls) { if (lam instanceof BreakpointOutput) { ((BreakpointOutput) lam).printValidityMessage(this, newValidity, getURL(), getLineNumber()); } } }
getCurrentEngine (); if (currentEngine == null) { return null;
getCurrentEngine (); if (currentEngine == null) { return null;
public void reload(MavenProject project, Log logger, String classname) throws MojoFailureException, MojoExecutionException { getCurrentEngine (); if (debuggerEngine == null) { throw new MojoFailureException ("No debugging sessions was found.");
public String getShortDescription() { Utils.log("JspTooltip: getShortDescription"); toolTipText = null; DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager (). getCurrentEngine (); if (currentEngine == null) return null; JPDADebugger d = (JPDADebugger) currentEngine.lookupFirst (null, JPDADebugger.class); if (d == null) return null; Line.Part lp = (Line.Part) getAttachedAnnotatable(); if (lp != null) { Line line = lp.getLine (); DataObject dob = DataEditorSupport.findDataObject(line); EditorCookie ec = (EditorCookie) dob.getCookie(EditorCookie.class); if (ec != null) { // Only for editable dataobjects try { doc = ec.openDocument (); rp.post(this); } catch (IOException e) { } } } return toolTipText; }
private static FileObject getFileObject(String classRelPath) { DebuggerEngine engine = DebuggerManager.getDebuggerManager ().getCurrentEngine(); if (engine != null) { SourcePathProvider sp = engine.lookupFirst(null, SourcePathProvider.class); if (sp != null) { String url = sp.getURL(classRelPath, false); if (url == null) { url = sp.getURL(classRelPath, true); } if (url != null) { try { FileObject fo = URLMapper.findFileObject(new URL(url)); if (fo != null) { return fo; } } catch (MalformedURLException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } } } } classRelPath = SourcePathProviderImpl.normalize(classRelPath); FileObject fo = GlobalPathRegistry.getDefault().findResource(classRelPath); return fo; }
private static FileObject getFileObject(String classRelPath) { DebuggerEngine engine = DebuggerManager.getDebuggerManager ().getCurrentEngine(); if (engine != null) { SourcePathProvider sp = engine.lookupFirst(null, SourcePathProvider.class); if (sp != null) { String url = sp.getURL(classRelPath, false); if (url == null) { url = sp.getURL(classRelPath, true); } if (url != null) { try { FileObject fo = URLMapper.findFileObject(new URL(url)); if (fo != null) { return fo; } } catch (MalformedURLException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } } } } classRelPath = SourcePathProviderImpl.normalize(classRelPath); FileObject fo = GlobalPathRegistry.getDefault().findResource(classRelPath); return fo; }
private static FileObject getFileObject(String classRelPath) { DebuggerEngine engine = DebuggerManager.getDebuggerManager ().getCurrentEngine(); if (engine != null) { SourcePathProvider sp = engine.lookupFirst(null, SourcePathProvider.class); if (sp != null) { String url = sp.getURL(classRelPath, false); if (url == null) { url = sp.getURL(classRelPath, true); } if (url != null) { try { FileObject fo = URLMapper.findFileObject(new URL(url)); if (fo != null) { return fo; } } catch (MalformedURLException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } } } } classRelPath = SourcePathProviderImpl.normalize(classRelPath); FileObject fo = GlobalPathRegistry.getDefault().findResource(classRelPath); return fo; }
if (expression == null) return ; DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager (). getCurrentEngine (); if (currentEngine == null) return; JPDADebugger d = currentEngine.lookupFirst(null, JPDADebugger.class);
public static void setupContext(JEditorPane editorPane) { EditorKit kit = CloneableEditorSupport.getEditorKit("text/x-scala"); editorPane.setEditorKit(kit); DebuggerEngine en = DebuggerManager.getDebuggerManager ().getCurrentEngine(); JPDADebugger d = en.lookupFirst(null, JPDADebugger.class); CallStackFrame csf = d.getCurrentCallStackFrame(); if (csf != null) { String language = DebuggerManager.getDebuggerManager ().getCurrentSession().getCurrentLanguage(); SourcePath sp = en.lookupFirst(null, SourcePath.class); String url = sp.getURL(csf, language); int line = csf.getLineNumber(language); setupContext(editorPane, url, line); } }
getCurrentEngine (); if (currentEngine == null) { return;
getCurrentEngine (); if (currentEngine == null) { return;
toolTipText = null; DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager().getCurrentEngine(); if (currentEngine == null) return; JPDADebugger d = (JPDADebugger) currentEngine.lookupFirst (null, JPDADebugger.class);