nodes = new Node[Math.min(prefetchCount, count)]; for (int i = 0; i < nodes.length; i++) { nodes[i] = nch.getNodeAt(i);
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { // Even when this renderer is set as default for any object, // we need to call super, as it sets bacgrounds and does some other // things... super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (table instanceof ETable) { row = ((ETable) table).convertRowIndexToModel(row); Node n = manager.getRootContext().getChildren().getNodeAt(row); if (n instanceof FunctionCallNode) { node = (FunctionCallNode) n; setText(ensureVisible(node.getHtmlDisplayName(), getBackground())); } } return this; }
static void openTestsuite(TestsuiteNode node) { Children childrens = node.getChildren(); if (childrens != null){ Node child = childrens.getNodeAt(0); if ((child != null) && (child instanceof JUnitTestMethodNode)){ final FileObject fo = ((JUnitTestMethodNode)child).getTestcaseFileObject();
public void openTestsuite(TestsuiteNode node) { Children childrens = node.getChildren(); if (childrens != null) { Node child = childrens.getNodeAt(0); if ((child != null) && (child instanceof MavenJUnitTestMethodNode)) { final FileObject fo = ((MavenJUnitTestMethodNode) child).getTestcaseFileObject();
private void saveExpandStatus(Node node) { if (node instanceof RootNode) { RootNode rootNode = (RootNode) node; for (Node n : rootNode.getChildren().getNodes()) { saveExpandStatus(n); } } else if (node instanceof QueryNode) { QueryNode queryNode = (QueryNode) node; Node firstChild = queryNode.getChildren().getNodeAt(0); boolean parameterExpanded = false; if (firstChild != null && firstChild instanceof ParameterNode) { parameterExpanded = isExpanded(firstChild); } uiModel.setExpand(queryNode.getQuery(), isExpanded(queryNode), parameterExpanded); for (Node n : queryNode.getChildren().getNodes()) { saveExpandStatus(n); } } } }
private void loadExpandStatus(Node node) { if (node instanceof RootNode) { RootNode rootNode = (RootNode) node; for (Node n : rootNode.getChildren().getNodes()) { loadExpandStatus(n); } } else if (node instanceof QueryNode) { QueryNode queryNode = (QueryNode) node; if (uiModel.isExpanded(queryNode.getQuery())) { expandNode(queryNode); } Node firstChild = queryNode.getChildren().getNodeAt(0); if (firstChild != null && firstChild instanceof ParameterNode) { if (uiModel.isParametersExpanded(queryNode.getQuery())) { expandNode(firstChild); } } for (Node n : queryNode.getChildren().getNodes()) { loadExpandStatus(n); } } }