Class SearchUsagesDialog

java.lang.Object
net.mcreator.ui.dialogs.SearchUsagesDialog

public class SearchUsagesDialog extends Object
Opens a dialog that shows usages of the elements selected by the user before all across the current workspace.
  • Constructor Details

    • SearchUsagesDialog

      public SearchUsagesDialog()
  • Method Details

    • showUsagesDialog

      public static void showUsagesDialog(MCreator mcreator, String queryType, Collection<ModElement> references)
      Parameters:
      mcreator - Workspace window calling this method.
      queryType - Localized string representing type of elements used by mod elements in the given list.
      references - List of referencing/dependent mod elements.
    • showDeleteDialog

      public static boolean showDeleteDialog(MCreator mcreator, String queryType, Collection<ModElement> references)
      Parameters:
      mcreator - Workspace window calling this method.
      queryType - Localized string representing type of elements used by mod elements in the given list.
      references - List of referencing/dependent mod elements.
      Returns:
      Whether the user confirmed deletion of selected elements.
    • showDeleteDialog

      public static boolean showDeleteDialog(MCreator mcreator, String queryType, Collection<ModElement> references, @Nullable String messageSuffix)
      Parameters:
      mcreator - Workspace window calling this method.
      queryType - Localized string representing type of elements used by mod elements in the given list.
      references - List of referencing/dependent mod elements.
      messageSuffix - Additional information to be displayed by deletion dialog.
      Returns:
      Whether the user confirmed deletion of selected elements.
    • showDialog

      public static boolean showDialog(MCreator mcreator, String queryType, Collection<ModElement> references, boolean deletionRequested, @Nullable String messageSuffix)
      Parameters:
      mcreator - Workspace window calling this method.
      queryType - Localized string representing type of elements used by mod elements in the given list.
      references - List of referencing/dependent mod elements.
      deletionRequested - Whether user wants to delete selected elements or just view their usages.
      messageSuffix - Additional information to be displayed by deletion dialog.
      Returns:
      Whether elements deletion was requested and the user confirmed deletion.