Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamo Package Dependency View Extension #9787

Merged
merged 27 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1126ba5
Initial Commit
QilongTang Jun 10, 2019
4d9303a
Update csproj to use project config imports
QilongTang Jun 10, 2019
6428ad8
Add Data bind
QilongTang Jun 11, 2019
226dd31
Workspace Open with package info
QilongTang Jun 11, 2019
01ca109
adjust styling and make cells read only
QilongTang Jun 13, 2019
57a91f9
adjust styling
QilongTang Jun 13, 2019
1379d94
reduce package cell width
QilongTang Jun 13, 2019
4dbdcc5
Code clean Up
QilongTang Jun 13, 2019
22992d0
Add Property watch for Package Dependencies
QilongTang Jun 13, 2019
abcce1f
use name of
QilongTang Jun 14, 2019
7a270ad
Some UI tunning
QilongTang Jun 14, 2019
7357094
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 14, 2019
e8c3667
Styling changes
QilongTang Jun 14, 2019
d4c5a0b
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 14, 2019
5679bfe
Using View injection API
QilongTang Jun 14, 2019
dc748c7
grid styling
QilongTang Jun 14, 2019
27c05fc
Highlight packages not installed
QilongTang Jun 14, 2019
63c6bd9
Add Download Button and view injection Menu Item
QilongTang Jun 17, 2019
48346eb
Some comments missing
QilongTang Jun 17, 2019
4904b89
code clean up
QilongTang Jun 17, 2019
0bebfcc
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 17, 2019
23b06bb
Address Comments
QilongTang Jun 18, 2019
5d483b1
UI Adjustment
QilongTang Jun 18, 2019
6c4ede7
Update unsubscribe logic
QilongTang Jun 18, 2019
c4d57ef
More comments
QilongTang Jun 18, 2019
924dca9
Merge branch 'master' into PackageDependencyViewExtension
QilongTang Jun 18, 2019
befc36a
Fix Unit Tests
QilongTang Jun 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
304 changes: 304 additions & 0 deletions src/Dynamo.All.sln

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/DynamoManipulation/DynamoManipulation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Reference Include="PresentationFramework" />
<Reference Include="ProtoGeometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(DynamoExternPath)\ProtoGeometry\ProtoGeometry.dll</HintPath>
<HintPath>..\..\extern\ProtoGeometry\ProtoGeometry.dll</HintPath>
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand Down
16 changes: 8 additions & 8 deletions src/DynamoManipulation/NodeManipulator.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Input;
using System.Windows.Media.Media3D;
using Autodesk.DesignScript.Geometry;
using Autodesk.DesignScript.Geometry;
using CoreNodeModels.Input;
using Dynamo.Extensions;
using Dynamo.Graph.Nodes;
Expand All @@ -15,6 +8,13 @@
using Dynamo.Wpf.ViewModels.Watch3D;
using ProtoCore.AST.AssociativeAST;
using ProtoCore.Mirror;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Input;
using System.Windows.Media.Media3D;
using Point = Autodesk.DesignScript.Geometry.Point;
using Vector = Autodesk.DesignScript.Geometry.Vector;

Expand Down
5 changes: 0 additions & 5 deletions src/LibraryViewExtension/Views/LibraryView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="clr-namespace:Dynamo.UI"
xmlns:controls="clr-namespace:Dynamo.Controls"
xmlns:uicontrols="clr-namespace:Dynamo.UI.Controls"
xmlns:vms="clr-namespace:Dynamo.Wpf.ViewModels"
xmlns:p="clr-namespace:Dynamo.Wpf.Properties"
xmlns:local="clr-namespace:Dynamo.LibraryUI.Views"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
mc:Ignorable="d"
Expand Down
11 changes: 11 additions & 0 deletions src/PackageDependencyViewExtension/PackageDependencyView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<UserControl x:Class="Dynamo.PackageDependency.PackageDependencyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="400">
<!--<Grid MaxWidth="500">
<DataGrid Name="PackageDependencyTable" HorizontalAlignment="Left" Height="430" Margin="10,10,0,0" VerticalAlignment="Top" Width=" 500" MaxWidth="500"/>
</Grid>-->
</UserControl>
16 changes: 16 additions & 0 deletions src/PackageDependencyViewExtension/PackageDependencyView.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Windows.Controls;

