-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split up cell services into subpackages, create adapter system for co…
…ntext menus
- Loading branch information
Showing
95 changed files
with
1,371 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
615 changes: 0 additions & 615 deletions
615
recaf-ui/src/main/java/software/coley/recaf/services/cell/ContextMenuProviderService.java
This file was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
...n/AbstractContextMenuProviderFactory.java → ...t/AbstractContextMenuProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...rc/main/java/software/coley/recaf/services/cell/context/AnnotationContextMenuAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package software.coley.recaf.services.cell.context; | ||
|
||
import jakarta.annotation.Nonnull; | ||
import javafx.scene.control.ContextMenu; | ||
import software.coley.recaf.info.ClassInfo; | ||
import software.coley.recaf.info.annotation.Annotated; | ||
import software.coley.recaf.info.annotation.AnnotationInfo; | ||
import software.coley.recaf.workspace.model.Workspace; | ||
import software.coley.recaf.workspace.model.bundle.ClassBundle; | ||
import software.coley.recaf.workspace.model.resource.WorkspaceResource; | ||
|
||
/** | ||
* Context menu adapter for {@link AnnotationInfo} types. | ||
* | ||
* @author Matt Coley | ||
*/ | ||
public interface AnnotationContextMenuAdapter extends ContextMenuAdapter { | ||
/** | ||
* @param menu | ||
* The menu to adapt. | ||
* @param source | ||
* Context request origin. | ||
* @param workspace | ||
* Containing workspace. | ||
* @param resource | ||
* Containing resource. | ||
* @param bundle | ||
* Containing bundle. | ||
* @param annotated | ||
* The annotated item. | ||
* @param annotation | ||
* The annotation the menu is for. | ||
*/ | ||
default void adaptAnnotationContextMenu(@Nonnull ContextMenu menu, | ||
@Nonnull ContextSource source, | ||
@Nonnull Workspace workspace, | ||
@Nonnull WorkspaceResource resource, | ||
@Nonnull ClassBundle<? extends ClassInfo> bundle, | ||
@Nonnull Annotated annotated, | ||
@Nonnull AnnotationInfo annotation) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...src/main/java/software/coley/recaf/services/cell/context/AssemblerContextMenuAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package software.coley.recaf.services.cell.context; | ||
|
||
import jakarta.annotation.Nonnull; | ||
import javafx.scene.control.ContextMenu; | ||
import software.coley.recaf.info.ClassInfo; | ||
import software.coley.recaf.path.AssemblerPathData; | ||
import software.coley.recaf.ui.pane.editing.assembler.AssemblerPane; | ||
import software.coley.recaf.workspace.model.Workspace; | ||
import software.coley.recaf.workspace.model.bundle.ClassBundle; | ||
import software.coley.recaf.workspace.model.resource.WorkspaceResource; | ||
|
||
/** | ||
* Context menu adapter for contents within an {@link AssemblerPane}. | ||
* | ||
* @author Matt Coley | ||
*/ | ||
public interface AssemblerContextMenuAdapter extends ContextMenuAdapter { | ||
/** | ||
* @param menu | ||
* The menu to adapt. | ||
* @param source | ||
* Context request origin. | ||
* @param workspace | ||
* Containing workspace. | ||
* @param resource | ||
* Containing resource. | ||
* @param bundle | ||
* Containing bundle. | ||
* @param declaringClass | ||
* Containing class. | ||
* @param assemblerData | ||
* The assembler data the menu is for. | ||
*/ | ||
default void adaptAssemblerMenu(@Nonnull ContextMenu menu, | ||
@Nonnull ContextSource source, | ||
@Nonnull Workspace workspace, | ||
@Nonnull WorkspaceResource resource, | ||
@Nonnull ClassBundle<? extends ClassInfo> bundle, | ||
@Nonnull ClassInfo declaringClass, | ||
@Nonnull AssemblerPathData assemblerData) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../cell/BasicBlacklistingContextSource.java → ...ntext/BasicBlacklistingContextSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...asicBundleContextMenuProviderFactory.java → ...asicBundleContextMenuProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...caf/services/cell/BasicContextSource.java → ...ices/cell/context/BasicContextSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...cDirectoryContextMenuProviderFactory.java → ...cDirectoryContextMenuProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...InnerClassContextMenuProviderFactory.java → ...InnerClassContextMenuProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
...sicPackageContextMenuProviderFactory.java → ...sicPackageContextMenuProviderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.