[hg] web-main: #206513 - Does not Save Files - fixed remaining e...

  • From: Miloslav Metelka < >
  • To:
  • Subject: [hg] web-main: #206513 - Does not Save Files - fixed remaining e...
  • Date: Thu, 31 Jan 2013 21:33:16 -0800

changeset 2280c9054f2d in web-main ((none))
details: http://hg.netbeans.org/web-main/rev/2280c9054f2d
description:
        #206513 - Does not Save Files - fixed remaining editor supports 
(besides HTML).

diffstat:

 html/src/org/netbeans/modules/html/HtmlEditorSupport.java                    
                          |   5 +++--
 
j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/xmlutils/XMLJ2eeEditorSupport.java
       |  10 ++++++++--
 php.smarty/src/org/netbeans/modules/php/smarty/editor/TplEditorSupport.java  
                          |   5 ++++-
 web.core/src/org/netbeans/modules/web/taglib/TLDEditorSupport.java           
                          |  10 ++++++++--
 web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java         
                          |  10 ++++++++--
 
web.struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java 
                         |  10 ++++++++--
 
websvc.jaxrpc/src/org/netbeans/modules/websvc/wsdl/xmlutils/XMLJ2eeEditorSupport.java
                  |  10 ++++++++--
 
websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/loader/WadlEditorSupport.java
 |  10 ++++++++--
 
xml.multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java
                    |  10 ++++++++--
 xml/src/org/netbeans/modules/xml/text/TextEditorSupport.java                 
                          |  10 ++++++++--
 10 files changed, 71 insertions(+), 19 deletions(-)

diffs (246 lines):

diff --git a/html/src/org/netbeans/modules/html/HtmlEditorSupport.java 
b/html/src/org/netbeans/modules/html/HtmlEditorSupport.java
--- a/html/src/org/netbeans/modules/html/HtmlEditorSupport.java
+++ b/html/src/org/netbeans/modules/html/HtmlEditorSupport.java
@@ -141,8 +141,9 @@
     public void saveDocument() throws IOException {
         updateEncoding();
         super.saveDocument();
-// DataObject.setModified() called as part of super.saveDocument(). The save 
action is now asynchronous
-// so super.saveDocument() uses carefull logic for handling the DO.modified 
flag properly.
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
 //        HtmlEditorSupport.this.getDataObject().setModified(false);
     }
 
diff --git 
a/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/xmlutils/XMLJ2eeEditorSupport.java
 
b/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/xmlutils/XMLJ2eeEditorSupport.java
--- 
a/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/xmlutils/XMLJ2eeEditorSupport.java
+++ 
b/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/common/xmlutils/XMLJ2eeEditorSupport.java
@@ -238,7 +238,10 @@
             }
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified (false);
         } catch (UnsupportedEncodingException ex) {
             // ask user what next?
             String message = 
NbBundle.getMessage(XMLJ2eeEditorSupport.class,"TEXT_SAVE_AS_UTF", enc);
@@ -287,7 +290,10 @@
 
                     super.saveDocument();
                     //moved from Env.save()
-                    getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// and super.saveDocument() checks for possible extra document modifications 
performed during save
+// and sets the DO.modified flag accordingly.
+//                    getDataObject().setModified (false);
 
                 } catch (BadLocationException lex) {
                     Exceptions.printStackTrace(lex);
diff --git 
a/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplEditorSupport.java 
b/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplEditorSupport.java
--- 
a/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplEditorSupport.java
+++ 
b/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplEditorSupport.java
@@ -122,7 +122,10 @@
     public void saveDocument() throws IOException {
         updateEncoding();
         super.saveDocument();
-        TplEditorSupport.this.getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//        TplEditorSupport.this.getDataObject().setModified(false);
     }
 
     void updateEncoding() throws UserCancelException {
diff --git 
a/web.core/src/org/netbeans/modules/web/taglib/TLDEditorSupport.java 
b/web.core/src/org/netbeans/modules/web/taglib/TLDEditorSupport.java
--- a/web.core/src/org/netbeans/modules/web/taglib/TLDEditorSupport.java
+++ b/web.core/src/org/netbeans/modules/web/taglib/TLDEditorSupport.java
@@ -130,7 +130,10 @@
             }
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified (false);
         }
         else {
                 // update prolog to new valid encoding                
@@ -173,7 +176,10 @@
 
                 super.saveDocument();
                 //moved from Env.save()
-                getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                getDataObject().setModified (false);
             }
             catch (javax.swing.text.BadLocationException e){
                 Logger.getLogger("global").log(Level.INFO, null, e);         
   
diff --git 
a/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java 
b/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java
--- a/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java
+++ b/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java
@@ -258,7 +258,10 @@
             }
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified(false);
         } else {
             // update prolog to new valid encoding
 
@@ -300,7 +303,10 @@
 
                 super.saveDocument();
                 //moved from Env.save()
-                getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                getDataObject().setModified(false);
             } catch (javax.swing.text.BadLocationException e){
                 Logger.getLogger("global").log(Level.INFO, null, e);
             }
diff --git 
a/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java
 
b/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java
--- 
a/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java
+++ 
b/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java
@@ -196,7 +196,10 @@
             }
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified (false);
         }
         else {
                 // update prolog to new valid encoding
@@ -239,7 +242,10 @@
 
                 super.saveDocument();
                 //moved from Env.save()
-                getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                getDataObject().setModified (false);
             }
             catch (javax.swing.text.BadLocationException e){
                 Logger.getLogger("global").log(Level.INFO, null, e);
diff --git 
a/websvc.jaxrpc/src/org/netbeans/modules/websvc/wsdl/xmlutils/XMLJ2eeEditorSupport.java
 
b/websvc.jaxrpc/src/org/netbeans/modules/websvc/wsdl/xmlutils/XMLJ2eeEditorSupport.java
--- 
a/websvc.jaxrpc/src/org/netbeans/modules/websvc/wsdl/xmlutils/XMLJ2eeEditorSupport.java
+++ 
b/websvc.jaxrpc/src/org/netbeans/modules/websvc/wsdl/xmlutils/XMLJ2eeEditorSupport.java
@@ -233,7 +233,10 @@
             new java.io.OutputStreamWriter(new 
java.io.ByteArrayOutputStream(1), enc);
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified (false);
         } catch (java.io.UnsupportedEncodingException ex) {
             // ask user what next?
             String message = 
java.text.MessageFormat.format(NbBundle.getMessage(XMLJ2eeEditorSupport.class,"TEXT_SAVE_AS_UTF"),
@@ -283,7 +286,10 @@
 
                     super.saveDocument();
                     //moved from Env.save()
-                    getDataObject().setModified (false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                    getDataObject().setModified (false);
 
                 } catch (BadLocationException lex) {
                     org.openide.ErrorManager.getDefault().notify(lex);
diff --git 
a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/loader/WadlEditorSupport.java
 
b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/loader/WadlEditorSupport.java
--- 
a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/loader/WadlEditorSupport.java
+++ 
b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/loader/WadlEditorSupport.java
@@ -531,7 +531,10 @@
                 return;
             }
             super.saveDocument();
-            getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified(false);
             
         } catch (UnsupportedEncodingException uee) {
             NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(
@@ -573,7 +576,10 @@
                     NbDocument.runAtomic(doc, edit);
                     
                     super.saveDocument();
-                    getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                    getDataObject().setModified(false);
                     
                 } catch (BadLocationException lex) {
                     ErrorManager.getDefault().notify(lex);
diff --git 
a/xml.multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java
 
b/xml.multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java
--- 
a/xml.multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java
+++ 
b/xml.multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java
@@ -290,7 +290,10 @@
             }
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified(false);
         } catch (UnsupportedEncodingException ex) {
             // ask user what next?
             String message = 
NbBundle.getMessage(XmlMultiViewEditorSupport.class,"TEXT_SAVE_AS_UTF", enc);
@@ -339,7 +342,10 @@
                     
                     super.saveDocument();
                     //moved from Env.save()
-                    getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//                    getDataObject().setModified(false);
                     // need to force reloading
                     ((XmlMultiViewDataObject) 
getDataObject()).getDataCache().reloadData();
                     
diff --git a/xml/src/org/netbeans/modules/xml/text/TextEditorSupport.java 
b/xml/src/org/netbeans/modules/xml/text/TextEditorSupport.java
--- a/xml/src/org/netbeans/modules/xml/text/TextEditorSupport.java
+++ b/xml/src/org/netbeans/modules/xml/text/TextEditorSupport.java
@@ -428,7 +428,10 @@
             fileEncoding.set(cs);
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified(false);
             
getXMLDataObjectLook().getSyncInterface().representationChanged(Document.class);
         } catch (UnmappableCharacterException ex) {
             handleUnsupportedEncoding(doc, enc);
@@ -491,7 +494,10 @@
             NbDocument.runAtomic(doc, edit);
             super.saveDocument();
             //moved from Env.save()
-            getDataObject().setModified(false);
+// DataObject.setModified() already called as part of super.saveDocument(). 
The save action is now asynchronous
+// in the IDE and super.saveDocument() checks for possible extra document 
modifications performed during save
+// and sets the DO.modified flag accordingly.
+//            getDataObject().setModified(false);
             
getXMLDataObjectLook().getSyncInterface().representationChanged(Document.class);
             if ( Util.THIS.isLoggable() ) /* then */ 
Util.THIS.debug("Saved."); // NOI18N
         } catch (BadLocationException lex) {

[hg] web-main: #206513 - Does not Save Files - fixed remaining e...

Miloslav Metelka 02/01/2013

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 236 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close