Class WorkspaceFileBrowser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class WorkspaceFileBrowser extends JPanel
Workspace file browser is used in a workspace window by the user to view source files of the project contained in the workspace and also observe source code of external libraries used by that project.
See Also:
  • Field Details

    • tree

      public final JTree tree
  • Constructor Details

    • WorkspaceFileBrowser

      public WorkspaceFileBrowser(MCreator mcreator)
      The sole constructor.
      Parameters:
      mcreator - Workspace window that is the future owner of this browser instance.
  • Method Details

    • reloadTree

      public void reloadTree()
      Reloads all the project files.
    • openSelectedFile

      public void openSelectedFile(boolean forceExpansion)
      If a file is selected, opens this file in built-in code editor if its type is supported, otherwise calls the program assigned to that file type.
      Parameters:
      forceExpansion - If selected node represents a directory and is expanded, value of true will keep it open and value of false will let it collapse.
    • openSelectedFileInDesktop

      public void openSelectedFileInDesktop()
      If a file is selected, opens this file using the program assigned to that file type.
    • showSelectedFileInDesktop

      public void showSelectedFileInDesktop()
      If a file is selected, opens that file's parent folder via OS native file explorer and highlights the file.
    • deleteSelectedFile

      public void deleteSelectedFile()
      If a file is selected, attempts to remove it from the file system.