Remove deprecations for JDK 17
This commit is contained in:
parent
2f7cff63c2
commit
35613f01da
1
pom.xml
1
pom.xml
|
@ -365,6 +365,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
|
<showDeprecation>true</showDeprecation>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + O
|
//CTRL + O
|
||||||
//open resource
|
//open resource
|
||||||
if ((e.getKeyCode() == KeyEvent.VK_O) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
if ((e.getKeyCode() == KeyEvent.VK_O) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + N
|
//CTRL + N
|
||||||
//new workspace
|
//new workspace
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_N) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_N) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
BytecodeViewer.resetWorkspace(true);
|
BytecodeViewer.resetWorkspace(true);
|
||||||
|
@ -70,7 +70,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + T
|
//CTRL + T
|
||||||
//compile
|
//compile
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
Thread t = new Thread(() -> BytecodeViewer.compile(true, false), "Compile");
|
Thread t = new Thread(() -> BytecodeViewer.compile(true, false), "Compile");
|
||||||
|
@ -79,7 +79,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + R
|
//CTRL + R
|
||||||
//Run remote code
|
//Run remote code
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + S
|
//CTRL + S
|
||||||
//Export resources
|
//Export resources
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_S) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_S) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + W
|
//CTRL + W
|
||||||
//close active resource (currently opened tab)
|
//close active resource (currently opened tab)
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ public class GlobalHotKeys
|
||||||
|
|
||||||
//CTRL + L
|
//CTRL + L
|
||||||
//open last opened resource
|
//open last opened resource
|
||||||
else if ((e.getKeyCode() == KeyEvent.VK_L) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
else if ((e.getKeyCode() == KeyEvent.VK_L) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class ExtendedJOptionPane
|
||||||
else
|
else
|
||||||
dialog.setLocationRelativeTo(BytecodeViewer.viewer);
|
dialog.setLocationRelativeTo(BytecodeViewer.viewer);
|
||||||
|
|
||||||
dialog.show();
|
dialog.setVisible(true);
|
||||||
dialog.dispose();
|
dialog.dispose();
|
||||||
|
|
||||||
return dialog;
|
return dialog;
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class SearchableJTextArea extends JTextArea
|
||||||
|
|
||||||
addKeyListener(new PressKeyListener(keyEvent ->
|
addKeyListener(new PressKeyListener(keyEvent ->
|
||||||
{
|
{
|
||||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
searchInput.requestFocus();
|
searchInput.requestFocus();
|
||||||
|
|
||||||
GlobalHotKeys.keyPressed(keyEvent);
|
GlobalHotKeys.keyPressed(keyEvent);
|
||||||
|
|
|
@ -108,10 +108,10 @@ public class SearchableRSyntaxTextArea extends RSyntaxTextArea
|
||||||
|
|
||||||
addKeyListener(new PressKeyListener(keyEvent ->
|
addKeyListener(new PressKeyListener(keyEvent ->
|
||||||
{
|
{
|
||||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
searchInput.requestFocus();
|
searchInput.requestFocus();
|
||||||
|
|
||||||
if (onCtrlS != null && (keyEvent.getKeyCode() == KeyEvent.VK_S) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
if (onCtrlS != null && (keyEvent.getKeyCode() == KeyEvent.VK_S) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||||
{
|
{
|
||||||
onCtrlS.run();
|
onCtrlS.run();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class TabbedPane extends JPanel
|
||||||
exitButton.setComponentPopupMenu(rightClickMenu);
|
exitButton.setComponentPopupMenu(rightClickMenu);
|
||||||
exitButton.addMouseListener(new MouseClickedListener(e ->
|
exitButton.addMouseListener(new MouseClickedListener(e ->
|
||||||
{
|
{
|
||||||
if (e.getModifiers() != InputEvent.ALT_MASK || System.currentTimeMillis() - lastMouseClick < 100)
|
if (e.getModifiersEx() != InputEvent.ALT_DOWN_MASK || System.currentTimeMillis() - lastMouseClick < 100)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lastMouseClick = System.currentTimeMillis();
|
lastMouseClick = System.currentTimeMillis();
|
||||||
|
|
|
@ -299,7 +299,7 @@ public class EZInjection extends Plugin
|
||||||
if(kit != null)
|
if(kit != null)
|
||||||
kit.setVisible(true);
|
kit.setVisible(true);
|
||||||
|
|
||||||
m2.invoke(classNode.getClass().newInstance(), (Object[]) new String[1]);
|
m2.invoke(classNode.getClass().getDeclaredConstructor().newInstance(), (Object[]) new String[1]);
|
||||||
|
|
||||||
print("Finished running " + invokeMethodInformation);
|
print("Finished running " + invokeMethodInformation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class CompiledJavaPluginLaunchStrategy implements PluginLaunchStrategy {
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadingClassLoader cl = new LoadingClassLoader(pdata, set);
|
LoadingClassLoader cl = new LoadingClassLoader(pdata, set);
|
||||||
Plugin p = cl.pluginKlass.newInstance();
|
Plugin p = cl.pluginKlass.getDeclaredConstructor().newInstance();
|
||||||
LoadedPluginData npdata = new LoadedPluginData(pdata, cl, p);
|
LoadedPluginData npdata = new LoadedPluginData(pdata, cl, p);
|
||||||
loaded.add(npdata);
|
loaded.add(npdata);
|
||||||
|
|
||||||
|
@ -197,4 +197,4 @@ public class CompiledJavaPluginLaunchStrategy implements PluginLaunchStrategy {
|
||||||
return pluginKlass;
|
return pluginKlass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,6 @@ public class JavaPluginLaunchStrategy implements PluginLaunchStrategy
|
||||||
);
|
);
|
||||||
|
|
||||||
//create a new instance of the class
|
//create a new instance of the class
|
||||||
return (Plugin) clazz.newInstance();
|
return (Plugin) clazz.getDeclaredConstructor().newInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ public enum TranslatedStrings
|
||||||
PLEASE_SEND_THIS_ERROR_LOG_TO,
|
PLEASE_SEND_THIS_ERROR_LOG_TO,
|
||||||
PLEASE_SEND_RESOURCES,
|
PLEASE_SEND_RESOURCES,
|
||||||
ONE_PLUGIN_AT_A_TIME,
|
ONE_PLUGIN_AT_A_TIME,
|
||||||
|
ILLEGAL_ACCESS_ERROR,
|
||||||
|
|
||||||
|
|
||||||
YES,
|
YES,
|
||||||
|
|
|
@ -263,6 +263,7 @@
|
||||||
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Please send this error log to",
|
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Please send this error log to",
|
||||||
"PLEASE_SEND_RESOURCES": "If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.",
|
"PLEASE_SEND_RESOURCES": "If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.",
|
||||||
"ONE_PLUGIN_AT_A_TIME": "There is currently another plugin running right now, please wait for that to finish executing.",
|
"ONE_PLUGIN_AT_A_TIME": "There is currently another plugin running right now, please wait for that to finish executing.",
|
||||||
|
"ILLEGAL_ACCESS_ERROR": "Please use Java 15 or older to do this.",
|
||||||
|
|
||||||
|
|
||||||
"FILES": "Files",
|
"FILES": "Files",
|
||||||
|
|
|
@ -255,5 +255,6 @@
|
||||||
"CLOSE_TAB": "Tab schließen",
|
"CLOSE_TAB": "Tab schließen",
|
||||||
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Bitte senden Sie dieses Fehlerprotokoll an",
|
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Bitte senden Sie dieses Fehlerprotokoll an",
|
||||||
"PLEASE_SEND_RESOURCES": "Wenn Sie entsprechende gesetzliche Rechte an der jeweiligen Klasse besitzen",
|
"PLEASE_SEND_RESOURCES": "Wenn Sie entsprechende gesetzliche Rechte an der jeweiligen Klasse besitzen",
|
||||||
"MIN_SDK_VERSION": "Minimale SDK-Version"
|
"MIN_SDK_VERSION": "Minimale SDK-Version",
|
||||||
|
"ILLEGAL_ACCESS_ERROR": "Bitte benutzen Sie Java 15 oder älter, um dies zu tun."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue