|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEBPlugin
org.acm.seguin.ide.jedit.JavaStylePlugin
public class JavaStylePlugin
A plugin for pretty printing the current jEdit buffer, using the PrettyPrinter of the JREFactory suite.
Nested Class Summary | |
---|---|
class |
JavaStylePlugin.JavaAST
Description of the Class |
class |
JavaStylePlugin.JavaTree
Description of the Class |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_TILE_MINSIZE_PROPERTY
Description of the Field |
static java.lang.String |
JAVASTYLE_DIR
Description of the Field |
static JavaStylePlugin |
jsPlugin
Description of the Field |
static java.lang.String |
NAME
Description of the Field |
static java.lang.String |
OPTION_RULES_PREFIX
Description of the Field |
static java.lang.String |
OPTION_UI_DIRECTORY_POPUP
Description of the Field |
static java.io.File |
PRETTY_SETTINGS_FILE
Description of the Field |
Fields inherited from interface org.acm.seguin.ide.common.IDEInterface |
---|
CODING_STANDARDS, CUT_AND_PASTE_DETECTOR, DEBUG, ERROR, MESSAGE, NOTICE, WARNING |
Constructor Summary | |
---|---|
JavaStylePlugin()
|
Method Summary | |
---|---|
void |
addAbstractParentClass(View view,
Buffer buffer)
|
void |
addAnnotation(java.awt.Frame view,
java.lang.Object buffer,
int type,
int lineNo,
java.lang.String description)
Adds an annotation to an ide buffer. |
void |
addChildClass(View view,
Buffer buffer)
|
static void |
addNavigator(Navigator nav)
Adds a feature to the navigator attribute of the JavaStylePlugin class |
boolean |
bufferContainsJavaSource(java.awt.Frame view,
java.lang.Object buffer)
Does the buffer contain Java source code. |
void |
bufferNavigatorTree(java.awt.Frame view,
java.lang.Object buffer,
javax.swing.tree.TreeNode node)
Indicates that a buffer has been parsed and that a navigator tree of the source is available. |
void |
bufferParsed(java.awt.Frame view,
java.lang.Object buffer,
net.sourceforge.jrefactory.ast.Node compilationUnit)
Indicates that a buffer has been parsed and that an Abstract Syntax Tree is available. |
void |
check(View view,
Buffer buffer)
Description of the Method |
void |
checkAllOpenBuffers(java.awt.Frame view)
Description of the Method |
void |
checkBuffer(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
void |
checkDirectory(java.awt.Frame view,
boolean recursive)
Description of the Method |
static void |
checkDirectory(View view,
VFSBrowser browser,
boolean recursive)
Description of the Method |
void |
checkFile(View view,
VFS.DirectoryEntry[] entry)
Description of the Method |
static void |
checkFile(View view,
VFSBrowser browser)
Description of the Method |
void |
clearAnnotations(java.awt.Frame view,
java.lang.Object buffer,
int type)
Clears all annotation for an ide buffer. |
void |
cpdAllOpenBuffers(java.awt.Frame view)
Description of the Method |
static void |
cpdAllOpenBuffers(View view,
boolean all)
Description of the Method |
void |
cpdBuffer(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
static void |
cpdCurrentFile(View view)
Description of the Method |
void |
cpdDir(java.awt.Frame view,
boolean recursive)
Description of the Method |
static void |
cpdDir(View view,
boolean recursive)
Description of the Method |
static void |
deleteProperty(java.lang.String key)
Description of the Method |
void |
extractInterface(View view,
Buffer buffer)
|
CPDDuplicateCodeViewer |
getCPDDuplicateCodeViewer(View view)
Gets the CPDDuplicateCodeViewer attribute of the JavaStylePlugin object |
java.lang.Object |
getCurrentBuffer(java.awt.Frame view)
Get the current (atcive) buffer. |
java.awt.Frame |
getEditorFrame()
Returns the frame that contains the editor. |
static DefaultErrorSource |
getErrorSource()
Gets the ErrorSource attribute of the JavaStylePlugin class |
java.io.File |
getFile(java.awt.Frame view,
java.lang.Object buffer)
Gets the file that is being edited |
java.lang.String |
getFilePathForBuffer(java.lang.Object buffer)
Description of the Method |
java.lang.String[] |
getIDEProjects(java.awt.Frame parent)
Description of the Method |
java.lang.String |
getIDEProperty(java.lang.String prop)
Gets the IDEProperty attribute of the JavaStylePlugin object |
java.lang.String |
getIDEProperty(java.lang.String prop,
java.lang.String deflt)
Gets the IDEProperty attribute of the JavaStylePlugin object |
int |
getLineCount(java.lang.Object buffer)
Description of the Method |
int |
getLineEndOffset(java.lang.Object buffer,
int end)
Description of the Method |
int |
getLineNumber(java.awt.Frame view,
java.lang.Object buffer)
Get the line number of the cursor within the current buffer. |
int |
getLineStartOffset(java.lang.Object buffer,
int begin)
Description of the Method |
java.lang.String |
getProjectName(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
static java.lang.String |
getProjectName(View view,
Buffer buffer)
Sets the projectData attribute of the JEditPrettyPrinter object |
PropertiesFile |
getProperties(java.lang.String type,
java.lang.String project)
Gets the Properties attribute of the JavaStylePlugin class |
java.lang.String |
getText(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
void |
goToBuffer(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
void |
handleMessage(EBMessage message)
Description of the Method |
void |
hideWaitCursor(java.awt.Frame parent)
Description of the Method |
static void |
initJSPlugin()
Description of the Method |
void |
instanceBeautify(View view,
Buffer buffer,
boolean silently)
|
void |
instanceCheck(View view,
Buffer buffer,
boolean silent)
check current buffer |
void |
instanceCheckAllOpenBuffers(View view)
check all open buffers |
void |
instanceCheckDirectory(View view,
boolean recursive)
Description of the Method |
void |
instanceClearErrorList()
clear error list |
javax.swing.Icon |
loadIcon(java.lang.String name)
Load an icon from the IDE |
void |
loadUML(View view,
java.lang.String fileName)
|
void |
log(int urgency,
java.lang.Object source,
java.lang.Object message)
Description of the Method |
void |
moveCaretPosition(java.awt.Frame view,
java.lang.Object buffer,
int start)
Description of the Method |
void |
moveClassTo(View view,
Buffer buffer)
|
void |
moveMethod(View view,
Buffer buffer)
|
java.lang.Object |
openFile(java.awt.Frame view,
java.lang.String fileName)
Description of the Method |
void |
openUML(View view,
java.lang.String fileName)
|
void |
pushDownField(View view,
Buffer buffer)
|
void |
pushDownMethod(View view,
Buffer buffer)
|
void |
pushUpAbstractMethod(View view,
Buffer buffer)
|
void |
pushUpField(View view,
Buffer buffer)
|
void |
pushUpMethod(View view,
Buffer buffer)
|
void |
removeClass(View view,
Buffer buffer)
|
static void |
removeNavigator(Navigator nav)
Description of the Method |
void |
renameClass(View view,
Buffer buffer)
|
void |
renameField(View view,
Buffer buffer)
|
void |
renameMethod(View view,
Buffer buffer)
|
void |
renameMethodParameters(View view,
Buffer buffer)
|
void |
renameVariablesUsingHungarian(View view,
Buffer buffer)
|
void |
runInAWTThread(java.lang.Runnable runnable)
Description of the Method |
void |
saveProperties()
write new settings |
void |
setBuffer(java.awt.Frame view,
java.lang.Object buffer)
Description of the Method |
void |
setLineNumber(java.awt.Frame view,
java.lang.Object buffer,
int lineNumber)
Sets the line number |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the Property attribute of the JavaStylePlugin class |
void |
setSelection(java.awt.Frame view,
java.lang.Object buffer,
int start,
int end)
Description of the Method |
void |
setText(java.awt.Frame view,
java.lang.Object buffer,
java.lang.String value)
Sets the string in the IDE |
void |
showWaitCursor(java.awt.Frame parent)
Description of the Method |
void |
start()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPTION_RULES_PREFIX
public static final java.lang.String OPTION_UI_DIRECTORY_POPUP
public static final java.lang.String DEFAULT_TILE_MINSIZE_PROPERTY
public static final java.lang.String NAME
public static final java.lang.String JAVASTYLE_DIR
public static final java.io.File PRETTY_SETTINGS_FILE
public static JavaStylePlugin jsPlugin
Constructor Detail |
---|
public JavaStylePlugin()
Method Detail |
---|
public void setSelection(java.awt.Frame view, java.lang.Object buffer, int start, int end)
setSelection
in interface IDEInterface
view
- Description of Parameterbuffer
- The new Selection valuestart
- The new Selection valueend
- The new Selection valuepublic void setBuffer(java.awt.Frame view, java.lang.Object buffer)
setBuffer
in interface IDEInterface
view
- Description of Parameterbuffer
- The new Buffer valuepublic void setText(java.awt.Frame view, java.lang.Object buffer, java.lang.String value)
setText
in interface IDEInterface
view
- The frame containing the IDE.buffer
- Description of Parametervalue
- The new file contained in a stringpublic void setLineNumber(java.awt.Frame view, java.lang.Object buffer, int lineNumber)
setLineNumber
in interface IDEInterface
view
- The new lineNumber valuebuffer
- The new lineNumber valuelineNumber
- The new lineNumber valuepublic java.lang.String getIDEProperty(java.lang.String prop)
getIDEProperty
in interface IDEInterface
prop
- Description of Parameter
public java.lang.String getIDEProperty(java.lang.String prop, java.lang.String deflt)
getIDEProperty
in interface IDEInterface
prop
- Description of Parameterdeflt
- Description of Parameter
public java.lang.String getFilePathForBuffer(java.lang.Object buffer)
getFilePathForBuffer
in interface IDEInterface
buffer
- Description of Parameter
public java.lang.String[] getIDEProjects(java.awt.Frame parent)
getIDEProjects
in interface IDEInterface
parent
- Description of Parameter
public CPDDuplicateCodeViewer getCPDDuplicateCodeViewer(View view)
view
- Description of Parameter
public PropertiesFile getProperties(java.lang.String type, java.lang.String project)
getProperties
in interface IDEInterface
type
- Description of Parameterproject
- Description of Parameter
public int getLineStartOffset(java.lang.Object buffer, int begin)
getLineStartOffset
in interface IDEInterface
buffer
- Description of Parameterbegin
- Description of Parameter
public int getLineEndOffset(java.lang.Object buffer, int end)
getLineEndOffset
in interface IDEInterface
buffer
- Description of Parameterend
- Description of Parameter
public java.lang.String getText(java.awt.Frame view, java.lang.Object buffer)
getText
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameter
public int getLineCount(java.lang.Object buffer)
getLineCount
in interface IDEInterface
buffer
- Description of Parameter
public java.lang.String getProjectName(java.awt.Frame view, java.lang.Object buffer)
getProjectName
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameter
public java.awt.Frame getEditorFrame()
getEditorFrame
in interface IDEInterface
public java.lang.Object getCurrentBuffer(java.awt.Frame view)
getCurrentBuffer
in interface IDEInterface
view
- The frame containing the IDE.
public int getLineNumber(java.awt.Frame view, java.lang.Object buffer)
getLineNumber
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameter
public java.io.File getFile(java.awt.Frame view, java.lang.Object buffer)
getFile
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameter
public void bufferParsed(java.awt.Frame view, java.lang.Object buffer, net.sourceforge.jrefactory.ast.Node compilationUnit)
bufferParsed
in interface IDEInterface
view
- The frame containing the IDE.buffer
- The buffer (containing Java Source) that has been parsed.compilationUnit
- The root node of the AST.public void bufferNavigatorTree(java.awt.Frame view, java.lang.Object buffer, javax.swing.tree.TreeNode node)
bufferNavigatorTree
in interface IDEInterface
view
- The frame containing the IDE.buffer
- The buffer (containing Java Source) that has been parsed.node
- The root node of the tree.public javax.swing.Icon loadIcon(java.lang.String name)
loadIcon
in interface IDEInterface
name
- The name of the icon.
public boolean bufferContainsJavaSource(java.awt.Frame view, java.lang.Object buffer)
bufferContainsJavaSource
in interface IDEInterface
view
- The frame containing the IDE.buffer
- Description of Parameter
true
if the buffer contains Java source code, false
otherwise.public void handleMessage(EBMessage message)
message
- Description of Parameterpublic void start()
public void showWaitCursor(java.awt.Frame parent)
showWaitCursor
in interface IDEInterface
parent
- Description of Parameterpublic void hideWaitCursor(java.awt.Frame parent)
hideWaitCursor
in interface IDEInterface
parent
- Description of Parameterpublic void log(int urgency, java.lang.Object source, java.lang.Object message)
log
in interface IDEInterface
urgency
- Description of Parametersource
- Description of Parametermessage
- Description of Parameterpublic void instanceCheck(View view, Buffer buffer, boolean silent)
view
- Description of Parameterbuffer
- Description of Parametersilent
- Description of Parameterpublic void instanceCheckDirectory(View view, boolean recursive)
view
- Description of Parameterrecursive
- Description of Parameterpublic void instanceCheckAllOpenBuffers(View view)
view
- Description of Parameterpublic void instanceClearErrorList()
public void checkFile(View view, VFS.DirectoryEntry[] entry)
view
- Description of Parameterentry
- Description of Parameterpublic void cpdBuffer(java.awt.Frame view, java.lang.Object buffer) throws java.io.IOException
cpdBuffer
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic void cpdAllOpenBuffers(java.awt.Frame view) throws java.io.IOException
cpdAllOpenBuffers
in interface IDEInterface
view
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic void cpdDir(java.awt.Frame view, boolean recursive) throws java.io.IOException
cpdDir
in interface IDEInterface
view
- Description of Parameterrecursive
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic java.lang.Object openFile(java.awt.Frame view, java.lang.String fileName) throws java.io.IOException
openFile
in interface IDEInterface
view
- Description of ParameterfileName
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic void moveCaretPosition(java.awt.Frame view, java.lang.Object buffer, int start)
moveCaretPosition
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameterstart
- Description of Parameterpublic void runInAWTThread(java.lang.Runnable runnable)
runInAWTThread
in interface IDEInterface
runnable
- Description of Parameterpublic void checkBuffer(java.awt.Frame view, java.lang.Object buffer)
checkBuffer
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameterpublic void check(View view, Buffer buffer)
view
- Description of Parameterbuffer
- Description of Parameterpublic void checkAllOpenBuffers(java.awt.Frame view)
checkAllOpenBuffers
in interface IDEInterface
view
- Description of Parameterpublic void checkDirectory(java.awt.Frame view, boolean recursive)
checkDirectory
in interface IDEInterface
view
- Description of Parameterrecursive
- Description of Parameterpublic void instanceBeautify(View view, Buffer buffer, boolean silently)
view
- the view; may be null, if there is no current viewbuffer
- the buffer containing the java source codesilently
- if true, no error dialogs are shownpublic void goToBuffer(java.awt.Frame view, java.lang.Object buffer)
goToBuffer
in interface IDEInterface
view
- Description of Parameterbuffer
- Description of Parameterpublic void saveProperties()
saveProperties
in interface IDEInterface
public void loadUML(View view, java.lang.String fileName)
view
- Description of the ParameterfileName
- Description of Parameterpublic void openUML(View view, java.lang.String fileName)
view
- Description of the ParameterfileName
- Description of Parameterpublic void renameClass(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void moveClassTo(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void addAbstractParentClass(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- The feature to be added to the abstractParentClass attributepublic void removeClass(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void addChildClass(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- The feature to be added to the childClass attributepublic void extractInterface(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void renameVariablesUsingHungarian(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void pushUpMethod(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void pushUpAbstractMethod(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void renameMethod(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void pushDownMethod(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void moveMethod(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void renameMethodParameters(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void renameField(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void pushUpField(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic void pushDownField(View view, Buffer buffer)
view
- Description of the Parameterbuffer
- Description of Parameterpublic static void setProperty(java.lang.String key, java.lang.String value)
key
- The new Property valuevalue
- The new Property valuepublic static DefaultErrorSource getErrorSource()
public static java.lang.String getProjectName(View view, Buffer buffer)
view
- Description of Parameterbuffer
- Description of Parameter
public static void addNavigator(Navigator nav)
nav
- The feature to be added to the navigator attributepublic static void removeNavigator(Navigator nav)
nav
- Description of Parameterpublic static void deleteProperty(java.lang.String key)
key
- Description of Parameterpublic static void initJSPlugin()
public static void cpdCurrentFile(View view) throws java.io.IOException
view
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic static void cpdAllOpenBuffers(View view, boolean all) throws java.io.IOException
view
- Description of Parameterall
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic static void cpdDir(View view, boolean recursive) throws java.io.IOException
view
- Description of Parameterrecursive
- Description of Parameter
java.io.IOException
- Description of Exceptionpublic static void checkFile(View view, VFSBrowser browser)
view
- Description of Parameterbrowser
- Description of Parameterpublic static void checkDirectory(View view, VFSBrowser browser, boolean recursive)
view
- Description of Parameterbrowser
- Description of Parameterrecursive
- Description of Parameterpublic void addAnnotation(java.awt.Frame view, java.lang.Object buffer, int type, int lineNo, java.lang.String description)
addAnnotation
in interface IDEInterface
view
- The frame containing the IDE.buffer
- The buffer (containing Java Source) that has been parsed.type
- either CODING_STANDARDS or CUT_AND_PASTE_DETECTIONlineNo
- The line number of the annotation.description
- The annotationpublic void clearAnnotations(java.awt.Frame view, java.lang.Object buffer, int type)
clearAnnotations
in interface IDEInterface
view
- The frame containing the IDE.buffer
- The buffer (containing Java Source) that has been parsed.type
- either CODING_STANDARDS or CUT_AND_PASTE_DETECTION
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |