right. should be fixed in r5168.. thx ede

On 06.11.2016 17:34, Michaël Michaud wrote:
> Hi Ede,
> 
> When starting OpenJUMP, I now get the following exception from the console :
> 
> java.lang.NullPointerException
>      at 
> org.openjump.core.ui.plugin.file.open.JFCWithEnterAction.getSelectedFile(JFCWithEnterAction.java:79)
>      at 
> com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(WindowsFileChooserUI.java:439)
>      at 
> javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:173)
>      at 
> com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:149)
>      at javax.swing.JComponent.setUI(JComponent.java:666)
>      at javax.swing.JFileChooser.updateUI(JFileChooser.java:1836)
>      at javax.swing.JFileChooser.setup(JFileChooser.java:371)
>      at javax.swing.JFileChooser.<init>(JFileChooser.java:343)
>      at javax.swing.JFileChooser.<init>(JFileChooser.java:296)
>      at 
> org.openjump.core.ui.plugin.file.open.JFCWithEnterAction.<init>(JFCWithEnterAction.java:27)
>      at 
> com.vividsolutions.jump.workbench.datasource.SaveFileDataSourceQueryChooser.getFileChooserPanel(SaveFileDataSourceQueryChooser.java:102)
>      at 
> com.vividsolutions.jump.workbench.datasource.FileDataSourceQueryChooser.setFileFilters(FileDataSourceQueryChooser.java:189)
>      at 
> com.vividsolutions.jump.workbench.datasource.FileDataSourceQueryChooser.getComponent(FileDataSourceQueryChooser.java:157)
>      at 
> com.vividsolutions.jump.workbench.datasource.DataSourceQueryChooserDialog.init(DataSourceQueryChooserDialog.java:112)
>      at 
> com.vividsolutions.jump.workbench.datasource.DataSourceQueryChooserDialog.<init>(DataSourceQueryChooserDialog.java:83)
>      at 
> com.vividsolutions.jump.workbench.datasource.SaveDatasetAsPlugIn.getDialog(SaveDatasetAsPlugIn.java:92)
>      at 
> com.vividsolutions.jump.workbench.datasource.SaveDatasetAsPlugIn.setSelectedFormat(SaveDatasetAsPlugIn.java:76)
>      at 
> com.vividsolutions.jump.workbench.datasource.AbstractLoadSaveDatasetPlugIn$1.windowOpened(AbstractLoadSaveDatasetPlugIn.java:28)
> 
> 
> Le 06/11/2016 à 16:18, [email protected] a écrit :
>> Mike,
>>
>> this should be fixed permanently now w/ r5167.. ede
>>
>> On 09.10.2016 19:24, Michaël Michaud wrote:
>>> Hi Ede,
>>>
>>>
>>>> Mike,
>>>>
>>>> i moved a workaround for JFC from deep within the Wizards, where (as it 
>>>> was described) sometimes getSelectedFile() returns null, although there is 
>>>> one selected. the workaround is to use the first entry in 
>>>> getSelectedFiles().
>>>>
>>>> can you give a step-by-step with an old snapshot, so i can reproduce the 
>>>> error and try to solve it on my side?
>>> Sure, it is easy to reproduce as state in my previous mail :
>>> Use a version of openJUMP > r4995 (ex. r5030)
>>> - Create a new Layer
>>> - Save layers without datasource (File menu)
>>> - Select a directory (you can select it without opening it or open it) -> 
>>> in both case you get its name in the text area (ex. D:\Temp)
>>> The prompt ask you to choose a format
>>> - choose jml or shp
>>> - OK =>
>>>
>>> java.lang.NullPointerException
>>>      at java.net.URI$Parser.parse(URI.java:3042)
>>>      at java.net.URI.<init>(URI.java:588)
>>>      at 
>>> com.vividsolutions.jump.io.datasource.ReaderWriterFileDataSource$1.executeUpdate(ReaderWriterFileDataSource.java:118)
>>>      at 
>>> org.openjump.core.ui.plugin.file.SaveLayersWithoutDataSourcePlugIn.saveLayer(SaveLayersWithoutDataSourcePlugIn.java:174)
>>>      at 
>>> org.openjump.core.ui.plugin.file.SaveLayersWithoutDataSourcePlugIn.execute(SaveLayersWithoutDataSourcePlugIn.java:151)
>>>      at 
>>> org.openjump.core.ui.plugin.file.SaveLayersWithoutDataSourcePlugIn.execute(SaveLayersWithoutDataSourcePlugIn.java:106)
>>>
>>> A few System.out.println showed me that OJ tries to save the file in 
>>> "D:\D:\" !
>>>
>>> Michaël
>>>
>>>> ..ede
>>>>
>>>> On 08.10.2016 11:17, Michaël Michaud wrote:
>>>>> Hi Ede,
>>>>>
>>>>> I tried but couldn't. Indeed, I can see no problem with JFileChooser 
>>>>> while JFCWithEnterAction just don't work (with showSaveDialog).
>>>>> (tried with jdk 1.7 and 1.8 on windows10)
>>>>>
>>>>> Did you try to solve a platform specific problem ?
>>>>>
>>>>> Michaël
>>>>>
>>>>>
>>>>> Le 07/10/2016 à 15:18, [email protected] a écrit :
>>>>>> how about fixing the issue instead ;)?.. ede
>>>>>>
>>>>>> On 07.10.2016 15:13, Michaud Michael wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>>    The problem is that JFCWithEnterAction#getSelectedFile does not 
>>>>>>> always return the file which name is in the input field (ex. "D:\" 
>>>>>>> while "D:\Temp" is displayed in the field)
>>>>>>>
>>>>>>> More over, the way the File object is build sometimes leads to return 
>>>>>>> "D:\D:\" where the textfield shows "D:\Temp".
>>>>>>>
>>>>>>> As a consequence, SaveLayersWithoutDataSourcePlugIn throws an exception.
>>>>>>>
>>>>>>>    Michaël
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> De : [email protected]
>>>>>>>
>>>>>>> Date d'envoi : vendredi 7 octobre 2016 à 12h35
>>>>>>>
>>>>>>> A : OpenJump develop and use <[email protected]>
>>>>>>>
>>>>>>> Objet : Re: [JPP-Devel] SVN: [5054] core/trunk
>>>>>>>
>>>>>>> hey Mike,
>>>>>>>
>>>>>>> that looks wrong. without JFCWithEnterAction you may not finish your 
>>>>>>> input with the enter key.
>>>>>>> what was the issue?
>>>>>>>
>>>>>>> ..ede
>>>>>>>
>>>>>>>
>>>>>>> On 07.10.2016 09:06, [email protected] wrote:
>>>>>>>> Revision: 5054
>>>>>>>> http://sourceforge.net/p/jump-pilot/code/5054
>>>>>>>> Author: michaudm
>>>>>>>> Date: 2016-10-07 07:06:53 +0000 (Fri, 07 Oct 2016)
>>>>>>>> Log Message:
>>>>>>>> -----------
>>>>>>>> Fix SaveLayersWithoutDataSourcePlugIn by using JFileChooser instead of 
>>>>>>>> JFCWithEnterAction
>>>>>>>>
>>>>>>>> Modified Paths:
>>>>>>>> --------------
>>>>>>>> core/trunk/ChangeLog
>>>>>>>> core/trunk/src/org/openjump/core/ui/plugin/file/SaveLayersWithoutDataSourcePlugIn.java
>>>>>>>>
>>>>>>>> Modified: core/trunk/ChangeLog
>>>>>>>> ===================================================================
>>>>>>>> --- core/trunk/ChangeLog 2016-10-06 22:26:18 UTC (rev 5053)
>>>>>>>> +++ core/trunk/ChangeLog 2016-10-07 07:06:53 UTC (rev 5054)
>>>>>>>> @@ -3,6 +3,10 @@
>>>>>>>> # 2. make sure that lines break at 80 chars for constricted display 
>>>>>>>> situations
>>>>>>>> ##
>>>>>>>>
>>>>>>>> +2016-10-07 mmichaud
>>>>>>>> + * Fix SaveLayersWithoutDataSourcePlugIn by using JFileChooser 
>>>>>>>> instead of
>>>>>>>> + JFCWithEnterAction
>>>>>>>> +
>>>>>>>> 2016-10-06 ede
>>>>>>>> * PLUS: update ImageIO-Ext to 1.1.15, GDAL binding to 2.1.0
>>>>>>>>
>>>>>>>>
>>>>>>>> Modified: 
>>>>>>>> core/trunk/src/org/openjump/core/ui/plugin/file/SaveLayersWithoutDataSourcePlugIn.java
>>>>>>>> ===================================================================
>>>>>>>> --- 
>>>>>>>> core/trunk/src/org/openjump/core/ui/plugin/file/SaveLayersWithoutDataSourcePlugIn.java
>>>>>>>>  2016-10-06 22:26:18 UTC (rev 5053)
>>>>>>>> +++ 
>>>>>>>> core/trunk/src/org/openjump/core/ui/plugin/file/SaveLayersWithoutDataSourcePlugIn.java
>>>>>>>>  2016-10-07 07:06:53 UTC (rev 5054)
>>>>>>>> @@ -90,7 +90,8 @@
>>>>>>>> }
>>>>>>>>
>>>>>>>> public void initialize(PlugInContext context) throws Exception {
>>>>>>>> - fileChooser = new JFCWithEnterAction();
>>>>>>>> + //fileChooser = new JFCWithEnterAction();
>>>>>>>> + fileChooser = new JFileChooser();
>>>>>>>> fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
>>>>>>>> fileChooser.setDialogTitle(FILECHOOSER);
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>>>>>> _______________________________________________
>>>>>>>> Jump-pilot-devel mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>>>>> _______________________________________________
>>>>>>> Jump-pilot-devel mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> ------------------------------------------------------------------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to