• R/O
  • SSH
  • HTTPS

wolf-desktop: コミット


コミットメタ情報

リビジョン375 (tree)
日時2015-04-03 16:46:52
作者l_v_yonsama

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/engine/SQLServerThread.java (revision 374)
+++ Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/engine/SQLServerThread.java (revision 375)
@@ -270,6 +270,38 @@
270270 return configFileDir;
271271 }
272272
273+ public boolean copyConfigFrom(File copy_config_folder) {
274+ if (!copy_config_folder.exists()) {
275+ return false;
276+ }
277+ dispose();
278+ File def = new File(copy_config_folder, "connections.def");
279+ File xml = new File(copy_config_folder, "connections.def.xml");
280+ if (def.exists()) {
281+ ConnectionSettingBean load = (ConnectionSettingBean) SQLUtil2
282+ .readObject(def);
283+ try {
284+ if (load == null) {
285+ if (xml != null) {
286+ load = (ConnectionSettingBean) SQLUtil2
287+ .readObjectXML(xml);
288+ }
289+ }
290+ if (load != null) {
291+ this.fConnectionSettingBean = load;
292+
293+ saveConnectionProperties();
294+ saveConnectionPropertiesToXml();
295+ }
296+ } catch (Exception e2) {
297+ e2.printStackTrace();
298+ }
299+
300+ this.init(this.configFileDir);
301+ }
302+ return true;
303+ }
304+
273305 public boolean init(File configFileDir) {
274306 this.configFileDir = configFileDir;
275307 if (!this.configFileDir.exists()) {
@@ -349,7 +381,6 @@
349381 }
350382
351383 public boolean saveConnectionProperties() throws IOException {
352- System.out.println("save :: " + fConnectionSettingBean);
353384 return FileUtil.save(connectionSetFile, fConnectionSettingBean);
354385 }
355386
@@ -746,7 +777,7 @@
746777
747778 /**
748779 * Close SSH-tunneling.
749- *
780+ *
750781 * @param sshProperties
751782 * @return true:success
752783 */
--- Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/resource/view/DBResourceCompositeMaker.java (revision 374)
+++ Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/resource/view/DBResourceCompositeMaker.java (revision 375)
@@ -2,9 +2,13 @@
22
33 import hiro.yoshioka.sql.ResourceSorter;
44 import hiro.yoshioka.util.ImageUtil;
5+import hiro.yoshioka.util.StringUtil;
6+import hiro.yoshioka.util.Util;
57 import hiro.yoshioka.util.ui.MySubjectControlContentAssistant;
68
79 import org.eclipse.swt.SWT;
10+import org.eclipse.swt.dnd.TextTransfer;
11+import org.eclipse.swt.dnd.Transfer;
812 import org.eclipse.swt.events.KeyAdapter;
913 import org.eclipse.swt.events.SelectionAdapter;
1014 import org.eclipse.swt.events.SelectionEvent;
@@ -81,6 +85,28 @@
8185 public void keyReleased(org.eclipse.swt.events.KeyEvent e) {
8286 if (e.stateMask == SWT.CTRL && e.character == ' ') {
8387 e.doit = false;
88+ } else if (e.stateMask == SWT.CTRL && e.character == 'a') {
89+ if (fSearchText.getText().length() > 0) {
90+ fSearchText.setSelection(0, fSearchText.getText()
91+ .length());
92+ }
93+ e.doit = false;
94+ } else if (e.stateMask == SWT.CTRL && e.character == 'p') {
95+ String str = (String) Util.getClipboard().getContents(
96+ TextTransfer.getInstance());
97+ fSearchText.setText(str);
98+ viewer.pressEnter(fSearchText.getText());
99+ e.doit = false;
100+ } else if (e.stateMask == SWT.CTRL && e.character == 'c') {
101+ if (!StringUtil.isEmpty(fSearchText.getSelectionText())) {
102+ Util.getClipboard()
103+ .setContents(
104+ new Object[] { fSearchText
105+ .getSelectionText() },
106+ new Transfer[] { TextTransfer
107+ .getInstance() });
108+ }
109+ e.doit = false;
84110 } else if (e.character == '\r' || e.character == '\n') {
85111 viewer.pressEnter(fSearchText.getText());
86112 e.doit = false;
--- Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/resource/view/DBTreeLabelProvider.java (revision 374)
+++ Libraries/WolfSQLParser/engine/src/hiro/yoshioka/sql/resource/view/DBTreeLabelProvider.java (revision 375)
@@ -53,8 +53,14 @@
5353 if (element instanceof ConnectionProperties) {
5454 ConnectionProperties prop = (ConnectionProperties) element;
5555 styledString = new StyledString(prop.getDisplayString());
56- styledString.append("(" + prop.getHost() + ")",
57- StyledString.COUNTER_STYLER);
56+ if (prop.getHost().startsWith("127.0.0.1")
57+ || prop.getHost().startsWith("localhost")) {
58+ styledString.append("(" + prop.getHost() + ")",
59+ StyledString.DECORATIONS_STYLER);
60+ } else {
61+ styledString.append("(" + prop.getHost() + ")",
62+ StyledString.COUNTER_STYLER);
63+ }
5864 if (prop.isConnected()) {
5965 cell.setImage(ImageUtil.getImage(ImageUtil.ACTION_32_CONNECT));
6066 } else {
旧リポジトリブラウザで表示