diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 14:29:47 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 14:29:47 +0000 |
commit | 634cfea8ae9dde404d547ba28c055e72f935631b (patch) | |
tree | 83b9dcbb042986fc75438f9a45a3342b00e6a306 /scripting | |
parent | c197b627978f1b311a5a2e3f1773d57fb32b72f1 (diff) |
INTEGRATION: CWS scriptingf10 (1.3.32); FILE MERGED
2005/01/10 14:10:04 toconnor 1.3.32.2: #i39330# BeanShell editor should prompt before closing
2005/01/06 10:56:36 toconnor 1.3.32.1: #i39330# beanshell editor should prompt to save before closing
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java b/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java index 5702c3645100..52b26269bba6 100644 --- a/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java +++ b/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java @@ -2,9 +2,9 @@ * * $RCSfile: NetBeansSourceView.java,v $ * -* $Revision: 1.3 $ +* $Revision: 1.4 $ * -* last change: $Author: hr $ $Date: 2004-07-23 14:05:24 $ +* last change: $Author: rt $ $Date: 2005-01-27 15:29:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -194,13 +194,9 @@ public class NetBeansSourceView extends JPanel so we don't get a storm of DocumentEvents during loading */ pane.getDocument().removeDocumentListener(this); - if (model.isModified()) { - if (this.isModified()) { - // ouch, contention, TODO - prompt for what to do - } - else { - pane.setText(model.getText()); - } + if (isModified == false) + { + pane.setText(model.getText()); } // scroll to current position of the model @@ -216,7 +212,11 @@ public class NetBeansSourceView extends JPanel } public boolean isModified() { - return this.isModified; + return isModified; + } + + public void setModified(boolean value) { + isModified = value; } public String getText() { @@ -237,7 +237,7 @@ public class NetBeansSourceView extends JPanel } public void doChanged(DocumentEvent e) { - this.isModified = true; + isModified = true; } } |