idea/android.git
2 hours agoIDEA-251207 Set of plugins cannot be unloaded because of IconLoader master
Vladimir Krivosheev [Tue, 22 Sep 2020 18:07:48 +0000 (20:07 +0200)]
IDEA-251207 Set of plugins cannot be unloaded because of IconLoader

GitOrigin-RevId: 441b875462f12fe0d20d3830181e6280e3b829ba

2 hours agoregenerate android icons
Vladimir Krivosheev [Wed, 23 Sep 2020 14:05:34 +0000 (16:05 +0200)]
regenerate android icons

GitOrigin-RevId: 399cb69d219f9e2ba18ca6b9fc964e8e27d31aa6

2 hours agoremove outdated android@2x.png file
Vladimir Krivosheev [Wed, 23 Sep 2020 05:59:20 +0000 (07:59 +0200)]
remove outdated android@2x.png file

GitOrigin-RevId: af0e0e2376d4f917907a1a1c7ec1e861da5d74c6

2 hours agocleanup (don't use deprecated method: scale -> scaleIcon)
Vladimir Krivosheev [Wed, 23 Sep 2020 05:21:20 +0000 (07:21 +0200)]
cleanup (don't use deprecated method: scale -> scaleIcon)

GitOrigin-RevId: d67bf091a1fbf601d7dfa3df376815f7821bbbe3

3 hours agounify some "Results might be incomplete during indexing" messages, fix grammar in...
Peter Gromov [Thu, 24 Sep 2020 14:03:38 +0000 (16:03 +0200)]
unify some "Results might be incomplete during indexing" messages, fix grammar in related places

GitOrigin-RevId: f4f31dcadaf1945f950fe267e3def63ca623464c

24 hours agoIDEA-249422: Android: make descriptors non-empty to enable dynamic unloading of layou...
Andrei Kuznetsov [Wed, 23 Sep 2020 15:37:08 +0000 (18:37 +0300)]
IDEA-249422: Android: make descriptors non-empty to enable dynamic unloading of layoutlib-native/standard plugins

When descriptor is empty, com.intellij.ide.plugins.cl.PluginClassLoader.detachParent never invoked for android plugin, and classloader for layoutlib-xxx leaks, preventing layoutlib-xxx plugin from being unloaded

GitOrigin-RevId: ae5361439c1c1335ae9682b5ddfef2b39092495f

2 days agoremove incorrect icon file `tutorialIndiator_dark@2x.png` — not used (typo in the...
Vladimir Krivosheev [Tue, 22 Sep 2020 08:36:48 +0000 (10:36 +0200)]
remove incorrect icon file `tutorialIndiator_dark@2x.png` — not used (typo in the name), do not use file name convention `_dark@2x` — use IJ convention instead (should be `@2x_dark`)

GitOrigin-RevId: 93cc27abf51709e2d178036da330f2308f9dc8fd

3 days agoicon cache using db instead of using module jar
Vladimir Krivosheev [Sat, 8 Aug 2020 07:37:27 +0000 (09:37 +0200)]
icon cache using db instead of using module jar

GitOrigin-RevId: 98995cafb9f72017dd71715052c685ba70c01646

3 days agoplatform.core.impl — remove dependency on intellij.platform.util.ui and intellij...
Vladimir Krivosheev [Tue, 15 Sep 2020 14:41:21 +0000 (16:41 +0200)]
platform.core.impl — remove dependency on intellij.platform.util.ui and intellij.platform.core.ui
java.psi.iml — remove dependency on intellij.platform.core.ui

GitOrigin-RevId: c1d4feb04c0471c7d17b5331b86738ee54a97f80

5 days agoWorkaround for java.lang.IllegalAccessError: class XXX tried to access protected...
Andrei Kuznetsov [Thu, 17 Sep 2020 15:04:25 +0000 (18:04 +0300)]
Workaround for java.lang.IllegalAccessError: class XXX tried to access protected field YYY

com.android.tools.idea.gradle.structure.configurables.variables.VariablesTable$NameCellEditor tried to access protected field javax.swing.JTable.selectionBackground

GitOrigin-RevId: 2442484e46a9ec44194760a8d2021dc99ae6b2e9

5 days agofix the new Kotlin NPE exception in test (it's now normalized in 1.4)
Eugene Petrenko [Wed, 16 Sep 2020 15:12:35 +0000 (17:12 +0200)]
fix the new Kotlin NPE exception in test (it's now normalized in 1.4)

GitOrigin-RevId: ffe28dd702db6017404b283621bed351e00720c3

5 days agofix type inference shange to Kotlin 1.4.0 (works ok without the change with Kotlin...
Eugene Petrenko [Wed, 16 Sep 2020 12:40:56 +0000 (14:40 +0200)]
fix type inference shange to Kotlin 1.4.0 (works ok without the change with Kotlin 1.4.10)

GitOrigin-RevId: 18987f1079ba12dd82e88de29127e52fdeff2d92

5 days agoThere is no difference in the generated Kotlin bytecode for 1.8 and 11
Eugene Petrenko [Tue, 15 Sep 2020 16:22:15 +0000 (18:22 +0200)]
There is no difference in the generated Kotlin bytecode for 1.8 and 11

also Revert "switch fleet Kotlin settings to yield JVM 11 bytecode"

This reverts commit 19bef8401ed6d6e2e55e52b3c6322fc10ba7385a.

GitOrigin-RevId: 73e0aa08ce5a4dfd55ff2fc716bddaff71d0e431

5 days agomake project compile with Kotlin 1.4
Eugene Petrenko [Tue, 15 Sep 2020 15:23:15 +0000 (17:23 +0200)]
make project compile with Kotlin 1.4

GitOrigin-RevId: d2ded397381541d8967535608c49b6cd00e8c9f4

5 days agoallow Kotlin 1.4 language version, target to 11 version of bytecode
Eugene Petrenko [Tue, 15 Sep 2020 12:59:46 +0000 (14:59 +0200)]
allow Kotlin 1.4 language version, target to 11 version of bytecode

GitOrigin-RevId: c04b9a30772988ffeb84f4c53b9610fe17cc33a5

5 days agodeprecate useless constructor
Sergey Malenkov [Fri, 18 Sep 2020 13:29:35 +0000 (16:29 +0300)]
deprecate useless constructor

GitOrigin-RevId: e8f5bd648db008b5c6a1c39f719212c23d624895

5 days agoAndroid: Fix race condition in NelePropertiesModelTest.testPropertyValuesChangedEvent...
Andrei Kuznetsov [Thu, 17 Sep 2020 21:43:41 +0000 (00:43 +0300)]
Android: Fix race condition in NelePropertiesModelTest.testPropertyValuesChangedEventAfterModelChange

GitOrigin-RevId: 4946997bb2f412683e0dc0dfe6e48aef27392cca

5 days agoAndroid: Fix expected type in test: ArrayIndexOutOfBoundsException > IndexOutOfBounds...
Andrei Kuznetsov [Thu, 17 Sep 2020 20:42:40 +0000 (23:42 +0300)]
Android: Fix expected type in test: ArrayIndexOutOfBoundsException > IndexOutOfBoundsException

GitOrigin-RevId: a6d035bd87e975a5c2984818cb2b98764ad6c219

6 days agoIDEA-250924: Android: Make ProjectLightResourceClassService lazy (don't do heavy...
Andrei Kuznetsov [Fri, 18 Sep 2020 11:09:26 +0000 (14:09 +0300)]
IDEA-250924: Android: Make ProjectLightResourceClassService lazy (don't do heavy operations in rootsChanged event)

GitOrigin-RevId: 18113160ca8dbb0cde7513ccaeb5bad2965f174a

6 days agoAndroid: remove PerformanceWatcher - make log more clean
Andrei Kuznetsov [Tue, 15 Sep 2020 08:34:54 +0000 (11:34 +0300)]
Android: remove PerformanceWatcher - make log more clean

PerformanceWatcher was introduced in IDEA-216052 (25-seconds freeze) to check with the user how fast this method works for their project (we could not reproduce the problem on our side). Now the problem seems to be resolved, and the watcher is not needed anymore.

GitOrigin-RevId: 3535a7f575b6ff001ed261e721b6a58cc37eb085

6 days agoAndroid: replace `ExecutorService.submit()` with `Executor.execute()` when execution...
Andrei Kuznetsov [Thu, 10 Sep 2020 19:29:19 +0000 (22:29 +0300)]
Android: replace `ExecutorService.submit()` with `Executor.execute()` when execution result is not needed

This is mostly to make sure that exceptions are not swallowed and logged properly. E.g. see IDEA-248474: using `submit` instead of `execute` resulted in `AssertionError` (method should be executed from EDT) not to be logged (future result containing an exception has been ignored).

GitOrigin-RevId: 6e8f2038ac53b1218575b4a2f3fb574307d4b75b

6 days agointroduce utility methods to show popup menus
Sergey Malenkov [Fri, 18 Sep 2020 09:21:45 +0000 (12:21 +0300)]
introduce utility methods to show popup menus

GitOrigin-RevId: 06cb1c574143ccf431307e3f23366d7e8ac239b5

8 days agorm CodeStyleSettings dependency on platform.ide
Petr Golubev [Mon, 14 Sep 2020 14:43:56 +0000 (17:43 +0300)]
rm CodeStyleSettings dependency on platform.ide

GitOrigin-RevId: f318a3337f54760e31053fa003fd7cacd192c740

9 days ago[external system] move ExternalStorageConfigurationManagerImpl to externalSystem... 203.3645 pycharm/203.3645.40
Nikolay Chashnikov [Mon, 14 Sep 2020 16:03:52 +0000 (19:03 +0300)]
[external system] move ExternalStorageConfigurationManagerImpl to externalSystem.impl module

GitOrigin-RevId: e0184e3defb69950ce21922539b883f2607436b6

10 days agocleanup: notnull and fix Processor type parameter types
Alexey Kudravtsev [Fri, 11 Sep 2020 14:39:04 +0000 (16:39 +0200)]
cleanup: notnull and fix Processor type parameter types

GitOrigin-RevId: 694f1cf4f8b2602e5a0e199c92490e68ec303c1b

13 days agoi18n: JUnit (fix consequences in mocha) (IDEA-249456)
Vitaliy.Bibaev [Fri, 11 Sep 2020 07:07:33 +0000 (14:07 +0700)]
i18n: JUnit (fix consequences in mocha) (IDEA-249456)

GitOrigin-RevId: 42b4e49faa74efdd77f0010446b68a552d0baf25

13 days agosupport dynamic message bundles inside JPS build process (IDEA-240279)
Eugene Zhuravlev [Fri, 11 Sep 2020 06:16:08 +0000 (08:16 +0200)]
support dynamic message bundles inside JPS build process (IDEA-240279)

GitOrigin-RevId: 13b9d19489baf62c4e8f921d7c7077583a302db4

2 weeks agoIDEA-246051: enable android tools menu in non-android projects if android SDK is...
Andrei Kuznetsov [Thu, 10 Sep 2020 13:14:25 +0000 (16:14 +0300)]
IDEA-246051: enable android tools menu in non-android projects if android SDK is configured

For example, to enable react-native developers to use AVD Manager

GitOrigin-RevId: a1cc238bff57fae5b07ba701a5b09f345d9502fb

2 weeks agoAndroid: Fix leaking project in tests (KeystoreStepTest, Android Plugin Tests / 8)
Andrei Kuznetsov [Wed, 9 Sep 2020 20:20:12 +0000 (23:20 +0300)]
Android: Fix leaking project in tests (KeystoreStepTest, Android Plugin Tests / 8)

GitOrigin-RevId: a4a17719bc1aa09e76ffc67bd8f363ef410349d2

2 weeks agoAndroid: Fix leaking project in tests (KeystoreStepTest, Android Plugin Tests / 8)
Andrei Kuznetsov [Wed, 9 Sep 2020 18:20:05 +0000 (21:20 +0300)]
Android: Fix leaking project in tests (KeystoreStepTest, Android Plugin Tests / 8)

GitOrigin-RevId: 06f51d3e2ad9affdae54bda277abc9d3736bd198

2 weeks ago[android] Fixed bombed test because of the change implementation of `IdeModifiableMod...
Mikhail Mazurkevich [Wed, 9 Sep 2020 14:14:20 +0000 (17:14 +0300)]
[android] Fixed bombed test because of the change implementation of `IdeModifiableModelsProviderImpl`

New implementation of `IdeModifiableModelsProviderImpl` relates to the new project model. To avoid a huge memory
footprint it uses a single instance of `WorkspaceEntityStorageBuilder`. In this test, the storage builder was
created right after the module "app" creation (before `ModifiableFacetModel` object instantiation). Thus
`IdeModifiableModelsProviderImpl` didn't contain any information about any further created modules and facets.
To fix it modules and facets creation were split into the two independent steps. Facets create right after all
modules created.

GitOrigin-RevId: 950c316fc70a87f557d389621cf21a8666929f4d

2 weeks agooptimize imports
Dmitry Batkovich [Tue, 8 Sep 2020 07:57:00 +0000 (10:57 +0300)]
optimize imports

GitOrigin-RevId: 2cb4f65b83b4fd77162821599bc3fb3e9e102cb3

2 weeks agoFormatting
Elena.Korotkova [Mon, 7 Sep 2020 13:49:13 +0000 (16:49 +0300)]
Formatting
IDEA-CR-66607

GitOrigin-RevId: 82713acec2c13155e1fb9d649c0c811d2d46cf0d

2 weeks agoNotNulls
Elena.Korotkova [Mon, 7 Sep 2020 08:20:16 +0000 (11:20 +0300)]
NotNulls
Simplifying vcs status bar widget default enablement condition
Hiding action when there is no project or repo available. Renaming VcsQuickActionsToolbarPopup,cleaning string properties
IDEA-CR-66607

GitOrigin-RevId: 660bd7828d814103c8e1f36ea26f63e9376a47ff

2 weeks agoIDEA-249742 internalization. Mark DocumentationProvider methods as @NlsSafe.
alexey.afanasiev [Fri, 4 Sep 2020 20:16:17 +0000 (23:16 +0300)]
IDEA-249742 internalization. Mark DocumentationProvider methods as @NlsSafe.

GitOrigin-RevId: f69bff5c9da899e8848a8dadde0c79c8fb4eda69

2 weeks ago[ui] show paths with system-dependent separators in UI
Nikolay Chashnikov [Fri, 4 Sep 2020 09:06:10 +0000 (12:06 +0300)]
[ui] show paths with system-dependent separators in UI

GitOrigin-RevId: 350b39309f85d1912e31e80064a9b8919f3e89b4

3 weeks ago[android] use Java 6 as target platform for Kotlin classes in gradle tooling modules
Nikolay Chashnikov [Thu, 3 Sep 2020 13:19:54 +0000 (16:19 +0300)]
[android] use Java 6 as target platform for Kotlin classes in gradle tooling modules

Since d8e82276d7 these modules use language level Java 7 to be compatible with JVM 7, but Kotlin classes were compiled with default project JVM target Java 8 so their class-files were incompatible with Java 7. Now we have Kotlin facets in these modules and specify target platform "JVM 1.6" in them (there is no option to use JVM 1.7).

GitOrigin-RevId: 404a97b7d21cf0463553a7d1a18b13495c2e1bef

3 weeks ago[openapi] IDEA-248714 - html link in Project Structure -> Problems
Nikita Eshkeev [Tue, 1 Sep 2020 19:53:57 +0000 (22:53 +0300)]
[openapi] IDEA-248714 - html link in Project Structure -> Problems

Both ProjectStructureProblemDescription#getDescription and ConfigurationError#getDescription used to return a string with caused problems with escaped html characters that can be converted multiple times and hence appear not as html tags on panes but as strings with extra symbols. In order to overcome these problems this patch changed the return type of the methods to HtmlChunk to provide the type safety when working with html tags.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: 277c8b44606159db7dc9e5101f3638eeb3bab541

3 weeks agoIDEA-247946: Android: add `intellij.android.jps.model` to JPS build process instead...
Andrei Kuznetsov [Tue, 1 Sep 2020 20:25:55 +0000 (23:25 +0300)]
IDEA-247946: Android: add `intellij.android.jps.model` to JPS build process instead of `intellij.android.common`

GitOrigin-RevId: ae67d4ef7fca5dfffdbc559c19882e67bb0e4cc8

3 weeks agoIDEA-247946:Android: move classes shared between the IDE and JPS build process to...
Andrei Kuznetsov [Tue, 1 Sep 2020 16:27:39 +0000 (19:27 +0300)]
IDEA-247946:Android: move classes shared between the IDE and JPS build process to new module intellij.android.jps.model

GitOrigin-RevId: 2a90a5566bf703b8a2e76043b444940515306e2c

3 weeks agoIDEA-247946: remove dependency `intellij.android.buildCommon` > `intellij.android...
Andrei Kuznetsov [Tue, 11 Aug 2020 15:39:59 +0000 (18:39 +0300)]
IDEA-247946: remove dependency `intellij.android.buildCommon` > `intellij.android.common`

`android.buildCommon` is used in the JPS build process. `android.common` has a lot of dependencies which are not available in JPS (available in the IDE only). In order to avoid potential NoClassDefFoundError, just replace `BufferingFileWrapper` with `FileWrapper` and remove the dependency. There is no performance penalty for this change, because `ProjectProperties.parsePropertyFile` will wrap the `InputStream` with the `BufferedReader`, so we just removed double-buffering (which is good in 3D games, but often useless when reading files)

GitOrigin-RevId: 3367e4ff689e5422f37fcacf0f22e5dddfd03983

3 weeks ago[jps model] cleanup: remove code which implements save for JPS model
Nikolay Chashnikov [Tue, 1 Sep 2020 17:42:21 +0000 (20:42 +0300)]
[jps model] cleanup: remove code which implements save for JPS model

JpsModel is used inside the build process (except small part related to custom source root types which is also used inside IDE) and the build process doesn't save the project configuration. And we don't have plans to use JpsModel inside the IDE process anymore (the new workspace model is used instead), so it makes no sense to maintain that code.

GitOrigin-RevId: 9cfa7ccc86756550ccf8d54d03e3e267fdd5933f

3 weeks agoMove annotations to com.intellij.util.concurrency.annotations package (LAB-50)
Marat Khabibullin [Tue, 1 Sep 2020 10:40:12 +0000 (13:40 +0300)]
Move annotations to com.intellij.util.concurrency.annotations package (LAB-50)

GitOrigin-RevId: 3b357a605a45d3d15a148aca2ce7bcf1d560590d

3 weeks agoRename threading annotations (LAB-50)
Marat Khabibullin [Fri, 21 Aug 2020 15:30:24 +0000 (18:30 +0300)]
Rename threading annotations (LAB-50)

GitOrigin-RevId: 3c73092f1880b8518804a62ebe3f150a9380add2

3 weeks ago[i18n] idea-ui - use messagePointer for fields
Nikita Eshkeev [Mon, 31 Aug 2020 15:03:30 +0000 (18:03 +0300)]
[i18n] idea-ui - use messagePointer for fields

Since application level services are singletons and live forever their nls fields cannot have constants, because if a user switches the locale these values don't get updated. This patch makes such fields messagePointers so every getter call will read the message from the active localization bundle regardless if the user changed locale or not

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: 5a015adc891dfa86283aec1f7975d3fcb46fd043

3 weeks agomake android tests green on windows
Alexander Bubenchikov [Mon, 31 Aug 2020 14:13:07 +0000 (17:13 +0300)]
make android tests green on windows

GitOrigin-RevId: d5854c6ffff507d807293bb43d984abe1e00a643

3 weeks agoIDEA-248474: Android: revert diamond (need to cherry-pick to 202)
Andrei Kuznetsov [Fri, 28 Aug 2020 15:27:03 +0000 (18:27 +0300)]
IDEA-248474: Android: revert diamond (need to cherry-pick to 202)

Java8 can't infer type arguments: '<>' with anonymous inner classes is not supported

GitOrigin-RevId: 4ea70e55c603b7660397fdcfa4fc33c7843f55b1

3 weeks agoIDEA-248474: Debug Window Unavailable via Run > Attach Debugger to Android Process 203.2986
Andrei Kuznetsov [Thu, 27 Aug 2020 22:02:51 +0000 (01:02 +0300)]
IDEA-248474: Debug Window Unavailable via Run > Attach Debugger to Android Process

`ProgramRunnerUtil.executeConfiguration[Async]` should be invoked on EDT with IW lock, because it will open debug toolwindow. ToolwindowManager needs EDT to perform manipulations with toolwindows.

Also make sure that `ExecutorService#execute` is used instead of `ExecutorService#submit` when possible, because `execute` will log exceptions, `submit` will not (client should  handle future result be it some value or an exception).

GitOrigin-RevId: 7c993cb587db00aab1ada1003dbaf2c3e102496f

3 weeks agoAdd LICENSE.txt to android-plugin repository (Apache License version 2.0)
Andrei Kuznetsov [Thu, 27 Aug 2020 19:26:11 +0000 (22:26 +0300)]
Add LICENSE.txt to android-plugin repository (Apache License version 2.0)

The code has already been distributed under Apache 2.0 license. With the explicit LICENSE.txt this fact is made more evident.

GitOrigin-RevId: 913a6c5a0294bf6b21f13a33bfcd4e144a1aead5

4 weeks agoIDEA-248934: Android: missing 'Resource Manager' toolwindow
Andrei Kuznetsov [Thu, 27 Aug 2020 11:47:12 +0000 (14:47 +0300)]
IDEA-248934: Android: missing 'Resource Manager' toolwindow

Convert 'Resource Manager' toolwindow to facet-dependent toolwindow to make it available when android facet is added (`shouldBeAvailable` invoked only once during ToolwindowManager initialization)

Also fix warning in plugin descriptor: Plugins developed as a part of IntelliJ IDEA project shouldn't specify generic plugin url

GitOrigin-RevId: 5f2a752070a95bb9567bdd8eab0cfd70f9222e68

4 weeks ago[jps build] i18n: internationalize messages in jps.build module (IDEA-240279)
Nikolay Chashnikov [Wed, 26 Aug 2020 15:05:55 +0000 (18:05 +0300)]
[jps build] i18n: internationalize messages in jps.build module (IDEA-240279)

GitOrigin-RevId: 37b71c9cd58add722c1aab9895d34facd3065088

4 weeks ago[i18n] idea-ui - remove nls annotations from overridden methods
Nikita Eshkeev [Tue, 25 Aug 2020 19:36:22 +0000 (22:36 +0300)]
[i18n] idea-ui - remove nls annotations from overridden methods

This patch removes the nls related annotations from overridden methods that were automatically generated as per the code review.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: 9afd924260b791548698fdb917e7a383f385a03a

4 weeks ago[i18n] idea-ui
Nikita Eshkeev [Mon, 24 Aug 2020 16:01:23 +0000 (19:01 +0300)]
[i18n] idea-ui

This patch fixes the notes from the review for ProjectLayoutPanel, it replaces the string concatenations in the NLS context with proper properties.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: e1781eb13a60bfcacc1cd35c5c61bb74d213fd71

4 weeks ago[Workspace Model] Add bomb for facet test
Alex Plate [Mon, 24 Aug 2020 10:07:12 +0000 (13:07 +0300)]
[Workspace Model] Add bomb for facet test

GitOrigin-RevId: 6d6e5bf77bf9558d4892a19b237a6281dd5f1fa0

4 weeks agoIDEA-244848: delete duplicated groups
Anastasia Ivanova [Fri, 21 Aug 2020 17:30:18 +0000 (19:30 +0200)]
IDEA-244848: delete duplicated groups

GitOrigin-RevId: a1db38429fb67e4991bc24efd8fec04a1e6bd138

4 weeks agomark notnull array elements to diagnose EA-235908 - IAE: GenericsHighlightUtil.$...
Alexey Kudravtsev [Fri, 21 Aug 2020 21:52:06 +0000 (00:52 +0300)]
mark notnull array elements to diagnose EA-235908 - IAE: GenericsHighlightUtil.$$$reportNull$$$

GitOrigin-RevId: a5e3768e6d0a99a0bd0ee1296c131a4877bc5968

4 weeks agocleanup: wildcardize functional interface usages for more exact types in platform
Alexey Kudravtsev [Wed, 19 Aug 2020 18:30:06 +0000 (21:30 +0300)]
cleanup: wildcardize functional interface usages for more exact types in platform

GitOrigin-RevId: 3af0bb041f43c386bf0b79f3549f5f8881bb85d0

4 weeks agoWEB-46940 I18n: introduce PresentableEnum and cleanup some of code style settings...
Piotr Tomiak [Fri, 21 Aug 2020 12:00:36 +0000 (14:00 +0200)]
WEB-46940 I18n: introduce PresentableEnum and cleanup some of code style settings rendering.

GitOrigin-RevId: 2ea3d77ea1a415082f0693acfd2b86631d8bd23a

4 weeks agojps-javac-extension project extracted
Eugene Zhuravlev [Fri, 21 Aug 2020 12:39:59 +0000 (14:39 +0200)]
jps-javac-extension project extracted

GitOrigin-RevId: e88bcbe562fa67445996dc5e59d535293e7969db

4 weeks agoIDEA-248591 I18n: XML plugins
Piotr Tomiak [Thu, 20 Aug 2020 18:34:03 +0000 (20:34 +0200)]
IDEA-248591 I18n: XML plugins

GitOrigin-RevId: c3bbd04c0b1f9cee1cb21a8689a758d0c2dfe91c

4 weeks agoIDEA-248591 I18n: cleanup key names in XML Analysis Bundle
Piotr Tomiak [Thu, 20 Aug 2020 10:58:40 +0000 (12:58 +0200)]
IDEA-248591 I18n: cleanup key names in XML Analysis Bundle

GitOrigin-RevId: 29e900def0246774f13b493966f52cc246a49b0f

5 weeks ago[java] i18n
Tagir Valeev [Thu, 20 Aug 2020 07:36:58 +0000 (14:36 +0700)]
[java] i18n

GitOrigin-RevId: a192ba05b86da2fb7fe64f08ac30f5d4e18a229a

5 weeks ago[android] use read action to access ProjectJdkTable (IDEA-222480)
Nikolay Chashnikov [Wed, 19 Aug 2020 11:27:11 +0000 (14:27 +0300)]
[android] use read action to access ProjectJdkTable (IDEA-222480)

ProjectJdkTable is a service, and it invokes runReadAction in his loadState. Since state is loaded under lock on the service class, it leads to deadlock if one thread tries to get instance of the service under write action, and another under no lock at all.

Anyway ProjectJdkTable::getSdksOfType should be called under read action to avoid concurrency problems.

GitOrigin-RevId: c2000f5fb8d5519805852abba0745e6b82fb7874

5 weeks agoIJ-CR-2748: [android] use 1.7 language level to compile classes used inside Gradle...
Vladislav.Soroka [Tue, 18 Aug 2020 12:07:37 +0000 (15:07 +0300)]
IJ-CR-2748: [android] use 1.7 language level to compile classes used inside Gradle process IDEA-248251

(cherry picked from commit 15d79ee85b4d78eeb03f857a4545ca1313854723)

GitOrigin-RevId: d8e82276d7e8d51e4a30696c71ce30650171d5a5

5 weeks agoIDEA-244848 get rid of notificationAllowlist
Anastasia Ivanova [Tue, 11 Aug 2020 15:01:50 +0000 (17:01 +0200)]
IDEA-244848 get rid of notificationAllowlist

GitOrigin-RevId: b867ba1c960df3d667fa262b6a95c82a6163e65e

5 weeks agoRevert "IDEA-CR-65973: IDEA-244848 add missing isLogByDefault flags"
Dmitriy.Panov [Fri, 14 Aug 2020 22:02:43 +0000 (01:02 +0300)]
Revert "IDEA-CR-65973: IDEA-244848 add missing isLogByDefault flags"

This reverts commit 00bd951f

Revert "IDEA-CR-65973: IDEA-244848 store notificationIds only for jb plugins, clean notificationIds"

This reverts commit d41ad479

Revert "IDEA-CR-65973: IDEA-244848 add NotNull and buildAndNotify in NotificationBuilder"

This reverts commit 0adf7682

Revert "IDEA-CR-65973: IDEA-244848 support NotificationGroupEP in devkit"

This reverts commit f9fddec5

Revert "IDEA-CR-65973: IDEA-244848 deprecate notification.group and notification.parentGroup"

This reverts commit 4220a37a

Revert "IDEA-CR-65973: IDEA-244848 get rid of notificationAllowlist"

This reverts commit e46fe5f0

Revert "IDEA-CR-65973: IDEA-244848 Register notification groups in plugin.xml"

This reverts commit d6f195d4

GitOrigin-RevId: f96347a5e55ab8c3c7ada9bd97b7b97cfa77bdd7

5 weeks agoIDEA-246198 Adjusted platform usages and implementations of FormattingModelBuilder
Alexandr Evstigneev [Tue, 21 Jul 2020 04:53:50 +0000 (07:53 +0300)]
IDEA-246198 Adjusted platform usages and implementations of FormattingModelBuilder

IDEA-CR-65283

GitOrigin-RevId: d06605b0187959f9e36150054a1a5c043a816338

5 weeks agoIDEA-CR-65973: IDEA-244848 get rid of notificationAllowlist
Anastasia Ivanova [Tue, 11 Aug 2020 15:01:50 +0000 (17:01 +0200)]
IDEA-CR-65973: IDEA-244848 get rid of notificationAllowlist

GitOrigin-RevId: e46fe5f0e6c6729c4d5ae854f4a5b6cfd6b6af08

5 weeks ago[i18n] idea-ui
Nikita Eshkeev [Thu, 13 Aug 2020 23:52:46 +0000 (02:52 +0300)]
[i18n] idea-ui

This patch replaces hard coded strings with i18n properties in idea-ui and in some other modules that implement interfaces and extend classes from the idea-ui module

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: 6b280b485e30b5d47b8803205b0ebbafe4319daf

6 weeks ago[android] migrate to Java 11: update equalsverifier library to 3.4.1
Nikolay Chashnikov [Tue, 11 Aug 2020 11:37:17 +0000 (14:37 +0300)]
[android] migrate to Java 11: update equalsverifier library to 3.4.1

The old version doesn't fully support Java 11 so e.g. SimpleIncludeValueTest failed while loading nested classes compiled by Javac 11.

GitOrigin-RevId: 5a6d273fc31f5a97e01c3878e68b4e8972c4dd1a

6 weeks ago[IntelliJ project configuration] migration to Java 11: explicitly set Java 8 language...
Nikolay Chashnikov [Tue, 11 Aug 2020 10:23:09 +0000 (13:23 +0300)]
[IntelliJ project configuration] migration to Java 11: explicitly set Java 8 language level for intellij.android.common

This module is added to classpath of JPS build process so it should stay on Java 8 (see IDEA-243693) after we migrate IDE modules to Java 11 (IDEA-241075). Currently this module depends on modules available inside IDE process only (see IDEA-247946) so we need to ignore these dependencies in JavaVersionInIntelliJModulesTest.

GitOrigin-RevId: 6e0bf06e233ff3e903a403aefaf2d7d2ceef2c7e

6 weeks ago[android] migration to Java 11: remove @Override annotations from some methods in...
Nikolay Chashnikov [Tue, 16 Jun 2020 12:14:13 +0000 (15:14 +0300)]
[android] migration to Java 11: remove @Override annotations from some methods in RenderSecurityManager

These methods doesn't override method from super-class so we need to remove annotations to make code compilable under JKD 11 (IDEA-241075).

GitOrigin-RevId: 3672a576e9fdc89b03bdffc00564efb2c544457b

6 weeks ago[platform] migration to Java 11: adapt code to changes in Swing API (IDEA-241075)
Nikolay Chashnikov [Tue, 16 Jun 2020 12:12:21 +0000 (15:12 +0300)]
[platform] migration to Java 11: adapt code to changes in Swing API (IDEA-241075)

GitOrigin-RevId: 6ce8f5e200f5dc8f00344d909d1a85721de98a98

6 weeks ago[android] migration to java 11: add explicit dependency on javax.activation library
Nikolay Chashnikov [Mon, 10 Aug 2020 16:25:59 +0000 (19:25 +0300)]
[android] migration to java 11: add explicit dependency on javax.activation library

AndroidBuildProcessParametersProvider refers to javax.activation.DataSource class which isn't included into JDK 11, so we need to add dependency on javax.activation library (it's included into the IDE distribution anyway).

GitOrigin-RevId: 47bce60d59fa6ed7e4e4cbd7293404a6e23e73ed

6 weeks agoproguard/r8 scope enlarger should not produce affect search scope if no proguard...
Dmitry Batkovich [Mon, 10 Aug 2020 07:20:56 +0000 (10:20 +0300)]
proguard/r8 scope enlarger should not produce affect search scope if no proguard/r8 files present in project

GitOrigin-RevId: 0c760119eeaf3a1073434ea029f5cd02ec00d383

6 weeks agoIDEA-239645 i18n: android - "Download location"
Dmitry.Krasilschikov [Sun, 9 Aug 2020 18:20:17 +0000 (21:20 +0300)]
IDEA-239645 i18n: android - "Download location"

GitOrigin-RevId: 442042b43df972229ae91111f6f4a0abd1f6f02d

6 weeks ago[workspace model] IDEA-246697 Fix OOM at external build system project import
Mikhail Mazurkevich [Thu, 30 Jul 2020 16:27:43 +0000 (19:27 +0300)]
[workspace model] IDEA-246697 Fix OOM at external build system project import

The precondition, the project should be opened based on this storage already be filled with project data.
The first problem that during reimport we create a lot of modifiable models with copied storage instead
of reusing one storage build in all modifiable models. To fix it `IdeModifiableModelsProviderImpI` was
rewritten and now, if the new project model enabled it creates modifiable models with a single instance
of the storage builder passed as a parameter.
The second problem of the huge memory consumption was related to the `VersionedEntityStorageOnBuilder`
which creates and caches a copy of the store if any changes were there. Thus we get `ValuesCache` the
full of storages of the different versions (e.g during regular execution of
`ModifiableRootModelBridgeImpl.addModuleOrderEntry` on the same modifiable model). To fix it
`DummyVersionedEntityStorage` was introduced which cache nothing and now modifiable model contains a
boolean flag which tells us if the data in the model should be cached.

GitOrigin-RevId: e54ceec0ec4f3b3fb18b68137580dbd4b070e744

6 weeks ago[i18n] idea-ui
Nikita Eshkeev [Thu, 6 Aug 2020 19:57:26 +0000 (22:57 +0300)]
[i18n] idea-ui

This patch replaces hard coded strings with i18n properties in idea-ui

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: f481ab904b8648a9f0d68d4de91e1f31c01be49f

7 weeks ago[android] Fixing compilation for Kotlin 1.4.0
Nicolay Mitropolsky [Tue, 4 Aug 2020 10:20:23 +0000 (13:20 +0300)]
[android] Fixing compilation for Kotlin 1.4.0

GitOrigin-RevId: 2ab2b5a9770d38d4da546f473671d8893420e0fc

7 weeks agoadd assertion for confusing empty path for allowRootAccess()
Alexey Kudravtsev [Wed, 5 Aug 2020 15:09:16 +0000 (18:09 +0300)]
add assertion for confusing empty path for allowRootAccess()

GitOrigin-RevId: 5b3733ef3b5c27f3a876a469516a08f01460b389

7 weeks agoAndroid: allow remote repositories in tests with gradle in IDEA (but not in Android...
Andrei Kuznetsov [Tue, 4 Aug 2020 17:03:55 +0000 (20:03 +0300)]
Android: allow remote repositories in tests with gradle in IDEA (but not in Android Studio)

This should simplify environment setup. In particular, this will help us not to re-build ZIP with offline m2 repositories when we update kotlin plugin.

GitOrigin-RevId: d0f709feb1ef183450926cabb4cb683a9e1c2a70

7 weeks agowelcome screen: update New Project icons, use General.Add for other places
Nadya Zabrodina [Mon, 27 Jul 2020 11:25:27 +0000 (14:25 +0300)]
welcome screen: update New Project icons, use General.Add for other places

GitOrigin-RevId: 866d7cfb0926259fd705db426c242bdd3ce4132b

7 weeks agoIDEA-247128: cleanup: `extends AnAction implements DumbAware` = `extends DumbAwareAction`
Andrei Kuznetsov [Mon, 3 Aug 2020 15:26:55 +0000 (18:26 +0300)]
IDEA-247128: cleanup: `extends AnAction implements DumbAware` = `extends DumbAwareAction`

GitOrigin-RevId: 91fdc67d5b5125dfa86b098719851a5631e5bb14

7 weeks agoIDEA-246840: Android: Fix missing toolbar in Android NavEditor
Andrei Kuznetsov [Sun, 2 Aug 2020 22:45:45 +0000 (01:45 +0300)]
IDEA-246840: Android: Fix missing toolbar in Android NavEditor

GitOrigin-RevId: 95e5aa7a478fc7fd15cce45da04cd2734156bfe0

7 weeks agoIDEA-247128: Android: Fix missing icons and tooltips in Android Layout editor
Andrei Kuznetsov [Sun, 2 Aug 2020 21:07:55 +0000 (00:07 +0300)]
IDEA-247128: Android: Fix missing icons and tooltips in Android Layout editor

GitOrigin-RevId: 4f498166d9b8362676af180e4e5d821cf46bf238

7 weeks agoIDEA-247241: Android Layout Editor: let dumb aware actions implement DumbAware, not...
Andrei Kuznetsov [Sun, 2 Aug 2020 21:03:11 +0000 (00:03 +0300)]
IDEA-247241: Android Layout Editor: let dumb aware actions implement DumbAware, not simply Presentation.setEnabled(true)

This commit partially reverts this one: "Always enable hide/gear actions in tool windows.  Independent of dumb mode.  Bug: 145309578 Test: Unit test added. Change-Id: Ief3523742740b98cdda2d620ef41fed7195497b4  GitOrigin-RevId: c598d570a566739e84a62adf2a4aa7b1770f46a8". It reverts prod code, but keeps tests.

All the actions manipulating with the workbench layout were made DumbAware, so not only they are enabled, but also they work as intended. So user does not see weird notification like "'Hide' is not available while IDEA is updating indices"

GitOrigin-RevId: b3a2ad62c96175eabe16032dc70b7e0e80a3ffb6

7 weeks agoIDEA-246929: AndroidBuildProcessParametersProvider should not throw NPE if some class...
Andrei Kuznetsov [Fri, 31 Jul 2020 22:32:26 +0000 (01:32 +0300)]
IDEA-246929: AndroidBuildProcessParametersProvider should not throw NPE if some class is available via "jrt://..." url

i.e. when some class is provided by the JVM. Note that in some situations ignoring missing JARs may lead to undesired consequences. E.g. if IDEA runs on Java 11 EA version (and javaee-related classes are available via  jrt://), but JPS process runs on Java 11 stable version (and javaee-related classes should be added from some external jar). Currently we consider this situation to be rare. NPE is bad thing anyway. Replace it with a warning in prod (and throw an error in unit test mode), since we cannot do anything helpful anyway. If jar is missing, but needed then ClassNotFound will be thrown, if it is not even needed (e.g. project does not have android modules) error will not happen at all.

GitOrigin-RevId: 2616c9c898d22d397e97082b269f2a6b39b437af

7 weeks agoRUBY-26840: Android: NPE in AndroidFileChangeListener: `null` is legal value for...
Andrei Kuznetsov [Fri, 31 Jul 2020 16:12:37 +0000 (19:12 +0300)]
RUBY-26840: Android: NPE in AndroidFileChangeListener: `null` is legal value for `VirtualFile.getParent()`

In Ruby's IRB Console `LightVirtualFile` is created and used to interact with a user. It is common that `LightVirtualFile`s report `null` as their parent. Fix `com.android.tools.idea.res.AndroidFileChangeListener.MyVfsListener.onFileOrDirectoryCreated()` to be more LightVirtualFile friendly.

GitOrigin-RevId: f3dd41e95e00488308cef3bad1e677c402468f5c

7 weeks agocleanup
Vladimir Krivosheev [Fri, 31 Jul 2020 16:33:30 +0000 (18:33 +0200)]
cleanup

GitOrigin-RevId: 19cd9cd57f8ccf9b8b29b6734e1ecd618227c06c

7 weeks agouse file.isCaseSensitive() instead of some VirtualFileSystem.isCaseSensitive()/System...
Alexey Kudravtsev [Fri, 31 Jul 2020 15:24:57 +0000 (18:24 +0300)]
use file.isCaseSensitive() instead of some VirtualFileSystem.isCaseSensitive()/SystemInfo.isCaseSensitive to support per-directory case sensitivity

GitOrigin-RevId: d7e7ecbba51a13c13935001238825b3740888458

7 weeks agoCleanup (deprecated `StreamUtil` usages)
Roman Shevchenko [Thu, 30 Jul 2020 21:35:42 +0000 (23:35 +0200)]
Cleanup (deprecated `StreamUtil` usages)

GitOrigin-RevId: 0657baa69d7828818e638edb989baa6bc38172ab

8 weeks agoIDEA-246976 prefer Path
Vladimir Krivosheev [Thu, 30 Jul 2020 15:55:17 +0000 (17:55 +0200)]
IDEA-246976 prefer Path

GitOrigin-RevId: 3e19c4cf7f906b248bfda0f4ffbabe614bbbde36

8 weeks agoremove duplicated code - showOkCancelDialog, showYesNoDialog, prefer MessageDialogBui...
Vladimir Krivosheev [Wed, 29 Jul 2020 11:57:10 +0000 (13:57 +0200)]
remove duplicated code - showOkCancelDialog, showYesNoDialog, prefer MessageDialogBuilder instead of showYesNoDialog (simple variant only for now), use power of named parameters to simplify code and make it more readable

GitOrigin-RevId: 9fe62de62cbaee7d445e6bd941b8cf48a6fb3235

8 weeks agoavoid loading test-only classes in production — extract TestDialogManager service
Vladimir Krivosheev [Wed, 29 Jul 2020 13:40:38 +0000 (15:40 +0200)]
avoid loading test-only classes in production — extract TestDialogManager service

GitOrigin-RevId: 170ea8aeebc77f9ff64cecdb16e3bf4639ff5b9e

8 weeks agourl classloader — avoid dependency on 3rd-party collection lib
Vladimir Krivosheev [Tue, 28 Jul 2020 16:35:52 +0000 (18:35 +0200)]
url classloader — avoid dependency on 3rd-party collection lib

do not export dependency on url class loader module

GitOrigin-RevId: 42c12d0f1b0cdd2c30881aa5f1f83ef693834af6

8 weeks agoAndroid: update test data (fix failing tests after THashMap->HashMap migration) 203.1774 pycharm/203.1774.6
Andrei Kuznetsov [Tue, 28 Jul 2020 18:09:47 +0000 (21:09 +0300)]
Android: update test data (fix failing tests after THashMap->HashMap migration)

Note that default code style in IDEA does not specify order on `xmlns:` attributes. It only says that the order does not change during formatting, and it should be placed before any other attribute.

GitOrigin-RevId: cf03b356eb391bb89104b30168792fd70aa9a67a

8 weeks agoIDEA-231267: Android: use Project JDK as Gradle JVM, and keep JDK in range [8..11]
Andrei Kuznetsov [Mon, 27 Jul 2020 21:52:15 +0000 (00:52 +0300)]
IDEA-231267: Android: use Project JDK as Gradle JVM, and keep JDK in range [8..11]

Don't explicitly specify Gradle JVM when creating project - leave default value (project JDK) and set desired JDK as project JDK. Desired JDK is obtained from IdeSdks.getJdk which provides surely compatible JDK (or null if no such JDK in the project table).

IdeSdks.isJdkCompatible now does not return JDK newer than 11, because Android projects use Gradle 6.1.1 which is not compatible with JDK 14, and the largest LTS supported JDK which works fine with android tools is 11 (newer versions are not heavily tested as of now).

GitOrigin-RevId: a40a83cf923a7a7f7109615d78c79f7024c9f40e

8 weeks agoIDEA-231267: Android: Deduplicate code (Jdks.isApplicableJdk/IdeSdks.isJdkCompatible...
Andrei Kuznetsov [Mon, 27 Jul 2020 12:59:17 +0000 (15:59 +0300)]
IDEA-231267: Android: Deduplicate code (Jdks.isApplicableJdk/IdeSdks.isJdkCompatible). Prefer IdeSdks.isJdkCompatible

`Jdks.isApplicableJdk` and `IdeSdks.isJdkCompatible` are doing the same thing. Just keep one of them - `IdeSdks.isJdkCompatible`.
Note that LangualeLevel in `Jdks.isApplicableJdk(Sdk, LangualeLevel)` was only used to compare it with `Sdk.getJavaSdkVersion.getMaxLanguageLevel`, so it is safe to replace it with `JavaSdkVersion` (JDK of version X supports some language levels up to X inclusive).

Additional efforts might be needed to not suggest SDKs which minLanguageLevel is larger than required LanguageLevel Y. The following commit will partially fix this by limiting upper JDK version.

GitOrigin-RevId: d74d0d82874938d68315ca687a109bf53cc4cb05

8 weeks agoIDEA-231267: Android: Deduplicate code (`Jdks.chooseOrCreateJavaSdk`/`IdeSdks.getJdk...
Andrei Kuznetsov [Sun, 26 Jul 2020 21:32:57 +0000 (00:32 +0300)]
IDEA-231267: Android: Deduplicate code (`Jdks.chooseOrCreateJavaSdk`/`IdeSdks.getJdk()`). Prefer IdeSdks.getJdk()

`Jdks.chooseOrCreateJavaSdk` and `IdeSdks.getJdk()` are doing the same thing. Just keep one of them - `IdeSdks.getJdk()`.
Note that it is not possible to pass instance of IdeSdks to AndroidSdks constructor, because instance of AndroidSdks should be passed to IdeSdks constructor. Break the cycle: AndroidSdks will invoke IdeSdks.getInstance().getJdk() as needed

GitOrigin-RevId: b59ad7e09e255604f955beb84c00da689736b4dd

8 weeks agoIDEA-231267: Android: Deduplicate code (`getJdk`/`getJdkPath` methods behavior made...
Andrei Kuznetsov [Sat, 25 Jul 2020 21:50:10 +0000 (00:50 +0300)]
IDEA-231267: Android: Deduplicate code (`getJdk`/`getJdkPath` methods behavior made more aligned with each other)

Extract code which supposed to do the same things from `getJdk` and `getJdkPath` into new methods: `getExistingJdk` and `createNewJdk`. Now invariant `getJdk().getHomePath() == getJdkPath()` should hold in all the cases, except the situation when `getJdk().getHomePath() == null` for any reason, or `STUDIO_GRADLE_JDK` env variable is set (`getJdk()` does not handle `STUDIO_GRADLE_JDK`, only `getJdkPath()` is aware about this variable).

GitOrigin-RevId: 95d97d16a83979043ab93469b6f26836c95d2919