From: John M. G. <joh...@ya...> - 2005-06-29 01:40:52
|
Vampire, have I told you lately that you da man? Because, if I haven't, then I've really been remiss in my duties as one of your apostles. ;) Thanks for the work you put into this. I'm currently up and running with a proper File System Browser thanks to you. I edited the binary as you suggested. More below. --- Vampire <Vam...@gm...> wrote: > > >BTW: Not sure I'm using the words horizontal/vertical correctly here: > >I'm guessing that a horizontal splitter is one that lies flat left to right, > >though in a sense, you could say that it divides panes vertically into a > >top and bottom, so on another planet you might call it a vertical splitter. > :) > > > > > On jEdits planet the vertically appearing splitter is called horizontal > splitter, because it is the splitter of the horizontal Layout, where the > panes are horizontally arranged side by side. ;-) > All a question of prospect. :-) > > >If there's no easy answer here, could someone please point me to the > >relevant jEdit source code file... Maybe there's more info in the comments > >in there. > > > > > The source-file you search is VFSBrowser.java in the package > org.gjt.sp.jedit.browser. > And the lines u search are, in the sources of 4.2final, lines 177 - 179: > > horizontalLayout = (mode != BROWSER > || DockableWindowManager.TOP.equals(position) > || DockableWindowManager.BOTTOM.equals(position)); > > These tell, that the horizontalLayout is used in all Modes (Open-Mode, > Save-Mode, ...) and even in the normal BROWSER mode, if the Browser is > docked at the top or at the bottom docking position. But for the normal > browser in floating position or left or right docked, the verticalLayout > is used. So u have the option to dock the VFS-Browser at the top or at > the bottom to bring it to horizontalLayout, or u could change the source > file to: > > horizontalLayout = (true); When I get the time, I'll try building jEdit from source with this change. Thanks! :) > and compile ur own jEdit-Version. :-) > I don't see any option/property that has influence on the layout, at > least not in 4.2final. > > One additional, a little more advanced possibility: > > - extract the VFSBrowser.class file from the jedit.jar file. Check. I made a copy of the jedit.jar file to my ~/chop_shop directory, then "jar xf jedit.jar; rm jedit.jar". > - then take a Hex Editor Check. "apt-get install ncurses-hexedit". > and open the VFSBrowser.class file > - search for the HexValues "04 03 B5" Found 'em! > You should only find one occurence in the whole class file and this is, > for me with jEdit 4.2final at file offset 0x3F11. Check. That's the location I found 'em at too. > - change the 03 to 04 To figure that out, I'm guessing you built jEdit both ways and then did a binary compare between the two jedit.jar's to find the difference... Hmm... no, you must've unjarred it and did a recursive diff... Could you please show me the step you followed to do the binary diff? > - save the class file > - put it back into the jedit.jar file Check. For this: "cd ~/chop_shop; jar cmf META-INF/MANIFEST.MF jedit.jar *" Backed up the old jedit.jar, and put my new one in its place. And bingo: I've got my File System Browser! Another question though: why is my new jedit.jar twice the size of the old one? john@avocado:~/opt/jedit/4.2$ ls -l jedit* -rw-r--r-- 1 john john 1645351 2005-06-28 21:24 jedit.jar -rw-r--r-- 1 john john 3172983 2005-06-26 21:46 jedit.jar.orig > > After changing this single byte the FileBrowser is always shown with > horizontalLayout. If you want to use the last method and have further > questions/problems regarding it, don't hesitate to contact me on the > list, in private or on IRC. > > Greetz, > Vampire > > PS: If there are more people who want to have that behaviour, I can > write a quick little java-application, that automatically patches the > class-file within the jar-file. They just have to let me know. :-) > > __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html |