KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > RemoteAnnotationEditorInput


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.ui;
12
13 import java.io.InputStream JavaDoc;
14
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.core.runtime.NullProgressMonitor;
17 import org.eclipse.team.core.TeamException;
18 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
19 import org.eclipse.ui.IStorageEditorInput;
20 import org.eclipse.ui.model.IWorkbenchAdapter;
21
22 /**
23  * An editor input for a cvs annotation response
24  */

25 public class RemoteAnnotationEditorInput extends RemoteFileEditorInput implements IWorkbenchAdapter, IStorageEditorInput {
26
27     InputStream JavaDoc contents;
28     
29     public RemoteAnnotationEditorInput(ICVSRemoteFile file, InputStream JavaDoc contents) {
30         super(file, new NullProgressMonitor());
31         this.contents = contents;
32     }
33     
34     /* (non-Javadoc)
35      * @see org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput#initializeStorage(org.eclipse.team.internal.ccvs.core.ICVSRemoteFile, org.eclipse.core.runtime.IProgressMonitor)
36      */

37     protected void initializeStorage(ICVSRemoteFile file, IProgressMonitor monitor) throws TeamException {
38         if (contents != null) {
39             storage = new RemoteAnnotationStorage(file, contents);
40         }
41     }
42 }
43
Popular Tags