Hi, I had the same problem and for various reasons I didn't want to use a view for the map window. I found a solution (the Asterisk remains but doesn't bother me): - First of all to prevent Eclipse reopening the editors add this preference line to plugin_customization.ini file (in the root of the main plugin): org.eclipse.ui/CLOSE_EDITORS_ON_EXIT = true
- I create one Project per logged-in user and one Map per project. They are loaded or created when the user logs in. - You might want to disable the "Project explorer" view, so that users can't create a new Map window. Filtering Eclipse plugin elements is another topic and there are two ways to achieve it a) Activities extension point b) Equinox transforms (http://wiki.eclipse.org/Equinox_Transforms) I use the second option to filter out some uDig/Eclipse views/extensions which I don't want them present in the UI. - I subclass the MapEditor class and implement the ISaveablePart2 interface. I override the "doSave","isSaveAsAllowed","isSaveOnCloseNeeded","promptToSaveOnClose" and create a custom "SaveMapRunnable" class. I basically make the editor not closable (and "save as" able) in normal conditions. When the workbench goes for shutdown, I save the custom layers that I want and then I enable the closing of the MapEditor. - To prevent the "New Editor" menu option in the editors context menu, I declare an empty handler for "org.eclipse.ui.window.newEditor" command and set it to always active and always disabled: <handler class="***.ui.internal.handlers.DisabledHandler" commandId="org.eclipse.ui.window.newEditor"> <enabledWhen><count value="-1"/></enabledWhen> <activeWhen><not><count value="-1"/></not></activeWhen> </handler> - Depending on the layers you have on the MapEditor the asterisk will show if the map is dirty. I use some temporary layers so the asterisk is always present. But in the end it doesn't bother me or the customer. Hope this helps, Panagiotis Skintzos On Tue, Jul 24, 2012 at 3:26 AM, Kory Kraft <[email protected]> wrote: > I am currently working on a research project at Furman University > utilizing uDig. > > I am trying using the MapEditor class to display an interactive map that > displays real-time scheduling. > > The current problem I am experiencing relates to the open-save-close > life-cycle of the MapEditor class. Every time the user starts the program, > I want there to only be one MapEditor in the workbench, however, when the > application opens, the program brings up the old MapEditor as well. Added > to this are a few other features that I would like to be able to disable. > I would like the user to be able to close the entire application without > the program asking if the user would like to save the map. I would also > like to disable the asterisk that displays when the editor "isDirty". > > After a little bit of searching, I found a thread on the refractions > forum that related to the same problem I am experiencing, however the > poster never revealed his/her final solution (if any). > > Thus, I figured I would try an email you for your expertise and see if > you could point me in the right direction as to how to solve this problem. > > Thank you so much for taking the time to read this email! > > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
