Skip to content

Commit

Permalink
Move workspace manager + io / processor services to service package
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Feb 26, 2024
1 parent 0e0701f commit 6d37efe
Show file tree
Hide file tree
Showing 53 changed files with 82 additions and 77 deletions.
2 changes: 1 addition & 1 deletion recaf-core/src/main/java/software/coley/recaf/Recaf.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.se.SeContainer;
import software.coley.recaf.cdi.WorkspaceBeanContext;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;

import java.lang.annotation.Annotation;
import java.util.Locale;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package software.coley.recaf.cdi;

import jakarta.interceptor.InterceptorBinding;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.workspace.WorkspaceOpenListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceOpenListener;

import java.lang.annotation.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import org.slf4j.Logger;
import software.coley.recaf.Recaf;
import software.coley.recaf.analytics.logging.Logging;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.workspace.WorkspaceOpenListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceOpenListener;
import software.coley.recaf.workspace.model.Workspace;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import jakarta.enterprise.inject.spi.Bean;
import software.coley.recaf.analytics.logging.DebuggingLogger;
import software.coley.recaf.analytics.logging.Logging;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceOpenListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.services.workspace.WorkspaceOpenListener;
import software.coley.recaf.workspace.model.Workspace;

import java.lang.annotation.Annotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import software.coley.recaf.services.Service;
import software.coley.recaf.util.MultiMap;
import software.coley.recaf.util.threading.ThreadPoolFactory;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.JvmClassBundle;
import software.coley.recaf.workspace.model.resource.ResourceJvmClassListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import software.coley.recaf.services.file.RecafDirectoriesConfig;
import software.coley.recaf.util.StringUtil;
import software.coley.recaf.util.TestEnvironment;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.Workspace;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import software.coley.recaf.path.ClassPathNode;
import software.coley.recaf.path.ResourcePathNode;
import software.coley.recaf.services.Service;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.JvmClassBundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import software.coley.recaf.cdi.WorkspaceScoped;
import software.coley.recaf.services.Service;
import software.coley.recaf.services.mapping.Mappings;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.model.Workspace;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import software.coley.recaf.info.JvmClassInfo;
import software.coley.recaf.info.builder.JvmClassInfoBuilder;
import software.coley.recaf.util.ReflectUtil;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.BasicJvmClassBundle;
import software.coley.recaf.workspace.model.bundle.Bundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import jakarta.enterprise.context.ApplicationScoped;
Expand All @@ -7,6 +7,7 @@
import jakarta.inject.Inject;
import org.slf4j.Logger;
import software.coley.recaf.analytics.logging.Logging;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.EmptyWorkspace;
import software.coley.recaf.workspace.model.Workspace;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import software.coley.recaf.workspace.model.Workspace;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import software.coley.recaf.cdi.AutoRegisterWorkspaceListeners;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.Produces;
import software.coley.recaf.services.Service;
import software.coley.recaf.workspace.io.WorkspaceExportOptions;
import software.coley.recaf.workspace.io.WorkspaceExporter;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.io.WorkspaceExportOptions;
import software.coley.recaf.services.workspace.io.WorkspaceExporter;
import software.coley.recaf.workspace.model.BasicWorkspace;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.resource.WorkspaceResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import software.coley.recaf.cdi.AutoRegisterWorkspaceListeners;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import jakarta.enterprise.context.ApplicationScoped;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.services.workspace;

import jakarta.annotation.Nonnull;
import software.coley.recaf.workspace.model.Workspace;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import jakarta.enterprise.context.ApplicationScoped;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import jakarta.enterprise.context.ApplicationScoped;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import software.coley.recaf.info.Info;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import software.coley.recaf.util.io.ByteSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import jakarta.enterprise.context.ApplicationScoped;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import software.coley.recaf.info.*;
import software.coley.recaf.info.properties.builtin.*;
import software.coley.recaf.util.Unchecked;
import software.coley.recaf.util.ZipCreationUtils;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.JvmClassBundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package software.coley.recaf.workspace.io;
package software.coley.recaf.services.workspace.io;

import jakarta.annotation.Nonnull;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.Workspace;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace.processors;
package software.coley.recaf.services.workspace.processors;

import jakarta.annotation.Nonnull;
import jakarta.inject.Inject;
Expand All @@ -9,8 +9,8 @@
import software.coley.recaf.info.properties.builtin.ThrowableProperty;
import software.coley.recaf.services.inheritance.InheritanceGraph;
import software.coley.recaf.services.inheritance.InheritanceVertex;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.workspace.WorkspaceProcessor;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceProcessor;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.JvmClassBundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import jakarta.annotation.Nonnull;
import software.coley.recaf.behavior.Closing;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.resource.AndroidApiResource;
import software.coley.recaf.workspace.model.resource.RuntimeWorkspaceResource;
import software.coley.recaf.workspace.model.resource.WorkspaceResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import software.coley.recaf.info.FileInfo;
import software.coley.recaf.info.JvmClassInfo;
import software.coley.recaf.path.*;
import software.coley.recaf.util.Streams;
import software.coley.recaf.util.Unchecked;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.ClassBundle;
import software.coley.recaf.workspace.model.bundle.FileBundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package software.coley.recaf.workspace;
package software.coley.recaf.workspace.model;