namespace Dynamo.PackageDependency
{
/// <summary>
/// Interaction logic for PackageDependencyView.xaml
/// </summary>
public partial class PackageDependencyView : UserControl
{
public PackageDependencyView()
{
InitializeComponent();
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using Dynamo.Extensions;
using Dynamo.Wpf.Extensions;
using System.Windows.Controls;

namespace Dynamo.PackageDependency
{
/// <summary>
/// The Extension framework for Dynamo allows you to extend
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
/// Dynamo by loading your own classes that can interact with Dynamo's API.
/// An Extension has two components, an assembly containing your class and
/// an xml manifest file telling Dynamo where to find your assembly. Extension
/// manifests are loaded from the Dynamo/Extensions folder or from package/extra
/// folders.
///
/// This sample demonstrates a simple IExtension which tracks nodes added to the workspace.
/// </summary>
public class PackageDependencyViewExtension : IViewExtension
{
/// <summary>
/// Extension Name
/// </summary>
public string Name
{
get
{
return "PackageDependencyViewExtension";
}
}

/// <summary>
/// GUID of the extension
/// </summary>
public string UniqueId
{
get
{
return "A6706BF5-11C2-458F-B7C8-B745A77EF7FD";
}
}

/// <summary>
/// Dispose function after extension is closed
/// </summary>
public void Dispose()
{

}

/// <summary>
/// Ready is called when the DynamoModel is finished being built, or when the extension is installed
/// sometime after the DynamoModel is already built. ReadyParams provide access to references like the
/// CurrentWorkspace.
/// </summary>
/// <param name="sp"></param>
public void Ready(ReadyParams sp)
{

}

public void Shutdown()
{
this.Dispose();
}

public void Startup(ViewStartupParams sp)
{

}

public void Loaded(ViewLoadedParams p)
{
var packageDependencyView = new PackageDependencyView();

var sidebarGrid = p.DynamoWindow.FindName("sidebarExtensionsGrid") as Grid;
sidebarGrid.Children.Add(packageDependencyView);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5E76AAB3-6302-473E-9655-081B53FB1419}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dynamo.PackageDependency</RootNamespace>
<AssemblyName>PackageDependencyViewExtension</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\AnyCPU\Debug\</OutputPath>
QilongTang marked this conversation as resolved.
Show resolved Hide resolved
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\AnyCPU\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\AssemblySharedInfoGenerator\AssemblySharedInfo.cs">
<Link>Properties\AssemblySharedInfo.cs</Link>
</Compile>
<Compile Include="PackageDependencyViewExtension.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.en-US.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.en-US.resx</DependentUpon>
</Compile>
<Compile Include="PackageDependencyView.xaml.cs">
<DependentUpon>PackageDependencyView.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DynamoCoreWpf\DynamoCoreWpf.csproj">
<Project>{51BB6014-43F7-4F31-B8D3-E3C37EBEDAF4}</Project>
<Name>DynamoCoreWpf</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\DynamoCore\DynamoCore.csproj">
<Project>{7858FA8C-475F-4B8E-B468-1F8200778CF8}</Project>
<Name>DynamoCore</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="PackageDependencyView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.en-US.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.en-US.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<ItemGroup>
<ExtensionDefinition Include="PackageDependency_ViewExtensionDefinition.xml" />
</ItemGroup>
<Copy SourceFiles="@(ExtensionDefinition)" DestinationFolder="$(OutputPath)\viewExtensions\" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<ViewExtensionDefinition>
<AssemblyPath>..\PackageDependencyViewExtension.dll</AssemblyPath>
<TypeName>Dynamo.PackageDependency.PackageDependencyViewExtension</TypeName>
</ViewExtensionDefinition>
11 changes: 11 additions & 0 deletions src/PackageDependencyViewExtension/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PackageDependencyViewExtension")]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5e76aab3-6302-473e-9655-081b53fb1419")]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading