blob: 587139a77846c1fca15b74a2843057a616640c90 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
* 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:
* Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.treeeditor.resource;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
import org.eclipse.viatra2.framework.IFramework;
public class FrameworkEditorInput implements IEditorInput
{
protected IFramework fw;
public FrameworkEditorInput(IFramework f)
{
fw = f;
}
public IFramework getFramework()
{
return fw;
}
public boolean exists()
{
return true;
}
public ImageDescriptor getImageDescriptor() { return null; }
public String getName() {
return fw.getId();
}
public IPersistableElement getPersistable()
{
// TODO create persistable element for a framework
return null;
}
public String getToolTipText()
{
return fw.getCurrentFilename();
}
public Object getAdapter(Class adapter)
{
return null;
}
}