Commit Graph

618 Commits

Author SHA1 Message Date
Vladimir Koshelev
d6bc46315e [images] re-generate PlatformImagesIcons.java since images doesn't have a package prefix
GitOrigin-RevId: 7a113d36498d968088a044f149faa21fa10f37fb
2024-06-20 10:01:35 +00:00
Vladimir Koshelev
265737f489 [images] platform.images: extract SvgParserDefinition and get rid of xml dependency
GitOrigin-RevId: 18d5caef028c77a362671a489ac4001aa2479eba
2024-06-20 10:01:29 +00:00
Alexander Lobas
89d58ee436 IJPL-150231 Move icon mappings from json to icon generator
GitOrigin-RevId: 4d4576fc7eeb92ec43c36abec2d62d271b45d9a4
2024-06-15 23:19:46 +00:00
Yuriy Artamonov
1016fab2ac [images] IJPL-149620 ImageInfoIndex clinit requests GistManager instance
GitOrigin-RevId: 956f061f2ff35aec61a787bcfc39dd7366470848
2024-05-15 11:48:03 +00:00
Alexey Kudravtsev
ddf9b3da94 assertion: Language constructor must be non-public to avoid creating Language duplicates + test
GitOrigin-RevId: eb6954f444bf64bbc1d47b419af5e4db6fadf07e
2024-04-24 14:06:20 +00:00
Aleksey Pivovarov
a466f0b37f ui: clarify 'Set Background Image' dialog actions behavior
GitOrigin-RevId: 4aee8cf64ad61c5b2f5314192a354567c7307067
2024-03-25 15:19:32 +00:00
Aleksey Pivovarov
8650ff0b12 platform: don't load background image from disk for each IDE frame
GitOrigin-RevId: d72d866f20b9218e1f37425991b8b9eb97b75f9c
2024-03-25 15:19:32 +00:00
Vladimir Kharitonov
e8bab554e1 dispose JSQuery in JCefImageViewer properly
GitOrigin-RevId: a0974489809d90c3f64b87844b13ec7f1489d123
2024-03-04 20:04:11 +00:00
Vladimir Kharitonov
6a26cd0e03 fix deprecation JBCefJSQuery#create warning
GitOrigin-RevId: 2ab8a2f02a8b1734adca17e4bf5dbfa7eafbcd45
2024-03-04 17:36:37 +00:00
Pavel Porvatov
1acf5c4661 Removed unused BaseConfigurableWithChangeSupport
GitOrigin-RevId: fd95b8c08312b6bfc56d5dda9912ed12b0c66288
2024-02-22 20:42:23 +00:00
Gregory.Shrago
d3ea9624e3 avoid AnActionEvent.getRequiredData: platform
Prefer silent exit to throwing an exception.

GitOrigin-RevId: c7086904b7ce3f268379e928c95029ea9fe6aa5e
2024-02-16 03:08:39 +00:00
Elena Shaverdova
542296e2c8 ThumbnailSelectInTarget: IJPL-486 Some options in "Select In" are only available after indexing complete
GitOrigin-RevId: 961de932945f49afca843bd470bce47158e081dc
2024-02-14 22:37:13 +00:00
Aleksey Pivovarov
148ada8bb5 ui: suppress warning about missing Toolbar target component
The actions in the BackgroundImageDialog are not using DataContext.

GitOrigin-RevId: 7d31e1dff57ffe1c6bda7017917edffd5a15deb2
2024-01-22 13:57:35 +00:00
Gregory.Shrago
1c98591a6e fix redundant cast (zero tolerance inspection)
GitOrigin-RevId: 5d5282b9d1b4f20110525fb5283d99448d5b3b54
2024-01-09 20:38:15 +00:00
Sergei Tachenov
5934649315 IDEA-342398 Fix modality in ImageFileService
When invoked from a modal dialog, the previous implementation
would never be invoked until the dialog is closed. If the image editor
is in the dialog, it would never show an image.

This service was initially supposed to work in any modal context.
It's because it used to be completely synchronous code before,
so it's really supposed to be invoked as soon as possible,
just without blocking the EDT anymore.

GitOrigin-RevId: 778f870a70a6078fdab893b91e1ea8ab42265ee2
2024-01-08 17:46:29 +00:00
Gregory.Shrago
fb3b9adf12 temporary workaround for IDEA-341171
GitOrigin-RevId: eac268caeebac02bf887035cb40270d162c39f0e
2023-12-16 16:49:00 +00:00
Gregory.Shrago
cf58114100 cleanup yellow code in ThumbnailViewUI
GitOrigin-RevId: 7746d04f4a1be09ffde025bfadd9a0212613ad27
2023-12-16 16:48:58 +00:00
Gregory.Shrago
313ab8c245 IDEA-341102 Extract BGT data provider for ThumbnailViewUI
EA-991763 PE: DataValidators.reportPsiElementOnEdt