import jakarta.annotation.Nonnull;
import software.coley.recaf.cdi.AutoRegisterWorkspaceListeners;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import software.coley.recaf.info.*;
import software.coley.recaf.services.workspace.io.BasicInfoImporter;
import software.coley.recaf.services.workspace.io.ClassPatcher;
import software.coley.recaf.services.workspace.io.InfoImporter;
import software.coley.recaf.services.workspace.io.InfoImporterConfig;
import software.coley.recaf.test.TestClassUtils;
import software.coley.recaf.util.ZipCreationUtils;
import software.coley.recaf.util.io.ByteSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import software.coley.recaf.info.properties.builtin.ZipCommentProperty;
import software.coley.recaf.info.properties.builtin.ZipCreationTimeProperty;
import software.coley.recaf.info.properties.builtin.ZipModificationTimeProperty;
import software.coley.recaf.services.workspace.io.*;
import software.coley.recaf.test.TestClassUtils;
import software.coley.recaf.test.dummy.HelloWorld;
import software.coley.recaf.util.ZipCreationUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import software.coley.recaf.info.JarFileInfo;
import software.coley.recaf.services.workspace.io.*;
import software.coley.recaf.test.TestClassUtils;
import software.coley.recaf.test.dummy.HelloWorld;
import software.coley.recaf.util.ZipCreationUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import software.coley.recaf.Recaf;
import software.coley.recaf.services.plugin.PluginManagerConfig;
import software.coley.recaf.util.TestEnvironment;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;

import java.lang.annotation.Annotation;

Expand Down
4 changes: 2 additions & 2 deletions recaf-ui/src/main/java/software/coley/recaf/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import software.coley.recaf.services.script.ScriptEngine;
import software.coley.recaf.util.JFXValidation;
import software.coley.recaf.util.Lang;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.io.ResourceImporter;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.io.ResourceImporter;
import software.coley.recaf.workspace.model.BasicWorkspace;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import software.coley.recaf.util.FxThreadUtil;
import software.coley.recaf.util.Icons;
import software.coley.recaf.util.Lang;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.WorkspaceOpenListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceOpenListener;
import software.coley.recaf.workspace.model.Workspace;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.control.Tab;
import org.slf4j.Logger;
import software.coley.recaf.analytics.logging.Logging;
import software.coley.recaf.cdi.EagerInitialization;
Expand All @@ -22,9 +21,8 @@
import software.coley.recaf.services.mapping.MappingResults;
import software.coley.recaf.ui.docking.DockingManager;
import software.coley.recaf.ui.docking.DockingTab;
import software.coley.recaf.util.FxThreadUtil;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.FileBundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import software.coley.recaf.config.BasicConfigValue;
import software.coley.recaf.config.ConfigGroups;
import software.coley.recaf.workspace.PathExportingManager;
import software.coley.recaf.workspace.io.WorkspaceExportOptions;
import software.coley.recaf.services.workspace.io.WorkspaceExportOptions;
import software.coley.recaf.workspace.model.Workspace;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import software.coley.recaf.util.Animations;
import software.coley.recaf.util.FxThreadUtil;
import software.coley.recaf.util.Lang;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.workspace.io.ResourceImporter;
import software.coley.recaf.services.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.io.ResourceImporter;
import software.coley.recaf.workspace.model.BasicWorkspace;
import software.coley.recaf.workspace.model.resource.WorkspaceResource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import software.coley.recaf.ui.config.WorkspaceExplorerConfig;
import software.coley.recaf.util.FxThreadUtil;
import software.coley.recaf.util.StringUtil;
import software.coley.recaf.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.WorkspaceModificationListener;
import software.coley.recaf.services.workspace.WorkspaceCloseListener;
import software.coley.recaf.workspace.model.WorkspaceModificationListener;
import software.coley.recaf.workspace.model.Workspace;
import software.coley.recaf.workspace.model.bundle.AndroidClassBundle;
import software.coley.recaf.workspace.model.bundle.FileBundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import software.coley.recaf.ui.pane.WelcomePane;
import software.coley.recaf.ui.pane.WorkspaceExplorerPane;
import software.coley.recaf.workspace.PathLoadingManager;
import software.coley.recaf.workspace.WorkspaceManager;
import software.coley.recaf.services.workspace.WorkspaceManager;

import java.io.IOException;
import java.nio.file.Path;
Expand Down
Loading

0 comments on commit 6d37efe

Please sign in to comment.