Commit graph

3065 commits

Author SHA1 Message Date
Jason P. Leasure 8f7f69d116 put GhidraScriptTableModel table changed events into the swing thread 2020-07-28 16:56:09 -04:00
Jason P. Leasure 3eb3e9d8ba fix refreshBundleSynchronously to work like Karaf 2020-07-28 16:56:09 -04:00
Jason P. Leasure fda2e2adda set width of bundle status type column 2020-07-28 16:56:09 -04:00
Jason P. Leasure 7f9d82fa47 fix: refresh bundles synchronously
- remove unnecessary waits during synchronous activate/deactivate
2020-07-28 16:56:09 -04:00
Jason P. Leasure 0d520dae16 style fixes for review 2020-07-28 16:56:09 -04:00
Jason P. Leasure 2015f13542 style fixes in ghidra.app. {plugin.core.script script} 2020-07-28 16:56:09 -04:00
Jason P. Leasure 6bc33bdf65 style fixes for ghidra.app.plugin.core.osgi 2020-07-28 16:56:09 -04:00
Jason P. Leasure 5832d95cdd disable undo/redo buttons when no undos/redos 2020-07-28 16:56:09 -04:00
Jason P. Leasure b53e752b8a add placeholder bundle for missing file, rewire bundlestatusmanager 2020-07-28 16:56:08 -04:00
Jason P. Leasure 9216a940dc save/restore active bundles, use generic.util.Path string encoding 2020-07-28 16:56:08 -04:00
Jason P. Leasure 74658143ea fix for non-unix paths 2020-07-28 16:56:08 -04:00
Jason P. Leasure cd310e2380 update GhidraBundle summary, fix double delete of old classfiles
- summaries belong to BundleStatus, not GhidraBundle
- reflect Jar bundle start errors in summary
2020-07-28 16:56:08 -04:00
Jason P. Leasure c807c859be add exceptions to bundlehostlistener 2020-07-28 16:56:08 -04:00
Jason P. Leasure d404e3f8dd show bundle paths with variable substituted 2020-07-28 16:56:08 -04:00
Jason P. Leasure a09861f942 lower Felix logging verbosity 2020-07-28 16:56:08 -04:00
Jason P. Leasure 0af17e4b08 help for Ghidra Bundles, update scripting help, @imports->@importpackage 2020-07-28 16:56:08 -04:00
Jason P. Leasure 8fc9240eda remove org.apache.felix.main dependency 2020-07-28 16:56:08 -04:00
Jason P. Leasure 4911e0814a script info manager should only "find" info it has 2020-07-28 16:56:08 -04:00
Jason P. Leasure 04a16aa0f4 add more time to script tests 2020-07-28 16:56:08 -04:00
Jason P. Leasure d79b193d20 move weird static call into GhidraScriptAnalyzer class 2020-07-28 16:56:08 -04:00
Jason P. Leasure 5f11c9cf7d update python & headless tests to manage GhidraScriptUtil resource 2020-07-28 16:56:08 -04:00
Jason P. Leasure 7ee2467016 avoid calling GhidraScriptUtils.getScriptSourceDirectories
- when called from the GUI, the bundle host manages paths
- when used to find a script by name, use findScriptByName
2020-07-28 16:56:08 -04:00
Jason P. Leasure 2b49816c6c factor GhidraScriptInfoManager out of GhidraScriptUtil
- move bundlehost to ghidrascriptmgrplugin
2020-07-28 16:56:08 -04:00
Jason P. Leasure a26ce496ef cleanup names, remove pointless code, reorder/deprecate 2020-07-28 16:56:08 -04:00
Jason P. Leasure 05dc95634f cleanup headless init for GhidraScriptUtil 2020-07-28 16:56:08 -04:00
Jason P. Leasure 11fe097e8e fix bundle status listing errors when adding two bundle status components 2020-07-28 16:56:08 -04:00
Jason P. Leasure a654060fbe make set-activation more like individual activation
- build unresolved bundles as the last step
- mark bundle status as busy
- clean now removes build errors
2020-07-28 16:56:08 -04:00
Jason P. Leasure ec4cad2237 add bundlehost tests.. and some fixes
- source manifests are now copied properly
- don't use a task to stop framework
2020-07-28 16:56:08 -04:00
Jason P. Leasure 464a6be6de fix loaded counter for testing 2020-07-28 16:56:08 -04:00
Jason P. Leasure 18163aeb58 avoid multiple GhidraScriptUtil.initialize calls w/ multiple tools 2020-07-28 16:56:08 -04:00
Jason P. Leasure 3cb0555453 check for existence of bundle paths on restoreState 2020-07-28 16:56:08 -04:00
Jason P. Leasure ea5eae8395 fix inclusion of broken imports in compile run 2020-07-28 16:56:08 -04:00
Jason P. Leasure 6ed7134b4c add missing IP headers 2020-07-28 16:56:08 -04:00
Jason P. Leasure c9f477264d stop asking a status model for stuff 2020-07-28 16:56:08 -04:00
Jason P. Leasure 49e3d6dcdc tease out GhidraScriptUtil state, clarify headless and headed cases
- GhidraScriptUtil how has (static) initialize & dispose
  - initialize is either through (headed/GUI) GhidraScriptMgrPlugin or
    directly (headless)
