CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

FileLine
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddUnrealGoalBotDialog.java136
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/ListEnvironmentsDialog.java50
				.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		clients.addCollectionListener(new CollectionEventAdaptor<EnvironmentService>() {

			@Override
			public void postAddEvent(
					Collection<EnvironmentService> alreadyAdded,
					final Collection<EnvironmentService> whereWereAdded) {
				SwingUtilities.invokeLater(new Runnable() {

					@Override
					public void run() {
						Collection<SelectableEnvironment> s = SelectableEnvironment
								.fromCollection(whereWereAdded);
						environmentList.setModel(new DefaultComboBoxModel(s
								.toArray()));
					}
				});
			}

			@Override
			public void postRemoveEvent(
					Collection<EnvironmentService> alreadyRemoved,
					final Collection<EnvironmentService> whereWereRemoved) {
				SwingUtilities.invokeLater(new Runnable() {

					@Override
					public void run() {
						Collection<SelectableEnvironment> s = SelectableEnvironment
								.fromCollection(whereWereRemoved);
						environmentList.setModel(new DefaultComboBoxModel(s
								.toArray()));
					}
				});
			}
		});

		add(environmentList);