mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
CommentsConfig extracting
This commit is contained in:
parent
f9b37c9d02
commit
907a61c12b
@ -10,6 +10,7 @@ import net.azib.ipscan.core.ScanningResult;
|
||||
import net.azib.ipscan.core.ScanningResultList;
|
||||
import net.azib.ipscan.fetchers.MACFetcher;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.net.InetAddress;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
@ -21,6 +22,7 @@ import java.util.prefs.Preferences;
|
||||
public class CommentsConfig {
|
||||
private Preferences preferences;
|
||||
|
||||
@Inject
|
||||
public CommentsConfig(Preferences preferences) {
|
||||
// use a separate node for comments - they can get large
|
||||
this.preferences = preferences.node("comments");
|
||||
|
||||
@ -56,7 +56,6 @@ public class ComponentRegistry {
|
||||
container.registerComponentInstance(globalConfig.forOpeners());
|
||||
container.registerComponentInstance(globalConfig.forFavorites());
|
||||
container.registerComponentInstance(Labels.getInstance());
|
||||
container.registerComponentImplementation(CommentsConfig.class);
|
||||
|
||||
container.registerComponentInstance(DaggerExporterComponent.create().get());
|
||||
container.registerComponentInstance(DaggerFetcherComponent.create().get());
|
||||
|
||||
@ -20,6 +20,8 @@ import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* The "Show IP Details" Window
|
||||
*
|
||||
@ -27,17 +29,18 @@ import org.eclipse.swt.widgets.Text;
|
||||
*/
|
||||
public class DetailsWindow extends AbstractModalDialog {
|
||||
|
||||
@Inject
|
||||
CommentsConfig commentsConfig;
|
||||
|
||||
private GUIConfig guiConfig;
|
||||
private CommentsConfig commentsConfig;
|
||||
private ResultTable resultTable;
|
||||
private ScanningResultList scanningResults;
|
||||
|
||||
int resultIndex;
|
||||
private Text commentsText;
|
||||
|
||||
public DetailsWindow(GUIConfig guiConfig, CommentsConfig commentsConfig, ResultTable resultTable, ScanningResultList scanningResults) {
|
||||
public DetailsWindow(GUIConfig guiConfig, ResultTable resultTable, ScanningResultList scanningResults) {
|
||||
this.guiConfig = guiConfig;
|
||||
this.commentsConfig = commentsConfig;
|
||||
this.resultTable = resultTable;
|
||||
this.scanningResults = scanningResults;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user