Giter Site home page Giter Site logo

leomillon / uuid-generator-plugin Goto Github PK

View Code? Open in Web Editor NEW
34.0 3.0 13.0 4.09 MB

An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)

License: MIT License

Kotlin 100.00%
uuid uuid-generator idea idea-plugin ulid ulid-generator cuid cuid-generator intellij

uuid-generator-plugin's People

Contributors

actions-user avatar dependabot[bot] avatar dvdandroid avatar leomillon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

uuid-generator-plugin's Issues

False positive highlight of CUID

Similar to #17, but for CUID (didn't even know it existed btw ๐Ÿ˜…). As you can see in the attached screenshots, the plugin highlitghts things that it should not. Probably, just ensuring that the entire word matches the expected pattern and not just a subset of it would be enough to fix the issue. Better would be to be able to configure for which types the highlighting is enable, so that for example if I know that I don't use CUID in my project I can disable its highlighting and reduce false positives

Schermata del 2021-02-26 10-45-10
Schermata del 2021-02-26 10-44-49

PhpStorm 2020.3.2
Build #PS-203.7148.74
Plugin version 4.3.0

Clipboard support

Sometimes I'm actually trying to get a UUID to place into a different program so if I could have an action to copy a random UUID straight to my clipboard that would be awesome. Thank you.

UUID Generator Popup

To make available "specific on-demand" UUID generation, a popup should be displayed with :

  • Settings (like the one in the default UUID settings)
  • A number field to generate multiple UUIDs at once
  • "String joining" fields, for example: "separator", "prefix" and "suffix"
  • A button to copy the result to the clipboard

Finally, this dialogue should remember the last setting of this particular dialogue (except if the user chooses to cancel the current generation).

(MacOS) Option-Enter Replace sometimes places the UUID incorrectly

When I try to replace the gen command with a new UUID using Option-Enter to speed things up, it sometimes places the new UUID incorrectly. This doesn't happen if I mouse click on the content, then choose additional actions and then choose replace.

This is on version 4.5.1

Screen Shot 2022-05-05 at 12 12 04 PM

into

Screen Shot 2022-05-05 at 12 10 31 PM

It's pretty frequent, like 1 in 4 are wrong

StringIndexOutOfBoundsException

Hi,

I use Intellij 2021.3 and I have this error when I want to replace "#gen.uuid#".

java.lang.StringIndexOutOfBoundsException: begin 726, end 736, length 322
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at java.base/java.lang.String.subSequence(String.java:1913)
at com.intellij.psi.impl.source.tree.injected.DocumentWindowImpl.prepareReplaceString(DocumentWindowImpl.java:317)
at com.intellij.psi.impl.source.tree.injected.DocumentWindowImpl.replaceString(DocumentWindowImpl.java:366)
at com.github.leomillon.uuidgenerator.EditorDocumentUtils.replaceTextAtRange(EditorDocumentUtils.kt:38)
at com.github.leomillon.uuidgenerator.quickfix.IdPlaceholderQuickFix.invoke$lambda-0(IdPlaceholderQuickFix.kt:25)
at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:361)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:947)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:361)
at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:349)
at com.github.leomillon.uuidgenerator.quickfix.IdPlaceholderQuickFix.invoke(IdPlaceholderQuickFix.kt:24)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.lambda$invoke$0(IntentionActionWithTextCaching.java:229)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:229)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$4(ShowIntentionActionsHandler.java:263)
at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:935)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:961)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:263)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$3(ShowIntentionActionsHandler.java:239)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:238)
at com.intellij.codeInsight.intention.impl.IntentionListStep.chooseActionAndInvoke(IntentionListStep.java:134)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:126)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.ui.popup.AbstractPopup.lambda$dispose$18(AbstractPopup.java:1508)
at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:101)
at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:186)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:140)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:175)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:36)
at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1505)
at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:164)
at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:326)
at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:136)
at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:166)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:169)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:157)
at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:268)
at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:433)
at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:405)
at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:356)
at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:270)
at com.intellij.ui.popup.WizardPopup.proceedKeyEvent(WizardPopup.java:380)
at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:356)
at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:112)
at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:148)
at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:101)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:724)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

