QuickLink in UML Profile not displaying in Sparx enterprise Architect - profile

I am trying to add a new item to the 'quick link' menu in Sparx Enterprise Architect.
I have followed the instructions on the EA website:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/add_quick_linker_definition_to.html
and in despiration I have also tried a vanilla copy of the example from http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/quick_linker_example.html
I have a new profile with a new stereotype of 'quick' which extends the metaclass 'Class'. I have added a 'QuickLink' artefact and copied the below entries into it (from the example above):
Class,quick,,,,Component,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Component,0,,,,,
Class,quick,,,,Component,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Component,0,,,TRUE,,
Class,quick,Component,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,,
Class,quick,Component,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,,
Class,quick,Port,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,,
Class,quick,Port,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,,
Class,quick,Component,,,Port,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,,,
Class,quick,Component,,,Port,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,TRUE,,
I have then saved the UML Profile and generated an MDG from it. I have looked in the profile.xml and MDG xml files and in both cases the CSV information appears as I would expect in the QuickLink element:
e.g.
When I import the MDG, I can create a new diagram, the correct toolbox appears with my 'quick' stereotype on it. When I drag it onto the diagram however and try to create new links, the quicklinks menu is not showing any of my customisations.
Is there anythink I am missing here to make this work?

The problem doesn't appear to be the quicklinker definition. I have created a working technology using that definition (below).
It is likely that the problem is with the way the technology has been put together, rather than the quicklinks themselves. Hopefully you can see what is different by comparing this to your technology. If not then post your technology and I will take a look.
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
<Documentation id="C5186393-D" name="MyProfile" version="1.0" notes="MyProfile"/>
<Content>
<Stereotypes>
<Stereotype name="quick" notes="">
<AppliesTo>
<Apply type="Class">
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
<QuickLink data="Class,quick,,,,Component,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Component,0,,,,,
Class,quick,,,,Component,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Component,0,,,TRUE,,
Class,quick,Component,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,,
Class,quick,Component,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,,
Class,quick,Port,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,,
Class,quick,Port,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,,
Class,quick,Component,,,Port,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,,,
Class,quick,Component,,,Port,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,TRUE,,
"/>
</Content>
</UMLProfile>

Related

Xamarin.forms Stand-alone resource dictionaries don't update dynamically if there is no cs code behind file

Xamarin team introduced 2 different way of stand-alone-resource-dictionaries. Obviously there is a big difference but they neglected to write in their documentation.
Basically if i use without cs code behind file and without x:class defined as defined in the documentation and referencing like that in my page
<ResourceDictionary Source="GradientStyles.xaml"/>
GradientStyles.xaml look like below and i am updating GradientStartColor , GradientStopColor of PancakeView on runtime based on the theme selected.
<pancakeView:GradientStopCollection x:Key="BackgroundGradientStops">
<pancakeView:GradientStop Color="{StaticResource GradientStartColor}"
Offset="0"/>
<pancakeView:GradientStop Color="{StaticResource GradientStopColor}"
Offset="0.74"/>
</pancakeView:GradientStopCollection>
Implementation above just not working. It doesn't update Colors at all.
The same exact code;
Works in ContentPage.Resources directly. It will update
Works if i define a stand-alone-resource-dictionary with cs code behind file and implement on the page like this below
<ResourceDictionary.MergedDictionaries>
<resDics:GradientStyles />
</ResourceDictionary.MergedDictionaries>
There is that annotation in the documentation but i don't get what exactly it means.
This syntax doesnot instantiate the MyResourceDictionary class.
Instead, it references the XAML file.
Does it mean that it extends the contentpage using like partial class or inherits. Or is it cached only once and remains static? And when you use it with code behind class, it creates a new instance every time?
Finally is that a bug or feature? :)

How can I find (and rehabilitate, if necessary) the Code Snippet I created?

