Skip to content

Commit

Permalink
Release 2024.0.8 (#179)
Browse files Browse the repository at this point in the history
* Update Readme.md

* Github dark theme support

* Psd image source

* Nuke update

* Fix usings

* Switch demo project configuration

* Async unit dialogs

* Public snoop api

* Family parameters: show definition name

for user instead of "FamilyParameter"

* An expicit Resharper rules for private fields (#176)

for those like me who hates any prefixes of vars, fields, props etc. and who wants to calm down R# / Rider on RevitLookup project.

Nothing is changed for others.

* An extension to show associated family parameters (#175)

* Add a new parameter extension

to retrieve associated family parameter

* make the results of parameter extension

which gets associated family parameter snoopable

* FailyParameterDescriptor implements

IDescriptorCollector, so no need to define any useless methods

* make extension manager context

public readonly property

* pull member up

* register extension only for family editor environment

* inline method

+ simplification - we don't need to double check extension.Context

* Update editor settings

* Cleanup

* Remove reviewer

* FamilyManager descriptor support

* Fix issue 177

* Remove unused types

* Fix element builder

* Time support

* Edit message

* Context menu improvement

* Set FontWeight

* Fix column toggle

* Add resources dictionary

* Fix ManuItem namespace

* Update Contributing.md

* Update Changelog.md

* Bump version

* Update tracker

* Icons update

---------

Co-authored-by: Alexander Ignatovich <[email protected]>
  • Loading branch information
Nice3point and CADBIMDeveloper authored Jun 22, 2023
1 parent 9221aac commit c38c33b
Show file tree
Hide file tree
Showing 59 changed files with 1,314 additions and 490 deletions.
536 changes: 530 additions & 6 deletions .editorconfig

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
Expand Down
58 changes: 29 additions & 29 deletions Build/Build.CI.GitHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,35 @@ partial class Build
await ReleaseDraftAsync(gitHubOwner, gitHubName, draft);
});

static async Task CheckTagsAsync(string gitHubOwner, string gitHubName, string version)
{
var gitHubTags = await GitHubTasks.GitHubClient.Repository.GetAllTags(gitHubOwner, gitHubName);
if (gitHubTags.Select(tag => tag.Name).Contains(version))
throw new ArgumentException($"A Release with the specified tag already exists in the repository: {version}");
}

static async Task<Release> CreatedDraftAsync(string gitHubOwner, string gitHubName, NewRelease newRelease) =>
await GitHubTasks.GitHubClient.Repository.Release.Create(gitHubOwner, gitHubName, newRelease);

static async Task ReleaseDraftAsync(string gitHubOwner, string gitHubName, Release draft) =>
await GitHubTasks.GitHubClient.Repository.Release.Edit(gitHubOwner, gitHubName, draft.Id, new ReleaseUpdate {Draft = false});

static async Task UploadArtifactsAsync(Release createdRelease, string[] artifacts)
{
foreach (var file in artifacts)
{
var releaseAssetUpload = new ReleaseAssetUpload
{
ContentType = "application/x-binary",
FileName = Path.GetFileName(file),
RawData = File.OpenRead(file)
};

await GitHubTasks.GitHubClient.Repository.Release.UploadAsset(createdRelease, releaseAssetUpload);
Log.Information("Artifact: {Path}", file);
}
}

string CreateChangelog(string version)
{
if (!File.Exists(ChangeLogPath))
Expand Down Expand Up @@ -73,33 +102,4 @@ string CreateChangelog(string version)
if (logBuilder.Length == 0) Log.Warning("No version entry exists in the changelog: {Version}", version);
return logBuilder.ToString();
}

static async Task CheckTagsAsync(string gitHubOwner, string gitHubName, string version)
{
var gitHubTags = await GitHubTasks.GitHubClient.Repository.GetAllTags(gitHubOwner, gitHubName);
if (gitHubTags.Select(tag => tag.Name).Contains(version))
throw new ArgumentException($"A Release with the specified tag already exists in the repository: {version}");
}

static async Task<Release> CreatedDraftAsync(string gitHubOwner, string gitHubName, NewRelease newRelease) =>
await GitHubTasks.GitHubClient.Repository.Release.Create(gitHubOwner, gitHubName, newRelease);

static async Task ReleaseDraftAsync(string gitHubOwner, string gitHubName, Release draft) =>
await GitHubTasks.GitHubClient.Repository.Release.Edit(gitHubOwner, gitHubName, draft.Id, new ReleaseUpdate {Draft = false});

static async Task UploadArtifactsAsync(Release createdRelease, string[] artifacts)
{
foreach (var file in artifacts)
{
var releaseAssetUpload = new ReleaseAssetUpload
{
ContentType = "application/x-binary",
FileName = Path.GetFileName(file),
RawData = File.OpenRead(file)
};

await GitHubTasks.GitHubClient.Repository.Release.UploadAsset(createdRelease, releaseAssetUpload);
Log.Information("Artifact: {Path}", file);
}
}
}
12 changes: 10 additions & 2 deletions Build/Build.Clean.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Nuke.Common;
using Nuke.Common.IO;
using Serilog;
using static Nuke.Common.IO.FileSystemTasks;

