[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-users] 0.9.105 Annotate View broken in Eclipse 3.2 M4

From: Brock Janiczak <brockj_at_tpg.com.au>
Date: 2006-02-25 23:40:59 CET

It may have been the Eclipse File System that was introduced. It looks
like we can no longer return null from
RemoteAnnotationStorage#getFullPath even though the javadoc says it is
ok. Btw, this only fails for .java files. Regular text files are ok.

Here is a patch:

Index:
D:/data/eclipse/workspace/ui/src/org/tigris/subversion/subclipse/ui/annotations/RemoteAnnotationStorage.java
===================================================================
---
D:/data/eclipse/workspace/ui/src/org/tigris/subversion/subclipse/ui/annotations/RemoteAnnotationStorage.java
(revision 2099)
+++
D:/data/eclipse/workspace/ui/src/org/tigris/subversion/subclipse/ui/annotations/RemoteAnnotationStorage.java
(working copy)
@@ -19,12 +19,15 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.PlatformObject;
 import org.eclipse.core.runtime.Status;
 import org.tigris.subversion.subclipse.core.ISVNRemoteFile;
+import org.tigris.subversion.subclipse.core.ISVNRepositoryLocation;
 import org.tigris.subversion.subclipse.core.SVNException;
 import org.tigris.subversion.subclipse.ui.Policy;
 import org.tigris.subversion.subclipse.ui.SVNUIPlugin;
+import org.tigris.subversion.svnclientadapter.SVNUrl;
 
 public class RemoteAnnotationStorage extends PlatformObject implements
IEncodedStorage {
 
@@ -75,7 +78,18 @@
      * @see org.eclipse.core.resources.IStorage#getFullPath()
      */
     public IPath getFullPath() {
- return null;
+ ISVNRepositoryLocation location = file.getRepository();
+ SVNUrl repositoryUrl = location.getRepositoryRoot();
+ String[] segments = repositoryUrl.getPathSegments();
+
+ IPath path = new Path(null, "/");
+ for (int i = 0; i < segments.length; i++) {
+ path = path.append(segments[i]);
+ }
+
+ path = path.setDevice(repositoryUrl.getHost() +
IPath.DEVICE_SEPARATOR);
+ path = path.append(file.getRepositoryRelativePath());
+ return path;
     }
    
     /*

cheers,
Brock

Jörg von Frantzius wrote:
> Hi,
>
> when I chose "Team/Show Annotation" for some file, I get the following
> exception:
>
> org.eclipse.jface.text.Assert$AssertionFailedException: null argument;
> at org.eclipse.jface.text.Assert.isNotNull(Assert.java:158)
> at org.eclipse.jface.text.Assert.isNotNull(Assert.java:134)
> at
> org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:92)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.initialize(DocumentAdapter.java:180)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.<init>(DocumentAdapter.java:162)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$2.createBuffer(CompilationUnitDocumentProvider.java:930)
>
> at
> org.eclipse.jdt.internal.core.CompilationUnit.openBuffer(CompilationUnit.java:1020)
>
> at
> org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:103)
>
> at
> org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:235)
> at
> org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:498)
>
> at
> org.eclipse.jdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:38)
>
> at
> org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720)
>
> at
> org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:779)
>
> at
> org.eclipse.jdt.internal.core.CompilationUnit.getWorkingCopy(CompilationUnit.java:895)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFakeCompiltationUnit(CompilationUnitDocumentProvider.java:933)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1000)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3022)
>
> at
> org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:173)
>
> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1490)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2211)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2184)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1539)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor$17.run(AbstractTextEditor.java:2374)
>
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:360)
>
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:305)
> at
> org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:631)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:628)
>
> at
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2168)
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2392)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2419)
>
> at
> org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:784)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:585)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:374)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
>
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:213)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2383)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2316)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2308)
> at
> org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2294)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2289)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2266)
> at
> org.tigris.subversion.subclipse.ui.annotations.AnnotateView.openEditor(AnnotateView.java:356)
>
> at
> org.tigris.subversion.subclipse.ui.annotations.AnnotateView.showAnnotations(AnnotateView.java:161)
>
> at
> org.tigris.subversion.subclipse.ui.annotations.AnnotateView.showAnnotations(AnnotateView.java:122)
>
> at
> org.tigris.subversion.subclipse.ui.operations.ShowAnnotationOperation$1.run(ShowAnnotationOperation.java:88)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3262)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2908)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
> I have no idea what the problem could be, does anybody else per chance?
>
> Regards + thanks,
> Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
> For additional commands, e-mail: users-help@subclipse.tigris.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Sat Feb 25 23:43:26 2006

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.