+ NodeOp.factory + is new method, particularly useful from + layers + that allows declarative definition of a root node. +
+lazy node- a node that displays basic information + * about the original node behind it, without touching it. As soon as + * the node is expanded, or a pop up menu is invoked on it, it switches + * to the real delegates and since then everything is being bridged to + * the real node. + *
+ * This method is especially useful when used from + * layers. + * Use following + * XML snippet to register your node into Services tab: + *
+ * <folder name="UI"> + * <folder name="Runtime"> + * <file name="org-yourorg-yourpgk-YourNode.instance"> + * <attr name="instanceCreate" methodvalue="org.openide.nodes.NodeOp.factory"/> + * <attr name="name" stringvalue="YourNode"/> + * <attr name="displayName" bundlevalue="org.yourorg.yourpkg.Bundle#NAME-KEY"/> + * <attr name="shortDescription" bundlevalue="org.yourorg.yourpkg.Bundle#SHORT-KEY"/> + * <attr name="iconResource" stringvalue="org/yourorg/yourpkg/image.png"/> + * <attr name="original" newvalue="org.yourorg.yourpkg.YourNode"/> + * <file/> + * <folder/> + * <folder/> + *+ * + * @param original the real node behind the one created + * @param name programatic name of the node + * @param displayName human readable name of the node + * @param shortDescription short description for the node + * @param iconResource path to icon to use as in {@link AbstractNode#setIconBaseWithExtension(java.lang.String)} + * @return new node with preset defaults that can delegate to original + * + * @since 7.9 + */ + public static Node factory( + Node original, + String name, String displayName, String shortDescription, + String iconResource + ) { + Map