pl.edu.agh.cast.backward.resources
Class DiagramEditorInput

java.lang.Object
  extended by pl.edu.agh.cast.backward.resources.FileEditorInput
      extended by pl.edu.agh.cast.backward.resources.DiagramEditorInput
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorInput, org.eclipse.ui.IPathEditorInput, IDiagramEditorInput

public class DiagramEditorInput
extends FileEditorInput
implements IDiagramEditorInput

Editor input provider in form of a IDiagram.

Author:
AGH CAST Team

Constructor Summary
DiagramEditorInput(IDiagram diagram, org.eclipse.core.resources.IFile file)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Two DiagramEditorInputs are equal if their files are equal.
 IDiagram getDiagram()
          Returns the diagram.
 int hashCode()
          
 
Methods inherited from class pl.edu.agh.cast.backward.resources.FileEditorInput
exists, getAdapter, getFile, getImageDescriptor, getName, getPath, getPersistable, getToolTipText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiagramEditorInput

public DiagramEditorInput(IDiagram diagram,
                          org.eclipse.core.resources.IFile file)
Constructor.

Parameters:
diagram - the diagram
file - input file
Method Detail

getDiagram

public IDiagram getDiagram()
Returns the diagram.

Specified by:
getDiagram in interface IDiagramEditorInput
Returns:
the diagram.
See Also:
IDiagramEditorInput.getDiagram()

equals

public boolean equals(Object obj)
Two DiagramEditorInputs are equal if their files are equal. That basically means that FileEditorInput's equals should be used.

Overrides:
equals in class FileEditorInput
See Also:
FileEditorInput.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class FileEditorInput
See Also:
FileEditorInput.hashCode()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.