1
/*******************************************************************************
2
* Copyright (c) 2010 Red Hat Inc. 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
package org.eclipse.linuxtools.changelog.tests.fixtures;
10
import org.eclipse.core.resources.IStorage;
11
import org.eclipse.jface.resource.ImageDescriptor;
12
import org.eclipse.ui.IPersistableElement;
13
import org.eclipse.ui.IStorageEditorInput;
16
* An IStorageEditorInput fixture. Used in CParserTest.
19
public class CStringStorageInput implements IStorageEditorInput {
21
private IStorage storage;
23
public CStringStorageInput(IStorage storage) {
24
this.storage = storage;
27
public boolean exists() {
31
public ImageDescriptor getImageDescriptor() {
35
public String getName() {
36
return storage.getName();
39
public IPersistableElement getPersistable() {
43
public IStorage getStorage() {
47
public String getToolTipText() {
48
return "String-based file: " + storage.getName();
51
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {