171 Commits

Author SHA1 Message Date
Mikaël
5935fe6ef8 Remove usage of sput-object-volatile into FieldUsageTypeTest
- Since 2db1dec703, sput-object-volatile is no longer supported at default api level.
Thus remove his usage until Smalidea has a way to define the api level to use.
2018-10-07 14:01:36 -07:00
Mikaël
cb4a44bdd1 Update results of testPackedSwitch and testSparseSwitch
- Computation of switch target offsets was modified into
10fd792f59,
thus update expected results to reflect this change.
2018-10-07 14:00:51 -07:00
Mikaël
7f46be6473 Align smallidea tokens and grammar on smali
- Now the following tests are fixed:
 * org.jf.smalidea.MethodRenameTest.testMethodRename
 * org.jf.smalidea.dexlib.SmalideaMethodTest.testArrayData
 * org.jf.smalidea.dexlib.SmalideaMethodTest.testCatchBlocks
 * org.jf.smalidea.MethodReferenceTest.testJavaReferenceFromSmali
 * org.jf.smalidea.MethodReferenceTest.testSmaliReferenceFromSmali
 * org.jf.smalidea.SmaliCodeFragmentFactoryTest.testUnknownClass
 * org.jf.smalidea.SmaliCodeFragmentFactoryTest.testRegisterType
 * org.jf.smalidea.findUsages.MethodUsageTypeTest.testMethodUsageTypes
 * org.jf.smalidea.findUsages.HighlightLocalClassUsagesTest.testHighlightLocalClassUsage
 * org.jf.smalidea.findUsages.FindClassUsagesTest.testSmaliUsageInSmaliFile
 * org.jf.smalidea.findUsages.FindClassUsagesTest.testJavaUsageInSmaliFile
2018-10-07 13:59:22 -07:00
Albert Gorski
86963ccb43 Change BlankReader to the correct location in SmaliLexer for idea 2018-08-20 12:55:29 -07:00
Ben Gruver
10fd792f59 Correctly calculate the offset for switch targets in smalidea
This fixes an issue where watches on registers (among other things) don't
work inside a method containing a switch statement, due to a failure
analyzing the method.
2017-03-31 17:06:53 -07:00
Ben Gruver
e72e07fc2e Update version to 0.04 2017-03-21 23:53:11 -07:00
Ben Gruver
8ed2f18601 Add Project argument to SmaliClassFinder constructor
In some cases, scope.getProject() may be null. Apparently, IDEA will
automatically pass in the project if you specify one in the constructor.
See, e.g. MigrationElementFinder in the IDEA source.
2017-03-21 23:26:06 -07:00
Ben Gruver
a15fc84ace Add missing read actions in SmaliPositionManager 2017-03-21 22:03:42 -07:00
Ben Gruver
1390c6cff6 getStubOrPsiParent() -> getParentByStub() 2017-03-21 21:22:29 -07:00
Ben Gruver
7a95aa296f Add additional exception info if StringReference doesn't resolve to a String 2016-10-23 13:55:23 -07:00
Ben Gruver
8f7d1a897d Fix null start/end locations in SmaliCodeFragmentFactory.evaluateRegister 2016-10-23 13:15:32 -07:00
Ben Gruver
0e773cbe9b Don't attempt to evaluate an out-of-bounds register 2016-10-23 12:49:19 -07:00
Ben Gruver
8f27f45fb1 Add Opcodes.getDefault
This replace various uses of hardcoded Opcodes.forApi() with
Opcodes.getDefault() or other alternatives as applicable
2016-10-01 17:07:18 -07:00
Ben Gruver
d7d995cc2d Remove the now-unused experimental opcodes flag/functionality 2016-09-17 21:30:28 -07:00
Ben Gruver
a5d82813f1 Call ContextUtil.getSourcePosition on the debugger manager thread 2016-07-24 15:38:34 -07:00
Ben Gruver
3aad871652 Add more info to troubleshoot crashes related to LazyValue.getValue being null 2016-07-24 15:37:27 -07:00
Ben Gruver
a95d0a43a5 Implement SmaliClass.getPresentation
This fixes an issue when trying to use ctrl+n to find a smali class
2016-07-24 14:37:57 -07:00
Ben Gruver
6f11c52b56 Don't try to resolve smali type references when in dumb mode 2016-07-24 14:06:31 -07:00
Ben Gruver
f8f4e32240 Update smalidea to work with newer versions of IDEA
This moves from using the deprecated DebuggerSupport class to the new
JvmSteppingCommandProvider

