public ErrorDescriptionNode(ErrorDescription ed, Map<ErrorDescription, List<FixDescription>> errors2Fixes) { super(new FixChildren(ed, errors2Fixes.get(ed))); this.ed = ed; int line = -1; try { line = ed.getRange().getBegin().getLine(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } setDisplayName((line != (-1) ? (line + ":") : "") + ed.getDescription()); setIconBaseWithExtension("org/netbeans/modules/java/hints/analyzer/ui/warning-glyph.gif"); }
public void actionPerformed(ActionEvent e) { Node node = getNextMeaningfullNode(); comp.nodesForNext.add(0, node); FixDescription fd = node.getLookup().lookup(FixDescription.class); assert fd != null; try { comp.getExplorerManager().setSelectedNodes(new Node[]{node}); } catch (PropertyVetoException ex) { Exceptions.printStackTrace(ex); } ErrorDescription ed = fd.getErrors(); UiUtils.open(ed.getFile(), ed.getRange().getBegin().getOffset()); fireEnabledChanged(); }
public void open() { try { PositionRef pos = ed.getRange().getBegin(); int line = pos.getLine(); int column = pos.getColumn(); Line l = pos.getCloneableEditorSupport().getLineSet().getCurrent(line); l.show(Line.SHOW_GOTO, column); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }
public FixNode(ErrorDescription ed, FixDescription fix) { super(Children.LEAF, Lookups.fixed(new OpenCookieImpl(ed), fix)); this.fix = fix; int line = -1; try { line = ed.getRange().getBegin().getLine(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } setDisplayName((line != (-1) ? (line + ":") : "") + fix.getText() + "(" + ed.getDescription() + ")"); setIconBaseWithExtension("org/netbeans/modules/java/hints/analyzer/ui/suggestion.png"); fix.addChangeListener(this); }
UiUtils.open(ed.getFile(), ed.getRange().getBegin().getOffset()); fireEnabledChanged();
severityToTaskListString(hint.getSeverity()), hint.getDescription(), hint.getRange().getBegin().getLine()+1); tasks.add(task); } catch (IOException ioe) {