UML papyrus tool - papyrus

Here what i have done so far to create UML Diagrams from java code.
Project -> right click-> Discovery -> Discoverer -> Discover KDM code from java project model –> You’ll get a property dialog box at the serialization line make set it to TRUE that would generate a file project_KDM.xmi
Right click that file -> Discovery -> Discoverer -> Discover UML model from KDM code again you’ll get a property dialog set the serialization prop to TRUE to generate a file named project.UML
create a folder in your project and copy that UML file to it, this is because sometimes when you delete the papyrus files along with UML files it messes up with the .project file and makes your project loses the Library runtime settings so just put them in that folder instead of main project folder “/” .
now go to that folder you created, and pasted the UML file there, then right click on the project.uml file –> new –> papyrus model -> and finish
This will create empty project.di file but it in someway references the uml (I wish I knew at the moment how to import the UML file and create so many *.di files but for now I don’t so just do it the way i did)
ALT+W -> show view -> papyrus model explorer
I am able to generate .uml from above steps.
When i right click on .uml i can not see any option "Initialize class diagram".
Do i need to intall any plugin/tool for this?
and how can i generate UML Diagrams from this .uml using papyrus tool?

When you have your .uml file open, you have to create diagrams in the model itself. To do that you have to open the "model explorer" view, trough usual window -> show view -> others -> Papyrus -> model explorer. Right click on a node in the explorer and select new diagram -> class diagram.

Related

Move an artifact from 1 model to another in AX7

