Extension SDK 10.1.2

oracle.ide
Class FileOpenHistory

java.lang.Object
  extended byoracle.ide.FileOpenHistory
All Implemented Interfaces:
Controller

public class FileOpenHistory
extends java.lang.Object
implements Controller

The FileOpenHistory class manages the opened files history.


Field Summary
static java.lang.String OPENED_FILES_NAME
           
static java.lang.String OPENED_PROJECTS_NAME
           
static java.lang.String OPENED_WORKSPACES_NAME
           
 
Constructor Summary
protected FileOpenHistory()
           
 
Method Summary
 java.lang.String[] getFileHistory()
          Get the opened files history list.
 int getHistoryCount()
          Get the maximum number of entries in the history list.
static FileOpenHistory getInstance()
          The FileOpenHistory controller is a singleton class.
protected  HistoryList getOpenedFiles()
           
protected  HistoryList getOpenedProjects()
           
protected  HistoryList getOpenedWorkspaces()
           
 java.lang.String[] getProjectHistory()
          Get the opened project files history list.
 java.lang.String[] getWorkspaceHistory()
          Get the opened wokspace files history list.
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
protected  void initialize()
           
 void removeHistory(Node node)
          Remove the specified Node from the opened node history.
 void save()
          Save the opened file history.
 void setHistoryCount(int count)
          Set the maximum number of entries in the history list.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 void updateFileHistory(java.net.URL url)
          Add the specified file url to the opened files history.
 void updateHistory(Node node)
          Add the specified Node to the opened node history.
 void updateProjectHistory(java.net.URL url)
          Add the specified project url to the opened project files history.
 void updateWorkspaceHistory(java.net.URL url)
          Add the specified workspace url to the opened workspace files history.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENED_FILES_NAME

public static final java.lang.String OPENED_FILES_NAME
See Also:
Constant Field Values

OPENED_PROJECTS_NAME

public static final java.lang.String OPENED_PROJECTS_NAME
See Also:
Constant Field Values

OPENED_WORKSPACES_NAME

public static final java.lang.String OPENED_WORKSPACES_NAME
See Also:
Constant Field Values
Constructor Detail

FileOpenHistory

protected FileOpenHistory()
Method Detail

getInstance

public static FileOpenHistory getInstance()
The FileOpenHistory controller is a singleton class. This method gets this controller's single instance.

Returns:
the FileOpenHistory controller single instance.

updateFileHistory

public void updateFileHistory(java.net.URL url)
Add the specified file url to the opened files history.


updateProjectHistory

public void updateProjectHistory(java.net.URL url)
Add the specified project url to the opened project files history.


updateWorkspaceHistory

public void updateWorkspaceHistory(java.net.URL url)
Add the specified workspace url to the opened workspace files history.


updateHistory

public void updateHistory(Node node)
Add the specified Node to the opened node history. This method figures out the type of node being added and adds the node URL to the files, projects, or workspace history list.


removeHistory

public void removeHistory(Node node)
Remove the specified Node from the opened node history. This method figures out the type of node being added and adds the node URL to the files, projects, or workspace history list.


getFileHistory

public java.lang.String[] getFileHistory()
Get the opened files history list.


getProjectHistory

public java.lang.String[] getProjectHistory()
Get the opened project files history list.


getWorkspaceHistory

public java.lang.String[] getWorkspaceHistory()
Get the opened wokspace files history list.


getHistoryCount

public int getHistoryCount()
Get the maximum number of entries in the history list. The same maximun is used for the file, project, and workspace history. The default value is 4.


setHistoryCount

public void setHistoryCount(int count)
Set the maximum number of entries in the history list. The same maximun is used for the file, project, and workspace history. The default value is 4.


save

public void save()
Save the opened file history. The history is saved in the Ide.properties file.


handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

initialize

protected void initialize()

getOpenedFiles

protected HistoryList getOpenedFiles()

getOpenedProjects

protected HistoryList getOpenedProjects()

getOpenedWorkspaces

protected HistoryList getOpenedWorkspaces()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.