private static void setupContext(final JEditorPane editorPane, Pair<Line.Part, FileObject> context) { assert SwingUtilities.isEventDispatchThread(); if (context != null) { final Line.Part lp = context.first(); final FileObject file = context.second(); //System.err.println("WatchPanel.setupContext("+file+", "+line+", "+offset+")"); // Do the binding for text files only: if (file != null && file.getMIMEType().startsWith("text/")) { // NOI18N String origText = editorPane.getText(); DialogBinding.bindComponentToFile(file, lp.getLine().getLineNumber(), lp.getColumn(), lp.getLength(), editorPane); Document editPaneDoc = editorPane.getDocument(); //editPaneDoc.putProperty("org.netbeans.modules.editor.java.JavaCompletionProvider.skipAccessibilityCheck", "true"); editorPane.setText(origText); } } setupUI(editorPane); }
Line cdiLine = cdiAnnotation.getPart().getLine(); if ( cdiLine.getLineNumber() == lineNumber ){ int length = cdiAnnotation.getPart().getLength(); if ( length == desc.getLength() ){ doAction( comp , annotationType, cdiAnnotation.getPart(),