UUID format settings

Add a plugin setting view to be able to define the generated UUID format.

Available options could be :

  • lowercased or UPPERCASED
  • With or without dashes
  • Long or short (ex: f2280785)

The default (current) format would be: lowercased + with dashes + long.

A preview of the result should be live reloaded on each setting modification.

Feature Request: Find and replace instances with UUID from popup

I love this plugin, it's excellent and covered exactly what I needed.
But I would love to see a way, from the popup window, of replacing instances for text with an idea, instead of just copying to clip board.

Let's say you generate a long list of GUID's from the popup. Hundreds or even thousands, to be used in an existing structure of objects. With webstorm's built-in functionality, I can easily manage to create an extra property on the object (javascript). But I still have to manually go through each of those properties, assigning a GUID.

What I'm proposing is functionality for "Find and Replace" from the popup window. You generate 400 GUID's, write a text (or regex pattern), click replace and the plugin goes through those instances, replacing it with the generated GUID.

I hope this makes sense.

Nil UUID generator action

I was wondering if it makes sense for the plugin to provide an action to be able to generate a nil UUID whose value is 00000000-0000-0000-0000-000000000000. Use case is mostly all places (I think tests are the most common) where you don't care about a real UUID but just about the format: having to remember how many characters there are for each segment or having to search the value takes time that would be better spent in other ways. I don't know Kotlin, but I would be happy to try implementing the feature if you agree

Kotlin migration

  1. Gradle Groovy script to Gradle Kotlin script
  2. Java source code to Kotlin source code (literal migration)

Plugin highlights class names

Hi!

Thank you for the plugin!

After I had updated the plugin to version 4.0.0 it started to highlight first 32 characters in a class name:

image

I've tried to invalidate caches and reinstall the plugin, but it still highlights.

IDE: Idea Ultimate 2020.2

Fatal error when modify read-only document

Version: 4.5.1

Steps to reproduce:

  1. Open git log
  2. Choose any commit
  3. Double-click on any file in that commit, read-only diff-viewer will open
  4. Press Ctrl+Shift+A (or Shiftx2), find and choose Random UUID

Result:

com.intellij.openapi.editor.ReadOnlyModificationException: Attempt to modify read-only document
	at com.intellij.openapi.editor.impl.DocumentImpl.assertWriteAccess(DocumentImpl.java:698)
	at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:541)
	at com.github.leomillon.uuidgenerator.EditorDocumentUtils.insertTextAtCaret(EditorDocumentUtils.kt:32)
	at com.github.leomillon.uuidgenerator.action.GenerateRandomAction.actionPerformed$lambda-1(GenerateRandomAction.kt:29)
	at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:361)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:947)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:361)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:349)
	at com.github.leomillon.uuidgenerator.action.GenerateRandomAction.actionPerformed(GenerateRandomAction.kt:25)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:244)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:244)
	at com.intellij.ide.actions.GotoActionAction.performActionImpl(GotoActionAction.java:111)
	at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:84)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Bug report - NoClassDefFoundError