GitOrigin-RevId: 8c281e199301e35e749263d4e2aa8fa1e128d7ea
2023-12-16 16:48:56 +00:00
Gregory.Shrago
cc5beecbce reformat
GitOrigin-RevId: 9e3a941071cfbf0f86f36da4be4b7d8c333b3d17
2023-12-16 16:48:54 +00:00
Sergei Tachenov
6403613334 IDEA-337118 Convert SVG to PNG in background
The task is pretty isolated from everything, so no need
for a channel or a flow here, just launch these asynchronously
and let them complete whenever they will.

GitOrigin-RevId: 373390f44a386a1a36e746cac27141d11c432379
2023-11-29 18:17:44 +00:00
Vladimir Kharitonov
e47f632a73 [svg viewer] IDEA-336092 restrict JS in SVGs
GitOrigin-RevId: 2f2157d9e65cf330798da7b9f1e4fd90061e9098
2023-11-09 20:55:18 +00:00
Sergei Tachenov
4d2c38d9e7 IDEA-333549 Refresh VFS after ConvertSvgToPngAction
This is needed so the new file is picked up by the Project View.

GitOrigin-RevId: 7d2a62ede3167189bd70092902e0ce0ca87e3803
2023-10-31 23:59:58 +00:00
Vladimir Krivosheev
69fc441f6e IJPL-310 mark extensions as obsolete (part 11)
GitOrigin-RevId: ef915fa2bf11f9fbcdf9ebbf80bc553129314335
2023-10-29 20:09:28 +00:00
Tagir Valeev
51854f80b3 "Method can be static" fix massive application
GitOrigin-RevId: ed296b85922a6814d5c6057b5cbc720f0c546e41
2023-10-20 19:12:56 +00:00
Yann Cébron
5e41a5e41d [images] SvgParserDefinition: cleanup
GitOrigin-RevId: 98d250fcbcb1da584e223173bfc09ebc8b2f72ca
2023-10-19 13:08:05 +00:00
george.lemeshko
3a61622815 Add format parameter to ImageEditorManager.createImageEditor
(cherry picked from commit 09080a44f450157f139eb07bb6314422e921f4bc)

IJ-CR-117012

GitOrigin-RevId: 9bbb7007adc86c3600b3569baa42e9671c0fe594
2023-10-17 16:44:33 +00:00
Sergei Tachenov
4b894e5286 EA-917083 Catch exceptions in ImageFileService
Exception handling code was accidentally lost when
converting to coroutines. Catch and log everything
to avoid uncaught exceptions. Ignore cancellation
exceptions because they're expected and not
errors. We don't have to reset the image on
cancellation either, as it could cause unnecessary
flickering when it's cancelled due to another
request arriving (another file is being loaded).

GitOrigin-RevId: 7ed4058783bd1d650a18b26eb179586021c9f604
2023-10-03 09:02:57 +00:00
Sergei Tachenov
16be8ae189 IDEA-332388 Properly layout ImageEditorUI
This regression was caused by some ancient (2005) layout hack
that overrode the invalidate() method and used it to center the image.
However, Swing doesn't always call invalidate() when validating.
Sometimes it just calls validate(), for example, if the parent component
was invalidated. This made laying out the image editor UI very fragile
and dependent on the specific moment when validation / invalidation / revalidation
happens.

When the slow op fix was applied, the image started to load with some delay,
as it would be now loaded in background and only then displayed. This broke
the mentioned hack because when the image is updated, revalidate() is called
on the parent container, not on the image container itself, which would cause
Swing to skip the invalidate() method containing the hack.

Fix by removing the hack and replacing it with a very simple custom layout
manager instead. Now validation happens the way it's intended by Swing,
and the new layout manager is called whenever needed, and it does the same
thing as the hack did: center the image.

GitOrigin-RevId: cb6965a0535ee365326dce59bd015d689b541943
2023-09-26 09:01:23 +00:00
Sergei Tachenov
0b6ff1b2f5 IDEA-332388 Convert ImageFileService into project-level service
Even though it's not using the project directly, it's still a regular project
service.

GitOrigin-RevId: 43795a82dc31b13f479327fa8b01e033baecc134
2023-09-26 09:01:20 +00:00
Alexey Kudravtsev
4d1d97efae EA-910800 ISE: JBColor.$$$reportNull$$$0
GitOrigin-RevId: a8b304c359bfd12abe85207656a23ea1a9cddf5a
2023-09-22 18:34:34 +00:00
Daniil Ovchinnikov
27e155fc21 IJPL-167 bump language and API version 1.8 -> 1.9
GitOrigin-RevId: 5204df1784bbbba550476415e4ceff7368ab5fd4
2023-09-19 19:52:47 +00:00
Vladimir Kharitonov
4cf4033b3a IDEA-330584 SvgViewer: handle empty image properly at setZoom
GitOrigin-RevId: 6e779224e4db224ad096f780f6e8f8a65a43333f
2023-08-29 22:57:46 +00:00
Vladimir Kharitonov
cd321dd908 IDEA-330584 SvgViewer call myViewPort.layout.show() from EDT
GitOrigin-RevId: 5469deafecdfb4e60b41014cd58c918471395769
2023-08-29 22:57:43 +00:00
Aleksey Pivovarov
6e955033e0 IDEA-329951 ui: do not leak JCefImageViewer via global eternal CefClient
GitOrigin-RevId: 84b32737a5980ad5adce3283bba48045594f0df9
2023-08-17 12:38:44 +00:00
Vladimir Krivosheev
8dd13764a9 IDEA-326151 update hash algo for icons
GitOrigin-RevId: bb8f3acd0314190362619afb86151270b893f082
2023-08-09 14:46:20 +00:00
Sergei Tachenov
2fd2b39fbf IDEA-309322, EA-772915 Move image loading out of EDT for ImageEditorImpl
Create a service and use coroutines to freely jump between IO threads and EDT.
To avoid converting too much stuff to Kotlin at once, use dependency
inversion and provide an object for image file loading to ImageEditorImpl
through the new service.

