Jalopy 1.0b10

de.hunsicker.jalopy.plugin
Interface ProjectFile


public interface ProjectFile

Represents a Java source file that is part of a project.

Version:
$Revision: 1.2 $
Author:
Marco Hunsicker

Method Summary
 Editor getEditor()
          Returns an editor view to modify the file.
 String getEncoding()
          Returns the encoding used to read and write this file.
 File getFile()
          Returns the underlying physical file.
 String getName()
          Returns the name of the file.
 Project getProject()
          Returns the project this file is attached to.
 boolean isOpened()
          Determines whether the file is currently opened.
 boolean isReadOnly()
          Determines whether the file can be changed.
 

Method Detail

getEditor

public Editor getEditor()
Returns an editor view to modify the file. One may check if the file is actually opened in the editor prior to call this method:
 if (projectFile.isOpened())
 {
     return projectFile.getEditor();
 }
 else
 {
     // do whatever you want ...
 }
 
Returns:
the editor to modify the contents of the file. Returns null if the file is currently closed.
See Also:
isOpened()

getEncoding

public String getEncoding()
Returns the encoding used to read and write this file.
Returns:
A Java encoding name. May be null to indicate the platform's default encoding.

getFile

public File getFile()
Returns the underlying physical file. Note that if the application uses virtual files this method should create an intermediate representation but never return null.
Returns:
the physical file.

getName

public String getName()
Returns the name of the file.
Returns:
the file name.

isOpened

public boolean isOpened()
Determines whether the file is currently opened. That means an editor view exists.
Returns:
true if the file is currently opened, i.e. has an editor to modify its contents.
See Also:
getEditor()

getProject

public Project getProject()
Returns the project this file is attached to.
Returns:
the containing project.

isReadOnly

public boolean isReadOnly()
Determines whether the file can be changed.
Returns:
true if the file can be changed by the user.

Jalopy 1.0b10

Submit a bug or feature.

For further information and documentation, visit the official Jalopy website.
This page generated: November 14 2002