java.lang.NoClassDefFoundError: com/jgoodies/forms/layout/FormLayout
	at com.github.leomillon.uuidgenerator.settings.uuid.form.UUIDGeneratorSettingsForm.$$$setupUI$$$(UUIDGeneratorSettingsForm.kt)
	at com.github.leomillon.uuidgenerator.settings.uuid.form.UUIDGeneratorSettingsForm.<init>(UUIDGeneratorSettingsForm.kt:14)
	at com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorConfigurable.createComponent(UUIDGeneratorConfigurable.kt:14)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.createComponent(ConfigurableWrapper.java:169)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.lambda$createConfigurableComponent$4(ConfigurableCardPanel.java:116)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:859)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.createConfigurableComponent(ConfigurableCardPanel.java:112)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.create(ConfigurableCardPanel.java:60)
	at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:54)
	at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:51)
	at com.intellij.ui.CardLayoutPanel.createValue(CardLayoutPanel.java:73)
	at com.intellij.ui.CardLayoutPanel.select(CardLayoutPanel.java:101)
	at com.intellij.ui.CardLayoutPanel.lambda$selectLater$0(CardLayoutPanel.java:117)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:799)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:814)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:799)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:699)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:435)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1670)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1630)
	at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:90)
	at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:50)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$initMacApplication$1(MacOSApplicationProvider.java:80)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$submit$8(MacOSApplicationProvider.java:178)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:799)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:814)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:799)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.jgoodies.forms.layout.FormLayout PluginClassLoader(plugin=PluginDescriptor(name=UUID Generator, id=com.github.leomillon.uuidgenerator, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0/213.4293.8/WebStorm 2021.3 EAP.app.plugins/UUID Generator, version=4.5.1, package=null, isBundled=false), packagePrefix=null, instanceId=33, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 83 more
WebStorm 2021.3 EAP
Build #WS-213.3714.441, built on September 22, 2021
Runtime version: 11.0.12+7-b1649.1 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Non-Bundled Plugins:
    patrick.kelleter.angular-cli-quick-switch (1.3)
    org.asciidoctor.intellij.asciidoc (0.35.4)
    in.thekalinga.snippet.intellij (6.1.0)
    ideanginx9 (0.1.9)
    de.netnexus.camelcaseplugin (3.0.8)
    de.cmm.side_nodes (1.2)
    com.mnr.java.intellij.idea.plugin.base64helper (2.0.3)
    com.jsonts.kotlin (1.0.12)
    com.intellij.swagger (213.3714.385)
    com.intellij.ideolog (203.0.27.0)
    com.github.leomillon.uuidgenerator (4.5.1)
    com.alayouni.ansiHighlight (1.2.4)
    cn.jxzhang.plugin.json-formatter (1.4)
    String Manipulation (8.17.203.000.0)
    mobi.hsz.idea.gitignore (4.2.0)
    izhangzhihao.rainbow.brackets (6.21)
    Dummy Text Generator (1.2.0)
    ru.adelf.idea.dotenv (2021.3.0.213)

WebStorm support

Thank for the plugin!
Please make it be available for WebStorm.

Feature Request: UUID in file/code templates

After failing to find any way to insert newly generated UUIDs into file templates, I fall back to this very nice plugin.

I use it to generate predefined entity/model IDs for functional tests, like a user must always have the same ID to be able to query it for certain endpoints.

Would it be possible to have an option in the settings to automatically inject variables into the file templates?

As I understand, those variables are precomposed strings, so $UUID$ would always be the same value. Maybe have a number input or generate 50 variables (or a simple integer configuration setting), like $UUID1$, $UUID2 and so on?

I already tried the new selection replace feature from #27, but that does not work on cases like

const ADMIN_ACCOUNT_ID = 'e188f027-39e9-4d6b-868a-2ba00aecc9d0';
const ADMIN_DEVICE_ID = '40db59b9-8249-4423-a840-9f4ae07f8280';

where I would need to right-click every single string and replace it (which is not faster then hitting alt+insert and generate). Multi select cursor selections also have no effect with this feature.

Similar plugins could not be found, only https://github.com/vkravets/FileTemplatesVariable seems to work with variable injection, but also provides no means to inject generated uuids.

Is this something that could be in scope of this plugin?

Error on IntelliJ IDEA 2021.2.2 ClassCastException

After plugin upgrade I got this error

java.lang.ClassCastException: class com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorSettings cannot be cast to class com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorSettings (com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorSettings is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @28532a81; com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorSettings is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @63748042)
	at com.github.leomillon.uuidgenerator.settings.uuid.UUIDGeneratorSettings$Companion.getInstance(UUIDGeneratorSettings.kt:44)
	at com.github.leomillon.uuidgenerator.annotator.uuid.UUIDDefaultAnnotator.annotate(UUIDAnnotator.kt:20)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:134)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:114)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:335)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:274)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:294)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:297)
	at com.github.izhangzhihao.rainbow.brackets.visitor.RainbowHighlightVisitor.analyze(RainbowHighlightVisitor.kt:36)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:94)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:265)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:211)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

