Intellij 11.1.5 - Project specific path variable - intellij-idea

I am using the Intellij 11.1.5. We are a large team, and have a pretty complex project setup. so we've made a template and when someone needs a new project set up, we just clone it and she is pretty much ready to go. One other thing i would like to automate is the creation of run configurations. One such configuration starts a custom bat file that requires a parameter representing a path that is user specific. I wanted to know if can store that value as a path variable specific to each project. Maybe somewhere in the .idea folder in my project. I know that Intellij stores it in its .IntelliJIdea11\config\options\path.macros.xml file, but is there a way to tweak that?
Any other idea that would allow me to locally store a parameter passed to the run config script would be usefull.
Thanks

I'm afraid you can't do it in IDEA, but you can use some environment variable directly in the .bat file instead of using the parameter (or rewrite the batch script to detect this value automatically, if possible). Instruct your users to define this environment variable.
IDEA Path variables are global and cannot be made project specific.

Related

Dynamic path creation

While developing transformations on local I set my transformation path to the target folders that are presented in Local PC and Once testing is completed on local I am moving our transformation to server repository to schedule it from server environments but every time I require to change the path set to the server folders. I believe it can be done by creating dynamic path or creating any variable but I am unable to resolve it. Is this option available in Pentaho? if Yes, Can you please help me for setting the dynamic path?
In This answer there is a link to a described solution, and in the answer i have a sample KTR that should help.
You can also use the pentaho properties file in different environments, meaning, you can utilize the same variable in both environments, say ${path}, but in each environment this has a different value.
kettle.properties can be found in your user folder .. C:\Users\YourUser.kettle
The standard way to handle environments in Kettleis with variables.
In the home directory there is a (hidden) folder named .kettle which contains every thing that should be local : your preferences, your shared connections, your cache, and, most of all, THE kettle.property file.
You can define variables in it, like a ${myPath}. To do this, use the menu Edit/Edit the Kettle.properties and add a variable named myPath and give it for value your prefered path, with an optional description.
Then, when you see a blue diamond with a $ on the right of a field in a step window (which means almost any field you'll need), you can press Crtl+Enter in the field and choose any variable defined in your kettle.properties. Alternatively, you may type or copy/paste ${your-variable-name} in the field.
Then, when launching spoon, it will not use the hard-coded path, but the content of the variable in the kettle.properties.
And nothing prevent you from having a different kettle.properties on your dev PC and on the prod server.
While we are there, three usefull tricks.
There is a predefined ${Internal.Job.Filename.Directory} variable contaning the path of the current transformation which by used for relative path. For example, ${Internal.Job.Filename.Directory}/../myDir/myFile.ext.
If you right-click anywhere on the screen, and go to the Properties/Parameters, you may also define your variable here.
You may also redefine these variables in the Run Option window that anoys you each time you rune a transformation (yes, there was a reason).
Finally, you can send these variables from job to jobs and transfos.

TIBCO Global variables, reverse engineering

I'm currently working on a project were am at the stage of figuring out what the current implementation is doing. Have been putting in a lot of time (A LOT) searching connections between queues declared as global variables.
Is there a way to get a listing of were a specific global variable is being used, or do I actually need to go through all processes, as I´m doing atm?
Thank you :)
in Tibco Designer 5.8 you can find where global variable is used using "Tools->Find Global Variable usages" menu item.
Please note that all tibco processes source code are text files. So, you also can search inside project folder using file text search from any utility that allowing you to search inside text files. For windows I prefer Far Manager
In the "Far manager" you can navigate to project folder then ALt+F7 and search for
%%GLOBAL_VARIABLE_NAME%%
Please also note that even if you don't have tibco project source code you can get it from tibco BW server. example path
tibco\tra\domain\tibco\datafiles\YOUR_PROJECT_NAME

Visual Studio Unit Test Data Path and Source Control

I have a unit test project for my VB.NET solution that takes a very large data set (multiple Gigabytes). The data set is static, outside of source control (developers unzip a big .zip file somewhere on their machine)
I'm trying to figure out how to reference this data set inside my project and I'm having trouble because of the following constraints:
The data set may be in a different location on each developer's machine e:\dev\MySolution\TestProject\ vs. c:\MySolution\TestProject\data. We can require it to be in the project folder but I can't require that the project folder be in the same place. This means I can't store the path in source control or I need some way to override it.
Because of its size I don't want to have to copy or deploy the test data at runtime because this will slow things down a lot and I don't want to have two copies of it.
My hack-y solution is to use a project property called DataPath and reference this inside each test. Then users would just change the property and I'd instruct them not to commit this change.... feels like an anti-pattern though.
My initial thoughts were to somehow store the path in the project.suo file which is outside of source control but I can't figure out how to make that work.
Anyone have experience with this?

EXRM - Can I set vm.args values from the config.exs file?

Somewhat related to this question - Parametrizing node name in Elixir Exrm - is there a way to dynamically set the content of the rel/vm.args file?
In the title, I suggest the use of config.exs, but I'm interested in any scheme that will allow me to add, remove and edit vm arguments at build time.
A bash script might be an idea, but a solution that would also work on Windows, and is preferably based on Elixir code would be the idea.
You can commit to your project repo a rel/vm.args file that you would like to be used instead of the Exrm generated one. Exrm will automatically use this file instead.

Property replacement in IntelliJ IML file

I recently migrated to IntelliJ 10. My .IML file has several properties such as $MODULE_DIR$ which set up the build environment. These are designed to be checked in so each user can configure his/her own local settings.
But everytime I checkin, IDEA replaces these some of these properties with the actual environment value, for example replacing every occurrence $MODULE_DIR$ in the iml file with my configured value "C:/Modules". This does not seem to happen for other properties, nor for other developers on the team using the same project. Am I missing some setting??
tia.
You should probably read about Path Variables in the Idea help.
I know that $MODULE_DIR$, $PROJECT_DIR$, ard $APPLICATION_HOME_DIR$ are used by Idea to determine where to find Module/Project/Idea stuff (jars etc). So I would guess not using these exact variable names will solve your problem.