Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Fix no-code-gen glyph placement
Browse files Browse the repository at this point in the history
  • Loading branch information
msawczyn committed Feb 7, 2020
1 parent 0d95cbe commit e70378d
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 194 deletions.
12 changes: 2 additions & 10 deletions src/Dsl/DslDefinition.dsl
Expand Up @@ -685,12 +685,7 @@
<ExternalTypeMoniker Name="/System/String" />
</Type>
</DomainProperty>
<DomainProperty Id="a17c8f41-4a5b-40a1-9f77-71346c428207" Description="Truncated Text property for Explorer display" Name="ShortText" DisplayName="Short Text" Kind="Calculated" IsBrowsable="false">
<Type>
<ExternalTypeMoniker Name="/System/String" />
</Type>
</DomainProperty>
<DomainProperty Id="35baaadc-91c0-496a-9249-bb18163fd2c3" Description="Solely for display in the object list of the VStudio property window" Name="Name" DisplayName="Name" Kind="Calculated" SetterAccessModifier="Private" IsElementName="true" IsBrowsable="false" IsUIReadOnly="true">
<DomainProperty Id="a17c8f41-4a5b-40a1-9f77-71346c428207" Description="Truncated Text property for Explorer display" Name="ShortText" DisplayName="Short Text" Kind="Calculated" IsElementName="true" IsBrowsable="false">
<Type>
<ExternalTypeMoniker Name="/System/String" />
</Type>
Expand Down Expand Up @@ -1560,7 +1555,7 @@
<ShapeHasDecorators Position="InnerTopLeft" HorizontalOffset="0" VerticalOffset="0">
<IconDecorator Name="TransientGlyph" DisplayName="Transient Glyph" DefaultIcon="Resources\TransientClass.png" />
</ShapeHasDecorators>
<ShapeHasDecorators Position="InnerTopLeft" HorizontalOffset="16" VerticalOffset="0">
<ShapeHasDecorators Position="InnerTopLeft" HorizontalOffset="0" VerticalOffset="0">
<IconDecorator Name="NoGenGlyph" DisplayName="No Code Generation" DefaultIcon="Resources\No.png" />
</ShapeHasDecorators>
<Compartment Name="AttributesCompartment" Title="Properties" />
Expand Down Expand Up @@ -2074,9 +2069,6 @@
<XmlPropertyData XmlName="shortText" Representation="Ignore">
<DomainPropertyMoniker Name="Comment/ShortText" />
</XmlPropertyData>
<XmlPropertyData XmlName="name" Representation="Ignore">
<DomainPropertyMoniker Name="Comment/Name" />
</XmlPropertyData>
</ElementData>
</XmlClassData>
<XmlClassData TypeName="UnidirectionalAssociation" MonikerAttributeName="" SerializeId="true" MonikerElementName="unidirectionalAssociationMoniker" ElementName="unidirectionalAssociation" MonikerTypeName="UnidirectionalAssociationMoniker">
Expand Down
208 changes: 104 additions & 104 deletions src/Dsl/DslDefinition.dsl.diagram

Large diffs are not rendered by default.

70 changes: 2 additions & 68 deletions src/Dsl/GeneratedCode/DomainClasses.cs
Expand Up @@ -8495,7 +8495,7 @@ namespace Sawczyn.EFDesigner.EFModel
[DslDesign::DescriptionResource("Sawczyn.EFDesigner.EFModel.Comment.Description", typeof(global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel), "Sawczyn.EFDesigner.EFModel.GeneratedCode.DomainModelResx")]
[DslModeling::DomainModelOwner(typeof(global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel))]
[global::System.CLSCompliant(true)]
[global::System.Diagnostics.DebuggerDisplay("{GetType().Name,nq} (Name = {Name})")]
[global::System.Diagnostics.DebuggerDisplay("{GetType().Name,nq} (ShortText = {ShortText})")]
[DslModeling::DomainObjectId("e2c13b26-0944-4b6c-89b5-bb95c500f515")]
public partial class Comment : DslModeling::ModelElement
{
Expand Down Expand Up @@ -8629,6 +8629,7 @@ public override sealed void SetValue(Comment element, global::System.String newV
[DslDesign::DescriptionResource("Sawczyn.EFDesigner.EFModel.Comment/ShortText.Description", typeof(global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel), "Sawczyn.EFDesigner.EFModel.GeneratedCode.DomainModelResx")]
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.ReadOnly(true)]
[DslModeling::ElementName]
[DslModeling::DomainProperty(Kind = DslModeling::DomainPropertyKind.Calculated)]
[DslModeling::DomainObjectId("a17c8f41-4a5b-40a1-9f77-71346c428207")]
public global::System.String ShortText
Expand Down Expand Up @@ -8679,73 +8680,6 @@ internal sealed partial class ShortTextPropertyHandler : DslModeling::Calculated

}