This also bumps the minimum required IDEA version to 15
2016-07-24 14:06:31 -07:00
Ben Gruver
5a8a2a47b6 Fix an NPE in SmaliPositionManager.createPrepareRequest 2016-02-27 18:32:53 -08:00
Ben Gruver
d018443797 Return an empty list from SmaliClass.getVisibleSignatures()
Don't return null from a @NotNull method, silly.
2016-02-27 17:42:47 -08:00
Ben Gruver
4d8aeebc07 Fix how SmaliPositionManager gets the current class 2016-02-27 17:39:25 -08:00
Ben Gruver
37fbbe8e15 Submit issues to the smalidea-issues repo
Let's not spam the nice people who watch the smali repo. (I'm looking
at you jcase)
2016-02-27 17:39:03 -08:00
Ben Gruver
82f031210e Add support for java inner classes
It's now possible to reference java inner classes based on what their
name would be in smali
2016-02-27 13:00:19 -08:00
Ben Gruver
66892009f5 Fix a possible NPE in SmaliCodeFragmentFactory 2016-02-27 12:51:26 -08:00
Ben Gruver
ff4c85c5e4 Provide better register type information 2016-02-26 21:13:29 -08:00
Ben Gruver
aebb205aeb Add better support for conditional expressions for breakpoints 2016-02-20 12:04:48 -08:00
Ben Gruver
7b387e06c5 Gracefully handle analysis errors 2016-02-20 12:04:47 -08:00
Ben Gruver
4b337cc04d Allow local search scopes when searching class usages 2016-02-20 12:00:05 -08:00
Ben Gruver
f16ea398a1 Don't require an active debugging session when making a code fragment
This is needed, e.g. when editing a conditional statement in the
breakpoint window.
2016-02-20 12:00:05 -08:00
Ben Gruver
df4e74e41c Make smalidea a separate gradle/idea project 2016-02-14 12:53:56 -08:00
Ben Gruver
2e7fe1b8fe Fix the tests that require a real jdk 2016-02-14 12:50:31 -08:00
Ben Gruver
327957ae66 Update for new MethodAnalyzer signature 2016-02-14 12:50:31 -08:00
Ben Gruver
546fdfe3d1 Fix an unprotected read in SmaliClassReferenceSearcher 2015-05-09 11:15:33 -07:00
Ben Gruver
1895a4df82 Fix NPE in SmaliClass.setName() 2015-05-05 20:46:17 -07:00
Ben Gruver
46b359cf21 Fix an NPE related to an array descriptor just before an EOF 2015-05-05 20:40:02 -07:00
Ben Gruver
7061b7871d Fix ClassMoveTest's basicToNoPackage test 2015-05-04 21:07:16 -07:00
Ben Gruver
3f4e6a388a Fix NPE in SmaliCodeFragmentFactory.isContextAccepted 2015-05-01 21:42:26 -07:00
Ben Gruver
7f54770868 Fix an unprotected read access in SmaliPositionManager.createPrepareRequest 2015-04-03 21:29:38 -07:00
Ben Gruver
660d4b5fd9 Workaround for issue with fake Object field type during indexing 2015-04-03 21:29:07 -07:00
Ben Gruver
5deac6ede2 Add an error reporter that can create issues on github 2015-04-03 00:07:10 -07:00
Ben Gruver
93ae7badcd Ensure that SmaliCodeFragmentFactory is only used for smali files 2015-04-02 20:59:18 -07:00
Ben Gruver
4f16feb476 Ensure that SmaliModifierList's direct parent is a PsiModifierListOwner 2015-04-02 19:48:22 -07:00
Ben Gruver
312921148d Add smali classes to the main shortname index
This ensures the classes are available for autocompletion, e.g. in
a java file or while adding a watch when debugging
2015-03-31 19:59:21 -07:00
Ben Gruver
48aacd2c01 Add support for renaming methods 2015-03-31 18:51:48 -07:00
Ben Gruver
923cc91ea2 Add support for renaming fields 2015-03-30 21:26:03 -07:00
Ben Gruver
07e6ade7fe Add support for renaming/moving classes 2015-03-28 12:50:36 -07:00
Ben Gruver
50810d1f5b Add usage type support for method usages 2015-03-25 19:45:31 -07:00
Ben Gruver
9bedfc8e3e Add usage type support for field usages 2015-03-25 19:45:20 -07:00
Ben Gruver
9b86fcabff Add usage type support for class usages 2015-03-24 22:09:37 -07:00