partial class Build
Expand All @@ -7,9 +9,15 @@ partial class Build
.OnlyWhenStatic(() => IsLocalBuild)
.Executes(() =>
{
EnsureCleanDirectory(ArtifactsDirectory);
CleanDirectory(ArtifactsDirectory);

foreach (var project in Solution.AllProjects.Where(project => project != Solution.Build))
EnsureCleanDirectory(project.Directory / "bin");
CleanDirectory(project.Directory / "bin");
});

static void CleanDirectory(AbsolutePath path)
{
Log.Information("Cleaning directory: {Directory}", path);
path.CreateOrCleanDirectory();
}
}
8 changes: 4 additions & 4 deletions Build/Build.Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ protected override void OnBuildCreated()

VersionMap = new()
{
{"Release R21", "2021.2.7"},
{"Release R22", "2022.2.7"},
{"Release R23", "2023.2.7"},
{"Release R24", "2024.0.7"}
{"Release R21", "2021.2.8"},
{"Release R22", "2022.2.8"},
{"Release R23", "2023.2.8"},
{"Release R24", "2024.0.8"}
};
}
}
2 changes: 1 addition & 1 deletion Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="Nuke.Common" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
Expand Down
42 changes: 42 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

# 2023-06-22 **2024.0.8**

## Features

### Core

* Computing Time Tracking

This feature includes the ability to monitor the computing time taken to invoke a member, such as methods or properties.
By tracking the execution time, you can identify and analyze slow-performing methods or properties, gaining insights into their overall performance.
The computing time is displayed in a separate column and a tooltip, providing you with detailed information. This feature is optional and disabled by default

![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/9f9c816f-2f49-49a0-9757-6f0bb0000113)

### User interface

* Context Menu

A convenient context menu has been added to the table, providing you with additional options to manage columns and update contents.
This menu enables you to customize your table view and effortlessly perform actions to enhance your experience.

![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/25491ace-1d16-46cc-9dc3-3e5016b266a0)

* Enhanced Visualization

Icons have been added to the context menu, making it more visually appealing and intuitive for users to navigate and interact with the available options.