I am wokring in AX7, I need to move some artifacts from Application Suite User Model to my new created model.
Scenario:
I created a model named "My Model"
created a project named "MyProject" and set its model to "My Model"
I have a table named "MyTable" in Application Suite User Model.
Problem:
I opened MyTable in Aplication Explorer and right click on it, it doesn't show me option "Add to project", and if I select "Customize" option, it says that
"MyTable cannot be customized in MyProject, Customization is only possible if the models are in the same package"
So how can I move an artifact from Application Suite User Model to My Model ??
I've found its solution, it is very simple.
Brief:
Just move your desired artifact from back-end, cut the file from "application suite usr model" and paste it to "My Model", Here you GO !! Now when you will open Application explorer, you will see that you artifact has been moved to "My Model".
In detail:
Go to below path and cut the artifact you want to move to other model.
C:\Packages\application suite\application suite usr model\AxTables
Now go to below path and paste that artifact here.
C:\Packages\My Model\AxTables
Open Application Explorer and find the artifact you moved, you will see that it is moved to you desired model.
Allow me to link this here first: https://community.dynamics.com/ax/f/33/t/193502
Essentially you can either do the Windows Explorer move, much as Shahrukh has also mentioned, or you can Cut and Paste between two projects with a solution.
In a little more detail:
Your solution should contain at least two projects: one project working in the model you want to move the elements from and one project working in the model you want to move the elements to. Select the elements you want to move, Cut (or ctrl+x), select the project you want to move to and Paste (or ctrl+v). Depending on the number of elements you are moving, this could take a few minutes.
This will move the elements without having you rummaging around in folders outside VS and will also update your models and source control (assuming you've added your solution to source control) as you go.

How to make project inherit it's settings from another project in VS2013?

I want to create a Native C++ project which inherits it's settings from another Native C++ project within the same solution, so if I were to change the settings from the base project, it will be reflected in the derived project.
Is this possible? I use the word inherit because I see that in the project settings, though I'm not sure where it's inheriting from.
Project settings sharing is done via Property Sheets.
Go to View -> Property Manager, right-click on one of your projects and select "Add New Project Property Sheet...". Choose some common place for it, that is easily accessible by all other projects (somewhere near solution file will do).
Double-click on that new property sheet and set whatever options you want your projects to share. Now you can add this property sheet to any other project via "Add Existing Property Sheet...".
It is inheriting from the solution. If you have both projects in the same solution then you can specify some of settings in the solution and have the projects inherit from the solution. You can then change the a setting in the solution and it be reflected in both projects.

How do you dissasociate a single file in a VS2010 project which is under source control from source control iteself?

We have a project (C#) which has been added to source control (TFS 2010), however one of the project files is anauto generated one and as such we dont want it under source control.
Is there a way to remove the source control association for this single file in the project?
Please note the autogenerated file is made from a custom XML document using an internal standalone tool. Whilst I appreciate a long term solution to this issue would be to not have the file linked to the project, but to include the source XML document and have it associated with an appropriate custom tool to generate the C# file at build time. Sadly creating said custom tool is not going to happen in my immediate future hence the query about dissacociating the generated file that is in the project from the projects TFS source control.
Open up the project and select the file.
On the VS menu go to: File -> Source Control -> Exclude FILE_NAME From Source Control

Visual Studio: can I copy a project's properties to use in another project?

I've added several directories, libraries such as matlab, opencv, etc to compile my current C file in Visual Studio project.
All my upcoming projects will require the same setup/properties. Do I need to setup my each project's properties individually or I can do something to apply it to all ?
Try using Property Sheets. These can create a single properties file that can be inherited by multiple projects.
Use "View > Other Windows > Property Manager" to bring up the Property Manager. It will show your projects and configurations.
Right click a configuration, and select "Add New Project Property Sheet...". You can name it, and select a location that works for all your projects.
Once created, you can edit its properties just as you would a build configuration.
To use that property sheet as the basis for other projects, just right click the configuration or project, and select "Add Existing Property Sheet...". Browse to where you saved the original sheet, and it will be inherited.
Any changes to the original sheet will be applied to any project that inherits it, unless they are overridden. If you go into properties higher up the chain, properties that override will have bold type for their values. To get them to always use the value in the base sheet, there will be a "inherit from parent or project defaults" option where applicable.
I am using AtmelStudio 6.1, which is built on Visual Studio 2010 (I believe), and yet doesn't have any Property Manager that I can find.
So, the hackish system I use is:
close (or at least unload via the contextual menu) the project whose configuration you want to modify
open its .cproj file (which is XML) in any text editor (VS works nicely),
MAKE A BACKUP COPY OF IT SOMEWHERE ELSE JUST IN CASE,
open the .cproj file of the project whose configuration data you want to copy,
look for the configuration data you want. Configurations are inside of PropertyGroup tags; for example, in my case it looks like
<PropertyGroup Condition=" '$(Configuration)' == 'Preprocess only' ">
for the configuration named "Preprocess only". Copy from the beginning of that tag until the end of the corresponding
</PropertyGroup>
tag.
Paste the block into the destination .cproj, just after other
</PropertyGroup>
tag. Make sure that the name of the configuration is unique in this file. Save.
You're finished. Now open the project normally in VS and you'll be able to select the added configuration.
For Visual Studio 2010+ you can make a Project Template.
If you choose to automatically add the template to Visual Studio in the template creation wizard, when you create/add a new project, the template will appear (after restarting Visual Studio). Projects created with this template will have the same project properties!
To add source code files to the template, the easiest way is to rearrange the source code files in solution-explorer to be in the root (not under any folder). After doing that, THEN generate the template.
Why? Sometimes putting your files under the default Source Code solution-explorer folder (not in file explorer, the .project.filters label) will fail to copy the source file to the template, you'll see "the document cannot be opened. it has been renamed deleted or moved" when you try to use the template and the file you wanted in the template will NOT be in the file explorer.
If you do want solution-explorer folders, you will have to add them manually to the template by unzipping the template folder, making changes, then re-zipping it again.
For example, literally copy and paste the source files you want the template to have in the template folder and edit the .vstemplate file. M$ Doc on template editing.
<TemplateContent>
<!-- put new file references here and/or in your .vcxproj .vcxproj.filters -->
TargetFileName="HelloWorld.cl">HelloWorld.cl</ProjectItem>
<ProjectItem ReplaceParameters="false"
</TemplateContent>
Related questions:
How do I use VS template I created?
How can i load a template I have created in Visual Studio?
How copy visual studio project?
Simply copying and pasting entire projects and solutions is not recommended for complex or shared projects since various GUID s and filenames may overlap - causing bugs.
For MSVS 2017, the process #AaronMK mentioned doesn't work. Instead do the following:
View -> Other Windows -> Property Manager
Add New Property Sheet.
Edit whatever options you want there.
Give it an appropriate name so that you remember it.
Right button on it and hit "Save {myPropertySheet}"
It would be wise to place it alongside the default property sheets and that you can add it whenever you want (by Property Manager -> Add Existing Property Sheet -> Browse to its location). This directory is: C:\Users\{myUsername}\AppData\Local\Microsoft\MSBuild\v4.0
Alternatively you can edit the default property sheets and use these by default. I wouldn't advice it though as they provide a fallback option in case you mess up. So make backups first if editing default files.

How do you remove the bindings from a VS Team project?

How do you remove the bindings from a VS Team project, is it just a matter of deleting ".vspscc" files?
What is the best way to do this, say I have a project on CodePlex and it is time to package it up for release, but by default the bindings come with the source so when others open the solution it interferes with it.
The simple way to unbind from source control:
Open your project
File -> Source Control -> Change Source Control
Select your project(s)
Click "Unbind"
What worked for me (under TFS, not codeplex)
Copy or move the project folder out of your workspace (I put it in c:\temp), and then open it in VS2008.
Visual studio then shows the following prompt:
The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover this missing information automatically, the projects whose bindings are missing will be treated as not under source control.
After this, another dialog appears, as follows:
The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover this missing information automatically, the projects whose bindings are missing will be treated as not under source control.
And you can chose Temporarily work uncontrolled, or Permanently remove source control association bindings.
Select the latter, do a Save All, and reload the solution. Profit!

Resources