quan-xie / goclipse

Automatically exported from code.google.com/p/goclipse
0 stars 0 forks source link

NewSourceFileWizard always checks for "_test.go" #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the NewSourceFileWizard
2. Choose Test-File
3. Choose "Package Source File" again. 

What is the expected output? What do you see instead?
The user should be able to finish the wizard,
but the "finish" button is disabled and it says "Tests must end with "_test.go" 
suffix".

What version of the product are you using? On what operating system?
goclipse v0.7.2r414
mac osx 10.7.4
eclipse 3.7.2

Original issue reported on code.google.com by eliteSc...@gmail.com on 16 Jul 2012 at 2:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After Step 3, you just have to change the file-name manually, then it works.

Seems like the new file name won't be validated, 
when it's automatically changed.

Original comment by eliteSc...@gmail.com on 16 Jul 2012 at 6:53

GoogleCodeExporter commented 9 years ago
Here is a patch, which fixes this bug.

The problem was, that the deselection-event of the Test-Button
occures before the selection-event, so fireDialogChange() is invoked,
when sourceFileType is still 'TEST'.

Now every button checks, whether the filename is correct and changes it,
if necessary

Original comment by eliteSc...@gmail.com on 16 Jul 2012 at 7:27

Attachments:

GoogleCodeExporter commented 9 years ago
From looking at NewSourceFileComposite.java, it seems like this was patched in 
a while ago but the issue wasn't closed.

Original comment by devonca...@gmail.com on 17 Nov 2012 at 7:28