I have the project with language not supported with any IntelliJ IDEA plugins. The syntax equals C language, but files had extension *.mq5.
Can I set an alias for *.mq5 files to IDEA recognize them as *.c
Yes, you can.
Go to: Settings > Editor > File Types. Choose C/C++ and in File name patterns add *.mq5
However it is better to use JetBrain C++ IDE - CLion (there is no free version, I think) or Eclipse for C/C++.
*.mq5 is an MQL language extension, there is a third party plugin: https://plugins.jetbrains.com/plugin/9291-mql-idea
Related
I have Jenkinsfile it's written in Groovy, but file name doesn't have approprite extension: .groovy. How can I tell IDEA to check groovy syntax of this file?
Update:
Also I interested in the same question about GoLand IDE
From the project sidebar, right-click the file and choose "Associate with File Type". Then just select Groovy from the menu, and you're all set.
GoLand does not support Groovy so this will not be possible there.
If you add following header comment in the beginning of your Jenkinsfile:
#!groovy
IntelliJ IDEA will automatically recognize this file as a Groovy source file. It should work for other editors and IDEs as well.
A little intro:
I work on a project with legacy codebase witch uses internal xml based descriptors with specific file extensions (about may be 10 extensions).
Let it be *.desc, *.check etc.
To have code highlighting for such a files I can configure Idea to consider these types of files as XML.
It's available through:
Preferences / Editor / File types
And then add all custom extensions to 'Recognized file types': 'XML'
Our project uses gradle as build tool
and my question is:
Is it possible to make same configuration via dsl of gadle 'idea' plugin?
The short answer is: No.
One could create a custom Gradle task that will modify IDE file type preferences XML file in the config directory. While it's possible to run such task automatically on the project refresh in IntelliJ IDEA, it will most likely not work since you can't modify IDE configuration when IDE is running (the changes will be reverted). So, you will have to run it from the command line, outside of IntelliJ IDEA when IDE is not running.
It's probably not what you want, but if documented, can be used by the team as the manual step to make this configuration change easier.
Using gradle idea is not recommended anyway.
A better way might be to provide your own IDE plug-in that will associate these file extensions with XML file type and instruct the team to install this plug-in.
I want to use custom rulesets with the PMDPlugin in IntelliJ 2016.1 (on Windows).
The Plugin page tells me
PMD supports custom ruleset file, to configure goto settings -> PMD and add the rule set files that are required.
but i can't find any setting to configure the PMDPlugin (I'm using version 1.7.7). In fact when i'm searching for PMD the only item listed in the search results of the settings menu is the Plugin itself. And under Tools -> Run PMD the Custom Rules are greyed out.
I found on this page a possible solution but it doesn't worked for me. And if it would i would like to change the rulesets for different projects and i don't want to modify the IDEA rules for each.
Also i found a solution to set PMD as an external tool, but i like how other plugins (e.g. Checkstyle-IDEA) integrate into the IDE.
I also checked the QA-Plug with the PMD extension but there you can just select the settings and don't specify a custom ruleset.
I think you are looking in the wrong place. Go to File > Settings > Other Settings > PMD and there should be a + sign like below:
From there you can add your own custom rulesets (*.XML files).
PMD Plugin Version 1.8
Support Idea 2016.1
As it was touched on by #dambros: The PMD plug within the QAPlug plugin is configurable by clicking
Tools->QAPlug->Analyze Code...->Run with chosen profile
The above answers assume you are using the PMD plugin and NOT the PMDplug plugin that resides within the QAplug suite.
I started creating a Test-Project for playing around with TypeScript in intelliJ IDEA 14. At first I added the angularjs_DefinitelyTyped TypeScript libraries in the Settings (Settings / Language & Frameworks / JavaScript / Libraries -> Download... -> TypeScript community stubs). At this point IntelliJ gave me the desired code-completition. I started creating a Controller as described here. Everything works fine.
The Problem I stumbled over occurs, when I installed the TypeScript transpiler with the "File Watchers"-Plugin as described in the IntelliJ IDEA 14 Web Help. Now I get the Error "error TS2304: cannot find name 'ng.'" when typing ... extends ng.IScope.
As i already downloaded the definition-Files I was hoping that the "File Watchers"-Plugin auto references these Files.
I tried manually referencing the these files but the TypeScript transpiler cannot resolve %userprofile%\.IntelliJIdea14\system\extLibs nor $USER_HOME$\....
Is there a solution without manually downloading and referencing all these Files in my Projects?
Does the tsc have an option to do this? I don't find anything about it.
Hope anybody can help me with this Problem ;-)
angularjs_DefinitelyTyped TypeScript libraries in the Settings (Settings / Language & Frameworks / JavaScript / Libraries -> Download... -> TypeScript community stubs).
That is how IntelliJ supports Type definitions for JavaScript projects. For TypeScript projects you need to include + reference the .d.ts files manually. TIP: create a vendor.d.ts file or use TSD : https://github.com/DefinitelyTyped/tsd/ it will create a reference tsd.d.ts file for you for all your imports
I'm started to learn Free Pascal and stick to the simple yet important question: is it possible to create project in console Free Pascal IDE?
How could I compile two units into one program?
I've searched over Internet, but all links leads to the Lazarus, which is not the same thing as Free Pascal IDE...
My best clue would be is to use Makefiles, but as far as I can see, information on this is also very-very limited.
So how create and compile multi-unit Pascal programs in Free Pascal IDE then?
The textmode IDE has no project concept where a list of files is kept, OR any external build system.
Basically the autobuild capability of the compiler (that is built-in) is utilized, so pressing compile or build on the mainmodule(program) will compile the whole lot.
The main module can be set in compiler->primary file, so that compile will also work from non main modules.
However it is possible to have local IDE settings (primary file, directories, defines), by copying all fp.(cfg|dsk|ini) files from the FPC directory to your project dir, and then customizing them (from within the IDE).
One could regard the combination of a set of config files + a directory for the mainmodule as a project or solution.