#endregion
#region Name domain property code

/// <summary>
/// Name domain property Id.
/// </summary>
public static readonly global::System.Guid NameDomainPropertyId = new global::System.Guid(0x35baaadc, 0x91c0, 0x496a, 0x92, 0x49, 0xbb, 0x18, 0x16, 0x3f, 0xd2, 0xc3);

/// <summary>
/// Gets or sets the value of Name domain property.
/// Solely for display in the object list of the VStudio property window
/// </summary>
[DslDesign::DisplayNameResource("Sawczyn.EFDesigner.EFModel.Comment/Name.DisplayName", typeof(global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel), "Sawczyn.EFDesigner.EFModel.GeneratedCode.DomainModelResx")]
[DslDesign::DescriptionResource("Sawczyn.EFDesigner.EFModel.Comment/Name.Description", typeof(global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel), "Sawczyn.EFDesigner.EFModel.GeneratedCode.DomainModelResx")]
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.ReadOnly(true)]
[DslModeling::ElementName]
[DslModeling::DomainProperty(Kind = DslModeling::DomainPropertyKind.Calculated)]
[DslModeling::DomainObjectId("35baaadc-91c0-496a-9249-bb18163fd2c3")]
public global::System.String Name
{
[global::System.Diagnostics.DebuggerStepThrough]
get
{
return NamePropertyHandler.Instance.GetValue(this);
}
}
/// <summary>
/// Value handler for the Comment.Name domain property.
/// </summary>
internal sealed partial class NamePropertyHandler : DslModeling::CalculatedPropertyValueHandler<Comment, global::System.String>
{
private NamePropertyHandler() { }

/// <summary>
/// Gets the singleton instance of the Comment.Name domain property value handler.
/// </summary>
public static readonly NamePropertyHandler Instance = new NamePropertyHandler();

/// <summary>
/// Gets the Id of the Comment.Name domain property.
/// </summary>
public sealed override global::System.Guid DomainPropertyId
{
[global::System.Diagnostics.DebuggerStepThrough]
get
{
return NameDomainPropertyId;
}
}

/// <summary>
/// Gets a strongly-typed value of the property on specified element.
/// </summary>
/// <param name="element">Element which owns the property.</param>
/// <returns>Property value.</returns>
public override sealed global::System.String GetValue(Comment element)
{
if (element == null) throw new global::System.ArgumentNullException("element");
// There is no storage for Name because its Kind is
// set to Calculated. Please provide the GetNameValue()
// method on the domain class.
return element.GetNameValue();
}

}

