Lines 46-54
Link Here
|
46 |
import org.openide.DialogDisplayer; |
46 |
import org.openide.DialogDisplayer; |
47 |
import org.openide.NotifyDescriptor; |
47 |
import org.openide.NotifyDescriptor; |
48 |
import org.openide.awt.UndoRedo; |
48 |
import org.openide.awt.UndoRedo; |
|
|
49 |
import org.openide.cookies.EditorCookie; |
49 |
import org.openide.cookies.LineCookie; |
50 |
import org.openide.cookies.LineCookie; |
|
|
51 |
import org.openide.cookies.OpenCookie; |
52 |
import org.openide.cookies.SaveCookie; |
53 |
import org.openide.filesystems.FileLock; |
54 |
import org.openide.filesystems.FileObject; |
50 |
import org.openide.loaders.DataObject; |
55 |
import org.openide.loaders.DataObject; |
51 |
import org.openide.loaders.MultiDataObject; |
|
|
52 |
import org.openide.nodes.Node; |
56 |
import org.openide.nodes.Node; |
53 |
import org.openide.nodes.Children; |
57 |
import org.openide.nodes.Children; |
54 |
import org.openide.src.SourceElement; |
58 |
import org.openide.src.SourceElement; |
Lines 59-64
Link Here
|
59 |
import org.openide.util.actions.SystemAction; |
63 |
import org.openide.util.actions.SystemAction; |
60 |
import org.openide.windows.*; |
64 |
import org.openide.windows.*; |
61 |
import org.openide.ErrorManager; |
65 |
import org.openide.ErrorManager; |
|
|
66 |
import org.openide.windows.CloneableOpenSupport; |
62 |
|
67 |
|
63 |
|
68 |
|
64 |
/* |
69 |
/* |
Lines 71-77
Link Here
|
71 |
* |
76 |
* |
72 |
* @author Petr Hamernik |
77 |
* @author Petr Hamernik |
73 |
*/ |
78 |
*/ |
74 |
public class JavaEditor extends EditorSupport implements PropertyChangeListener { |
79 |
public class JavaEditor extends DataEditorSupport implements PropertyChangeListener, Node.Cookie, OpenCookie, EditorCookie.Observable { |
75 |
/** The prefix of all magic strings */ |
80 |
/** The prefix of all magic strings */ |
76 |
final static String MAGIC_PREFIX = "//GEN-"; // NOI18N |
81 |
final static String MAGIC_PREFIX = "//GEN-"; // NOI18N |
77 |
|
82 |
|
Lines 185-228
Link Here
|
185 |
/** Create a new Editor support for the given Java source. |
190 |
/** Create a new Editor support for the given Java source. |
186 |
* @param entry the (primary) file entry representing the Java source file |
191 |
* @param entry the (primary) file entry representing the Java source file |
187 |
*/ |
192 |
*/ |
188 |
public JavaEditor(MultiDataObject.Entry entry) { |
193 |
public JavaEditor(DataObject dob) { |
189 |
super(entry); |
194 |
super(dob, new JavaEditorEnv(dob)); |
190 |
// add change listener |
195 |
// add change listener |
191 |
addChangeListener(new JavaEditorChangeListener()); |
196 |
addChangeListener(new JavaEditorChangeListener()); |
192 |
JavaMetamodel.getUndoManager().addPropertyChangeListener(new UndoManagerListener(this)); |
197 |
JavaMetamodel.getUndoManager().addPropertyChangeListener(new UndoManagerListener(this)); |
193 |
} |
198 |
} |
194 |
|
199 |
|
195 |
/** Finds data object the editor belongs to. |
200 |
private void changeTimeoutElapsed() { |
196 |
* @return data object or null |
201 |
parseSource(false, true); |
197 |
*/ |
|
|
198 |
DataObject getDataObject() { |
199 |
return findDataObject(); |
200 |
} |
202 |
} |
201 |
|
203 |
|
202 |
synchronized UndoRedo.Manager getUndoRedo() { |
204 |
protected boolean notifyModified() { |
203 |
if (undoRedo == null) { |
205 |
if (! super.notifyModified()) { |
204 |
undoRedo = super.createUndoRedoManager(); |
206 |
return false; |
205 |
undoRedoPrecreated = true; |
207 |
} |
|
|
208 |
JavaDataObject obj = (JavaDataObject) getDataObject(); |
209 |
if (obj.getCookie(SaveCookie.class) == null) { |
210 |
obj.addSaveCookie(new Save()); |
211 |
obj.setModified(true); |
206 |
} |
212 |
} |
207 |
return undoRedo; |
213 |
return true; |
208 |
} |
214 |
} |
209 |
|
215 |
|
210 |
protected UndoRedo.Manager createUndoRedoManager() { |
216 |
protected void notifyUnmodified() { |
211 |
if (undoRedoPrecreated) { |
217 |
super.notifyUnmodified(); |
212 |
undoRedoPrecreated = false; |
218 |
JavaDataObject obj = (JavaDataObject) getDataObject(); |
213 |
return undoRedo; |
219 |
SaveCookie save = (SaveCookie) obj.getCookie(SaveCookie.class); |
|
|
220 |
if (save != null) { |
221 |
obj.removeSaveCookie(save); |
222 |
obj.setModified(false); |
214 |
} |
223 |
} |
215 |
undoRedo = super.createUndoRedoManager(); |
|
|
216 |
return undoRedo; |
217 |
} |
224 |
} |
218 |
|
225 |
|
219 |
private void changeTimeoutElapsed() { |
226 |
private class Save implements SaveCookie { |
220 |
parseSource(false, true); |
227 |
public void save() throws IOException { |
|
|
228 |
saveDocument(); |
229 |
getDataObject().setModified(false); |
230 |
} |
221 |
} |
231 |
} |
|
|
232 |
|
222 |
|
233 |
|
223 |
private void parseSource(boolean force, final boolean refreshAnnotations) { |
234 |
private void parseSource(boolean force, final boolean refreshAnnotations) { |
224 |
if (force) { |
235 |
if (force) { |
225 |
JavaMetamodel.getManager().addModified((JavaDataObject) findDataObject()); |
236 |
JavaMetamodel.getManager().addModified((JavaDataObject) getDataObject()); |
226 |
} |
237 |
} |
227 |
ERROR_ANNOTATION_QUEUE.post(new Runnable() { |
238 |
ERROR_ANNOTATION_QUEUE.post(new Runnable() { |
228 |
public void run() { |
239 |
public void run() { |
Lines 303-309
Link Here
|
303 |
if (onlyIfRunning && (timer==null || !timer.isRunning())) |
314 |
if (onlyIfRunning && (timer==null || !timer.isRunning())) |
304 |
return; |
315 |
return; |
305 |
|
316 |
|
306 |
JavaMetamodel.getManager().addModified((JavaDataObject)findDataObject()); |
317 |
JavaMetamodel.getManager().addModified((JavaDataObject)getDataObject()); |
307 |
|
318 |
|
308 |
delay = JavaSettings.getDefault().getAutoParsingDelay(); |
319 |
delay = JavaSettings.getDefault().getAutoParsingDelay(); |
309 |
if (delay<=0) |
320 |
if (delay<=0) |
Lines 320-337
Link Here
|
320 |
timer.restart(); |
331 |
timer.restart(); |
321 |
} |
332 |
} |
322 |
|
333 |
|
323 |
/* Calls superclass. |
|
|
324 |
* @param pos Where to place the caret. |
325 |
* @return always non null editor |
326 |
*/ |
327 |
protected EditorSupport.Editor openAt(PositionRef pos) { |
328 |
EditorSupport.Editor ed = super.openAt(pos); |
329 |
ed.requestActive(); |
330 |
return ed; |
331 |
} |
332 |
|
333 |
public void openAtPosition(PositionRef begin) { |
334 |
public void openAtPosition(PositionRef begin) { |
334 |
openAt(begin); |
335 |
openAt(begin, -1).getComponent().requestActive(); |
|
|
336 |
} |
337 |
|
338 |
public void openAt(PositionRef p) { |
339 |
openAtPosition(p); |
335 |
} |
340 |
} |
336 |
|
341 |
|
337 |
public void open() { |
342 |
public void open() { |
Lines 409-415
Link Here
|
409 |
result = (Resource) JavaMetamodel.getDefaultRepository().getByMofId(resourceMofId); |
414 |
result = (Resource) JavaMetamodel.getDefaultRepository().getByMofId(resourceMofId); |
410 |
} |
415 |
} |
411 |
if (result == null || !result.isValid()) { |
416 |
if (result == null || !result.isValid()) { |
412 |
result = JavaMetamodel.getManager().getResource(findDataObject().getPrimaryFile()); |
417 |
result = JavaMetamodel.getManager().getResource(getDataObject().getPrimaryFile()); |
413 |
if (result==null) |
418 |
if (result==null) |
414 |
return null; |
419 |
return null; |
415 |
resourceMofId = result.refMofId(); |
420 |
resourceMofId = result.refMofId(); |
Lines 439-445
Link Here
|
439 |
|
444 |
|
440 |
if (filling) { |
445 |
if (filling) { |
441 |
GuardedReader reader = new GuardedReader(stream, false, |
446 |
GuardedReader reader = new GuardedReader(stream, false, |
442 |
Util.getFileEncoding(entry.getFile())); |
447 |
Util.getFileEncoding(getDataObject().getPrimaryFile())); |
443 |
kit.read(reader, doc, 0); |
448 |
kit.read(reader, doc, 0); |
444 |
fillSections(reader, doc); |
449 |
fillSections(reader, doc); |
445 |
newLineType = reader.getNewLineType(); |
450 |
newLineType = reader.getNewLineType(); |
Lines 475-481
Link Here
|
475 |
*/ |
480 |
*/ |
476 |
protected void saveFromKitToStream(StyledDocument doc, EditorKit kit, OutputStream stream) throws IOException, BadLocationException { |
481 |
protected void saveFromKitToStream(StyledDocument doc, EditorKit kit, OutputStream stream) throws IOException, BadLocationException { |
477 |
OutputStream os = new NewLineOutputStream(stream, newLineType); |
482 |
OutputStream os = new NewLineOutputStream(stream, newLineType); |
478 |
String encoding = Util.getFileEncoding(entry.getFile()); |
483 |
String encoding = Util.getFileEncoding(getDataObject().getPrimaryFile()); |
479 |
if (sections != null) { |
484 |
if (sections != null) { |
480 |
ArrayList list = new ArrayList(sections.values()); |
485 |
ArrayList list = new ArrayList(sections.values()); |
481 |
if (list.size() > 0) { |
486 |
if (list.size() > 0) { |
Lines 492-519
Link Here
|
492 |
kit.write(w, doc, 0, doc.getLength()); |
497 |
kit.write(w, doc, 0, doc.getLength()); |
493 |
} |
498 |
} |
494 |
|
499 |
|
495 |
/** Reload the document when changed externally */ |
500 |
// /** Reload the document when changed externally */ |
496 |
protected Task reloadDocumentTask () { |
501 |
// protected Task reloadDocumentTask () { |
497 |
StyledDocument doc = null; |
502 |
// StyledDocument doc = null; |
498 |
// PENDING: do not openDocument() to obtain doc, as all text is removed from the |
503 |
// // PENDING: do not openDocument() to obtain doc, as all text is removed from the |
499 |
// document, guarded sections are (probably) erased anyway. This causes two passes |
504 |
// // document, guarded sections are (probably) erased anyway. This causes two passes |
500 |
// through loadFromStreamToKit! |
505 |
// // through loadFromStreamToKit! |
501 |
try { |
506 |
// try { |
502 |
doc = openDocument(); |
507 |
// doc = openDocument(); |
503 |
} |
508 |
// } |
504 |
catch (IOException e) { |
509 |
// catch (IOException e) { |
505 |
// no reload performed in this case |
510 |
// // no reload performed in this case |
506 |
} |
511 |
// } |
507 |
|
512 |
// |
508 |
if (doc != null) { |
513 |
// if (doc != null) { |
509 |
clearSections(); |
514 |
// clearSections(); |
510 |
NbDocument.unmarkGuarded(doc, 0, doc.getLength()); |
515 |
// NbDocument.unmarkGuarded(doc, 0, doc.getLength()); |
511 |
reloading = true; |
516 |
// reloading = true; |
512 |
return super.reloadDocumentTask (); |
517 |
// return super.reloadDocumentTask (); |
513 |
} |
518 |
// } |
514 |
else |
519 |
// else |
515 |
return null; |
520 |
// return null; |
516 |
} |
521 |
// } |
517 |
|
522 |
|
518 |
/** Save the document in this thread and start reparsing it. |
523 |
/** Save the document in this thread and start reparsing it. |
519 |
* @exception IOException on I/O error |
524 |
* @exception IOException on I/O error |
Lines 523-536
Link Here
|
523 |
} |
528 |
} |
524 |
|
529 |
|
525 |
/** Save the document in this thread. |
530 |
/** Save the document in this thread. |
526 |
* @param parse true if the parser should be started, otherwise false |
|
|
527 |
* @exception IOException on I/O error |
528 |
*/ |
529 |
protected void saveDocumentIfNecessary(boolean parse) throws IOException { |
530 |
saveDocument(false); |
531 |
} |
532 |
|
533 |
/** Save the document in this thread. |
534 |
* @param forceSave if true save always, otherwise only when is modified |
531 |
* @param forceSave if true save always, otherwise only when is modified |
535 |
* @exception IOException on I/O error |
532 |
* @exception IOException on I/O error |
536 |
*/ |
533 |
*/ |
Lines 539-545
Link Here
|
539 |
if (!checkCharsetConversion(Util.getFileEncoding(getDataObject().getPrimaryFile()))){ |
536 |
if (!checkCharsetConversion(Util.getFileEncoding(getDataObject().getPrimaryFile()))){ |
540 |
return; |
537 |
return; |
541 |
} |
538 |
} |
542 |
RepositoryUpdater.getDefault().addFileObjectToSave(findDataObject().getPrimaryFile()); |
539 |
RepositoryUpdater.getDefault().addFileObjectToSave(getDataObject().getPrimaryFile()); |
543 |
super.saveDocument(); |
540 |
super.saveDocument(); |
544 |
} |
541 |
} |
545 |
} |
542 |
} |
Lines 587-593
Link Here
|
587 |
StyledDocument doc = getDocument(); |
584 |
StyledDocument doc = getDocument(); |
588 |
Runnable docRenderer = new Runnable() { |
585 |
Runnable docRenderer = new Runnable() { |
589 |
public void run() { |
586 |
public void run() { |
590 |
LineCookie cookie = (LineCookie)findDataObject().getCookie(LineCookie.class); |
587 |
LineCookie cookie = (LineCookie)getDataObject().getCookie(LineCookie.class); |
591 |
Line.Set lines = cookie.getLineSet(); |
588 |
Line.Set lines = cookie.getLineSet(); |
592 |
|
589 |
|
593 |
for (Iterator i=finalAdded.iterator();i.hasNext();) { |
590 |
for (Iterator i=finalAdded.iterator();i.hasNext();) { |
Lines 654-674
Link Here
|
654 |
|
651 |
|
655 |
private ClassPath getBootClassPath () { |
652 |
private ClassPath getBootClassPath () { |
656 |
if (this.bootClasspath == null) { |
653 |
if (this.bootClasspath == null) { |
657 |
this.bootClasspath = ClassPath.getClassPath (this.entry.getFile(), ClassPath.BOOT); |
654 |
this.bootClasspath = ClassPath.getClassPath (getDataObject().getPrimaryFile(), ClassPath.BOOT); |
658 |
} |
655 |
} |
659 |
return this.bootClasspath; |
656 |
return this.bootClasspath; |
660 |
} |
657 |
} |
661 |
|
658 |
|
662 |
private ClassPath getLibrariesPath () { |
659 |
private ClassPath getLibrariesPath () { |
663 |
if (this.librariesClasspath == null) { |
660 |
if (this.librariesClasspath == null) { |
664 |
this.librariesClasspath = ClassPath.getClassPath (this.entry.getFile(), ClassPath.COMPILE); |
661 |
this.librariesClasspath = ClassPath.getClassPath (getDataObject().getPrimaryFile(), ClassPath.COMPILE); |
665 |
} |
662 |
} |
666 |
return this.librariesClasspath; |
663 |
return this.librariesClasspath; |
667 |
} |
664 |
} |
668 |
|
665 |
|
669 |
private ClassPath getSourcePath () { |
666 |
private ClassPath getSourcePath () { |
670 |
if (this.sourceClasspath == null) { |
667 |
if (this.sourceClasspath == null) { |
671 |
this.sourceClasspath = ClassPath.getClassPath (this.entry.getFile(), ClassPath.SOURCE); |
668 |
this.sourceClasspath = ClassPath.getClassPath (getDataObject().getPrimaryFile(), ClassPath.SOURCE); |
672 |
} |
669 |
} |
673 |
return this.sourceClasspath; |
670 |
return this.sourceClasspath; |
674 |
} |
671 |
} |
Lines 680-686
Link Here
|
680 |
* @deprecated Please use DataObject services to obtain java hierarchy. |
677 |
* @deprecated Please use DataObject services to obtain java hierarchy. |
681 |
*/ |
678 |
*/ |
682 |
public SourceElement getSource() { |
679 |
public SourceElement getSource() { |
683 |
return ((JavaDataObject)findDataObject()).getSource(); |
680 |
return ((JavaDataObject)getDataObject()).getSource(); |
684 |
} |
681 |
} |
685 |
|
682 |
|
686 |
/** Translate a source element to text. |
683 |
/** Translate a source element to text. |
Lines 1126-1156
Link Here
|
1126 |
return beginPos; |
1123 |
return beginPos; |
1127 |
} |
1124 |
} |
1128 |
|
1125 |
|
1129 |
// ==================== Misc not-public methods ======================== |
1126 |
protected CloneableEditor createCloneableEditor() { |
1130 |
|
1127 |
return new JavaEditorComponent(this); |
1131 |
/* A method to create a new component. Overridden in subclasses. |
|
|
1132 |
* @return the {@link Editor} for this support |
1133 |
*/ |
1134 |
protected CloneableTopComponent createCloneableTopComponent () { |
1135 |
prepareDocument(); |
1136 |
return createJavaEditorComponent(); |
1137 |
} |
1128 |
} |
1138 |
|
1129 |
|
1139 |
/** Method for creation of the java editor component |
1130 |
// // ==================== Misc not-public methods ======================== |
1140 |
* - accessible from the innerclass. |
1131 |
// |
1141 |
*/ |
1132 |
// /** Method for creation of the java editor component |
1142 |
JavaEditorComponent createJavaEditorComponent() { |
1133 |
// * - accessible from the innerclass. |
1143 |
DataObject obj = findDataObject (); |
1134 |
// */ |
1144 |
JavaEditorComponent editor = new JavaEditorComponent(obj); |
1135 |
// JavaEditorComponent createJavaEditorComponent() { |
1145 |
editor.setIcon(obj.getNodeDelegate().getIcon(java.beans.BeanInfo.ICON_COLOR_16x16)); |
1136 |
// DataObject obj = getDataObject (); |
1146 |
|
1137 |
// JavaEditorComponent editor = new JavaEditorComponent(this); |
1147 |
// dock into editor mode if possible |
1138 |
// //editor.setIcon(obj.getNodeDelegate().getIcon(java.beans.BeanInfo.ICON_COLOR_16x16)); |
1148 |
Mode editorMode = WindowManager.getDefault().findMode(EDITOR_MODE); |
1139 |
// |
1149 |
if (editorMode != null) |
1140 |
// // dock into editor mode if possible |
1150 |
editorMode.dockInto(editor); |
1141 |
// Mode editorMode = WindowManager.getDefault().findMode(EDITOR_MODE); |
1151 |
|
1142 |
// //if (editorMode != null) |
1152 |
return editor; |
1143 |
// // editorMode.dockInto(editor); |
1153 |
} |
1144 |
// |
|
|
1145 |
// return editor; |
1146 |
// } |
1154 |
|
1147 |
|
1155 |
/** Set all sections as invalid. It is called from closeLast method |
1148 |
/** Set all sections as invalid. It is called from closeLast method |
1156 |
* of the JavaEditorComponent. |
1149 |
* of the JavaEditorComponent. |
Lines 1181-1193
Link Here
|
1181 |
} |
1174 |
} |
1182 |
return fromWhere; |
1175 |
return fromWhere; |
1183 |
} |
1176 |
} |
|
|
1177 |
|
1178 |
public static class JavaEditorEnv extends DataEditorSupport.Env { |
1184 |
|
1179 |
|
|
|
1180 |
static final long serialVersionUID = -6792511207355520950L; |
1181 |
|
1182 |
public JavaEditorEnv(DataObject obj) { |
1183 |
super(obj); |
1184 |
} |
1185 |
|
1186 |
protected FileObject getFile() { |
1187 |
return getDataObject().getPrimaryFile(); |
1188 |
} |
1189 |
protected FileLock takeLock() throws IOException { |
1190 |
return ((JavaDataObject) getDataObject()).getPrimaryEntry().takeLock(); |
1191 |
} |
1192 |
public CloneableOpenSupport findCloneableOpenSupport() { |
1193 |
// must be sync with cookies.add(EditorCookie.class, factory); |
1194 |
// #12938 XML files do not persist in Source editor |
1195 |
return (CloneableOpenSupport) getDataObject().getCookie(EditorCookie.class); |
1196 |
} |
1197 |
} |
1198 |
|
1185 |
/** The real component of the Java editor. |
1199 |
/** The real component of the Java editor. |
1186 |
* Subclasses should not attempt to work with this; |
1200 |
* Subclasses should not attempt to work with this; |
1187 |
* if they require special editing support, separate windows |
1201 |
* if they require special editing support, separate windows |
1188 |
* should be created by overriding (e.g.) {@link EditorSupport#open}. |
1202 |
* should be created by overriding (e.g.) {@link EditorSupport#open}. |
1189 |
*/ |
1203 |
*/ |
1190 |
public static class JavaEditorComponent extends EditorSupport.Editor { |
1204 |
public static class JavaEditorComponent extends CloneableEditor { |
1191 |
/** Default delay between cursor movement and updating selected element nodes. */ |
1205 |
/** Default delay between cursor movement and updating selected element nodes. */ |
1192 |
static final int SELECTED_NODES_DELAY = 1000; |
1206 |
static final int SELECTED_NODES_DELAY = 1000; |
1193 |
|
1207 |
|
Lines 1217-1224
Link Here
|
1217 |
} |
1231 |
} |
1218 |
|
1232 |
|
1219 |
/** Creates new editor */ |
1233 |
/** Creates new editor */ |
1220 |
public JavaEditorComponent (DataObject obj) { |
1234 |
public JavaEditorComponent (CloneableEditorSupport sup) { |
1221 |
super(obj); |
1235 |
super(sup); |
1222 |
initialize(); |
1236 |
initialize(); |
1223 |
} |
1237 |
} |
1224 |
|
1238 |
|
Lines 1230-1236
Link Here
|
1230 |
void selectElementsAtOffset(final int offset) { |
1244 |
void selectElementsAtOffset(final int offset) { |
1231 |
elementSelectionPoster.post(new Runnable() { |
1245 |
elementSelectionPoster.post(new Runnable() { |
1232 |
public void run() { |
1246 |
public void run() { |
1233 |
final DataObject d = support.findDataObject(); |
1247 |
final DataObject d = support.getDataObject(); |
1234 |
if (!isActiveTC() || d == null || !d.isValid() || d.isTemplate()) { |
1248 |
if (!isActiveTC() || d == null || !d.isValid() || d.isTemplate()) { |
1235 |
return; |
1249 |
return; |
1236 |
} |
1250 |
} |
Lines 1361-1368
Link Here
|
1361 |
|
1375 |
|
1362 |
/** Obtain a support for this component */ |
1376 |
/** Obtain a support for this component */ |
1363 |
private void initialize () { |
1377 |
private void initialize () { |
1364 |
support = (JavaEditor)obj.getCookie(JavaEditor.class); |
1378 |
support = (JavaEditor) cloneableEditorSupport(); |
1365 |
assert support != null : "jdo.getCookie(JavaEditor.class) returned null for JDO " + obj.getPrimaryFile().getPath(); // NOI18N |
1379 |
//assert support != null : "jdo.getCookie(JavaEditor.class) returned null for JDO " + obj.getPrimaryFile().getPath(); // NOI18N |
1366 |
|
1380 |
|
1367 |
timerSelNodes = new Timer(200, new java.awt.event.ActionListener() { |
1381 |
timerSelNodes = new Timer(200, new java.awt.event.ActionListener() { |
1368 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
1382 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
Lines 1404-1418
Link Here
|
1404 |
timerSelNodes.setInitialDelay(SELECTED_NODES_DELAY); |
1418 |
timerSelNodes.setInitialDelay(SELECTED_NODES_DELAY); |
1405 |
timerSelNodes.restart(); |
1419 |
timerSelNodes.restart(); |
1406 |
lastCaretOffset = pos; |
1420 |
lastCaretOffset = pos; |
1407 |
} |
|
|
1408 |
|
1409 |
|
1410 |
/* Is called from the clone method to create new component from this one. |
1411 |
* This implementation only clones the object by calling super.clone method. |
1412 |
* @return the copy of this object |
1413 |
*/ |
1414 |
protected CloneableTopComponent createClonedObject () { |
1415 |
return support.createJavaEditorComponent(); |
1416 |
} |
1421 |
} |
1417 |
|
1422 |
|
1418 |
/* This method is called when parent window of this component has focus, |
1423 |
/* This method is called when parent window of this component has focus, |