-
-
Notifications
You must be signed in to change notification settings - Fork 31
add getId
method to EnigmaService
#164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
f32f05f
rework interface
ix0rai 552b761
work
ix0rai a04fa74
work
ix0rai 27ea6eb
somewhat functional
ix0rai 45f75fd
fix and improve server stuff
ix0rai 3106481
check the style
ix0rai 2429f71
fix rare npe due to mishandling of flatlaf
ix0rai 72a12de
misc
ix0rai 4a6715c
restore old save/load behaviour
ix0rai b0d4014
fully working I think :D
ix0rai d172324
fix checkstyle
ix0rai 3ff4cbd
port enigma-cli
ix0rai 1985d89
delete recaf (it broke and I'm lazy)
ix0rai fa197fe
fix
ix0rai 0d18c05
error handling for invalid token types
ix0rai 37ab82f
fix navigator issues
ix0rai e6c712b
clarify javadoc
ix0rai 74425be
priority
ix0rai 671de4b
fix npe
ix0rai 1a6bde0
store proposed mappings separately
ix0rai 9b46ba9
store proposed mappings separately
ix0rai f014b81
add a test for service ordering
ix0rai d675df0
malformed json test
ix0rai 0ed0ec0
start moving plugin ID into plugin code
ix0rai 3d67ea7
Merge branch 'develop/2.0' into 2.0/service-ids
ix0rai 0d48318
fix error
ix0rai 6af226c
finish
ix0rai 42df8d8
fix
ix0rai e9b486d
lol
ix0rai c262f33
resolve comments
ix0rai 316fa44
address review from iota
ix0rai 8c1a31d
check the style
ix0rai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
12 changes: 12 additions & 0 deletions
12
enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaService.java
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,16 @@ | ||
package org.quiltmc.enigma.api.service; | ||
|
||
public interface EnigmaService { | ||
/** | ||
* The ID of this service. This should satisfy a few criteria: | ||
* <ul> | ||
* <li>Be namespaced, with the plugin name and service name separated by a colon. The {@code enigma} namespace is reserved for builtin plugins.</li> | ||
* <li>Be all lowercase, with words separated by underscores.</li> | ||
* <li>Be constant and unique: it should never change.</li> | ||
* </ul> | ||
* <p>Examples: {@code enigma:cfr}, {@code enigma:enum_name_proposer}, {@code your_plugin:custom_indexer}</p> | ||
* | ||
* @return the constant ID | ||
*/ | ||
String getId(); | ||
} |
This file contains hidden or 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 hidden or 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
49 changes: 45 additions & 4 deletions
49
enigma/src/main/java/org/quiltmc/enigma/api/source/Decompilers.java
This file contains hidden or 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 |
---|---|---|
@@ -1,13 +1,54 @@ | ||
package org.quiltmc.enigma.api.source; | ||
|
||
import org.quiltmc.enigma.api.class_provider.ClassProvider; | ||
import org.quiltmc.enigma.impl.source.bytecode.BytecodeDecompiler; | ||
import org.quiltmc.enigma.impl.source.cfr.CfrDecompiler; | ||
import org.quiltmc.enigma.impl.source.procyon.ProcyonDecompiler; | ||
import org.quiltmc.enigma.impl.source.vineflower.VineflowerDecompiler; | ||
|
||
public class Decompilers { | ||
public static final DecompilerService VINEFLOWER = VineflowerDecompiler::new; | ||
public static final DecompilerService PROCYON = ProcyonDecompiler::new; | ||
public static final DecompilerService CFR = CfrDecompiler::new; | ||
public static final DecompilerService BYTECODE = BytecodeDecompiler::new; | ||
public static final DecompilerService VINEFLOWER = new DecompilerService() { | ||
ix0rai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@Override | ||
public Decompiler create(ClassProvider classProvider, SourceSettings settings) { | ||
return new VineflowerDecompiler(classProvider, settings); | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "enigma:vineflower"; | ||
} | ||
}; | ||
public static final DecompilerService PROCYON = new DecompilerService() { | ||
@Override | ||
public Decompiler create(ClassProvider classProvider, SourceSettings settings) { | ||
return new ProcyonDecompiler(classProvider, settings); | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "enigma:procyon"; | ||
} | ||
}; | ||
public static final DecompilerService CFR = new DecompilerService() { | ||
@Override | ||
public Decompiler create(ClassProvider classProvider, SourceSettings settings) { | ||
return new CfrDecompiler(classProvider, settings); | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "enigma:cfr"; | ||
} | ||
}; | ||
public static final DecompilerService BYTECODE = new DecompilerService() { | ||
@Override | ||
public Decompiler create(ClassProvider classProvider, SourceSettings settings) { | ||
return new BytecodeDecompiler(classProvider, settings); | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "enigma:bytecode"; | ||
} | ||
}; | ||
} |
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.