#endregion
#region ModelRoot opposite domain role accessor
/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Dsl/GeneratedCode/DomainModel.cs
Expand Up @@ -204,7 +204,6 @@ protected sealed override DomainMemberInfo[] GetGeneratedDomainProperties()
new DomainMemberInfo(typeof(ModelAttribute), "IsAutoPropertyTracking", ModelAttribute.IsAutoPropertyTrackingDomainPropertyId, typeof(ModelAttribute.IsAutoPropertyTrackingPropertyHandler)),
new DomainMemberInfo(typeof(Comment), "Text", Comment.TextDomainPropertyId, typeof(Comment.TextPropertyHandler)),
new DomainMemberInfo(typeof(Comment), "ShortText", Comment.ShortTextDomainPropertyId, typeof(Comment.ShortTextPropertyHandler)),
new DomainMemberInfo(typeof(Comment), "Name", Comment.NameDomainPropertyId, typeof(Comment.NamePropertyHandler)),
new DomainMemberInfo(typeof(ModelEnum), "ValueType", ModelEnum.ValueTypeDomainPropertyId, typeof(ModelEnum.ValueTypePropertyHandler)),
new DomainMemberInfo(typeof(ModelEnum), "Namespace", ModelEnum.NamespaceDomainPropertyId, typeof(ModelEnum.NamespacePropertyHandler)),
new DomainMemberInfo(typeof(ModelEnum), "IsNamespaceTracking", ModelEnum.IsNamespaceTrackingDomainPropertyId, typeof(ModelEnum.IsNamespaceTrackingPropertyHandler)),
Expand Down
8 changes: 0 additions & 8 deletions src/Dsl/GeneratedCode/DomainModelResx.resx
Expand Up @@ -1193,14 +1193,6 @@
<value>Short Text</value>
<comment>DisplayName for DomainProperty &apos;ShortText&apos; on DomainClass &apos;Comment&apos;</comment>
</data>
<data name="Sawczyn.EFDesigner.EFModel.Comment/Name.Description" xml:space="preserve">
<value>Solely for display in the object list of the VStudio property window</value>
<comment>Description for DomainProperty &apos;Name&apos; on DomainClass &apos;Comment&apos;</comment>
</data>
<data name="Sawczyn.EFDesigner.EFModel.Comment/Name.DisplayName" xml:space="preserve">
<value>Name</value>
<comment>DisplayName for DomainProperty &apos;Name&apos; on DomainClass &apos;Comment&apos;</comment>
</data>
<data name="Sawczyn.EFDesigner.EFModel.ModelEnum.Description" xml:space="preserve">
<value>Represents an enumeration in C#</value>
<comment>Description for DomainClass &apos;ModelEnum&apos;</comment>
Expand Down
2 changes: 1 addition & 1 deletion src/Dsl/GeneratedCode/Shapes.cs
Expand Up @@ -366,7 +366,7 @@ protected override void InitializeDecorators(global::System.Collections.Generic.
decorators.Add(decorator6);

DslDiagrams::ShapeField field7 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "NoGenGlyph");
DslDiagrams::Decorator decorator7 = new DslDiagrams::ShapeDecorator(field7, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, new DslDiagrams::PointD(16, 0));
DslDiagrams::Decorator decorator7 = new DslDiagrams::ShapeDecorator(field7, DslDiagrams::ShapeDecoratorPosition.InnerTopLeft, DslDiagrams::PointD.Empty);
decorators.Add(decorator7);

}
Expand Down
Binary file modified src/Dsl/Resources/No.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -226,10 +226,10 @@
<classShapeMoniker Id="2c8f374e-0a9c-4688-8b22-8d8ad0737340" />
</nodes>
</bidirectionalConnector>
<enumShape Id="e6582c70-309b-4ff3-8e43-d93db4e607a3" absoluteBounds="93.625, 2.5, 1.5, 1.2362939453125001" fillColor="Gray" textColor="White" outlineColor="Black" visible="true" outlineThickness="0.01" outlineDashStyle="Solid">
<enumShape Id="e6582c70-309b-4ff3-8e43-d93db4e607a3" absoluteBounds="94.625, 2.5, 1.5, 1.2362939453125001" fillColor="Gray" textColor="White" outlineColor="Black" visible="true" outlineThickness="0.01" outlineDashStyle="Solid">
<modelEnumMoniker Id="d999f148-5d0f-4b8d-a3fc-5abf12f0242b" />
<nestedChildShapes>
<elementListCompartment Id="dce2fca1-deda-41cf-95c9-9478ec8b606b" absoluteBounds="93.64, 2.8100000000000005, 1.4700000000000002, 0.8262939453125" name="ValuesCompartment" titleTextColor="Black" itemTextColor="Black" />
<elementListCompartment Id="dce2fca1-deda-41cf-95c9-9478ec8b606b" absoluteBounds="94.64, 2.8100000000000005, 1.4700000000000002, 0.8262939453125" name="ValuesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</enumShape>
<classShape Id="00b4a70f-db76-4654-bd04-e718262ec948" absoluteBounds="96.625, 2.5, 2.5, 5.0241975911458354" fillColor="0, 122, 204" textColor="White" outlineColor="Black" outlineDashStyle="Solid" visible="true" outlineThickness="0.01">
Expand Down

0 comments on commit e70378d

Please sign in to comment.