use of com.intellij.execution.MethodBrowser in project intellij-community by JetBrains.
the class JUnitConfigurable method installDocuments.
private void installDocuments() {
for (int i = 0; i < myTestLocations.length; i++) {
final LabeledComponent testLocation = getTestLocation(i);
final JComponent component = testLocation.getComponent();
final ComponentWithBrowseButton field;
Object document;
if (component instanceof TextFieldWithBrowseButton) {
field = (TextFieldWithBrowseButton) component;
document = new PlainDocument();
((TextFieldWithBrowseButton) field).getTextField().setDocument((Document) document);
} else if (component instanceof EditorTextFieldWithBrowseButton) {
field = (ComponentWithBrowseButton) component;
document = ((EditorTextField) field.getChildComponent()).getDocument();
} else {
field = myPatternTextField;
document = new PlainDocument();
((TextFieldWithBrowseButton) field).getTextField().setDocument((Document) document);
}
myBrowsers[i].setField(field);
if (myBrowsers[i] instanceof MethodBrowser) {
final EditorTextField childComponent = (EditorTextField) field.getChildComponent();
((MethodBrowser) myBrowsers[i]).installCompletion(childComponent);
document = childComponent.getDocument();
}
myModel.setJUnitDocument(i, document);
}
}
Aggregations