I created a code snippet (the first of many, hopefully) using mainly this article as guidance.
It seemed to work. Here are the steps I took:
First, I created this file with the code snippet (HtmlTableRowWithTwoCells.snippet):
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
<CodeSnippet Format="1.0.0">
<!-- The Title of the snippet, this will be shown in the snippets manager. -->
<Title>Create a 2-Cell HTML Table Row</Title>
<!-- The description of the snippet. -->
<Description>Creates a 2-Cell Row to be added to an HtmlTable</Description>
<!-- The author of the snippet. -->
<Author>Warble P. McGorkle for Platypi R Us (Duckbills Unlimited)</Author>
<!-- The set of characters that must be keyed in to insert the snippet. -->
<Shortcut>row2</Shortcut>
<!-- The set of snippet types we're dealing with - either Expansion or -->
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<!-- Now we have the snippet itself. -->
<Snippet>
<Declarations>
<Literal>
<ID>RowName</ID>
<ToolTip>Enter the Row instance name</ToolTip>
<Default>RowName</Default>
</Literal>
<Literal>
<ID>Cell1Name</ID>
<ToolTip>Enter the name for Cell 1</ToolTip>
<Default>Cell1Name</Default>
</Literal>
<Literal>
<ID>Cell2Name</ID>
<ToolTip>Enter the name for Cell 2</ToolTip>
<Default>Cell2Name</Default>
</Literal>
</Declarations>
<!-- Sepecify the code language and the actual snippet content. -->
<Code Language="CSharp" Kind="any">
<![CDATA[
var $RowName$ = new HtmlTableRow();
var $Cell1Name$ = new HtmlTableCell();
var $Cell2Name$ = new HtmlTableCell();
$RowName$.Cells.Add($Cell1Name$);
$RowName$.Cells.Add($Cell2Name$);
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Then, I created this "manifest" file (.vscontent):
<?xml version="1.0" encoding="utf-8" ?>
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005" >
<Content>
<FileName>HtmlTableRowWithTwoCells.snippet</FileName>
<DisplayName>Inserts a 2-Cell HTML Table Row</DisplayName>
<Description>Inserts a 2-Cell Row to be added to an HtmlTable</Description>
<FileContentType>Code Snippet</FileContentType>
<ContentVersion>2.0</ContentVersion>
<Attributes>
<Attribute name="lang" value="csharp"/>
</Attributes>
</Content>
</VSContent>
I zipped those two files together, renamed the extension from .zip to .vsi, 2-clicked it, and installed it into the "My Code Snippets" folder here with these steps:
And it indicates the snippet was installed in a reasonable location:
Yet, when I attempt to add a Code Snippet in VS, the only categories I see are these (no "My Code Snippets"):
When I select Tools > Code Snippets Manager..., I can navigate to Visual C# > My Code Snippets, but it is empty.
When I use the Code Snippets Manager's "Import" button and navigate to the location of the snippet and attempt to add the snippet file, I get, "The snippet files chosen were not valid."
Why does it tell me it installed successfully, when it apparently didn't (or where is it hiding)? What flaming hoop did I neglect to catapult myself through?
Is the "weird" name of the "manifest" file possibly the problem? ".vscontent" seems odd to me, but that's what the article referenced above says to name it. Perhaps that was just on oversight, and it should really be [snippetName].vscontent?
UPDATE
Apparently, naming the "manifest" file *.vscontent" is not the problem. Maybe it's a problem, but it's not the problem, because I named it the same as the .snippets file (except for the extension), went through the installation process again, and got the same exact results: seeming success, actual demoralization.
BTW, by default, when choosing a category into which to place the snippet, the Code Snipeets Manager puts a checkbox in "Microsoft Visual Studio Tools for Applications 2005 > My Code Snippets". I had previously unticked that and ticked the topmost "My Code Snippets"; this time I retained the default selection, PLUS my preferred location/category PLUS "Visual C#"
But alas and anon, the only category of those that seems to dispaly via Ctrl+K, X in VS is C#, and the expected shortcut ("row2") does not appear in the snippet dropdown.
Here's an easier way (and, as a bonus, it works):
Download the Snippets Designer:
Write the code directly in Visual Studio:
var RowName = new HtmlTableRow();
var Cell1Name = new HtmlTableCell();
var Cell2Name = new HtmlTableCell();
RowName.Cells.Add(Cell1Name);
RowName.Cells.Add(Cell2Name);
Right-click and select "Export as Snippet"
This puts the code in the Snippet Designer. Here's what it looks like after setting a few properties, and electing which parts of the code would be replaceable:
This is quite easy - sure beats the "olde-fashioned" way I was trying (which would have been okay, had it worked).
All I had to do was right-click the elements of code I wanted to replace on adding a new snippet, set the snippet's shortcut and description properties in Solution Explorer, save it, and voila!
Now mashing Ctrl+K, X in VS shows the snippet in "My Code Snippets" along with its description and shortcut:
Selecting it adds the snippet with the replacement strings highlighted:

Add image to Welcome.aml with Sandcastle

First of, I've searched far and wide about this issue, and it should be working.
I want to add a picture to my Welcome.aml with Sandcastle.
Inside the Welcome.aml:
<section>
<title>Short process description</title>
<content>
<para>
A short description
</para>
<para>
<medialinkInLine>
<image xlink:href="ShortProcess"/>
</medialinkInLine>
</para>
</content>
</section>
I've added the image to my media folder and uses the Image ID in xlink:href.
But nothing appears.
Log files mention it here:
Copying images and creating the media map file...
C:\blaablaaa\blaaaa\Doc\Doc\Media\ShortProcess.jpg -> C:\blaablaaa\blaaaa\Doc\Doc\Help\Working\Media\ShortProcess.jpg
Generating conceptual topic files
Anyone got an idea?
I did some documentations for my own projects and tumbled acros a very important fact
[cite]... Also, make sure the href ID on the image element matches the
ImageId property on the image file in the project explorer window. If
you use the Entity References window to list the images in the
project, you can drag and drop them from there into the documents and
they will be added with the proper element name and ID[/cite]
citation taken from Sandcastle discussion forum
Usage in my latest demo project
For further details you may have a look at mediaLink description at sandcastle itself.
Apperantly medialinkInLine didn't work for me. Even though it worked for a co-worker.
<section>
<title>Short process for BladeSet</title>
<content>
<para>
A rough description of the BladeSet application.
</para>
<mediaLink>
<image xlink:href="Short process for BladeSet"/>
</mediaLink>
</content>
</section>

Joomla 2.5 'Alternative Menu Items' and 'Category Blog' (Multiple template layout overrides for the same component)

I've come across a very strange problem relating to 'Alternative Menu Items', the usage is described here:
http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6
The following files are located in: templates/testtemplate/html/com_content/category and these are the steps I took:
These files:
blog.php, blog.xml, blog_children.php, blog_item.php, blog_links.php
Have been changed to:
bloggal.php, bloggal.xml, bloggal_children.php, bloggal_item.php, bloggal_links.php
For file bloggal.xml – I changed this part:
<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE"
To:
<layout title="Blog Gallery"
Then added sub headings to bloggal.php and bloggal_item.php so I can see if the child items are in effect.
Now the interesting part is bloggal.php works fine but the child items drawn from bloggal_item.php do not come up.
I've done this test with the same template on multiple Joomla installs, on one of them it seems to work and the rest it does not.
The only thing I can think of is Joomla may have had a regression since the working one was an updated install and the rest are more recent versions.
Any ideas?
Starting Joomla 1.6 you can choose an alternate layout for each category. Including those you have overrides for. No need to select an alternate layout when configuring menu items ;)
Sorry I should've posted this sooner. I figured out the issue, I renamed:
<field name="layout_type"
type="hidden"
default="blog"
/>
To:
<field name="layout_type"
type="hidden"
default="bloggal"
/>
Essentially looking for a model that doesn't exist.
If you did this, do the following to fix it:
Rename default="whatever" back to default="blog"
In your database go to _menu table
Look for your menu item via the title column
Head over to the params and change {"layout_type":"bloggal"... to {"layout_type":"blog"...

Flex different MXML layout for each orientation

I have several MXML layouts that are used for my application's menu on the Playbook, I need to be able to create a different layout for each orientation because my side-bar menu wouldn't work when in portrait, what is the best way to create a view or two that can be used in each orientation but share the important functional code.
I tried first to make MXML views and separate the script and into a file and including it with the script tag but this doesn't work well for various reason.
An alternative more suited to the proper use of the flex tools and capabilities would be appreciated.
Thanks
For that you use States in one MXML, for example:
<s:View>
<s:states>
<s:State name="portrait"/>
<s:State name="landscape"/>
</s:states>
<s:layout.portrait>
<s:HorizontalLayout/>
</s:layout.portrait>
<s:layout.portrait>
<s:VerticalLayout/>
</s:layout.portrait>
<s:Label includeIn="portrait"/>
[...]
</s:View>

Resources