Cancelling the image loader's job through dispose() looks a bit ugly,
but until we move the entire thing to coroutines, it seems to be the only reasonable
way.

GitOrigin-RevId: ce42805acfcb67bbdbb3de869fb7a3606adcf383
2023-07-31 06:46:03 +00:00
Vladimir Krivosheev
16c9cd96c7 FileEditorProvider.accept - readAction should be taken by extension if needed (part 2)
GitOrigin-RevId: 2f58d7bd0aaa2a95bea61dff8496044eccf7aef6
2023-07-13 22:30:37 +00:00
Vladimir Krivosheev
398365698a cleanup
GitOrigin-RevId: adc92e5edfa04fc03e3d547a88c21ddab9c67a45
2023-05-05 23:01:52 +00:00
Vladimir Krivosheev
227d75a1fc don't extend DynamicBundle
GitOrigin-RevId: 49cbebd629a92877dbeeffba8d97b0631fb9407e
2023-05-05 09:46:42 +00:00
Matthew Gharrity
1c45726f6b IDEA-317096: fix NPE in ImageDocumentationProvider
closes https://github.com/JetBrains/intellij-community/pull/2382

GitOrigin-RevId: 6cbf2add3c7584a14a1ae08bda840671cc5c09aa
2023-04-21 16:08:47 +00:00
Ivan Semenov
ec4e07821c [images/platform] move image filetype icon to platform
GitOrigin-RevId: 778ee4998c399df1c4f519dc221d63fe35b2f36a
2023-04-18 18:31:50 +00:00
Daniil Ovchinnikov
6fe5c49599 deprecate com.intellij.reference.SoftReference constructors
GitOrigin-RevId: a723be59b812f71953e79879d7adf09d58a9e935
2023-04-15 00:04:29 +00:00
Pavel Porvatov
14d16c3cf2 Port EditExternalImageEditorAction to Kotlin UI DSL 2
GitOrigin-RevId: 674c868e13af4b007c112b63ef23aa922ebf1f94
2023-04-11 10:13:24 +00:00
Vladimir Kharitonov
55606f1df8 IDEA-312164: make scrollbars tranperant in JBCefImageViewer
GitOrigin-RevId: ca1d17a2c03fd4df9987c9051a1c9afe35c1360b
2023-03-31 03:04:15 +00:00
Vladimir Kharitonov
847548497e JBR-5352: use JBCefScrollbarsHelper in JCefImageViewer
GitOrigin-RevId: 373e49cd638070f58905a0e1fcb415cbd9ed9600
2023-03-31 03:04:09 +00:00
Vladimir Krivosheev
6dbda83b26 use komihash for icon classes to align rasterized key with a runtime cache key (same algo)
GitOrigin-RevId: fec04acb91d4a69d5c50571d3408c9b0ce3fddd4
2023-03-24 15:49:56 +00:00
Vladimir Krivosheev
4c88167f4f optimize png icons
GitOrigin-RevId: 8d4b8ed9df196a6525981e2c25b7e5173fd943f2
2023-03-14 16:50:46 +00:00
Vladimir Krivosheev
93a8fe3d83 IJPL-81 Switch to JSVG for SVG icon rendering
GitOrigin-RevId: c64ba9c12f89a0c4b20c734eb2eb69428a7aff22
2023-03-10 17:11:32 +00:00
Kate Botsman
a0718b3ca8 GTW-168 Color picker implementation for remote dev and code with me
- Replaced direct access to ColorPicker's and ColorChooser's static methods with ColorChooserService to explicitly route all color picker popups and dialogs to a client
- Had to create ColorPopupCloseListener to support message about popup closing (so we could finish session in time and avoid memory leaks)
- Added notification for user if they have read only access instead of opening color picker and silently dropping all changes

Merge-request: IJ-MR-104316
Merged-by: Kate Botsman <kate.botsman@jetbrains.com>

GitOrigin-RevId: 5cf9468992e9f538be47f6b96d1759e31f6c241a
2023-03-08 13:11:56 +00:00
Vladimir Kharitonov
ef7ca8c93d IDEA-312489: svg viewer: set grid color according to config
GitOrigin-RevId: 68fb5c70e78c6079cad99ac1af7c33bf321e2a92
2023-02-27 20:10:56 +00:00