IntelliJ constants.getProperty() autocomplete field - intellij-idea

I have a large constants.properties file.
When reading properties from it with constants.getProperty("PROPERTY_NAME") I often have to copy/paste the property names which is rather long.
I see that IntelliJ is able to detect when properties are used inside the code, is it be possible to have auto-completion of property names when I type the name in getProperty()?

Yes, IntelliJ IDEA provides the completion for the Java Properties, use Ctrl+Space to get the hints:

Related

How to suppress warnings regarding naming conventions?

For one of my enum classes I'd like to use non-standard naming:
enum class MyEnum {
I_like_to_use,
This_strange_naming_here
}
The IDE (and code inspection) rightfully complains with:
Enum entry name 'This_strange_naming_here' doesn't match regex '[A-Z]([A-Za-z\d]*|[A-Z_\d]*)'.
This inspection reports enum entry named that do not follow the recommended naming conventions.
However in this case, I would like to actively suppress this warning. I tried with #Suppress("naming"), but to no avail.
For Kotlin/Java add
#Suppress("LocalVariableName", "PropertyName")
above the class name to suppress naming conventions warnings for global and local variables.
#Suppress("EnumEntryName") use these
Please see Suppress inspections. You are not supposed to type it by hand.
Use Alt+Enter to invoke the pop-up menu for the light bulb, select the inspection or the suggested quick fix from the drop-down menu, press the right arrow on the keyboard to open the sub-menu on the right, choose the Suppress option.

IntelliJ IDEA 2017.1 shows "var" instead of actual type

After upgrading to IntelliJ IDEA 2017.1 variables now do not show their types. Instead, it shows var. Also, it abbreviates some method calls. For example instead me.getIdAsStr() it shows me.idAsStr. How to revert to the old behavior?
This behavior is caused by the Advanced Java Folding plug-in. Either disable the plug-in or change its setting to not fold certain code elements.
To disable showing val/var instead of variable type
go to Settings | Editor | General | Code Folding
and UnCheck Variable Declaration
And just next to it
Uncheck Getters and setters
to start showing getter Setter method calls with full method name

create field in typescript intellij 14.1.2 ultimate from usage

Coming from Eclipse, I like to use a field first (for example) this.fieldname = "value", and then quick fix (control-1) the field declaration into existence without having to type it myself. It would create "private String fieldname;" for example in my class file.
In intellij I thought the same thing was possible across its editors, but I am not able to alt-enter or control space the field into existence. How do I accomplish this? This is for Typescript in Intellij Ultimate. I have enabled the TypeScript compiler per the banner popup.

How place getter/setter methods at the bottom of a class definition in intellij

I use the Generate function in the context menu to create my getter and setter methods. But there seems no way to tell Intellij to place the generated methods after the last method in the file ie at the bottom of the class definition. This is possible in Eclipse. Anybody know how to do it automatically in Intellij?
First of all a little hint. IntelliJ is designed to use without a mouse, so I prefer using the keyboard-shortcut Alt + Insert for code generating.
I don't know any possibility to generally define the place for inserting generated code. I recommend to place the cursor there, where you want to insert generated code and then generate it.
If you want to generate getters and setters via Generate menu, the only way is to place cursor at the bottom of your class (or wherever you want them to be)
But if your field is not used yet, there is another option: navigate to the field you need getter/setter for, press Alt+Enter (it calls intentions dialog) and choose "generate getter and setter" option. Then getter and setter will be generated at the bottom of the class (but not below inner classes if any).
settings > code style > java > arrangement
lets you customize the auto formatting options

.NET - Find all references of property assignment

I am using VB.NET. In Visual Studio, if I right-click a property name and click "Find All References", it searches for all instances of the property being used.
However, a property is always used either for assignment (Set method) or retrieval (Get method). Is there any way of searching for only one of these uses? e.g. search for all uses of the property in code where it is being assigned a value, not when the value is being retrieved.
Use the compiler to turn what you want to find into errors. Remove the setter to find all the places were it was going to be used.
With Resharper, if you simply use the "Find Results" tool, and then there is a filter icon in the results window. You can then limit the results to only "Show Write Usages".
You can also use Reflector to browse through your assembly.
Resharper (MSVS addin) has the exact feature you are looking for.
Check:
ReSharper.FindUsages
or
ReSharper.FindUsagesAdvanced
in keyboard shortcuts mapping (Tools -> Options -> Keyboard) to find out what shortcut is used.