IntelliJ file excluded from search, how to un-exclude? - intellij-idea

I have somehow managed to exclude my webpack configuration from IntelliJ search results. It also now has a little cross on it as shown below. How do I re-add the content of this file to search results?
I have tried excluding the file from the Project Settings/ Modules/ Excluded files, and then removing it to clear the cache, but it still gets excluded. Thanks!

Please check your .idea/workspace.xml - do you have this .js file listed in <component name="TypeScriptGeneratedFilesManager"> section there, like:
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
<option name="exactExcludedFiles">
<list>
<option value="$PROJECT_DIR$/path/to/webpack.config.js" />
...
</list>
</option>
</component>

Related

How to prevent Idea Intellij to change MODULE_DIR in IML files?

Using Intellij Ultimate 2020.2, in a multi-module Maven project, my IML files use the MODULE_PATH variable, like this:
<component ...>
<option name="directories">
<list>
<option value="$MODULE_DIR$/src/main/java" />
But when I refresh (switch branch, build, etc.) Intellij replaces MODULE_DIR by the reel path, for example:
<component ...>
<option name="directories">
<list>
<option value="C:/somepath/myproject/mywebapp/src/main/java" />
Is there a way to prevent Intellij to change the content?

SonarLint plugin IntelliJ with no authentication

Is it possible to connect to a remote SonarQube 5.6.1 server using the SonarLint 3.0.0 plugin for IntelliJ 2017.1 without using authentication by default? Currently the plugin seems to want either username/password OR token
There is a hack which you can use:
Normally sonarLint stores the information in your IntelliJConfiguration-directory in config/options/sonarlint.xml - you can simply paste following configuration into that file:
<application>
<component name="SonarLintGlobalSettings">
<option name="sonarQubeServers">
<list>
<SonarQubeServer>
<option name="hostUrl" value="<your-server-url>" />
<option name="name" value="test" />
<option name="login" value="" />
<password />
<organizationKey />
</SonarQubeServer>
</list>
</option>
</component>
</application>
which is the basic configuration for a server without authentication.
// EDIT: It seems like this was an intended change by sonarSource to sonarLint - https://groups.google.com/forum/#!topic/sonarlint/xnpQmXN8NEo - is the mailing list discussion about this

Remove a folder if registry entry is not present

I need to remove a folder if a certain folder path in registry doesn't exist. I wrote the below code but it doesn't work. The folder is not deleted and nothing about a condition check in the logs as well.
<Property Id="UPDATERSERVICEFOLDER">
<RegistrySearch Key="SYSTEM\CurrentControlSet\Services\UpdaterService\Parameters" Root="HKLM" Type="raw" Id="UpdateDirectoryRegistrySearch" Name="UpdaterServicePath" />
</Property>
<Component Id="RemoveFolder" Directory="MyProgramDir" Guid="*" >
<RemoveFolder Id="MosquittoInstallDir" On="uninstall"/>
<Condition><![CDATA[UPDATERSERVICEFOLDER]]></Condition>
</Component>
What am I doing wrong here? Any help would be much appreciated.
RemoveFolder won't remove the folder if there is anything in the folder when the component is processed. The issue you probably have is that this component gets processed before all the other components that represent something in that folder are processed or there are files that are not part of your install in this folder.
I don't know if there is a way to force a component to be processed last. An alternative you can try is Util:RemoveFolderEx. It is very important to note the remark at the bottom of this page. What this is basically saying is that you can't use a directory property to define the path to remove; you can't use [MyProgramDir] as the Property. The suggested way to implement the Property for this Util:RemoveFolderEx is to use a registry search to get the correct path then use that property set by the registry search.

"Distribution with sources" feature kills Grails 3 projects in IntelliJ

Create new Gradle 3 project, select all default values. You can test project that is runs. Then, stop the project and open build.gradle file. You will be prompted with a tip
(You can configure Gradle wrapper to use distribution with sources. It will provide IDE with Gradle API/DSL documentation)
Select Ok, apply suggestion
Now you will be unable to compile or run project anymore with the following error:
Error:Cannot compile Groovy files: no Groovy library is defined for module 'untitled1'
Is it possible to restore the project state back to normal?
UPDATE
Some block is absent in broken IPR file:
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="mavenHome" value="D:/Apps/apache-maven-3.2.3" />
</MavenGeneralSettings>
</option>
<option name="importingSettings">
<MavenImportingSettings>
<option name="downloadDocsAutomatically" value="true" />
<option name="downloadSourcesAutomatically" value="true" />
</MavenImportingSettings>
</option>
</component>

In Wix, how can I avoid hardcoding a file source for a file that already exists in the installation directory?

In my .wxs file, I have the following file declaration. This file already exists in the installation directory. It is not being copied from the source directory. I need to update it using util:XmlConfig during the install. The XmlConfig part is working.
<File Id="AppConfig" Name="Dynamics.exe.config" Source="C:\Program Files (x86)\Microsoft Dynamics\GP2010\Dynamics.exe.config" />
The problem is I can't assume the file is always going to exist in that same location. I'd really like to simply reference it like so:
<File Id="AppConfig" Name="[#INSTALLDIR]\Dynamics.exe.config" />
However, that fails with the following message:
> light.exe ....
The system cannot find the file 'SourceDir\....\[#INSTALLDIR]\Dynamics.exe.config'
How can I say "the file already exists in the installation directory, use that file during the installation, and do not validate for it now"?
Directories are available with bracket notation as though they were regular properties. If you don't need to install the Dynamics.exe.config but just access it with XmlConfig elements, you can simply reference that directory and don't need to bother with the File element:
<Component Id="Dynamics.exe.config" KeyPath="yes" Guid="*">
<util:XmlConfig Id="Dynamics.exe.config.XmlConfig1"
On="install"
Action="..."
File="[INSTALLDIR]\Dynamics.exe.config"
...
/>
<util:XmlConfig Id="Dynamics.exe.config.XmlConfig2"
On="install"
Action="..."
File="[INSTALLDIR]\Dynamics.exe.config"
...
/>
</Component>