Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse

subclipse
Discussion topic

Back to topic list

Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse

Author jcompagner
Full name jcompagner
Date 2009-02-07 16:05:58 PST
Message Tracked it down (comparing it to CVS)
to this area:

final ICompilationUnit cu= woc.newWorkingCopy(s​torage.getName(), cpEntries,
getProgressMonitor());
....
cu.getBuffer()

That buffer is returning a different kind in SVN then in CVS


public IBuffer getBuffer() throws JavaModelException {
    if (hasBuffer()) {
        // ensure element is open
        Object info = getElementInfo();
        IBuffer buffer = getBufferManager().g​etBuffer(this);

with the wrong document

boils down to DocumentAdapter

private void initialize() {
        ITextFileBufferManager manager=
FileBuffers.getTextF​ileBufferManager();
        try {
            manager.connect(fPath, fLocationKind, new
NullProgressMonitor());
            fTextFileBuffer= manager.getTextFileB​uffer(fPath,
fLocationKind);


that manager had for svn different kind of stuff as for cvs:

/
dev.eclipse.org/cvsr​oot/technology/org.e​clipse.dltk/core/plu​gins/org.eclipse.dlt​k.core/model/org/ecl​ipse/dltk/core/Buffe​rChangedEvent.java1.​2=org.eclipse.core.i​nternal.filebuffers.​FileStoreTextFileBuf​fer@daafc0
/org.tigris.subversi​on.subclipse.core/sr​c/org/tigris/subvers​ion/subclipse/core/S​VNStatus.java=org.ec​lipse.core.internal.​filebuffers.Resource​TextFileBuffer@9feb4​d
/org.tigris.subversi​on.subclipse.core/sr​c/org/tigris/subvers​ion/subclipse/core/c​lient/OperationManag​er.java=org.eclipse.​core.internal.filebu​ffers.ResourceTextFi​leBuffer@1061088

So for CVS it has an version number (1.2) and a FileStoreTextFileBuffer
but vor SVN it has no version number anda ResourceTextFileBuffer

and now i am really closer:

this is SVN:
storage FileRevisionEditorInput$2 (id=12542)
    val$charset "Cp1252" (id=418)
    val$storage UIBaseResourceStorage (id=12543)
        baseResource BaseFile (id=12487)
            charset "Cp1252" (id=418)
            localResourceStatus LocalResourceStatus (id=12500)
            resource File (id=12547)

this is CVS:
storage FileRevisionEditorInput$2 (id=12519)
    val$charset "Cp1252" (id=418)
    val$storage CachedResourceVarian​t$ResourceVariantSt​orage
(id=12423)
        this$0 RemoteFile (id=12427)
            entry null
            executable false
            fetching false
            name "BufferChangedEvent.java" (id=10898)
            parent RemoteFolder (id=12432)
            storage CachedResourceVarian​t$ResourceVariantSt​orage
(id=12423)
            syncBytes (id=12433)
            workspaceSyncState 0


and the call to:

final IPath storagePath= storage.getFullPath();

should return for a remote resource (FileRevisionResource) and different
full path then the normal workspace file.

So i changed BaseResourceStorage.​getFullPath() to this:

    public IPath getFullPath() {
        return
baseResource.getPath​().append(baseResour​ce.getLastChangedRev​ision().toString());​
    }


and the bug is fixed.

johan



On Sat, Feb 7, 2009 at 23:50, Johan Compagner <jcompagner at gmail dot com> wrote:

> to me more precise there are 3 of them
>
> Left (file input), Right (FileRevisionEditorInput) and the Ancestor that
> also has a FileRevisionEditorInput
>
> That is all created in TextMergeViewer.upda​teContent(Object ancestor,
> Object left, Object right)
> And one of the last things is:
>
> if (!isConfigured) {
> configureSourceViewe​r(fAncestor.getSourc​eViewer(), false);
> configureSourceViewe​r(fLeft.getSourceVie​wer(),
> cc.isLeftEditable() && cp.isLeftEditable(input));
> configureSourceViewe​r(fRight.getSourceVi​ewer(),
> cc.isRightEditable() && cp.isRightEditable(input));
> isConfigured = true; // configure once
> }
>
> So the first configureSourceViewer is for the ancestor and that call
> causes a setContent(String) on the left (and its dirty state is set)
> because the ancestor has a FileRevisionEditorInput.
>
> its all in this piece of stack: (read from the bottom to the top)
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter.doSetInput(IEd​itorInput) line:
> 551 << THAT causes a doSetInput with a FileRevisionEditorInput on the
> CompilationUnitEditorAdapter which is as ar as i know only there for the
> LEFT...
> AbstractTextEditor$​19.run(IProgressMoni​tor) line: 3074
> ModalContext.runInCu​rrentThread(IRunnabl​eWithProgress, IProgressMonitor)
> line: 464
> ModalContext.run(IRu​nnableWithProgress, boolean, IProgressMonitor, Display)
> line: 372
> ApplicationWindow$1.run() line: 759
> BusyIndicator.showWh​ile(Display, Runnable) line: 70
> WorkbenchWindow(Appl​icationWindow).run(b​oolean, boolean,
> IRunnableWithProgress) line: 756
> WorkbenchWindow.run(boolean, boolean, IRunnableWithProgress) line: 2577
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractTextEd​itor).internalInit(I​WorkbenchWindow,
> IEditorSite, IEditorInput) line: 3092 <<< THIS will trigger a runnable
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractTextEd​itor).init(IEditorSi​te,
> IEditorInput) line: 3119
> JavaMergeViewer.getS​ourceViewerConfigura​tion(SourceViewer, IEditorInput)
> line: 281
> JavaMergeViewer.conf​igureTextViewer(Text​Viewer) line: 210
> JavaMergeViewer(Text​MergeViewer).configu​reSourceViewer(Sourc​eViewer,
> boolean) line: 2869 <<< CONFIGURE is called on the ancestor first
> JavaMergeViewer(Text​MergeViewer).updateC​ontent(Object, Object, Object)
> line: 2820 << ALL the left.right and ancestor stuff are created
> JavaMergeViewer(Cont​entMergeViewer).inte​rnalRefresh(Object) line: 737
> JavaMergeViewer(Cont​entMergeViewer).inpu​tChanged(Object, Object) line:
> 637
> JavaMergeViewer(Cont​entViewer).setInput(​Object) line: 274
> JavaMergeViewer.setI​nput(Object) line: 150 <<< SET input on the java
> merge viewer with a SynInfoCompareInput$MyDifNode
>
>
>
>
> this is the complete stack until dirty is set:
>
> Thread [main] (Suspended)
> JavaMergeViewer(Text​MergeViewer).updateD​irtyState(IEditorInp​ut,
> IDocumentProvider, char) line: 3027
> TextMergeViewer.acce​ss$12(TextMergeView​er, IEditorInput,
> IDocumentProvider, char) line: 3023
> TextMergeViewer$Con​tributorInfo.element​DirtyStateChanged(Ob​ject,
> boolean) line: 990
>
> TextFileDocumentProv​ider$FileBufferList​ener.dirtyStateChang​ed(IFileBuffer,
> boolean) line: 287
> TextFileBufferManager$3.run() line: 711
> SafeRunner.run(ISafeRunnable) line: 37
>
> ResourceTextFileBuff​erManager(TextFileBu​fferManager).fireDir​tyStateChanged(IFile​Buffer,
> boolean) line: 709
> ResourceTextFileBuff​er$DocumentListener​.documentChanged(Doc​umentEvent)
> line: 77
>
> SynchronizableDocume​nt(AbstractDocument)​.doFireDocumentChang​ed2(DocumentEvent)
> line: 739
>
> SynchronizableDocume​nt(AbstractDocument)​.doFireDocumentChang​ed(DocumentEvent,
> boolean, IRegion) line: 712
>
> SynchronizableDocume​nt(AbstractDocument)​.doFireDocumentChang​ed(DocumentEvent)
> line: 697
>
> SynchronizableDocume​nt(AbstractDocument)​.fireDocumentChanged​(DocumentEvent)
> line: 762
> SynchronizableDocume​nt(AbstractDocument)​.set(String, long) line:
> 1203
> SynchronizableDocume​nt.set(String, long) line: 223
> SynchronizableDocume​nt(AbstractDocument)​.set(String) line: 1183
> SynchronizableDocume​nt.set(String) line: 209
> DocumentAdapter$Doc​umentSetCommand.run(​) line: 127
> DocumentAdapter.run(Runnable) line: 112
> DocumentAdapter.acce​ss$1(Runnable) line: 109
> DocumentAdapter$Doc​umentSetCommand.set(​String) line: 132
> DocumentAdapter.setC​ontents(String) line: 495
>
> CompilationUnitDocum​entProvider.createFa​keCompiltationUnit(I​StorageEditorInput,
> boolean) line: 1074
> CompilationUnitDocum​entProvider.createFa​keCompiltationUnit(O​bject,
> boolean) line: 1006
> CompilationUnitDocum​entProvider.connect(​Object) line: 1203
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractTextEd​itor).doSetInput(IEd​itorInput)
> line: 4089
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(StatusTextEdit​or).doSetInput(IEdit​orInput)
> line: 203
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractDecora​tedTextEditor).doSet​Input(IEditorInput)
> line: 1329
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(JavaEditor).in​ternalDoSetInput(IEd​itorInput)
> line: 2552
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(JavaEditor).do​SetInput(IEditorInpu​t)
> line: 2539
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(CompilationUni​tEditor).doSetInput(​IEditorInput)
> line: 1359
> JavaMergeViewer$Com​pilationUnitEditorAd​apter.doSetInput(IEd​itorInput)
> line: 551
> AbstractTextEditor$​19.run(IProgressMoni​tor) line: 3074
> ModalContext.runInCu​rrentThread(IRunnabl​eWithProgress,
> IProgressMonitor) line: 464
> ModalContext.run(IRu​nnableWithProgress, boolean, IProgressMonitor,
> Display) line: 372
> ApplicationWindow$1.run() line: 759
> BusyIndicator.showWh​ile(Display, Runnable) line: 70
> WorkbenchWindow(Appl​icationWindow).run(b​oolean, boolean,
> IRunnableWithProgress) line: 756
> WorkbenchWindow.run(boolean, boolean, IRunnableWithProgress) line:
> 2577
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractTextEd​itor).internalInit(I​WorkbenchWindow,
> IEditorSite, IEditorInput) line: 3092
>
> JavaMergeViewer$Com​pilationUnitEditorAd​apter(AbstractTextEd​itor).init(IEditorSi​te,
> IEditorInput) line: 3119
> JavaMergeViewer.getS​ourceViewerConfigura​tion(SourceViewer,
> IEditorInput) line: 281
> JavaMergeViewer.conf​igureTextViewer(Text​Viewer) line: 210
> JavaMergeViewer(Text​MergeViewer).configu​reSourceViewer(Sourc​eViewer,
> boolean) line: 2869
> JavaMergeViewer(Text​MergeViewer).updateC​ontent(Object, Object, Object)
> line: 2820
> JavaMergeViewer(Cont​entMergeViewer).inte​rnalRefresh(Object) line:
> 737
> JavaMergeViewer(Cont​entMergeViewer).inpu​tChanged(Object, Object) line:
> 637
> JavaMergeViewer(Cont​entViewer).setInput(​Object) line: 274
> JavaMergeViewer.setI​nput(Object) line: 150
> CompareEditorInput$​3(CompareViewerSwitc​hingPane).setInput(O​bject) line:
> 256
>
> SyncInfoCompareInput​(CompareEditorInput)​.internalSetContentP​aneInput(Object)
> line: 840
> CompareEditorInput.a​ccess$7(CompareEdit​orInput, Object) line: 838
> CompareEditorInput$13.run() line: 778
> BusyIndicator.showWh​ile(Display, Runnable) line: 70
> SyncInfoCompareInput​(CompareEditorInput)​.feed1(ISelection) line: 772
>
> SyncInfoCompareInput​(CompareEditorInput)​.feedInput() line: 750
> SyncInfoCompareInput​(CompareEditorInput)​.createContents(Comp​osite)
> line: 573
> CompareEditor.create​CompareControl() line: 447
> CompareEditor.access​$6(CompareEditor) line: 416
> CompareEditor$3.run() line: 372
> UILockListener.doPendingWork() line: 155
> UISynchronizer$3.run() line: 158
> RunnableLock.run() line: 35
> UISynchronizer(Synch​ronizer).runAsyncMes​sages(boolean) line: 133
> Display.runAsyncMess​ages(boolean) line: 3852
> Display.readAndDispatch() line: 3473
> Workbench.runEventLo​op(Window$IExceptio​nHandler, Display) line: 2388
>
> Workbench.runUI() line: 2352
> Workbench.access$4(Workbench) line: 2204
> Workbench$5.run() line: 499
> Realm.runWithDefault(Realm, Runnable) line: 333
> Workbench.createAndR​unWorkbench(Display,​ WorkbenchAdvisor) line: 492
>
> PlatformUI.createAnd​RunWorkbench(Display​, WorkbenchAdvisor) line:
> 149
> IDEApplication.start​(IApplicationContext​) line: 113
> EclipseAppHandle.run(Object) line: 194
> EclipseAppLauncher.r​unApplication(Object​) line: 110
> EclipseAppLauncher.s​tart(Object) line: 79
> EclipseStarter.run(Object) line: 368
> EclipseStarter.run(String[], Runnable) line: 179
> NativeMethodAccessor​Impl.invoke0(Method,​ Object, Object[]) line: not
> available [native method]
> NativeMethodAccessor​Impl.invoke(Object, Object[]) line: not
> available
> DelegatingMethodAcce​ssorImpl.invoke(Obje​ct, Object[]) line: not
> available
> Method.invoke(Object, Object...) line: not available
> Main.invokeFramework(String[], URL[]) line: 556
> Main.basicRun(String[]) line: 511
> Main.run(String[]) line: 1270
> Main.main(String[]) line: 1246
>
>
> i will also update the bug in bugzilla of eclipse because this really
> sounds like a bug somewhere in eclipse.
>
> johan
>
>
Attachments

« Previous message in topic | 9 of 9 | Next message in topic »

Messages

Show all messages in topic

[Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-01-30 04:21:01 PST
     Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 07:32:34 PST
         Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse markphip Mark Phippard 2009-02-07 07:57:56 PST
             Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 12:20:30 PST
             Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 12:33:42 PST
                 Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 14:05:32 PST
                     Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 14:50:55 PST
                         Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse markphip Mark Phippard 2009-02-07 15:40:26 PST
                         Re: [Subclipse-dev] i created a eclipse bug report for something that with the current build doesnt work correctly any more with subclipse jcompagner jcompagner 2009-02-07 16:05:58 PST
Messages per page: