| java.lang.Object org.netbeans.modules.openfile.DefaultOpenFileImpl
DefaultOpenFileImpl | public class DefaultOpenFileImpl implements OpenFileImpl,Runnable(Code) | | Opens files when requested. Main functionality.
author: Jaroslav Tulach, Jesse Glick, Marian Petras, David Konecny |
Method Summary | |
protected void | notifyCannotOpen(String fileName) Displays a dialog that the file cannot be open.
This method is to be used in cases that the file was open via
the Open File Server. | public boolean | open(FileObject fileObject, int line) Opens the FileObject either by calling
EditorCookie (or
OpenCookie or
ViewCookie ),
or by showing it in the Explorer. | protected boolean | openByCookie(Node.Cookie cookie, Class cookieClass, int line) Activates the specified cookie, thus opening a file.
The file is specified by the cookie, because the cookie was obtained
from it. | public void | run() This method is called when it is rescheduled to the AWT thread.
(from a different thread). | final protected void | setStatusLine(String text) Sets the specified text into the status line. |
JAVA_EXT | final static String JAVA_EXT(Code) | | extenstion for .java files (including the dot)
|
TXT_EXT | final static String TXT_EXT(Code) | | extension for .txt files (including the dot)
|
DefaultOpenFileImpl | public DefaultOpenFileImpl()(Code) | | Creates a new instance of OpenFileImpl
|
notifyCannotOpen | protected void notifyCannotOpen(String fileName)(Code) | | Displays a dialog that the file cannot be open.
This method is to be used in cases that the file was open via
the Open File Server. The message also informs that
the launcher will be notified as if the file
was closed immediately.
Parameters: fileName - name of file that could not be opened |
open | public boolean open(FileObject fileObject, int line)(Code) | | Opens the FileObject either by calling
EditorCookie (or
OpenCookie or
ViewCookie ),
or by showing it in the Explorer.
|
openByCookie | protected boolean openByCookie(Node.Cookie cookie, Class cookieClass, int line)(Code) | | Activates the specified cookie, thus opening a file.
The file is specified by the cookie, because the cookie was obtained
from it. The cookie must be one of EditorCookie
OpenCookie , EditCookie ,
ViewCookie .
Parameters: cookie - cookie to activate Parameters: cookieClass - type of the cookie - specifies action to activate Parameters: line - used only by EditorCookie s -specifies initial line to open the file at true if the cookie was successfully activated,false if some error occured exception: java.lang.IllegalArgumentException - if cookieClass is not any ofEditorCookie , OpenCookie ,ViewCookie exception: java.lang.ClassCastException - if the cookie is not an instanceof the specified cookie class |
run | public void run()(Code) | | This method is called when it is rescheduled to the AWT thread.
(from a different thread). It is always run in the AWT thread.
|
setStatusLine | final protected void setStatusLine(String text)(Code) | | Sets the specified text into the status line.
Parameters: text - text to be displayed |
|
|