Search in sources :

Example 1 with ScopeHierarchyTreeCell

use of net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeCell in project pmd by pmd.

the class NodeInfoPanelController method initialize.

@Override
public void initialize(URL location, ResourceBundle resources) {
    EventStreams.valuesOf(scopeHierarchyTreeView.getSelectionModel().selectedItemProperty()).filter(Objects::nonNull).map(TreeItem::getValue).filterMap(o -> o instanceof NameDeclaration, o -> (NameDeclaration) o).subscribe(parent::onNameDeclarationSelected);
    scopeHierarchyTreeView.setCellFactory(view -> new ScopeHierarchyTreeCell(parent));
}
Also used : NameDeclaration(net.sourceforge.pmd.lang.symboltable.NameDeclaration) Initializable(javafx.fxml.Initializable) Label(javafx.scene.control.Label) ListView(javafx.scene.control.ListView) ScopeHierarchyTreeCell(net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeCell) URL(java.net.URL) TreeItem(javafx.scene.control.TreeItem) TypeNode(net.sourceforge.pmd.lang.java.ast.TypeNode) FXCollections(javafx.collections.FXCollections) Node(net.sourceforge.pmd.lang.ast.Node) TreeView(javafx.scene.control.TreeView) Objects(java.util.Objects) MetricEvaluator(net.sourceforge.pmd.util.fxdesigner.model.MetricEvaluator) FXML(javafx.fxml.FXML) TabPane(javafx.scene.control.TabPane) ResourceBundle(java.util.ResourceBundle) AttributeAxisIterator(net.sourceforge.pmd.lang.ast.xpath.AttributeAxisIterator) Tab(javafx.scene.control.Tab) ScopeHierarchyTreeItem(net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeItem) EventStreams(org.reactfx.EventStreams) Attribute(net.sourceforge.pmd.lang.ast.xpath.Attribute) ObservableList(javafx.collections.ObservableList) Collections(java.util.Collections) MetricResult(net.sourceforge.pmd.util.fxdesigner.model.MetricResult) TreeItem(javafx.scene.control.TreeItem) ScopeHierarchyTreeItem(net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeItem) ScopeHierarchyTreeCell(net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeCell) NameDeclaration(net.sourceforge.pmd.lang.symboltable.NameDeclaration)

Aggregations

URL (java.net.URL)1 Collections (java.util.Collections)1 Objects (java.util.Objects)1 ResourceBundle (java.util.ResourceBundle)1 FXCollections (javafx.collections.FXCollections)1 ObservableList (javafx.collections.ObservableList)1 FXML (javafx.fxml.FXML)1 Initializable (javafx.fxml.Initializable)1 Label (javafx.scene.control.Label)1 ListView (javafx.scene.control.ListView)1 Tab (javafx.scene.control.Tab)1 TabPane (javafx.scene.control.TabPane)1 TreeItem (javafx.scene.control.TreeItem)1 TreeView (javafx.scene.control.TreeView)1 Node (net.sourceforge.pmd.lang.ast.Node)1 Attribute (net.sourceforge.pmd.lang.ast.xpath.Attribute)1 AttributeAxisIterator (net.sourceforge.pmd.lang.ast.xpath.AttributeAxisIterator)1 TypeNode (net.sourceforge.pmd.lang.java.ast.TypeNode)1 NameDeclaration (net.sourceforge.pmd.lang.symboltable.NameDeclaration)1 MetricEvaluator (net.sourceforge.pmd.util.fxdesigner.model.MetricEvaluator)1