Setting default config for Visual Graph in GraphDB - graphdb

Is it possible to set a custom advanced graph configuration as a default config to use upon clicking 'Visual Graph' button (e.g. from the 'Graph overview' sidebar) in GraphDB Free 8.4.1?
I have declared advanced configurations that are suitable for exploring my data, but they are only available through 'Visual Graph' menu. I would like to use them (at least one) also when switching to graph visualisation from the view of triples.
I haven't found such an option so far. A desperate move could be to rewrite the URL and manually add a fixed '?config=my_config' parameter, but I hope there is a better way do solve it.

There is no option to configure the default queries through GDB Workbench, but what you can do is change the queries in the files in your GDB distribution directly. They are located in graphdb/graphdb-/lib/workbench/WEB-INF/lib/graphdb-framework-graph-explore-.jar/graph-explore-queries/.. resourceLinks.sparql is the query for links expansion.

Related

How to change cmake options in clion 2017 without going through CMakeCache.txt

I use clion for quite a while now and in the past there was a dedicated window which shows all cmake variables/options for the current projet. Here you could see and change all variables/options. It was very convenient. I guess they changed this now and you have to open the CMakeCache.txt file and change the options in this file. But this file is so big it is very annoying to search for the option you want to change. It is even more annoying when you don't know the exact name of the option. So, my feeling is, there should be better way to list at least all options. So, is there a better way or do I have to go through the hassle and search for the options in the CMakeCache.txt?
As mentioned by #Maxim Banaev in the comments, there is a feature request on youtrack. Quoting from the discussion thread:
we hope to deliver this feature this year. Hopefully, in 2022.2 release
We've added the editor to CMake settings in EAP3 link and more updates for it are yet to come in EAP4 and EAP5.
See the interactive dialog applications that come bundled with CMake, ccmake (a curses-based terminal gui), and cmake-gui (a gui application). Both provide user-friendly interfaces to edit the CMake cache variables, including appropriate GUI inputs based on the cache variable's type (string, bool, path, filepath, etc.), and enable hide/show of variables that are marked as being for advanced usage scenarios. They also provide the option to group options by common prefixes of cache variable names and to visually expand and collapse those groups.

In JetBrains tools, how can I share IDE and project settings between multiple developers?

I love the JetBrains tools. But, I can't find a way to effectively share settings at the IDE level and the project level with team members. To date, I've followed instructions provided by an article on the JetBrains site, titled "How to manage projects under Version Control Systems". But, many comments on the article warn against implementing it as a method for sharing project settings. And I've run into a few issue with the method, namely not everything I'd like to be shared, is actually shared with team members.
I've also tried using the function found under the File->Settings Repository menu of the JetBrains tools. It shares some settings between users, and I like that it automatically creates commits to the Git repo, but it doesn't share all the settings. The settings that are shared work great! But, it seems like the "Settings Repository" feature is a work in progress.
I've read many discussions on this topic, but no definitive answer on a way to share IDE level settings and, at the same time, project specific settings when using the JetBrains tools. Not to mention, I use a multiple JetBrains tools (PhpStorm, PyCharm, WebStorm and IntelliJ). I'd like it if there were a solution that also shared settings between all the tools, because some settings are global across all JetBrains tools, some are specific to a particular tool, and some are specific to a project.
Sharing settings between JetBrains tools is more of a "nice to have". What I really need to know is, how can I share global IDE settings and project level settings easily between team members. But, I'll give mad respect points to anyone who can figure out both. :-)
I finally found a few minutes to write up an answer to this. I want to write up a more complete answer, but I've been incredibly busy lately so this will have to do for now.
This solution describes what I've been using to share code and settings of PyCharm projects. There is one caveat to this solution, which I'll attempt to describe and detail a work-around for.
Following the instructions on JetBrain's knowledge-base, we'll add the entire project folder to a Git repo. But, before doing so, be sure to exclude at least the workspace.xml file by creating a .gitignore file in the project directory and add at least the following line:
.idea/workspace.xml
# JetBrains also recommends adding tasks.xml, but I found it useful to
# share tasks with team members.
# Uncomment the following line to avoid sharing tasks with team members
# .idea/tasks.xml
You'll definitely want to add workspace.xml to .gitignore because it stores all of your local window sizes, debug panel layouts and the like. My team found it useful to syncronize our tasks, so that we could coordinate work. But, every team works differently, so use your own discretion.
There are three main locations project and personal preferences are stored:
<project_directory>/.idea contains project specific settings.
$HOME/.PyCharmYYYY.M/config contains options for all projects managed by PyCharm (or substitue "PyCharm" for any other JetBrains tool).
If you use the shared settings found in File->Settings Repository, $HOME/.PyCharmYYY.M/config will contain all of the settings shared via JetBrain's built in "shared settings" function. I and my team didn't care for it, because it seemed to automatically share some things we didn't want to (like the color theme, and key mappings). And we weren't able to select a sub-set of options to share team-wide. Long story short, it didn't give us the flexibility and control we need.
We did try using options 1 and 3 at the same time, but it was too unwieldy. For example, one person would change a font, and it would change it for the whole team the next time we re-launched JetBrains. It was a mess. If you do decide to try out using options 1 and 3, I recommend proceeding with extreme caution.
Presently, we are using only option 1, and it's working out quite nicely.
A few other notable folders you might want to add or remove from the .gitignore file are:
<project_folder>/.idea/runConfigurations/ contains all of your debug and run configurations used to run nose tests and debug into your code.
<project_folder>/.idea/scopes/ contains all of the scopes used to filter your view of the project files, into more management groupings.
$HOME/.PyCharmYYYY.M/options contains all of the global options for version of PyCharm you're using. For example, the color scheme, key mappings and any other non-project specific options. For a full list of other global settings, see this JetBrains article, or the following excerpt:

Is it possible to use live-templates as file templates?

In the intellij products I'm very fond of the live-templates. I wonder if it is possible to use the same syntax for file templates, e.g. formatting a variable to snake- or camel-camese, defining a starting cursor position and so on.
Unfortunately you cannot use the same functions/macros available in Live Templates in File Templates.
File Templates use Apache Velocity template language. It allows some Java(?) simple methods to be run on variables (e.g. #set($class_start = $class.substring(0,1).toUpperCase())). Quite possible that more complex methods will work as well.
UPDATE (2017/01/13):
As of 2016.1 (or perhaps 2016.2) version it's now possible to use some Live Templates in File Templates as well (by checking Enable Live Templates checkbox for that File template). I'm not 100% sure if it will do the requested here thing (not tested myself).
Syntax example: #[[ $MY_VARIABLE$ $END$ ]]#
https://www.jetbrains.com/help/phpstorm/2016.3/file-and-code-templates-2.html

Restrict Intellij IDEA backward analysis

I'm trying to analyze one Maven module of a Java project in Intellij IDEA using the Analyze->Inspect Code menu item. I have restricted the scope of the analysis to that project. When it runs the analysis, it gets to a phase called "Perform Backward Analysis" where it is looking at files outside of the module I ran the analysis on. Specifically, it is running the analysis on a large number of XML and HTML files that are used as part of the help documentation of the project and are not related to the code.
At the rate it is going, it is probably not going to finish the analysis this decade, so how do I either get Intellij to really only look at the files in the current directory, or turn off backward analysis, or exclude the XML/HTML files from the backward analysis so that it eventually finished?
When you go to Analyze->Inspect Code, the dialog gives you the option to limit to the "Current file" or the module that is active in the editor when you invoked it. You can also define a custom scope such as just java files or files in a particular package.. Click on the button with the ellipsis. In the dialog, click the help button for the syntax for defining scopes.
You can create a custom scope to do this. If you have a look at the custom scope dialog you'll find an option to exclude selected paths, or you can simply type a pattern, such as !*..*.xml.

How to maintain different file headers per project in IntelliJ?

IntelliJ allows you to configure the "File and Code Templates" in Settings.
This is a global setting, however I want different templates depending on which project I am working on (for example there will be different #author tags if its commercial / open source work, and version information varies by project).
Eclipse manages this on a per-workspace basis; how can I achieve the same thing in IntelliJ IDEA?
Unfortunately per project templates are not supported in IntelliJ IDEA. I recommend you comment-on/vote-for/track the feature request Make file templates per-project. (See UPDATE about this feature request below)
A few workarounds you can try...
Create a File Template for each project. Then when you create a new class, use the project's template rather than the standard "Java class" template. It will clutter up your template list a bit, and you have to remember to change from the default template when creating a new class (remember than inline search is available in the new class dialog when setting the type). But it is workable.
The copyright settings are done on a per project basis. Sometimes a need for a specific header can be met using the copyright utility (even if it is not an actual copyright statement). The options are pretty good for determining where it gets placed. The one shortcoming will be that while you can configure it to be a comment just before the class declaration, you can only configure to be a block comment or inline comment, not a javadoc comment.
Finally, a last option would be to write a live template for each project with the header information. Then after you create a class use the proper one to place the header information.
Hopefully those things will help while we wait for the feature to get implemented.
UPDATE
The above mentioned feature request to allow for file templates to be saved on a per project basis has been implemented in IDEA v14.1. It is currently (Feb 2015) available as an EAP (i.e. beta). It is scheduled for release at the end of Q1 2015.