com.togethersoft.openapi.ide.project
Interface IdeProject


public interface IdeProject

Interface IdeProject defines a Together project.


To open or close a found project, open and close methods are used.
Note, that opening a found project only loads it into IDE. It is also possible to
obtain information about a non-opened found IdeProject, same as for the opened projects. (See
IdeProjectManager.getProject method).


The project consists of IdeProjectNodes, each representing a file or a directory.

Author:
TogetherSoft
Since: Together 3.0
See Also: IdeProjectManager, IdeProjectNode

Method Summary
 voidaddImportPath(String path)
          Adds specified path to the project as a set of root IdeProjectNode instances.
 voidclose(boolean save)
          Closes this project.
 IdeProjectNodefindNode(String url)
          Given the node's URL, finds the IdeProjectNode( which can be a file or a directory).
 StringgetDefaultLanguage()
          Returns the string with the name of this project's default language.
 StringgetFileName()
          Returns a string with the full path to the file representing this project.
 StringgetName()
          Returns a short name of a project.
 booleanisOpen()
          Checks whether this project is opened.
 voidopen()
          Loads this project into IDE.
 IdeProjectNodeEnumerationroots()
          Returns an enumeration of all root IdeProjectNodes for this project.

Method Detail

addImportPath

public void addImportPath(String path)
Adds specified path to the project as a set of root IdeProjectNode instances.
can consist of several paths separated with a File.separator.
Parameters:
path String to be added
Since:
Together 3.1

close

public void close(boolean save)
throws com.togethersoft.openapi.util.VetoException,
java.io.IOException
Closes this project. If save parameter is true then it saves the changed data,
otherwise does not save.
Parameters:
save boolean value indicating whether the changed data should be saved
Throws:
VetoException if an error occurred.
IOException

findNode

public IdeProjectNode findNode(String url)
Given the node's URL, finds the IdeProjectNode( which can be a file or a directory).
Parameters:
url String with IdeProjectNode's URL. For example, for a directory
"c:\together\myprojects" this will be "c:\together\myprojects".
Returns: IdeProjectNode

getDefaultLanguage

public String getDefaultLanguage()
Returns the string with the name of this project's default language. The predefined values are in
SciLanguage interface.
Returns: String that denotes the language of the current project
See Also:
SciLanguage

getFileName

public String getFileName()
Returns a string with the full path to the file representing this project. For example,
if a project named "myTestProj" is located in the "c:\myProjects" directory, this method will
return "c:\myProjects\myTestProj.tpr"
Returns: String fully qualified project name

getName

public String getName()
Returns a short name of a project. For example, for a project is "c:\myProjects\myTestProj.tpr" this
method will return "myTestProj.tpr".
Returns: String short name of this project

isOpen

public boolean isOpen()
Checks whether this project is opened.
Returns: true if this project is opened, false otherwise

open

public void open()
throws com.togethersoft.openapi.util.VetoException,
java.io.IOException
Loads this project into IDE. If an error occurred throws the VetoException.
Throws:
VetoException if an error occurred
IOException

roots

public IdeProjectNodeEnumeration roots()
Returns an enumeration of all root IdeProjectNodes for this project.
Returns: an enumeration of all root IdeProjectNodes for this project
See Also:
IdeProjectNode