MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getGUIHistory

Method getGUIHistory

src/main/java/core/packetproxy/gui/GUIMain.java:152–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150 }
151
152 private GUIHistory getGUIHistory() throws Exception {
153 // 環境変数RESTORE_HISTORYで指定されている場合promptせずに起動
154 String restoreHistoryEnv = System.getenv("RESTORE_HISTORY");
155 if (restoreHistoryEnv != null) {
156
157 if (restoreHistoryEnv.matches("(?i)(true|yes|y|restore)")) {
158
159 return GUIHistory.restoreLastInstance(this);
160 } else if (restoreHistoryEnv.matches("(?i)(false|no|n|drop)")) {
161
162 return GUIHistory.getInstance(this);
163 }
164 }
165
166 // 環境変数RESTORE_HISTORYで指定されていなかった場合Historyをrestoreするか聞く
167 int restoreHistory = JOptionPane.showConfirmDialog(this,
168 I18nString.get("Do you want to load the previous packet data?"),
169 I18nString.get("Loading previous packet data"), YES_NO_OPTION);
170 if (restoreHistory == YES_NO_OPTION) {
171
172 return GUIHistory.restoreLastInstance(this);
173 } else {
174
175 return GUIHistory.getInstance(this);
176 }
177 }
178
179 private void setLookandFeel() throws Exception {
180 if (PacketProxyUtility.getInstance().isUnix()) {

Callers 1

GUIMainMethod · 0.95

Calls 4

restoreLastInstanceMethod · 0.95
getInstanceMethod · 0.95
getMethod · 0.95
matchesMethod · 0.45

Tested by

no test coverage detected