David Mundie wrote:
> No, Hussein's proposal is better. The only time I've wished XMLEditor
> had kept a file name in the list is when I've introduced syntactic
> errors with an external tool.
This is indeed one case which I get infuriated by - I use external tools
a lot. You edit externally, XXE fails to open it, you fix the problem
externally and suddenly XXE has lost it.
The other case is where I have a file on a network share - again I use
them a lot and the fix is to re-mount the share, not to assume that the
file has gone for ever.
The fact is that XXE does not remove non-existent files from the list
anyway until you try and open them! I would be happy if they did not
move to the top of the list if an open fails. That way they just drop
off the bottom eventually. Obviously different users use the recent
files in very different ways!
Hussein wrote:
> Simply replace com.xmlmind.xmleditapp.kit.part.RecentFilesMenuItems by a
> slightly modified class of your own. (All this is fully documented --
> see our web site.)
I would gladly have a go at this but I have never written a line of java
in my life. Perhaps this is when I learn.
As far as I can see, this class simply deletes all the recent files list
(line 39) and then rebuilds it using
app.getProperty("lastOpenedFiles");
and
urlHistory.getAll();
My strategy would be to add each file successfully opened to the top of
the list and shift the others down until I either reach a maximum or a
previous instance of the same file. This way files which don't get
opened drop off the bottom eventually.
Philip