Re: [JPP-Devel] File drag-and-drop revisited
Thanks Paul. I was already downloading your build. I'll give it a spin this afternoon and will get back to you. The Sunburned Surveyor On 9/28/07, Paul Austin [EMAIL PROTECTED] wrote: Landon, It is tied into my new OpenFile changes, so if people are happy with what i've done I can merge it into the trunk at any time. The latest test release is at http://open.revolsys.com/download/nightly/openjump/openjump-core-1.2-20070928-bin.zip Paul Sunburned Surveyor wrote: Paul, Any firm plans on migrating this change to the trunk? Do you need someone to do some testing first? The Sunburned Surveyor On 9/24/07, Martin Davis [EMAIL PROTECTED] wrote: Excellent! This will be great functionality to have in OJ. M Paul Austin wrote: Martin, This will fit nicely into my new OpenFile plug-in, all I'll need to do is make one small change to be able to call the plug-in with a list of files rather than a single file (used in the open recent). With this approach if there are any required options or more than one file loader then the wizard pops up to allow them to select the options. I can take on that part as the code hasn't been integrated into the trunk yet. Paul Martin Davis wrote: That'd be great. The FileDrop code is almost trivial - the trick will be figuring out where and how to patch it into JUMP. One thing that will be needed I think is a mapping from file extensions to DataSource types (AFAIK that's not present now). I'd volunteer myself, but right now all my open source hours are taken up with JTS stuff... Martin Sunburned Surveyor wrote: Martin, Maybe I can take a peek at the code in the library this week? SS On 9/19/07, Martin Davis [EMAIL PROTECTED] wrote: Hey, coders. Check out the FileDrop library for doing file drag-and-drop: http://iharder.sourceforge.net/filedrop/ The code is unlicensed and can be repackaged and used anywhere It's almost trivial to use - with one class FileDrop you can respond to file drop events on any Swing component. It took me literally 5 minutes to implement file dropping in the JTS TestBuilder, using this code: private void initFileDrop(Component comp) { new FileDrop(comp, new FileDrop.Listener() { public void filesDropped(java.io.File[] files) { try { openXmlFilesAndDirectories(files); } catch (Exception ex) { reportException(null, ex); } } }); } With this, I can see adding file dropping in two places in OJ: - dropping onto a Task (Project) window would load the dataset(s) into that Task - dropping onto the top OJ frame would create a new task and load the dataset(s) into it This is a perfect example of where modularizing into View and Model is important. The file loading/task creation code should be in the model module, where it can be called from many different view gestures (menu items and drop events, in this case). Anyone keen to give this a go? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net
Re: [JPP-Devel] File drag-and-drop revisited
Hi Paul, I'll try it as soon as possible as I'm concerned with a few plugins I wrote I'll have to adapt to this new framework. The release at http://open.revolsys.com/download/nightly/openjump/openjump-core-1.2-20070928-bin.zip returns this exception on my machine : com.vividsolutions.jts.util.AssertionFailedException: Should never reach here at com.vividsolutions.jts.util.Assert.shouldNeverReachHere(Assert.java:122) at com.vividsolutions.jts.util.Assert.shouldNeverReachHere(Assert.java:111) at com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.abstractPlugInActionListener(FeatureInstaller.java:552) at com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.addMainMenuItemWithJava14Fix(FeatureInstaller.java:531) at com.vividsolutions.jump.workbench.JUMPConfiguration.configureMainMenus(JUMPConfiguration.java:647) at com.vividsolutions.jump.workbench.JUMPConfiguration.setup(JUMPConfiguration.java:362) at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:257) at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:222) Any idea ? Michaël Paul Austin a écrit : Landon, It is tied into my new OpenFile changes, so if people are happy with what i've done I can merge it into the trunk at any time. The latest test release is at http://open.revolsys.com/download/nightly/openjump/openjump-core-1.2-20070928-bin.zip Paul Sunburned Surveyor wrote: Paul, Any firm plans on migrating this change to the trunk? Do you need someone to do some testing first? The Sunburned Surveyor On 9/24/07, Martin Davis [EMAIL PROTECTED] wrote: Excellent! This will be great functionality to have in OJ. M Paul Austin wrote: Martin, This will fit nicely into my new OpenFile plug-in, all I'll need to do is make one small change to be able to call the plug-in with a list of files rather than a single file (used in the open recent). With this approach if there are any required options or more than one file loader then the wizard pops up to allow them to select the options. I can take on that part as the code hasn't been integrated into the trunk yet. Paul Martin Davis wrote: That'd be great. The FileDrop code is almost trivial - the trick will be figuring out where and how to patch it into JUMP. One thing that will be needed I think is a mapping from file extensions to DataSource types (AFAIK that's not present now). I'd volunteer myself, but right now all my open source hours are taken up with JTS stuff... Martin Sunburned Surveyor wrote: Martin, Maybe I can take a peek at the code in the library this week? SS On 9/19/07, Martin Davis [EMAIL PROTECTED] wrote: Hey, coders. Check out the FileDrop library for doing file drag-and-drop: http://iharder.sourceforge.net/filedrop/ The code is unlicensed and can be repackaged and used anywhere It's almost trivial to use - with one class FileDrop you can respond to file drop events on any Swing component. It took me literally 5 minutes to implement file dropping in the JTS TestBuilder, using this code: private void initFileDrop(Component comp) { new FileDrop(comp, new FileDrop.Listener() { public void filesDropped(java.io.File[] files) { try { openXmlFilesAndDirectories(files); } catch (Exception ex) { reportException(null, ex); } } }); } With this, I can see adding file dropping in two places in OJ: - dropping onto a Task (Project) window would load the dataset(s) into that Task - dropping onto the top OJ frame would create a new task and load the dataset(s) into it This is a perfect example of where modularizing into View and Model is important. The file loading/task creation code should be in the model module, where it can be called from many different view gestures (menu items and drop events, in this case). Anyone keen to give this a go? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] File drag-and-drop revisited
Michaël, 1. Which Operating system? 2. Which java version 3. Did you add you're plug-ins into lib/ext Cheers, Paul Michaël Michaud wrote: Hi Paul, I'll try it as soon as possible as I'm concerned with a few plugins I wrote I'll have to adapt to this new framework. The release at http://open.revolsys.com/download/nightly/openjump/openjump-core-1.2-20070928-bin.zip returns this exception on my machine : com.vividsolutions.jts.util.AssertionFailedException: Should never reach here at com.vividsolutions.jts.util.Assert.shouldNeverReachHere(Assert.java:122) at com.vividsolutions.jts.util.Assert.shouldNeverReachHere(Assert.java:111) at com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.abstractPlugInActionListener(FeatureInstaller.java:552) at com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.addMainMenuItemWithJava14Fix(FeatureInstaller.java:531) at com.vividsolutions.jump.workbench.JUMPConfiguration.configureMainMenus(JUMPConfiguration.java:647) at com.vividsolutions.jump.workbench.JUMPConfiguration.setup(JUMPConfiguration.java:362) at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:257) at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:222) Any idea ? Michaël Paul Austin a écrit : Landon, It is tied into my new OpenFile changes, so if people are happy with what i've done I can merge it into the trunk at any time. The latest test release is at http://open.revolsys.com/download/nightly/openjump/openjump-core-1.2-20070928-bin.zip Paul Sunburned Surveyor wrote: Paul, Any firm plans on migrating this change to the trunk? Do you need someone to do some testing first? The Sunburned Surveyor On 9/24/07, Martin Davis [EMAIL PROTECTED] wrote: Excellent! This will be great functionality to have in OJ. M Paul Austin wrote: Martin, This will fit nicely into my new OpenFile plug-in, all I'll need to do is make one small change to be able to call the plug-in with a list of files rather than a single file (used in the open recent). With this approach if there are any required options or more than one file loader then the wizard pops up to allow them to select the options. I can take on that part as the code hasn't been integrated into the trunk yet. Paul Martin Davis wrote: That'd be great. The FileDrop code is almost trivial - the trick will be figuring out where and how to patch it into JUMP. One thing that will be needed I think is a mapping from file extensions to DataSource types (AFAIK that's not present now). I'd volunteer myself, but right now all my open source hours are taken up with JTS stuff... Martin Sunburned Surveyor wrote: Martin, Maybe I can take a peek at the code in the library this week? SS On 9/19/07, Martin Davis [EMAIL PROTECTED] wrote: Hey, coders. Check out the FileDrop library for doing file drag-and-drop: http://iharder.sourceforge.net/filedrop/ The code is unlicensed and can be repackaged and used anywhere It's almost trivial to use - with one class FileDrop you can respond to file drop events on any Swing component. It took me literally 5 minutes to implement file dropping in the JTS TestBuilder, using this code: private void initFileDrop(Component comp) { new FileDrop(comp, new FileDrop.Listener() { public void filesDropped(java.io.File[] files) { try { openXmlFilesAndDirectories(files); } catch (Exception ex) { reportException(null, ex); } } }); } With this, I can see adding file dropping in two places in OJ: - dropping onto a Task (Project) window would load the dataset(s) into that Task - dropping onto the top OJ frame would create a new task and load the dataset(s) into it This is a perfect example of where modularizing into View and Model is important. The file loading/task creation code should be in the model module, where it can be called from many different view gestures (menu items and drop events, in this case). Anyone keen to give this a go? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by:
Re: [JPP-Devel] File drag-and-drop revisited
Larry Becker a écrit : Paul, Add -Duser.language=FR to your launch file and you'll see the error. Larry Hey, shame on me as I already encountered and resolved the problem the first time I tested Paul's development. I changed the regional parameters to english on my box and it works. Enough for testing. Drag and drop works like a charm. With Larry and Paul, we make sure that OpenJUMP will keep its user-friendlyness, a domain where it already excels :-) @Paul : Some times ago, I patched I18N to use the key each time the code did not find a value in a language file, because I thought that the soft should not stop because of a missing value. How it goes that a language problem prevent me from launching OJ ? Michael - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] File drag-and-drop revisited
Hi Michaël, You'll have to forgive my lazy English person when it comes to I18N, I hadn't put all the I18N stuff in all the files. I just used that new tool and have added them in so the nightly build tonight on my server will have the changes that should work in other languages. I agree that the I18N code should not cause exceptions if it can't find a language and default to the English so at least something works. Any chance you can check in the patch? Paul Michaël Michaud wrote: Larry Becker a écrit : Paul, Add -Duser.language=FR to your launch file and you'll see the error. Larry Hey, shame on me as I already encountered and resolved the problem the first time I tested Paul's development. I changed the regional parameters to english on my box and it works. Enough for testing. Drag and drop works like a charm. With Larry and Paul, we make sure that OpenJUMP will keep its user-friendlyness, a domain where it already excels :-) @Paul : Some times ago, I patched I18N to use the key each time the code did not find a value in a language file, because I thought that the soft should not stop because of a missing value. How it goes that a language problem prevent me from launching OJ ? Michael - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] File drag-and-drop revisited
Martin, Maybe I can take a peek at the code in the library this week? SS On 9/19/07, Martin Davis [EMAIL PROTECTED] wrote: Hey, coders. Check out the FileDrop library for doing file drag-and-drop: http://iharder.sourceforge.net/filedrop/ The code is unlicensed and can be repackaged and used anywhere It's almost trivial to use - with one class FileDrop you can respond to file drop events on any Swing component. It took me literally 5 minutes to implement file dropping in the JTS TestBuilder, using this code: private void initFileDrop(Component comp) { new FileDrop(comp, new FileDrop.Listener() { public void filesDropped(java.io.File[] files) { try { openXmlFilesAndDirectories(files); } catch (Exception ex) { reportException(null, ex); } } }); } With this, I can see adding file dropping in two places in OJ: - dropping onto a Task (Project) window would load the dataset(s) into that Task - dropping onto the top OJ frame would create a new task and load the dataset(s) into it This is a perfect example of where modularizing into View and Model is important. The file loading/task creation code should be in the model module, where it can be called from many different view gestures (menu items and drop events, in this case). Anyone keen to give this a go? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] File drag-and-drop revisited
Hi Paul, This will fit nicely into my new OpenFile plug-in I was thinking the same thing. thanks, Larry On 9/24/07, Paul Austin [EMAIL PROTECTED] wrote: Martin, This will fit nicely into my new OpenFile plug-in, all I'll need to do is make one small change to be able to call the plug-in with a list of files rather than a single file (used in the open recent). With this approach if there are any required options or more than one file loader then the wizard pops up to allow them to select the options. I can take on that part as the code hasn't been integrated into the trunk yet. Paul Martin Davis wrote: That'd be great. The FileDrop code is almost trivial - the trick will be figuring out where and how to patch it into JUMP. One thing that will be needed I think is a mapping from file extensions to DataSource types (AFAIK that's not present now). I'd volunteer myself, but right now all my open source hours are taken up with JTS stuff... Martin Sunburned Surveyor wrote: Martin, Maybe I can take a peek at the code in the library this week? SS On 9/19/07, Martin Davis [EMAIL PROTECTED] wrote: Hey, coders. Check out the FileDrop library for doing file drag-and-drop: http://iharder.sourceforge.net/filedrop/ The code is unlicensed and can be repackaged and used anywhere It's almost trivial to use - with one class FileDrop you can respond to file drop events on any Swing component. It took me literally 5 minutes to implement file dropping in the JTS TestBuilder, using this code: private void initFileDrop(Component comp) { new FileDrop(comp, new FileDrop.Listener() { public void filesDropped(java.io.File[] files) { try { openXmlFilesAndDirectories(files); } catch (Exception ex) { reportException(null, ex); } } }); } With this, I can see adding file dropping in two places in OJ: - dropping onto a Task (Project) window would load the dataset(s) into that Task - dropping onto the top OJ frame would create a new task and load the dataset(s) into it This is a perfect example of where modularizing into View and Model is important. The file loading/task creation code should be in the model module, where it can be called from many different view gestures (menu items and drop events, in this case). Anyone keen to give this a go? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- http://amusingprogrammer.blogspot.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel