Package net.mcreator.ui.dialogs
Class SearchUsagesDialog
java.lang.Object
net.mcreator.ui.dialogs.SearchUsagesDialog
Opens a dialog that shows usages of the elements selected by the user before all across the current workspace.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanshowDeleteDialog(MCreator mcreator, String queryType, Collection<ModElement> references) static booleanshowDeleteDialog(MCreator mcreator, String queryType, Collection<ModElement> references, String messageSuffix) static booleanshowDialog(MCreator mcreator, String queryType, Collection<ModElement> references, boolean deletionRequested, String messageSuffix) static voidshowUsagesDialog(MCreator mcreator, String queryType, Collection<ModElement> references)
-
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.
-