|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.editor.eclipse.project.pages.EditorUtility
public class EditorUtility
A utility class to help interact with the NetBeans editors
| Field Summary |
|---|
| Fields inherited from interface org.formaria.editor.project.pages.IEditorUtility |
|---|
FRAME_HEIGHT, FRAME_WIDTH |
| Constructor Summary | |
|---|---|
EditorUtility()
Creates a new instance of EditorUtility |
|
| Method Summary | |
|---|---|
boolean |
activateEditor(PageResource pageRes,
boolean activate)
Activate the source code editor for this page |
void |
addJar(EditorProject currentProject,
java.net.URL jarUrl)
Add a jar reference to the project class path. |
boolean |
canImportDbTable(java.awt.datatransfer.DataFlavor transferFlavor)
Indicates whether a database table can be imported from a given data flavor. |
void |
copy(java.io.InputStream in,
java.io.OutputStream out)
Copies data from "in" to "out" |
void |
copyToClipboard(java.lang.String text)
Copy text to the clipboard |
Page |
getCachedPage(EditorProject currentProject,
PageResource pageRes)
If the page xml has been cached we want to use that xml to generate the page otherwise we just return the page contained in the pageRes object |
java.sql.Connection |
getDbConnection(java.lang.Object obj)
Get database connection |
java.lang.String |
getDbConnectionName(java.lang.Object tableObject)
Get the database connection name |
java.lang.String |
getDbDriver(java.lang.Object obj)
Get the database connection driver |
java.lang.String |
getDbDriverFile(java.lang.Object obj)
Get the path to the file (zip, jar) containing the jdbc driver used to connect the the database. |
java.lang.String |
getDbPassword(java.lang.Object obj)
Get database connection password It cannot be obtained from the Connection object |
java.lang.String |
getDbTableName(java.lang.Object obj)
Get database table name |
java.lang.ClassLoader |
getEditorClassLoader(EditorProject project)
Gets the class loader being used by the editor to load resources of the specified project. |
javax.swing.JEditorPane |
getEditorPane(java.awt.Container cont)
Search the container for an instance of JEditorPane |
javax.swing.JEditorPane |
getEditorPane(java.lang.String fileName)
Search the container for an instance of JEditorPane |
java.lang.Object[] |
getHandlerMethods(EditorProject currentProject,
java.lang.String fileName)
Get a list of the methods provided by the page class |
Modifiable |
getPageDataObject(EditorProject currentProject,
java.lang.String name)
Retrieve the PageDataObject for the page with the passed name |
java.lang.String |
getPlatform()
|
java.net.URL[] |
getProjectURLs(EditorProject project)
Gets the class path URLs of the given project |
boolean |
hasMethod(EditorProject currentProject,
java.lang.String fileName,
java.lang.String methodName)
Check if a method is already contained within the direct superclass |
void |
insertTextAtCaret(java.lang.Object sce,
java.lang.String newText)
|
boolean |
isEclipse()
Is this an eclipse plugin? |
boolean |
isValid(java.lang.Object sourceCodeEditor)
|
java.awt.Image |
loadImage(java.lang.String name)
|
boolean |
locateMethod(Project currentProject,
PageResource pageRes,
java.lang.Object sce,
java.lang.String methodName,
java.lang.String searchText,
boolean addNew,
boolean ctrlDown)
|
void |
markDirty(EditorProject project)
Mark the project as dirty |
boolean |
openSourceFile(EditorProject currentProject,
PageResource pr,
java.lang.String fileName)
|
void |
requestActive(java.lang.Object window)
|
boolean |
setSourceCodeEditor(PageResource pageRes,
java.lang.String fileName)
Set the source code editor for the pageResource |
void |
showErrorMessage(java.lang.String msg,
java.lang.String title)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditorUtility()
| Method Detail |
|---|
public boolean setSourceCodeEditor(PageResource pageRes,
java.lang.String fileName)
setSourceCodeEditor in interface IEditorUtility
public boolean activateEditor(PageResource pageRes,
boolean activate)
activateEditor in interface IEditorUtilitypageRes - the page resource that owns the sourceactivate - force the source editor to display if true
public javax.swing.JEditorPane getEditorPane(java.awt.Container cont)
getEditorPane in interface IEditorUtilitycont - the container to search
public javax.swing.JEditorPane getEditorPane(java.lang.String fileName)
getEditorPane in interface IEditorUtilitycont - the container to search
public Modifiable getPageDataObject(EditorProject currentProject,
java.lang.String name)
getPageDataObject in interface IEditorUtilityname - the name of the page whose PageDataObject we wish to retrieve
public Page getCachedPage(EditorProject currentProject,
PageResource pageRes)
getCachedPage in interface IEditorUtilitypageRes - the pageResource we're checking
public void requestActive(java.lang.Object window)
requestActive in interface IEditorUtility
public boolean locateMethod(Project currentProject,
PageResource pageRes,
java.lang.Object sce,
java.lang.String methodName,
java.lang.String searchText,
boolean addNew,
boolean ctrlDown)
locateMethod in interface IEditorUtility
public void insertTextAtCaret(java.lang.Object sce,
java.lang.String newText)
insertTextAtCaret in interface IEditorUtilitypublic boolean isValid(java.lang.Object sourceCodeEditor)
isValid in interface IEditorUtility
public boolean openSourceFile(EditorProject currentProject,
PageResource pr,
java.lang.String fileName)
openSourceFile in interface IEditorUtility
public void copy(java.io.InputStream in,
java.io.OutputStream out)
copy in interface IEditorUtility
public boolean hasMethod(EditorProject currentProject,
java.lang.String fileName,
java.lang.String methodName)
hasMethod in interface IEditorUtilitycurrentProject - the current projectfileName - the full file name for the enclosing classmethodName - the bare method name e.g. 'showPrevious'
public java.lang.Object[] getHandlerMethods(EditorProject currentProject,
java.lang.String fileName)
IEditorUtility
getHandlerMethods in interface IEditorUtilitycurrentProject - the current projectfileName - the full file name for the enclosing classpublic java.awt.Image loadImage(java.lang.String name)
loadImage in interface IEditorUtilitypublic void copyToClipboard(java.lang.String text)
copyToClipboard in interface IEditorUtilitytext - the text to be copiedpublic java.lang.String getDbDriverFile(java.lang.Object obj)
getDbDriverFile in interface IEditorUtilitytableNode - the table node object from which the db driver path
will be otained.public java.lang.String getDbPassword(java.lang.Object obj)
getDbPassword in interface IEditorUtilityobj - from which password is to be obtained
public java.lang.String getDbTableName(java.lang.Object obj)
getDbTableName in interface IEditorUtilityobj - from which database driver name is to be obtained
public java.sql.Connection getDbConnection(java.lang.Object obj)
IEditorUtility
getDbConnection in interface IEditorUtilityobj - the object that the connection is to be obtained from
public java.lang.String getDbConnectionName(java.lang.Object tableObject)
getDbConnectionName in interface IEditorUtilitytableObject - object containing connection name
public java.lang.String getDbDriver(java.lang.Object obj)
getDbDriver in interface IEditorUtilityobj - the object from which the database connection is
to be obtained
public java.lang.String getPlatform()
getPlatform in interface IEditorUtility
public void showErrorMessage(java.lang.String msg,
java.lang.String title)
showErrorMessage in interface IEditorUtility
public void addJar(EditorProject currentProject,
java.net.URL jarUrl)
addJar in interface IEditorUtilitycurrentProject - the current projectjarUrl - the jar to addpublic boolean canImportDbTable(java.awt.datatransfer.DataFlavor transferFlavor)
canImportDbTable in interface IEditorUtilitytrue if database table can be imported,
false otherwisepublic boolean isEclipse()
isEclipse in interface IEditorUtilitypublic java.lang.ClassLoader getEditorClassLoader(EditorProject project)
getEditorClassLoader in interface IEditorUtilityproject - project the classloader of which is to be obtained
public java.net.URL[] getProjectURLs(EditorProject project)
getProjectURLs in interface IEditorUtilityproject - project whose class path entries will be returned
public void markDirty(EditorProject project)
markDirty in interface IEditorUtilityproject - the current project
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||