Author Topic: HexEdit plugin  (Read 33385 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: HexEdit plugin
« Reply #30 on: July 24, 2008, 02:12:46 pm »
Thanks for reporting, I'm investigating it right now :)

I updated my local repository to svn 5160 and everything is working fine once again, thanx! :)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: HexEdit plugin
« Reply #31 on: July 29, 2008, 10:31:38 pm »
nice work, byo!

mario wanted to be able to open files in the hex editor from the file browser window in my ShellExtensions plugin, so I provide this small patch. Unfortunately, I have to clutter your plugin class with some methods and a wxString member to hold the name of the file that the user has clicked in the browser.

[attachment deleted by admin]
« Last Edit: July 29, 2008, 10:46:05 pm by dmoore »

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: HexEdit plugin
« Reply #32 on: July 30, 2008, 08:25:57 am »
Hi dmoore,

cool :D I will try it as soon as possible.

Bye,

Mario

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: HexEdit plugin
« Reply #33 on: July 30, 2008, 03:03:48 pm »
nice work, byo!

mario wanted to be able to open files in the hex editor from the file browser window in my ShellExtensions plugin, so I provide this small patch. Unfortunately, I have to clutter your plugin class with some methods and a wxString member to hold the name of the file that the user has clicked in the browser.

Thanks for the patch. I'll apply it in next few days (I have some work in progress code now so it must be finished first).

Regards
   BYO

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: HexEdit plugin
« Reply #34 on: October 07, 2008, 01:10:26 pm »
Hi Byo,

I am just playing around with the HexEditor. I was thinking about if the File-> Open with HexEditor could be removed and integrated in the following manner:

- The File->Open Menu will open the browse dialogue
- Optional: There could be a file mask for HexFiles which the user selects
- Since CB then would pop-up (What to do dialogue) the user should be able to select:
...
Open with CB editor
Open with HexEditor (new entry)

optional: If possible then the file extension handler would register the extension with the HexEditor and opening these files will result in a Hex-view.

I personally would prefer to have a context menu like Swap HexEditor/Editor to access the HexEditor.

Bye,

Mario

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: HexEdit plugin
« Reply #35 on: October 07, 2008, 07:31:22 pm »
- Optional: There could be a file mask for HexFiles which the user selects

We would have to change this in the core code since sdk doesn't allow adding custom extensions (good candidate for feature request ? ;) )

Quote
- Since CB then would pop-up (What to do dialogue) the user should be able to select:
...
Open with CB editor
Open with HexEditor (new entry)

That would confuse usual users which doesn't need the hex editor at all.

Quote
optional: If possible then the file extension handler would register the extension with the HexEditor and opening these files will result in a Hex-view.

This could be done, but I wanted HexEditor to open all types of files (including those that are opened in standard editor like .cpp or anything else).

Anyway, which extensions did you want to be opened by hexeditor by default ?

Quote
I personally would prefer to have a context menu like Swap HexEditor/Editor to access the HexEditor.

Do you mean like switching between header and source file ?


Regards
   BYO

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: HexEdit plugin
« Reply #36 on: October 07, 2008, 08:30:07 pm »
Quote
This could be done, but I wanted HexEditor to open all types of files (including those that are opened in standard editor like .cpp or anything else).

Anyway, which extensions did you want to be opened by hexeditor by default ?

Perhaps *.bin; *.hex; *.elf; *.exe; ???

Quote
Do you mean like switching between header and source file ?

Exactly.

Sometimes it is useful to have a fixed number of columns in the hex-editor to see e.g. a multiple of 16-Byte in a row. Is this feature already available in the HexEditor?

Bye,

Mario

Offline webbesen

  • Single posting newcomer
  • *
  • Posts: 3
Re: HexEdit plugin
« Reply #37 on: October 30, 2008, 11:27:08 pm »
I really like the Hexeditor. Nice work.
However as Mario already suggested it would be great to be able to specify how many bits/bytes to show in a row.
Fast, cheap, quality. Pick two!

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: HexEdit plugin
« Reply #38 on: October 31, 2008, 11:48:40 am »
Hi

Isn't it is possible to extend CB that it opens *.bin, *.elf ... within the hex editor if the hex
editor implements the mime plugin interface (deriving from cbMimePlugin) and say it can open .bin .elf..
and create a lexer configuration like this?
Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_lexer_properties>
<CodeBlocks_lexer_properties>
<Lexer name="HexEditor binary"
index="20"
filemasks="*.bin,*.elf,*.exe">
</Lexer>
</CodeBlocks_lexer_properties>

So CB shows the entry in the file open dialog.

regards danselmi

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: HexEdit plugin
« Reply #39 on: November 03, 2008, 11:38:10 pm »
I really like the Hexeditor. Nice work.
However as Mario already suggested it would be great to be able to specify how many bits/bytes to show in a row.

Already working on that, but it turned out not to be so easy task (I don't want to make some ugly workarounds ;) ). Just don't have much free time now :(

Isn't it is possible to extend CB that it opens *.bin, *.elf ... within the hex editor if the hex
editor implements the mime plugin interface (deriving from cbMimePlugin) and say it can open .bin .elf..

Making C::B automatically open those exstensions you request is easy task. The problem is that even if you register mime plugin, registered extensions won't show up in the file open dialog - you'll have to select "Show all file types" or something like this.

Regards
   BYO

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: HexEdit plugin
« Reply #40 on: November 04, 2008, 10:54:22 am »
The (misused?) lexer configuration file will make the file open dialog
show an entry for this filetypes (I have tested it).
And the registered mime plugin will open the file.

regards danselmi

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: HexEdit plugin
« Reply #41 on: November 04, 2008, 01:11:18 pm »
The problem is that even if you register mime plugin, registered extensions won't show up in the file open dialog - you'll have to select "Show all file types" or something like this.
Nice catch! So we should change the core to do so. Anyways - the file extension handling is ugly in general and could need some overhaul / refactoring.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: HexEdit plugin
« Reply #42 on: January 21, 2009, 12:04:20 am »
any chance on having the search menu working on a hex editor opened file?

At least just the "find" one anyway...

also something that searches for hex strings as well as text would rock too. :)

good job, doesn't quite replace HxD as is though. ;)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: HexEdit plugin
« Reply #43 on: January 21, 2009, 11:13:58 pm »
Yeah, the plugin has some issues :/ Unfortunately I don't have enough time to work on it right now (for next few weeks I suppose). So please be patient :) Maybe anybody wants to help ?

BYO

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: HexEdit plugin
« Reply #44 on: February 14, 2009, 12:03:35 pm »
Hi. Those who observe HexEdit in svn log may notice that I've reached the 0.5 version. This version include:

  • Can edit files with size up to 10^19 bytes (tested on 3GB iso file)
  • Search for utf8 string, hex string or by calculating some expression
  • Adjustable view: bin/hex, byte/word/dword/qword, big/little endian
  • Adjustable number of columns in one row
  • Build-in expression parser which can be used to calculate some value based on current cursor position and preview it, can also be used to automatically calculate address on goto and to give more advanced search criteria

The version 0.5 also means that I've reached the end of my roadmap for this plugin. This means that from now on in probably next few months I'll only fix bugs, maybe add some small features in meantime. I need to focus on other tasks right now :) If anybody has some feature request, please send an PM to me.

Also keep in mind that the 0.5 version is not bug-free. I did my best to create product with good quality and especially tested the code that may damage some data. But no guarantees are given.

Regards
   BYO