class ProjectLibraryReimportSynchronizedOperation

Project library operation that re-imports all resources from a source resource that was previously imported via the synchronized import operation.

Public

Constructors

ProjectLibraryReimportSynchronizedOperation

ProjectLibraryReimportSynchronizedOperation(const ProjectLibraryOperationContext &context, const Path &relativePath, const SPtr<ImportOptions> &importOptions = nullptr)

Constructs the operation.

context
Project library context the operation is being executed in.
relativePath
Path to the synchronized package entry, relative to the project library imported resource folder.
importOptions
Import options to import the source resource with. Can be null, in which case previously used import options will be used.

Methods

PrepareOnMainThread

Result PrepareOnMainThread() override

Performs the first stage of the operation.

Verifies the input parameters are correct, creates library database entries (if possible) and returns success if operation will proceed to execute. Executed on the main thread.

Returns: Operation result and optional error message if failed.

RunOnWorkerThread

void RunOnWorkerThread() override

Performs the second stage of the operation.

Performs longer lasting tasks such as saving or loading a package, copying a file or generating preview icons. Executed on a worker thread.

FinalizeOnMainThread

void FinalizeOnMainThread() override

Performs the last stage of the operation.

This will be called after the worker thread completes. Will ensure the entries in the project library database match to packages written by the worker thread.

Private

Fields

mRelativePath

Path mRelativePath

mImportOptions

SPtr<ImportOptions> mImportOptions

mImportOperation

TAsyncOp<Vector<SubResourceRaw>> mImportOperation

mImportedResourceRelativePaths

Vector<Path> mImportedResourceRelativePaths

mRemovedResourceRelativePaths

Vector<Path> mRemovedResourceRelativePaths