This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 35007 - CloneableEditorSupport breaks externaleditor support
Summary: CloneableEditorSupport breaks externaleditor support
Status: VERIFIED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-18 22:36 UTC by _ gordonp
Modified: 2008-12-22 23:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Defer save operation to document for ExtEdDocument type (3.77 KB, patch)
2003-07-18 22:38 UTC, _ gordonp
Details | Diff
Same as ces.diff but "diff -cwb ..." (more for information) (1.89 KB, text/plain)
2003-07-18 22:39 UTC, _ gordonp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2003-07-18 22:36:26 UTC
The CloneableEditorSupport class makes an assumption
that it is responsible for writing the document. This
is NOT the case for files being edited in the external
editor. If CES saves the document then the editor will
show a message saying the file has changed and you
will
need to reread it. Its much cleaner if only one editor
is responsible for writing/saving. In this case it
makes more sense for the external editor to do it.

This is an important issue for Rainier. We currently
have 2 P2 bugs filed on this bug have had as many as
5 (some P1) filed on it. I've got a suggested patch
so it shouldn't take more than verification from the
CES owner.

I don't absolutely need this patch installed by EA
(4 August) but would definately like it for EA.
Comment 1 _ gordonp 2003-07-18 22:38:03 UTC
Created attachment 11036 [details]
Defer save operation to document for ExtEdDocument type
Comment 2 _ gordonp 2003-07-18 22:39:36 UTC
Created attachment 11037 [details]
Same as ces.diff but "diff -cwb ..." (more for information)
Comment 3 David Konecny 2003-07-21 13:17:56 UTC
I must be missing some info. I has feeling that this is working from
the beginning of the external editor. 

What you wrote sound like external editor opens directly the file from
disk? If yes then it is wrong. Yes, there must be only one place
responsible for writing document. And in current architecture it is
CES. It is designed a way that external editor should not open the
files from disk directly. It should just visualize Swing document.
Then it will never popup that file was changed externally and needs to
be reloaded.

The patch unfortunatelly is not acceptable - introspecting method from
one of modules and calling it instead of CES.saveDocument is really
bad bad bad!

I would like to help you solve your problem, but I need more info. Thanx.
Comment 4 David Konecny 2003-07-28 16:01:34 UTC
We talked with Gordon about this issue offline.

This issue touches architecture of text package and so unfortunatelly
there is not much what could be done in the short term to help solve
these problems.

For the long term we first need to know the problems which external
editors suffer and then a solution can be proposed. Gordon promised to
write them down.
Comment 5 Marian Mirilovic 2003-07-28 16:58:22 UTC
Ok - verifying.