![image](https://github.com/jeremytammik/RevitLookup/assets/20504884/afe44cbf-6e5b-4508-beda-b5a4e7babcf2)

## Improvements

* Added async support for unit dialogs
* Added API for external programs https://github.com/jeremytammik/RevitLookup/issues/171
* Added FamilyParameter support by @CADBIMDeveloper in https://github.com/jeremytammik/RevitLookup/pull/174
* Added FamilyManager.GetAssociatedFamilyParameter extension by @CADBIMDeveloper in https://github.com/jeremytammik/RevitLookup/pull/175

## Bugs

* Fixed shortcuts reloading leading to incorrect ribbon update https://github.com/jeremytammik/RevitLookup/issues/177

Full changelog: https://github.com/jeremytammik/RevitLookup/compare/2024.0.7...2024.0.8

# 2023-06-03 **2024.0.7**

Corrective update to the last major release [RevitLookup 2024.0.6](https://github.com/jeremytammik/RevitLookup/releases/tag/2024.0.6)
Expand Down
2 changes: 1 addition & 1 deletion Codeowners
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

# These owners will be the default owners for everything in the repo,
# and will automatically be added as reviewers to all pull requests.
* @Nice3point @jeremytammik
* @Nice3point
24 changes: 15 additions & 9 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ Indicates that the descriptor can retrieve object members by reflection.
If you add this interface, the user can click on the object and analyze its members.

```c#
public sealed class ApiObjectDescriptor : Descriptor, IDescriptorCollector
public sealed class ApplicationDescriptor : Descriptor, IDescriptorCollector
{
public ApplicationDescriptor(Autodesk.Revit.ApplicationServices.Application application)
{
Name = application.VersionName;
}
}
```

Expand Down Expand Up @@ -138,19 +142,21 @@ Adding an option for the context menu:
```c#
public sealed class ElementDescriptor : Descriptor, IDescriptorConnector
{
public MenuItem[] RegisterMenu()
public void RegisterMenu(ContextMenu contextMenu, UIElement bindableElement)
{
return new[]
{
MenuItem.Create("Show element")
.AddCommand(_element, element =>
if (_element is ElementType) return;

contextMenu.AddMenuItem("Show element")
.SetCommand(_element, element =>
{
Application.ActionEventHandler.Raise(_ =>
{
if (RevitApi.UiDocument is null) return;
RevitApi.UiDocument.ShowElements(element);
RevitApi.UiDocument.Selection.SetElementIds(new List<ElementId>(1) {element.Id});
})
.AddGesture(ModifierKeys.Alt, Key.F7)
};
});
})
.AddShortcut(bindableElement, ModifierKeys.Alt, Key.F7);
}
}
```
7 changes: 5 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<div align="center">
<img alt="RevitLookup" width="600" src="https://user-images.githubusercontent.com/20504884/218192495-19b13547-ce67-40e3-8fe8-e847f89bddb7.png"/>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github-production-user-asset-6210df.s3.amazonaws.com/20504884/243138822-e25cbe43-91ce-4c90-9fbd-e0c6c9f9996c.png">
<img alt="RevitLookup" width="600" src="https://github-production-user-asset-6210df.s3.amazonaws.com/20504884/243138821-45a22919-4865-478e-8cfe-dc6288646d44.png">
</picture>
</div>

Interactive Revit project database exploration tool to view and navigate BIM element parameters, properties and relationships.
Expand All @@ -13,7 +16,7 @@ Whether you are a seasoned professional or just starting out, the RevitLookup is
</div>
<br/>
<div align="center">
<img alt="Screenshot" src="https://user-images.githubusercontent.com/20504884/225871636-21c17658-d02e-411c-93cd-34e4d2121933.png"/>
<img alt="Screenshot" src="https://github.com/jeremytammik/RevitLookup/assets/20504884/e8cfa664-ee2e-4b75-9652-c0d4efe5ab7d"/>
</div>

## Installation
Expand Down
14 changes: 13 additions & 1 deletion RevitLookup.UI/ForkModificationList.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,16 @@ New control with ItemsSourceChanged event
# Wpf.Ui.Styles.Controls.Navigation.NavigationViewContentPresenter

- Add navigation\unloaded events
- NotifyContentAboutNavigatingTo removed `content is FrameworkElement`
- NotifyContentAboutNavigatingTo removed `content is FrameworkElement`

# Wpf.Ui.Styles.Controls.ToolTip

- Add TextElement.FontWeight-

# Wpf.Ui.Styles.Controls.Contextmenu

- Add TextElement.FontWeight

# Wpf.Ui.Styles.Controls.MenuItem

- Edited SubmenuItem Symbol trigger
4 changes: 1 addition & 3 deletions RevitLookup.UI/RevitLookup.UI.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UseWPF>true</UseWPF>
<Version>1.0.0</Version>
<LangVersion>latest</LangVersion>
<PlatformTarget>x64</PlatformTarget>
<ImplicitUsings>true</ImplicitUsings>
<TargetFramework>net48</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>CS0618;CS0625;CS8602;CS8604;CS0168;CS8625;CS8632;CS0162;CS0414</NoWarn>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -34,7 +32,7 @@

<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="PolySharp" Version="1.12.1">
<PackageReference Include="PolySharp" Version="1.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions RevitLookup.UI/Styles/Controls/ContextMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<Setter Property="Popup.PopupAnimation" Value="None" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
Expand Down
4 changes: 2 additions & 2 deletions RevitLookup.UI/Styles/Controls/MenuItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,8 @@
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="SymbolIcon" Value="Empty">
<Setter TargetName="SymbolIcon" Property="Visibility" Value="Collapsed" />
<Setter TargetName="SymbolIcon" Property="Margin" Value="0" />
<Setter TargetName="SymbolIcon" Property="Visibility" Value="Hidden" />
<!-- <Setter TargetName="SymbolIcon" Property="Margin" Value="0" /> -->
</Trigger>
<Trigger Property="IsCheckable" Value="True">
<Setter TargetName="CheckBoxIconBorder" Property="Visibility" Value="Visible" />
Expand Down
1 change: 1 addition & 0 deletions RevitLookup.UI/Styles/Controls/ToolTip.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<Setter Property="Height" Value="Auto" />
<Setter Property="Width" Value="Auto" />
<Setter Property="TextElement.FontSize" Value="12" />
<Setter Property="TextElement.FontWeight" Value="Normal" />
<Setter Property="TextBlock.TextAlignment" Value="Justify" />
<Setter Property="TextElement.Foreground">
<Setter.Value>
Expand Down
4 changes: 2 additions & 2 deletions RevitLookup.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ Global
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.Release R24|Any CPU.Build.0 = Release R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.Benchmark|Any CPU.ActiveCfg = Release R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.Installer|Any CPU.ActiveCfg = Release R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Debug|Any CPU.ActiveCfg = Debug R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Debug|Any CPU.Build.0 = Debug R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Release|Any CPU.ActiveCfg = Release R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Release|Any CPU.Build.0 = Release R24|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Debug|Any CPU.ActiveCfg = Debug R22|Any CPU
{05C77115-2277-4DFC-8F95-BE37E5F1130F}.UI.Demo Debug|Any CPU.Build.0 = Debug R22|Any CPU
{64D9C223-D070-46CD-A635-04FD4E1BEC3C}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU
{64D9C223-D070-46CD-A635-04FD4E1BEC3C}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU
{64D9C223-D070-46CD-A635-04FD4E1BEC3C}.Installer|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
4 changes: 2 additions & 2 deletions RevitLookup.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Use, duplication, or disclosure by the U.S. Government is subject to
restrictions set forth in FAR 52.227-19 (Commercial Computer
Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
(Rights in Technical Data and Computer Software), as applicable.</s:String>
<s:String x:Key="/Default/CustomTools/CustomToolsData/@EntryValue"></s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Addin/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Addins/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=APIUI/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -28,4 +27,5 @@ Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
<s:Boolean x:Key="/Default/UserDictionary/Words/=prerelease/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Schedulable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Snoopable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Workset/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Workset/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>
2 changes: 2 additions & 0 deletions RevitLookup/Core/ComponentModel/DescriptorMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static Descriptor FindDescriptor(object obj, Type type)
//APIObjects
Category value when type is null || type == typeof(Category) => new CategoryDescriptor(value),
Parameter value when type is null || type == typeof(Parameter) => new ParameterDescriptor(value),
FamilyParameter value when type is null || type == typeof(FamilyParameter) => new FamilyParameterDescriptor(value),
Reference value when type is null || type == typeof(Reference) => new ReferenceDescriptor(value),
Color value when type is null || type == typeof(Color) => new ColorDescriptor(value),
Curve value when type is null || type == typeof(Curve) => new CurveDescriptor(value),
Expand All @@ -75,6 +76,7 @@ public static Descriptor FindDescriptor(object obj, Type type)
PaperSize value when type is null || type == typeof(PaperSize) => new PaperSizeDescriptor(value),
PrintManager value when type is null || type == typeof(PrintManager) => new PrintManagerDescriptor(value),
DefinitionGroup value when type is null || type == typeof(DefinitionGroup) => new DefinitionGroupDescriptor(value),
FamilyManager value when type is null || type == typeof(FamilyManager) => new FamilyManagerDescriptor(value),
APIObject when type is null || type == typeof(APIObject) => new ApiObjectDescriptor(),

//IDisposables
Expand Down
Loading

0 comments on commit c38c33b

Please sign in to comment.