Enterprise Architect Generate Source Code - configuration

I am using Enterprise Architecture to generate C++ classes.
Every time I do a Generate Code, it forces me to navigate to the directory I want to save the files to. Is there a configuration setting for a project or model to tell it to always generate the files to directory X?

Using 'Auto Generate Files' (in the Code generation window) should set the path name to the files automatically, and once a file path is selected, you wouldn't have to select the directory again.

Related

How to publish html report inside VSTS

I have a simple batch (let's call it run_job.bat) job that I set up in VSTS as release definition. VSTS reads this file from the remote git repository that is also set up in VSTS.
The agent is configured on a remote machine to access certain folder, say C:\AllScans\FolderWhereScanIsRunning\ bring the necessary batch file in there and start the run. The job runs some scan against web application and generates report file with some unknown for me extension.
Another job then runs as queue in VSTS (let's call it run_report.bat) that transforms this unckown file to zip file where .html, .css and .js files are sitting. Simply exporting this manually to another folder and double clicking on the index.html file shows nicely looking html report on how the scan is run, and if there were any failures during it.
My question: is it possible to access this zip file C:\AllScans\FolderWhereScanIsRunning\report.zip, unzip it and bring this index.html file within the VSTS UI? I want be able for my other coworkers to see the results of the scan in html format without leaving VSTS interface? Thanks for the help
There isn't any way to achieve this by default.
A workaround would be deploy the html files to a web page which allow iframe embedding and then use "Embedded Webpage" widget in VSTS to show the content.

How to use a relative program path in a PhpStorm file watcher

In PhpStorm (as well as other JetBrains IDEs, I'm sure), I'm setting up a File Watcher. In the Watcher Settings section, it asks me to specify the path to the program to be executed.
I want to use the executable file within the node_modules/.bin directory of my project. I don't want it installed globally because I may have other projects that use the same program, but may require a different version.
I could simply specify the absolute path to my project's node_modules/.bin directory, but then if I move the project, the file watcher will break.
In the Arguments and Output paths to refresh fields just below the Program field, it allows you to insert a macro, like $Projectpath$. This is exactly what I need, but it doesn't look like the Program field allows that.
Is there a way to specify a relative path for the Program field?
Here is a screenshot of the File Watcher setup window:
I could simply specify the absolute path to my project's node_modules/.bin directory, but then if I move the project, the file watcher will break.
That's not true -- at very least it does not break anything here -- got 3 projects that use local stuff.
Is there a way to specify a relative path for the Program field?
Sure. Use full path to the program :)
Internally (in config file) it will be stored using $PROJECT_DIR$ (AFAIK) special macro/variable but in actual field (in that dialog window) you will always see full path. Such conversion is done automatically.
You can read a bit more here (in comments): https://youtrack.jetbrains.com/issue/WEB-24376
If you are using the same project on different computers ... where path to the same program will be different but outside of the project (e.g. stored inside user-specific folder and user logins/names are different on such computers) ... you could use Path Variables functionality (Settings/Preferences | Appearance & Behavior | Path Variables) and specify the same variable on all of such computers that would point to correct path on that computer. IDE will automatically use that path variable to store the path.
So .. on one computer MY_TOOL_PATH will be pointing to /Users/Joe/MyTool and on another it could be /Users/Sam/AnotherTool.

How do I get access to assets added to a library?

I have a main project and an external library. I have added a directory of assets to the external library in src/assets/[50 files here].
When I do that, I go into the external library properties and select the folder and this includes all the files in that directory. Example shown (1 file selected):
In my main application I want to access that folder and copy the files into another directory. How do I access those files?
Note:
I may update these files periodically, copying the files and pasting them into that directory. There may be a few more or less files each time. So I'm against embedding them.
Go to your main project > Properties and select Flex Build Path. Under Source path, choose Add Folder... and enter the following
${DOCUMENTS}\GigaLibrary\src\assets
(assuming your library project is called GigaLibrary, that is)

Selenium ide to locate a file and store its path info from any computer

currently in my test scripts for automated file upload to browser, the paths are already defined in the value column
command type
target //input[#type='file']
value /Users/.../.../.../filename.extension
in such cases, this script is unable to run on other computers because the path would be different.
my question will be is
is there a way to locate the file in a general folder (for example file is downloaded and in the "download" folder), by using selenium ide can we get the path of the file (/Users/.../downloads/filename.extension)
store the path of the file with its extension into a notepad which i will be using it for multiple test of file uploads later on.
right now if my colleague needs to run the script from his computer, he have to manually change the value to his path.
You could use a suite file that contains a "setup" file to only change the file name in 1 place and the variable is shared across tests in the suite. You could also select an agreed up on place to store the files: c:\test_info\image.jpg.
Or you can make the file available by URL & not local, Unfortunately javascript prevents that for security: How to get the current file path in javascript
Unfortunately I can't think of any other good way unless you all have the same path in a home directory and could do something like ~/test_dir/photo.jpg

Recursively navigate a directory generating dynamic xml files according to the current visited folder with SSIS

I need to visit a folder and all of its children with SSIS (SQL Server Integration Services). At the moment by setting the folder path into a variable after reading it, I able to loop through all the .txt files of the current folder and fill a pre-generated (with head info) xml file.
What I would need now is to be able to create one per each accessed folder, a new xml file (the beginning content will be always the same). Once I would be able to create it, as first action once a new folder is accessed, I can then simply apply the logic I developed so far.
However I am blocked at the moment, since within the loop where i read the files (with their full path) I cannot find a way to express "create the xml file if the accessed folder is new".
Assuming I understand the problem, you need to walk the entirety of a directory structure and for each folder you find, you need to create a base XML file. Then for each text file you find in that folder, you will perform some operation on the XML file. The trick being how do you only create the XML file once.
I would envision a process like this.
A script task that makes use of the System.IO.GetDirectories to populate a variable (directoryXML> that contains the folder structure, something like
<Dir>
<D>C:\ssisdata</D>
<D>C:\ssisdata\a</D>
<D>C:\ssidata\a\b</D>
</Dir>
Use a Foreach Nodelist Enumerator to shred that XML out into a variable (currentDirecotry).
You'd perform your one-time task of creating the XML file in currentDirectory.
Further using the currentDirectory variable as an expression on the Foreach File Enumerator (assign to Directory with a FileSpec of *.txt) you can then perform your task on all the files meeting that specification. Do not check the traverse subfolder option as that will not give the desired results.
This is a fairly high level approach to the problem as I'm assuming you have some familiarity with SSIS but the approach should be sound. Let me know if you have any particular sticking points.