private static void ProjectWindowItemOnGUI(string guid, Rect selectionRect)
        {
            if (selectionRect.height > 30)
            {
                return;
            }

            var path        = AssetDatabase.GUIDToAssetPath(guid);
            var packageJson = NpmPublishMenu.GetPackageJson(path);

            if (packageJson == null)
            {
                return;
            }

            var rootFolderPath = NpmPublishMenu.GetPackageRootFolder(packageJson);

            if (rootFolderPath != path)
            {
                return;
            }

            var rect = new Rect(selectionRect)
            {
                xMin = selectionRect.xMax - 30,
                xMax = selectionRect.xMax - 4,
            };

            GUI.Label(rect, "npm", Styles.RightGrayLabel);
        }
        private void OnSelectionChanged()
        {
            var newPackageJson = NpmPublishMenu.GetSelectedPackageJson();

            if (newPackageJson != null && newPackageJson != packageAsset)
            {
                packageAsset = newPackageJson;
                RefreshImmediate(false);
            }
        }
            public PackageTreeViewItem(int id, TextAsset packageJsonAsset) : base(id, 0)
            {
                Package = JsonUtility.FromJson <Package>(packageJsonAsset.text);

                var rootFolderPath = NpmPublishMenu.GetPackageRootFolder(packageJsonAsset);

                SelectionObject = AssetDatabase.LoadMainAssetAtPath(rootFolderPath);

                displayName = Package.displayName;
            }