Cleanup fmxlview and javax imports (#3661)

* Remove @FxmlView from abstract view classes

* Use generic javax imports for DI

* Additional cleanup of redundant DI annotations
This commit is contained in:
Christoph Atteneder 2019-11-26 14:36:01 +01:00 committed by GitHub
commit 62aea83308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 43 additions and 61 deletions

View File

@ -23,8 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import java.io.File;

View File

@ -23,8 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import java.io.File;

View File

@ -31,8 +31,8 @@ import bisq.common.crypto.KeyRing;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import javax.inject.Inject;
import javax.inject.Named;
import com.google.common.base.Charsets;

View File

@ -32,8 +32,8 @@ import bisq.common.proto.network.NetworkEnvelope;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import javax.inject.Inject;
import javax.inject.Named;
import com.google.common.base.Charsets;

View File

@ -22,7 +22,7 @@ import bisq.network.NetworkOptionKeys;
import bisq.common.handlers.ErrorMessageHandler;
import bisq.common.storage.FileUtil;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import javax.inject.Singleton;

View File

@ -23,8 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import java.io.File;

View File

@ -23,8 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import java.io.File;

View File

@ -23,8 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import java.io.File;

View File

@ -41,8 +41,8 @@ import bisq.common.crypto.KeyRing;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Utils;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import javax.inject.Inject;
import javax.inject.Named;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;

View File

@ -34,7 +34,7 @@ import bisq.common.storage.JsonFileManager;
import bisq.common.storage.Storage;
import bisq.common.util.Utilities;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -26,9 +26,9 @@ import bisq.network.p2p.storage.payload.ProtectedStorageEntry;
import bisq.common.crypto.KeyRing;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.inject.Named;
import java.util.List;

View File

@ -26,8 +26,8 @@ import bisq.network.p2p.storage.payload.ProtectedStorageEntry;
import bisq.common.crypto.KeyRing;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
import javax.inject.Singleton;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -26,9 +26,9 @@ import bisq.network.p2p.storage.payload.ProtectedStorageEntry;
import bisq.common.crypto.KeyRing;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.inject.Named;
import java.util.List;

View File

@ -23,7 +23,7 @@ import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -31,7 +31,7 @@ import bisq.common.storage.Storage;
import bisq.common.util.Utilities;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import javax.inject.Named;
import javafx.collections.FXCollections;
import javafx.collections.ObservableSet;

View File

@ -19,7 +19,6 @@ package bisq.desktop.main.account.register;
import bisq.desktop.common.view.ActivatableViewAndModel;
import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.components.AutoTooltipLabel;
import bisq.desktop.components.TitledGroupBg;
@ -38,8 +37,6 @@ import bisq.common.UserThread;
import bisq.common.util.Tuple2;
import bisq.common.util.Tuple3;
import com.google.inject.name.Named;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
@ -70,7 +67,6 @@ import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
// TODO translation string keys should renamed to be more generic.
// Lets do it for 1.1.7 the translator have time to add new string.
@FxmlView
public abstract class AgentRegistrationView<R extends DisputeAgent, T extends AgentRegistrationViewModel<R, ?>>
extends ActivatableViewAndModel<VBox, T> {
@ -89,7 +85,7 @@ public abstract class AgentRegistrationView<R extends DisputeAgent, T extends Ag
// Constructor, lifecycle
///////////////////////////////////////////////////////////////////////////////////////////
public AgentRegistrationView(T model, @Named(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
public AgentRegistrationView(T model, boolean useDevPrivilegeKeys) {
super(model);
this.useDevPrivilegeKeys = useDevPrivilegeKeys;
}

View File

@ -25,7 +25,7 @@ import bisq.core.app.AppOptionKeys;
import bisq.core.locale.Res;
import bisq.core.support.dispute.arbitration.arbitrator.Arbitrator;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -25,7 +25,7 @@ import bisq.core.app.AppOptionKeys;
import bisq.core.locale.Res;
import bisq.core.support.dispute.mediation.mediator.Mediator;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -25,7 +25,7 @@ import bisq.core.app.AppOptionKeys;
import bisq.core.locale.Res;
import bisq.core.support.dispute.refund.refundagent.RefundAgent;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -76,7 +76,6 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@FxmlView
public abstract class StateMonitorView<StH extends StateHash,
StB extends StateBlock<StH>,
BLI extends StateBlockListItem<StH, StB>,

View File

@ -65,8 +65,7 @@ import bisq.common.util.Tuple3;
import org.bitcoinj.core.Coin;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
import de.jensd.fx.glyphs.GlyphIcons;

View File

@ -45,7 +45,7 @@ import bisq.network.p2p.NodeAddress;
import com.googlecode.jcsv.writer.CSVEntryConverter;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -47,7 +47,7 @@ import bisq.network.p2p.NodeAddress;
import bisq.common.UserThread;
import bisq.common.util.Utilities;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -99,7 +99,6 @@ import java.util.Optional;
import lombok.Getter;
@FxmlView
public abstract class DisputeView extends ActivatableView<VBox, Void> {
protected final DisputeManager<? extends DisputeList<? extends DisputeList>> disputeManager;

View File

@ -17,7 +17,6 @@
package bisq.desktop.main.support.dispute.agent;
import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.main.overlays.windows.ContractWindow;
import bisq.desktop.main.overlays.windows.DisputeSummaryWindow;
@ -38,11 +37,8 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javafx.scene.control.Button;
@FxmlView
public abstract class DisputeAgentView extends DisputeView {
public DisputeAgentView(DisputeManager<? extends DisputeList<? extends DisputeList>> disputeManager,
@ -54,7 +50,7 @@ public abstract class DisputeAgentView extends DisputeView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
@Named(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
boolean useDevPrivilegeKeys) {
super(disputeManager,
keyRing,
tradeManager,

View File

@ -39,7 +39,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

View File

@ -37,8 +37,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;
@FxmlView

View File

@ -37,7 +37,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -34,7 +34,6 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
@FxmlView
public abstract class DisputeClientView extends DisputeView {
public DisputeClientView(DisputeManager<? extends DisputeList<? extends DisputeList>> DisputeManager,
KeyRing keyRing,

View File

@ -37,7 +37,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -37,7 +37,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -37,7 +37,7 @@ import bisq.core.util.coin.CoinFormatter;
import bisq.common.crypto.KeyRing;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -27,8 +27,8 @@ import bisq.network.p2p.network.TorNetworkNode;
import bisq.common.proto.network.NetworkProtoResolver;
import com.google.inject.Provider;
import com.google.inject.name.Named;
import javax.inject.Provider;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -19,7 +19,7 @@ package bisq.network.p2p.network;
import bisq.network.NetworkOptionKeys;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -20,7 +20,7 @@ package bisq.network.p2p.peers;
import bisq.network.NetworkOptionKeys;
import bisq.network.p2p.NodeAddress;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -36,7 +36,7 @@ import bisq.common.app.Capabilities;
import bisq.common.proto.persistable.PersistedDataHost;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;

View File

@ -23,7 +23,7 @@ import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
import bisq.common.storage.FileUtil;
import bisq.common.storage.Storage;
import com.google.inject.name.Named;
import javax.inject.Named;
import javax.inject.Inject;