Changeset 10122 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r10035 r10122 27 27 import javax.swing.event.ChangeListener; 28 28 29 import org.openstreetmap.josm.Main; 29 30 import org.openstreetmap.josm.gui.help.HelpBrowser; 30 31 import org.openstreetmap.josm.gui.help.HelpUtil; … … 229 230 } 230 231 231 if (msg instanceof String) {232 msg = new JMultilineLabel((String) msg, true);233 }234 235 232 final JOptionPane pane = new JOptionPane( 236 msg ,233 msg instanceof String ? new JMultilineLabel((String) msg, true) : msg, 237 234 messageType, 238 235 JOptionPane.DEFAULT_OPTION, … … 241 238 defaultButton 242 239 ); 240 241 // Log message. Useful for bug reports and unit tests 242 switch (messageType) { 243 case JOptionPane.ERROR_MESSAGE: 244 Main.error(title + " - " + msg); 245 break; 246 case JOptionPane.WARNING_MESSAGE: 247 Main.warn(title + " - " + msg); 248 break; 249 default: 250 Main.info(title + " - " + msg); 251 } 243 252 244 253 if (!GraphicsEnvironment.isHeadless()) { -
trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
r10121 r10122 39 39 try { 40 40 System.setProperty("josm.plugins", "buildings_tools,plastic_laf"); 41 assertEquals("buildings_tools,plastic_laf", System.getProperty("josm.plugins"));42 41 SplashProgressMonitor monitor = new SplashProgressMonitor("foo", new ChangeListener() { 43 42 @Override … … 47 46 }); 48 47 Collection<PluginInformation> plugins = MainApplication.updateAndLoadEarlyPlugins(null, monitor); 49 assertEquals("buildings_tools,plastic_laf", System.getProperty("josm.plugins"));50 48 assertEquals(2, plugins.size()); 51 49 assertNotNull(PluginHandler.getPlugin("plastic_laf"));
Note:
See TracChangeset
for help on using the changeset viewer.