testmycode / tmc-netbeans

Test My Code NetBeans plugin
GNU General Public License v2.0
19 stars 18 forks source link

Bug in showing Settings #109

Closed UMTti closed 9 years ago

UMTti commented 9 years ago
  1. Start NetBeans
  2. Click TMC -> Settings
  3. Click closing cross
  4. Click TMC -> Settings -----> Settings panel doesn't open

Issue is located in https://github.com/testmycode/tmc-netbeans/blob/master/tmc-plugin/src/fi/helsinki/cs/tmc/actions/ShowSettingsAction.java#L46 , the program thinks that prefUiFactory.isPreferencesUiVisible() is true and returns from function which shows preferences panel. This happens, because dialog is created in step 2, but it isn't destroyed correctly then.

DialogDescriptor is created in https://github.com/testmycode/tmc-netbeans/blob/master/tmc-plugin/src/fi/helsinki/cs/tmc/ui/PreferencesUIFactory.java#L89. In constructor there is NotifyDescriptor.OK_CANCEL_OPTION, but nothing related to closing option.

We tried to add descriptor.setClosingOptions(new Object[]{NotifyDescriptor.CLOSED_OPTION}); after constructor but it didn't help.

a544jh commented 9 years ago

I could take a look at this

a544jh commented 9 years ago

This is now fixed & merged

jamo commented 9 years ago

Oh right, I was hoping on github to automatically close this...