List of Dymola flags - dymola

Some settings in Dymola can be altered by setting flags in the "Commands" window:
Some examples for flags are:
Advanced.AutoFormatting
Advanced.PedanticModelica
Advanced.LogStartValuesForIterationVariables
Hidden.PrintFailureToDifferentiate
Is there a comprehensive list of all Dymola flags?
Or, even better, a command to print such a list?
Or, even better, something like the about:config in Firefox?
Especially, I would like to change the default setting for the Save contents in one file checkbox to Directories - No Questions because version control software (git in my case) works better with many small files.

The Save contents in one file checkbox cannot be changed by flags, but by (un)commenting the line Dymola5StoreOnOneFile 0 in the file $Dymola$\insert\dymodraw.ini.
But many other settings can be changed using flags. Use list() to print a list of flags (unfortunately, Hidden. flags are not included in that list) or use help() to get more help.

Update
In recent Dymola versions there is user dialog with filter function for all flags. You can find it at
Tools → Options → Variables.

Since Dymola 2018 (and may be an earlier versions) there is a flag called Advanced.DefaultStoreAsOneFile. Setting to false will enable to save packages as directories.
This flag can be set via GUI as well, see Edit > Options..., and in the pop-up window, the Tab Version, uncheck As default store packages as one file. In this way, the setting will be saved in your setup.dymx (setup.mos in former Dymola versions) file and will thus not affect the Dymola for other users. You can also find some more flags in that file.
But I would suggest to split this question into two ones since there are two topics treated in just one thread.

Related

IntelliJ Show Diff Includes Unversioned Files

After upgrading to IntelliJ IDEA 2021.2.2 Ultimate Edition, I've noticed now that when I go to the Commit pane and select Show Diff on a file in the Default Changelist, that it includes the Unversioned Files in the set of files for the diff comparison.
That is, say I only change one line of code in pom.xml but I also have some un-versioned file, let's say called temp.sql. If I open the Show Diff tool by select Show Diff from pom.xml in the Default Changelist, then the Compare to Next File button is still enabled. Clicking it takes me to temp.sql`, though I have no desire to look at it since I don't even have it in source control.
For example, here I have a Default Changelist with a change to one file in source control, pom.xml. And I have an un-versioned file called temp.sql.
When I select Show Diff on a file in the Default Changlist, it should, in my opinion, and in my previous version of IntelliJ, only show you...the Default Changelist, which is pom.xml. Instead it is giving me pom.xml and temp.sql.
Is this a new feature? It seems like a bug to me. I can't seem to find any documentation for it. I can't find any way to turn it off.
I see there is a "Show unversioned files" check box in the Version Control > Commit section of Preferences, but clicking it doesn't seem to change anything.
If I choose Show Diff on the Default Changelist object, rather than on a file in the Default Changelist, that it restricts navigation to the files in the change list as I want. It's only if I select Show Diff from a file in the Default Changelist that includes all files in all change lists, including un-versioned files.
Ruslan Kuleshov made a comment that this seems like a known issue, https://youtrack.jetbrains.com/issue/IDEA-237528.
New commit tool: don't jump to other changelist's changes
I always review all changes on the current changelist before commit. I focus the diff preview and use F7 to jump through all changes on all files. Previously, when I reached the last file F7 stopped jumping to other files. But after enabling the new tool, when I press F7 on the last changed file on the current changelist, it jumps to the first change on the next changelist. That's a problem since I can begin reviewing changes which are not intended for commiting right now, loosing time, confusing me and even risking to mix files from different changesets.
I had failed to find that issue on https://youtrack.jetbrains.com because I hadn't yet tried having files in source control with changes in a non-default change list. I was only searching YouTrack for the fact that Show Diff now includes un-versioned files.
So, it seems that if you choose Show Diff from a file in a change list, then the diff comparison tool will now include all files in the set of files, regardless which change list they are in and regardless whether they are in source control yet.
I think that this is a bug and have voted for the issue. I encourage others to do so as well.

How to do I control which CMake options appear only in "advanced mode"?

I use CMake 3.x in (more than) one of my projects. When I ccmake ., I get a terminal screen with various options to configure - supposedly, the ones a user might want to set manually before building. If I press t I enter "advanced mode", and numerous other options are visible.
Great, right? Except that some options in the non-advanced mode are such which I feel would be a better fit for the advanced mode and not be visible always (in my case it's the results of FindCUDA.cmake).
How can I make certain options only appear in advanced mode?
For make CACHE variable to be appeared in GUI (like ccmake) only in advanced mode, use command mark_as_advanced:
mark_as_advanced(my_cache_var)
Normally, mark_as_advanced is called by the script, which creates the variable. E.g. "Find" script marks as advanced some of variables obtained via find_path or find_library.
But it is correct to mark as "advanced" a variable created by some other script.

where to configure phpstorm 7 less compile directory

I'm using Phpstorm7 on mac. When I open one less file, Phpstorm tells me that it can be watched, so I just allow it to be watched. However, I want to compile this less file to another directory, instead of the same directory.
Saying, I need compile sites/all/themes/bic/less/style.less to sites/all/themes/css/style.css.
After a long research, it seems I need to edit some file watcher, but I can't find such file watcher stuff anywehre in Phpstorm7. There's no such 'File watcher' setting when I go to 'File' => 'Default Settings' in Phpstorm7. Now I can't stop this less from compiling either.
Any help would be much appreciated. Thanks!
File | Default Settings is for settings that will be applied to the brand new projects.
All settings (both IDE-wide as well as project specific) are located in the same place as every other Mac program does -- it's called "Preferences" (which you should now where to find, since you are a Mac user).
PhpStorm v7.x has a feature called Search Everywhere (Shift 2 times or by clicking on corresponding icon in toolbar) -- it searches trough settings/preferences as well.

IntelliJ - not asking if I want to save a file

I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation

How to set target settings for different builds

In xcode 4.5 how do I select different target settings for different builds for example one target setting for debug, one target setting for release etc, so I can define different icons depending on the build etc.
You have two options, neither perfect. I'm going to focus on the concrete example of using different icons depending on your build configuration, as you suggest, though both techniques can be applied more broadly.
Redirect in your Info.plist
This is the simplest way. Specify your "Icon file" property in your target's Info.plist as e.g. "Icon-${CONFIGURATION}". Then, create two ICNS icons, "Icon-Release.icns" and "Icon-Debug.icns", and add them to your project. That's it. The downside with this approach is that both icons will be copied into your built app every time, rather than just the one it needs.
Use a "Run Script" build phase
This is a little more involved but it gives you a better result. Add a Run Script build phase to your target, with the following script:
cp "$(dirname "${PRODUCT_SETTINGS_PATH}")/Icon-${CONFIGURATION}.icns" "${SCRIPT_OUTPUT_FILE_0}"
Specify its output file as:
$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/Icon.icns
And make sure your "Icon file" property in your Info.plist is set to just "Icon".
This relies on your icons sitting in the same folder as your Info.plist within your source tree (though you can edit the script however you like to suit your project's configuration).
Note also that with this approach Xcode won't be able to see that you have the icon set correctly, so for example in the "Summary" tab of your target's settings it'll still show the question mark placeholder for the icon. You'll need to do an actual build to verify it's working.
My solution is pretty close from Wade's first point, you can also add an dynamic suffix using a user-defined settings in you project configuration.
I use this solution to dynamize the icon, the bundle display name and also the bundle identifier of my build to be able to use the version from the app store beside my development version.