- BundleHost
  - now owns bundle paths (script dirs)
  - save and restore to SaveState for use by GUI
  - no static instances
  - GhidraScriptUtil BundleHost coincides with GUI's when both are used
  - generates events
  - conservative use of auto-vivification
- BundleStatusCompoentProvider / PathManager
  - better split between GUI & model
  - subscribes to GUI's BundleHost for events
  - provider registers for generated events, controls BundleHost
2020-07-28 16:56:07 -04:00
Jason P. Leasure 2c27ca1376 consolidate bundle management into bundlehost
- change ownership of script directories to singleton bundlehost
- start moving BundleStatus into GUI only mode
2020-07-28 16:56:07 -04:00
Jason P. Leasure 1735a11a76 do not auto-create ScriptInfo objects, fix static allocatins in testing 2020-07-28 16:56:07 -04:00
Jason P. Leasure 6268ab9d3e move static bundle vars to BundleHost 2020-07-28 16:56:07 -04:00
Jason P. Leasure 0f74dcb8be cleanup, fix tests where script deleted before getScriptInfo
- mark deleted scripts as having compile errors
2020-07-28 16:56:07 -04:00
Jason P. Leasure 5c28ab536c add jarbundle, add toolbar actions, fix view versus row indexing
- move bundle compiler into source bundle
- activate action attempts to activate in topological order
- modified suppression of RowObjectSelectionManager.repair
- add animation for clean operation
2020-07-28 16:56:07 -04:00
Jason P. Leasure 0383926fc3 replace +- buttons in bundlestatus gui with toolbar actions
- synchronize summary, compilerErrors
- check requirements before activation for class files that won't load
2020-07-28 16:56:07 -04:00
Jason P. Leasure 89e0e617b2 speed up bundle status load, fix empty source dir handling 2020-07-28 16:56:07 -04:00
Jason P. Leasure 15f46b7fae a status is not a path 2020-07-28 16:56:07 -04:00
Jason P. Leasure 431d7ac752 introduce GhidraBundle, cleanup packages, rename path->status 2020-07-28 16:56:07 -04:00
Jason P. Leasure 7873bb32fa improve OSGi error messages
- move serialization and bundleevents from provider into
  bundlestatusmodel
- add summary field to bundle status
- add more precise tracking of requirements
- make status updates asynchronous via OSGiListener
2020-07-28 16:56:07 -04:00
Jason P. Leasure 8d55571172 connect OSGi framework to bundlestatusprovider 2020-07-28 16:56:07 -04:00
Jason P. Leasure f39d55cca1 start connecting OSGi to bundlestatusmanager
- minimize access to BundleHost instance (JavaScriptProvider is still bad)
- BundlePath
  - restrict construction to osgi package
  - remove "editable" attribute and fix incorrect reference
  - remove references in GhidraScriptUtil
    - BundlePath attribute choice came down only to system or user
    - user filtering on "enabled" were redundant
- move compilation from JavaScriptProvider to BundheHost
2020-07-28 16:56:07 -04:00
Jason P. Leasure 36f4a219d9 headers for new files 2020-07-28 16:56:07 -04:00
Jason P. Leasure d8610b00be improve model/view split in bundle status, more nomenclature fixes 2020-07-28 16:56:07 -04:00
Jason P. Leasure ad897f263c rename variables, move bundlehost instance, clean dead fileinstaller code 2020-07-28 16:56:07 -04:00