UUID not gray when commented

When code is commented in Intellij, it is gray and no part is bold. When the UUID plugin is installed, UUID are always colored and bold.
image

Plugin-setting to enable/disable line in context menu

This is a feature request.

The plugin is working fine, the only problem I have is that my context menu is now too long due to the nine new lines this plugin adds to it. I only use UUIDs and have no need of ULIDs and CUIDs. That is why I would like to remove the (for me) unnecessary six additional lines.

My request is to add an enable/disable checkbox to all three settings tabs of UUID, ULID and CUID to enable/disable each section of the *IDs in the context menu.

image

Android Studio compatibility

Copied for user comment (https://plugins.jetbrains.com/plugin/8320-uuid-generator#comment=30752)

David Yamanoha Jan 27, 2019 02:50:18
Not sure if Android Studio has plugin specific compatibility issues ... nonetheless, doesn't work in 3.3. Haven't tried other versions.

java.lang.NullPointerException
	at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor.getActionName(AndroidStudioSystemHealthMonitor.java:723)
	at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor.countActionInvocation(AndroidStudioSystemHealthMonitor.java:615)
	at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor$3.countActionInvocation(AndroidStudioSystemHealthMonitor.java:328)
	at com.intellij.ide.AndroidStudioSystemHealthMonitorAdapter.countActionInvocation(AndroidStudioSystemHealthMonitorAdapter.java:29)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.fireBeforeActionPerformed(ActionManagerImpl.java:1196)
	at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:202)
	at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:191)
	at com.intellij.ui.popup.ActionPopupStep.lambda$onChosen$2(ActionPopupStep.java:185)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.ui.popup.AbstractPopup.lambda$dispose$8(AbstractPopup.java:1417)
	at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:3094)
	at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:189)
	at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:138)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:190)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:58)
	at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1411)
	at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:160)
	at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:307)
	at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:289)
	at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
	at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
	at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:138)
	at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:107)
	at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:182)
	at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:107)
	at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:151)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125)
	at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:263)
	at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:442)
	at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:396)
	at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:337)
	at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:250)
	at com.intellij.ui.popup.WizardPopup.proceedKeyEvent(WizardPopup.java:378)
	at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:358)
	at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:126)
	at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:160)
	at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:86)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:709)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:394)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Can't generate multiple UUID at once

It only creates a single uuid at the cursor.

Also if I place multiple cursors, it only replaces the last one.
Maybe broken with the current IDE (with the new UI)

I would like to be able to replace every placeholder in a file / project with an UUID.

image

Support mullti-cursor mode

If you select multiple places with CTRL+ALT+SHIFT+CLICK and start typing it types on each place.

I think generating an uuid in this situation should generate a different uuid for each cursor.

What's actually happen instead is it generates an uuid on the last cursor only.

ULID feature request

Hi there,

I am using your plugin a lot, but lately I am getting requests to return an ULID instead of an UUID.
I came across this: https://github.com/f4b6a3/ulid-creator and was wondering if it is easy for you to include the creation ULID's as well as creating UUID's in a future update?

Based on the spec ULID's can look like this:

  • 01706d6c-6aac-80bd-7ff5-f660c2dd58ea
  • 01E1PPRTMSQ34W7JR5YSND6B8T
  • 01ecz13fmqxmtx6z46xxdhb9fx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.