Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Quincy379
jadx
提交
1d3e6ecb
J
jadx
项目概览
Quincy379
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1d3e6ecb
编写于
3月 31, 2019
作者:
A
Ahmed Ashour
提交者:
skylot
3月 31, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: use lambda (PR #544)
上级
a5a951cf
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
66 deletion
+36
-66
jadx-gui/src/main/java/jadx/gui/jobs/IndexJob.java
jadx-gui/src/main/java/jadx/gui/jobs/IndexJob.java
+12
-15
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
+3
-6
jadx-gui/src/main/java/jadx/gui/ui/ProgressPanel.java
jadx-gui/src/main/java/jadx/gui/ui/ProgressPanel.java
+1
-8
jadx-gui/src/main/java/jadx/gui/ui/codearea/CodeArea.java
jadx-gui/src/main/java/jadx/gui/ui/codearea/CodeArea.java
+11
-7
jadx-gui/src/main/java/jadx/gui/ui/codearea/SearchBar.java
jadx-gui/src/main/java/jadx/gui/ui/codearea/SearchBar.java
+9
-30
未找到文件。
jadx-gui/src/main/java/jadx/gui/jobs/IndexJob.java
浏览文件 @
1d3e6ecb
...
@@ -34,24 +34,21 @@ public class IndexJob extends BackgroundJob {
...
@@ -34,24 +34,21 @@ public class IndexJob extends BackgroundJob {
cache
.
setTextIndex
(
index
);
cache
.
setTextIndex
(
index
);
cache
.
setUsageInfo
(
usageInfo
);
cache
.
setUsageInfo
(
usageInfo
);
for
(
final
JavaClass
cls
:
wrapper
.
getIncludedClasses
())
{
for
(
final
JavaClass
cls
:
wrapper
.
getIncludedClasses
())
{
addTask
(
new
Runnable
()
{
addTask
(()
->
{
@Override
try
{
public
void
run
()
{
index
.
indexNames
(
cls
);
try
{
index
.
indexNames
(
cls
);
CodeLinesInfo
linesInfo
=
new
CodeLinesInfo
(
cls
);
CodeLinesInfo
linesInfo
=
new
CodeLinesInfo
(
cls
);
List
<
StringRef
>
lines
=
splitLines
(
cls
);
List
<
StringRef
>
lines
=
splitLines
(
cls
);
usageInfo
.
processClass
(
cls
,
linesInfo
,
lines
);
usageInfo
.
processClass
(
cls
,
linesInfo
,
lines
);
if
(
Utils
.
isFreeMemoryAvailable
())
{
if
(
Utils
.
isFreeMemoryAvailable
())
{
index
.
indexCode
(
cls
,
linesInfo
,
lines
);
index
.
indexCode
(
cls
,
linesInfo
,
lines
);
}
else
{
}
else
{
index
.
classCodeIndexSkipped
(
cls
);
index
.
classCodeIndexSkipped
(
cls
);
}
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Index error in class: {}"
,
cls
.
getFullName
(),
e
);
}
}
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Index error in class: {}"
,
cls
.
getFullName
(),
e
);
}
}
});
});
}
}
...
...
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
浏览文件 @
1d3e6ecb
...
@@ -185,12 +185,9 @@ public class MainWindow extends JFrame {
...
@@ -185,12 +185,9 @@ public class MainWindow extends JFrame {
JadxUpdate
.
check
(
new
IUpdateCallback
()
{
JadxUpdate
.
check
(
new
IUpdateCallback
()
{
@Override
@Override
public
void
onUpdate
(
final
Release
r
)
{
public
void
onUpdate
(
final
Release
r
)
{
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
SwingUtilities
.
invokeLater
(()
->
{
@Override
updateLink
.
setText
(
NLS
.
str
(
"menu.update_label"
,
r
.
getName
()));
public
void
run
()
{
updateLink
.
setVisible
(
true
);
updateLink
.
setText
(
NLS
.
str
(
"menu.update_label"
,
r
.
getName
()));
updateLink
.
setVisible
(
true
);
}
});
});
}
}
});
});
...
...
jadx-gui/src/main/java/jadx/gui/ui/ProgressPanel.java
浏览文件 @
1d3e6ecb
...
@@ -2,8 +2,6 @@ package jadx.gui.ui;
...
@@ -2,8 +2,6 @@ package jadx.gui.ui;
import
javax.swing.*
;
import
javax.swing.*
;
import
java.awt.*
;
import
java.awt.*
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.beans.PropertyChangeEvent
;
import
java.beans.PropertyChangeEvent
;
import
java.beans.PropertyChangeListener
;
import
java.beans.PropertyChangeListener
;
...
@@ -38,12 +36,7 @@ public class ProgressPanel extends JPanel implements PropertyChangeListener {
...
@@ -38,12 +36,7 @@ public class ProgressPanel extends JPanel implements PropertyChangeListener {
cancelButton
.
setBorderPainted
(
false
);
cancelButton
.
setBorderPainted
(
false
);
cancelButton
.
setFocusPainted
(
false
);
cancelButton
.
setFocusPainted
(
false
);
cancelButton
.
setContentAreaFilled
(
false
);
cancelButton
.
setContentAreaFilled
(
false
);
cancelButton
.
addActionListener
(
new
ActionListener
()
{
cancelButton
.
addActionListener
(
e
->
mainWindow
.
cancelBackgroundJobs
());
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
mainWindow
.
cancelBackgroundJobs
();
}
});
add
(
cancelButton
);
add
(
cancelButton
);
}
}
}
}
...
...
jadx-gui/src/main/java/jadx/gui/ui/codearea/CodeArea.java
浏览文件 @
1d3e6ecb
package
jadx.gui.ui.codearea
;
package
jadx.gui.ui.codearea
;
import
javax.swing.*
;
import
java.awt.Dimension
;
import
javax.swing.event.PopupMenuListener
;
import
java.awt.Point
;
import
java.awt.Rectangle
;
import
java.awt.event.MouseAdapter
;
import
java.awt.event.MouseEvent
;
import
javax.swing.JPopupMenu
;
import
javax.swing.JViewport
;
import
javax.swing.SwingUtilities
;
import
javax.swing.text.BadLocationException
;
import
javax.swing.text.BadLocationException
;
import
javax.swing.text.Caret
;
import
javax.swing.text.Caret
;
import
javax.swing.text.DefaultCaret
;
import
javax.swing.text.DefaultCaret
;
import
java.awt.*
;
import
java.awt.event.MouseAdapter
;
import
java.awt.event.MouseEvent
;
import
org.fife.ui.rsyntaxtextarea.RSyntaxDocument
;
import
org.fife.ui.rsyntaxtextarea.RSyntaxDocument
;
import
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
;
import
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
;
...
@@ -91,12 +95,12 @@ public final class CodeArea extends RSyntaxTextArea {
...
@@ -91,12 +95,12 @@ public final class CodeArea extends RSyntaxTextArea {
}
}
private
void
addMenuItems
(
JClass
jCls
)
{
private
void
addMenuItems
(
JClass
jCls
)
{
Action
findUsage
=
new
FindUsageAction
(
contentPanel
,
this
,
jCls
);
FindUsage
Action
findUsage
=
new
FindUsageAction
(
contentPanel
,
this
,
jCls
);
JPopupMenu
popup
=
getPopupMenu
();
JPopupMenu
popup
=
getPopupMenu
();
popup
.
addSeparator
();
popup
.
addSeparator
();
popup
.
add
(
findUsage
);
popup
.
add
(
findUsage
);
popup
.
addPopupMenuListener
(
(
PopupMenuListener
)
findUsage
);
popup
.
addPopupMenuListener
(
findUsage
);
}
}
public
void
loadSettings
()
{
public
void
loadSettings
()
{
...
...
jadx-gui/src/main/java/jadx/gui/ui/codearea/SearchBar.java
浏览文件 @
1d3e6ecb
...
@@ -3,7 +3,6 @@ package jadx.gui.ui.codearea;
...
@@ -3,7 +3,6 @@ package jadx.gui.ui.codearea;
import
javax.swing.*
;
import
javax.swing.*
;
import
javax.swing.text.BadLocationException
;
import
javax.swing.text.BadLocationException
;
import
java.awt.*
;
import
java.awt.*
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.awt.event.ActionListener
;
import
java.awt.event.KeyAdapter
;
import
java.awt.event.KeyAdapter
;
import
java.awt.event.KeyEvent
;
import
java.awt.event.KeyEvent
;
...
@@ -40,6 +39,7 @@ class SearchBar extends JToolBar {
...
@@ -40,6 +39,7 @@ class SearchBar extends JToolBar {
private
final
JCheckBox
wholeWordCB
;
private
final
JCheckBox
wholeWordCB
;
private
final
JCheckBox
matchCaseCB
;
private
final
JCheckBox
matchCaseCB
;
private
ActionListener
forwardListener
=
e
->
search
(
0
);
public
SearchBar
(
RSyntaxTextArea
textArea
)
{
public
SearchBar
(
RSyntaxTextArea
textArea
)
{
rTextArea
=
textArea
;
rTextArea
=
textArea
;
...
@@ -64,55 +64,41 @@ class SearchBar extends JToolBar {
...
@@ -64,55 +64,41 @@ class SearchBar extends JToolBar {
}
}
}
}
});
});
searchField
.
addActionListener
(
new
ActionListener
()
{
searchField
.
addActionListener
(
e
->
search
(
1
));
public
void
actionPerformed
(
ActionEvent
e
)
{
search
(
1
);
}
});
new
TextStandardActions
(
searchField
);
new
TextStandardActions
(
searchField
);
add
(
searchField
);
add
(
searchField
);
JButton
prevButton
=
new
JButton
(
NLS
.
str
(
"search.previous"
));
JButton
prevButton
=
new
JButton
(
NLS
.
str
(
"search.previous"
));
prevButton
.
setIcon
(
ICON_UP
);
prevButton
.
setIcon
(
ICON_UP
);
prevButton
.
addActionListener
(
new
ActionListener
()
{
prevButton
.
addActionListener
(
e
->
search
(-
1
));
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
search
(-
1
);
}
});
prevButton
.
setBorderPainted
(
false
);
prevButton
.
setBorderPainted
(
false
);
add
(
prevButton
);
add
(
prevButton
);
JButton
nextButton
=
new
JButton
(
NLS
.
str
(
"search.next"
));
JButton
nextButton
=
new
JButton
(
NLS
.
str
(
"search.next"
));
nextButton
.
setIcon
(
ICON_DOWN
);
nextButton
.
setIcon
(
ICON_DOWN
);
nextButton
.
addActionListener
(
new
ActionListener
()
{
nextButton
.
addActionListener
(
e
->
search
(
1
));
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
search
(
1
);
}
});
nextButton
.
setBorderPainted
(
false
);
nextButton
.
setBorderPainted
(
false
);
add
(
nextButton
);
add
(
nextButton
);
markAllCB
=
new
JCheckBox
(
NLS
.
str
(
"search.mark_all"
));
markAllCB
=
new
JCheckBox
(
NLS
.
str
(
"search.mark_all"
));
markAllCB
.
addActionListener
(
new
ForwardListener
()
);
markAllCB
.
addActionListener
(
forwardListener
);
add
(
markAllCB
);
add
(
markAllCB
);
regexCB
=
new
JCheckBox
(
NLS
.
str
(
"search.regex"
));
regexCB
=
new
JCheckBox
(
NLS
.
str
(
"search.regex"
));
regexCB
.
addActionListener
(
new
ForwardListener
()
);
regexCB
.
addActionListener
(
forwardListener
);
add
(
regexCB
);
add
(
regexCB
);
matchCaseCB
=
new
JCheckBox
(
NLS
.
str
(
"search.match_case"
));
matchCaseCB
=
new
JCheckBox
(
NLS
.
str
(
"search.match_case"
));
matchCaseCB
.
addActionListener
(
new
ForwardListener
()
);
matchCaseCB
.
addActionListener
(
forwardListener
);
add
(
matchCaseCB
);
add
(
matchCaseCB
);
wholeWordCB
=
new
JCheckBox
(
NLS
.
str
(
"search.whole_word"
));
wholeWordCB
=
new
JCheckBox
(
NLS
.
str
(
"search.whole_word"
));
wholeWordCB
.
addActionListener
(
new
ForwardListener
()
);
wholeWordCB
.
addActionListener
(
forwardListener
);
add
(
wholeWordCB
);
add
(
wholeWordCB
);
JButton
closeButton
=
new
JButton
();
JButton
closeButton
=
new
JButton
();
closeButton
.
setIcon
(
ICON_CLOSE
);
closeButton
.
setIcon
(
ICON_CLOSE
);
closeButton
.
addActionListener
(
l
->
toggle
());
closeButton
.
addActionListener
(
e
->
toggle
());
closeButton
.
setBorderPainted
(
false
);
closeButton
.
setBorderPainted
(
false
);
add
(
closeButton
);
add
(
closeButton
);
...
@@ -181,11 +167,4 @@ class SearchBar extends JToolBar {
...
@@ -181,11 +167,4 @@ class SearchBar extends JToolBar {
searchField
.
setBackground
(
COLOR_BG_NORMAL
);
searchField
.
setBackground
(
COLOR_BG_NORMAL
);
}
}
}
}
private
class
ForwardListener
implements
ActionListener
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
search
(
0
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录