blob: c0e5e790ef075203816400efa04d44c3619dd1d3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Kentarou FUKUDA - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.model.ui.editor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
public class DummyEditorInput implements IEditorInput {
private String name = "";
private String url = "";
public DummyEditorInput(String url, String name) {
setUrl(url);
if (name != null) {
this.name = name;
}
}
public boolean exists() {
System.out.println("exists");
return false;
}
public ImageDescriptor getImageDescriptor() {
return null;
}
public String getName() {
return name;
}
public IPersistableElement getPersistable() {
return null;
}
public String getToolTipText() {
return "";
}
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
return null;
}
public String getUrl() {
return url;
}
protected void setUrl(String url) {
if (url != null) {
this.url = url;
}
}
}