cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r661065 - in /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler: ProjectWatchdog.java dialog/FileDeletedDialog.java
Date Wed, 28 May 2008 20:03:08 GMT
Author: aadamchik
Date: Wed May 28 13:03:08 2008
New Revision: 661065

URL: http://svn.apache.org/viewvc?rev=661065&view=rev
Log:
CAY-1056 Detection of the project file changes on disk.
(patch #2)

Modified:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FileDeletedDialog.java

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java?rev=661065&r1=661064&r2=661065&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectWatchdog.java
Wed May 28 13:03:08 2008
@@ -90,12 +90,14 @@
             }
 
         }
+        else
+            mediator.setDirty(true);
     }
 
     @Override
     protected void doOnRemove(FileInfo fileInfo) {
         if (mediator.getProject() != null
-                && fileInfo.getFile().equals(mediator.getProject().getMainFile()))
{
+                /*&& fileInfo.getFile().equals(mediator.getProject().getMainFile())
*/ ) {
             FileDeletedDialog dialog = new FileDeletedDialog(Application.getFrame());
             dialog.show();
 
@@ -112,9 +114,9 @@
 
                 controller.projectClosedAction();
             }
+            else
+                mediator.setDirty(true);
         }
-        else
-            ;// pretend that nothing happened by now
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FileDeletedDialog.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FileDeletedDialog.java?rev=661065&r1=661064&r2=661065&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FileDeletedDialog.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FileDeletedDialog.java
Wed May 28 13:03:08 2008
@@ -46,7 +46,7 @@
 
     public void show() {
         JOptionPane pane = new JOptionPane(
-                "Main project file was deleted or renamed. "
+                "One or more project files were deleted or renamed. "
                         + "Do you want to save the changes or close the project?",
                 JOptionPane.QUESTION_MESSAGE);
         pane.setOptions(OPTIONS);



Mime
View raw message