I am trying to set up a federated model, in Sparx EA. According to the documentation, it is reasonable:
set a package (or model) as a branch,
put under version control, export as .eab file.
In other file, import branch .eab file.
However, I have no option to Export as Model Branch when I check the context menu of a package or model. Any suggestions as to what I might be doing wrong? (Version 15.2).
The option can be found under Package Control | Export as Model Branch in the context menu of a version controlled package.
But you can also simply import the xmi file of the version controlled package. If there are nested version controlled packages you can use the option Get Latest to get the nested package context.
Related
I have a nuget package that references other nuget packages. One of these "inner" packages has a security hole. How can I - without changing the package - overwrite the "inner" reference? Thanks for the help!
Your only option is to directly reference that package in your project/package so that the fixed version is "nearer" to the project that is being restored.
However you cannot change the package identifier, only the version being used (and in worst case szenarios, create your own package from a fork with the same id/name but a custom version - e.g. 1.2.3-workaround.1)
I'm following a Udemy course that uses Eclipse for Scala. Using Eclipse, he creates a package, then right-clicks on that package, selects Import, then General, then FileSystem and selects an existing resource that he provides in the course.
I'd like to know how to do this in Intellij. I created a package but see no way to import an existing resource into it.
Many thanks.
You either configure content root in the existing module or add a new module with the source roots, then make your main module depend on it.
IntelliJ IDEA will not copy the files from some other location, so you have two options:
set up a module with the content roots for the existing location with the sources
copy files to the existing module source root using your favorite file manager.
I am developing an scripting environment for EMF and need to import the model plugin so that my script is able to use classes generated by the model, but in order to do that I need to explicitly add the plugin to my imports.
Can I do that automatically? Like adding all workspace plugins to my imports at runtime?
You can use DynamicImport-Package: * attribute in the bundle manifest to make all exported packages visible.
Note that packages imported via DynamicImport-Package are resolved every time a class from the package is needed. Consider selective dynamic import DynamicImport-Package: *;dynamic=mymodel or buddy policy as better alternatives.
I would like to auto import XML files that contains information about changed packages, diagrams, elements, and so on to my repository on a MySQL server.
There is a functionality in the EA, located in "Import/Export" -> "Import package from XMI file". Is there any way to trigger that function from a script or from a program to automate that?
Yes, check the operation ImportPackageXMI in the Project Interface. You can use that operation from an add-in, external program or EA script.
The NuGet docs describe two possible repositories for package files defined within a VS template: 1) within the VSIX, or 2) within the template. There's also the third option of the registry for "installed" packages.
We have custom project templates which will use publicly available NuGet packages which are not already defined in the registry. It will bloat the VSIX and/or templates too much to include the nupkg files too. Is there some hidden option or trick to allow the repository to instead point to the package source(s) as defined by the Visual Studio user?
Since I didn't find any easy "trick", I wrote a custom project wizard per this discussion - http://nuget.codeplex.com/discussions/385955.
The package sources can be found via the PackageSourceProvider, which you can import via MEF along with the PackageInstaller. You then create a repository from the package sources, and pass it to the installer:
var factory = NuGet.PackageRepositoryFactory.Default;
var packageSources = PackageSourceProvider.LoadPackageSources().Select(s => s.Source).ToList();
var repository = new AggregateRepository(factory, packageSources, true);
NuGetPackageInstaller.InstallPackage(repository, project, package.Id, package.Version, false, false);
Calling InstallPackage directly also allows you to install dependent packages and assembly references, both of which are disabled by the standard NuGet VSIX package installer.
I'm guessing standard NuGet doesn't allow the dependencies to be installed for security reasons, but in our case we're using our own VSIX, our templates, and our NuGet packages, with a few additional known dependencies, so the license check has been made long before the template is actually used.