• R/O
  • SSH
  • HTTPS

smart-gs: コミット


コミットメタ情報

リビジョン1205 (tree)
日時2017-04-16 12:02:30
作者yuta-hashimoto

ログメッセージ

Firebaseへの参照を削除

変更サマリ

差分

--- trunk/src/smart_gs/swingui/WorkspaceWindow.java (revision 1204)
+++ trunk/src/smart_gs/swingui/WorkspaceWindow.java (revision 1205)
@@ -79,7 +79,6 @@
7979 import smart_gs.swingui.toolbar.action.GSFileFilter;
8080 import smart_gs.util.CanonicalPathString;
8181 import smart_gs.util.GSLog;
82-import smart_gs.util.GsFirebaseSaver;
8382 import smart_gs.util.GsXMLSaver;
8483 import smart_gs.util.LinkCounter;
8584 import smart_gs.util.ProjectSaver;
@@ -88,10 +87,6 @@
8887 import webdav.WebDavListenerAction;
8988 import webdav.WebDavProcessor;
9089
91-import com.firebase.client.DataSnapshot;
92-import com.firebase.client.Firebase;
93-import com.firebase.client.FirebaseError;
94-import com.firebase.client.ValueEventListener;
9590 import com.hexidec.ekit.GSHTMLEditorSearchActionListner;
9691
9792 @SuppressWarnings("serial")
@@ -105,6 +100,7 @@
105100 private JTabbedPane leftPanel;
106101 private SpreadTreePanel spreadTreePanel;
107102 private UsersNoteTreePanel usersNoteTreePanel;
103+ //private TalkPanel talkPanel;
108104 private JPanel textDocumentPanel;
109105 private WorkspaceWindowNorthPanel workspaceWindowNorthPanel;
110106 private JLabel textDocumentStatusBar;
@@ -170,10 +166,12 @@
170166 this.enableEvents(AWTEvent.WINDOW_EVENT_MASK);
171167 this.imagePanel = new JPanel(new BorderLayout());
172168 this.spreadTreePanel = new SpreadTreePanel();
169+ //this.talkPanel = new TalkPanel();
173170 this.usersNoteTreePanel = new UsersNoteTreePanel();
174171 this.leftPanel = new JTabbedPane();
175172 this.leftPanel.addTab("Images", this.spreadTreePanel);
176173 this.leftPanel.addTab("Notes", this.usersNoteTreePanel);
174+ //this.leftPanel.addTab("Talk", this.talkPanel);
177175 this.getContentPane().setLayout(new BorderLayout());
178176 this.workspaceWindowNorthPanel = new WorkspaceWindowNorthPanel(this);
179177 this.getContentPane().add(workspaceWindowNorthPanel, BorderLayout.NORTH);
@@ -194,7 +192,6 @@
194192 gsKeyEventPost = new GSKeyEventPost();
195193 m.addKeyEventPostProcessor(gsKeyEventPost);
196194 this.addWindowFocusListener(new WorkspaceWindowFocusListener());
197-
198195 }
199196
200197 public void displayWorksapceWindow(int workspaceWindowMode) {
@@ -448,40 +445,40 @@
448445 }
449446
450447 // Firebase 縺九i restore
451- public void restoreFromFirebase(final String projName) {
452- setRestoring(true);
453- Firebase ref = new Firebase(Constants.FIREBASE_URI);
454- ref.addListenerForSingleValueEvent(new ValueEventListener() {
455- @Override
456- public void onCancelled(FirebaseError arg0) {
457- setRestoring(false);
458- JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Could not load the project.");
459- }
460- @Override
461- public void onDataChange(DataSnapshot snapshot) {
462- try {
463- String source = (String) snapshot.child(projName).getValue();
464- DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
465- InputSource is = new InputSource(new StringReader(source));
466- Document document = builder.parse(is);
467- restoreTrees(document);
468- JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Project loaded.");
469- } catch (ParserConfigurationException e) {
470- e.printStackTrace();
471- } catch (SAXException e) {
472- e.printStackTrace();
473- } catch (IOException e) {
474- e.printStackTrace();
475- } finally {
476- setRestoring(false);
477- }
478- tabbedPane.clear();
479- tabbedPane.validate();
480- tabbedPane.repaint();
481- validate();
482- }
483- });
484- }
448+// public void restoreFromFirebase(final String projName) {
449+// setRestoring(true);
450+// Firebase ref = new Firebase(Constants.FIREBASE_URI);
451+// ref.addListenerForSingleValueEvent(new ValueEventListener() {
452+// @Override
453+// public void onCancelled(FirebaseError arg0) {
454+// setRestoring(false);
455+// JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Could not load the project.");
456+// }
457+// @Override
458+// public void onDataChange(DataSnapshot snapshot) {
459+// try {
460+// String source = (String) snapshot.child(projName).getValue();
461+// DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
462+// InputSource is = new InputSource(new StringReader(source));
463+// Document document = builder.parse(is);
464+// restoreTrees(document);
465+// JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Project loaded.");
466+// } catch (ParserConfigurationException e) {
467+// e.printStackTrace();
468+// } catch (SAXException e) {
469+// e.printStackTrace();
470+// } catch (IOException e) {
471+// e.printStackTrace();
472+// } finally {
473+// setRestoring(false);
474+// }
475+// tabbedPane.clear();
476+// tabbedPane.validate();
477+// tabbedPane.repaint();
478+// validate();
479+// }
480+// });
481+// }
485482
486483 private void restoreTrees(Document document) {
487484 Element rootElement = document.getDocumentElement();
@@ -642,20 +639,20 @@
642639 }
643640 }
644641
645- // Fireabase 縺ォ Dom 縺ョXML繧剃ソ晏ュ倥☆繧�
646- public boolean saveOnFirebase (String projName) {
647- try {
648- Document document = this.buildXMLDocument();
649- GsFirebaseSaver saver = new GsFirebaseSaver(document, projName);
650- saver.save();
651- setUpdated(false);
652- JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Project saved on cloud.");
653- } catch (ParserConfigurationException e) {
654- e.printStackTrace();
655- return false;
656- }
657- return true;
658- }
642+ // Fireabase
643+// public boolean saveOnFirebase (String projName) {
644+// try {
645+// Document document = this.buildXMLDocument();
646+// GsFirebaseSaver saver = new GsFirebaseSaver(document, projName);
647+// saver.save();
648+// setUpdated(false);
649+// JOptionPane.showMessageDialog(WorkspaceWindow.getInstance(), "Project saved on cloud.");
650+// } catch (ParserConfigurationException e) {
651+// e.printStackTrace();
652+// return false;
653+// }
654+// return true;
655+// }
659656
660657 public boolean saveXMLDocument(File file, Document document) {
661658 if(file == null){
--- trunk/src/smart_gs/network/Constants.java (revision 1204)
+++ trunk/src/smart_gs/network/Constants.java (revision 1205)
@@ -36,7 +36,7 @@
3636 static final String NONE = "none";
3737 public static final String MAIN_DOCUMENT_NAME = "main";
3838
39- public static final String FIREBASE_URI = "https://wahon.firebaseio.com/smartgs/";
39+ //public static final String FIREBASE_URI = "https://wahon.firebaseio.com/smartgs/";
4040
4141
4242 }
--- trunk/src/smart_gs/menu/FileMenu.java (revision 1204)
+++ trunk/src/smart_gs/menu/FileMenu.java (revision 1205)
@@ -1,6 +1,7 @@
11 /* $Id$ */
22 package smart_gs.menu;
33
4+import java.awt.Font;
45 import java.awt.event.ActionEvent;
56 import java.awt.event.ActionListener;
67
@@ -65,14 +66,14 @@
6566 openOldVersion.addActionListener(new OpenOldVersionActionListener(0));
6667 this.add(openOldVersion);
6768
68- JMenuItem openCloud = new JMenuItem("Open from cloud server");
69- openCloud.addActionListener(new ActionListener() {
70- @Override
71- public void actionPerformed(ActionEvent e) {
72- WorkspaceWindow.getInstance().restoreFromFirebase("myproject");
73- }
74- });
75- this.add(openCloud);
69+// JMenuItem openCloud = new JMenuItem("Open from Cloud Server");
70+// openCloud.addActionListener(new ActionListener() {
71+// @Override
72+// public void actionPerformed(ActionEvent e) {
73+// WorkspaceWindow.getInstance().restoreFromFirebase("myproject");
74+// }
75+// });
76+// this.add(openCloud);
7677
7778 JMenuItem saveAS = new JMenuItem("Save as ...");
7879 saveAS.addActionListener(new SaveActionListener(0));
@@ -84,15 +85,15 @@
8485 // save.setAccelerator();
8586 this.add(save);
8687
87- JMenuItem upload2Cloud = new JMenuItem("Save on cloud server");
88- upload2Cloud.addActionListener(new ActionListener(){
89- @Override
90- public void actionPerformed(ActionEvent e) {
91- WorkspaceWindow.getInstance().saveOnFirebase("myproject");
92- }
93-
94- });
95- this.add(upload2Cloud);
88+// JMenuItem upload2Cloud = new JMenuItem("Save on Cloud Server");
89+// upload2Cloud.addActionListener(new ActionListener(){
90+// @Override
91+// public void actionPerformed(ActionEvent e) {
92+// WorkspaceWindow.getInstance().saveOnFirebase("myproject");
93+// }
94+//
95+// });
96+// this.add(upload2Cloud);
9697
9798 // 20110328 shayashi
9899 JMenuItem importGSfile = new JMenuItem("Import");
旧リポジトリブラウザで表示