def organize_step_one(self):
        self.reset()
        ActionHistory().add_action(
            (
                "javatar.commands.operations" +
                ".organize_imports.organize_step_one"
            ),
            "Organize Imports Step 1 - Gathering imported types and use types"
        )
        imports_and_types = JavaStructure().imports_and_types_in_file(
            self.view.file_name()
        )
        self.import_nodes = imports_and_types["import_nodes"]

        for class_name in imports_and_types["types"]:
            self.useTypes.append(class_name)
            class_path = self.class_path_for_type(
                class_name, imports_and_types["imports"]
            )
            unimport = (
                not class_path and class_name not in self.unimportTypes
            )
            if unimport:
                self.unimportTypes.append(class_name)
            elif (class_path and
                    class_path.as_class_path() not in self.importedTypes):
                self.importedTypes.append(class_path.as_class_path())
dataset/ETHPy150Open spywhere/Javatar/commands/operations/organize_imports.py/JavatarOrganizeImports.organize_step_one/original