org.acm.seguin.ide.common
Interface IDEInterface

All Known Implementing Classes:
JavaStylePlugin

public interface IDEInterface

Description of the Interface

Author:
Mike Atkinson

Field Summary
static int CODING_STANDARDS
          Signals that this is to do with coding standards checking.
static int CUT_AND_PASTE_DETECTOR
          Signals that this is to do with cut and paste detection.
static int DEBUG
          Debugging message urgency.
static int ERROR
          Error urgency.
static int MESSAGE
          Message urgency.
static int NOTICE
          Notice urgency.
static int WARNING
          Warning urgency.
 
Method Summary
 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.
 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 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
 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
 void cpdBuffer(java.awt.Frame view, java.lang.Object buffer)
          Description of the Method
 void cpdDir(java.awt.Frame view, boolean recursive)
          Description of the Method
 java.lang.Object getCurrentBuffer(java.awt.Frame view)
          Get the current (atcive) buffer.
 java.awt.Frame getEditorFrame()
          Returns the frame that contains the editor.
 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)
          Gets the IDEProjects attribute of the IDEInterface object
 java.lang.String getIDEProperty(java.lang.String prop)
          Gets the IDEProperty attribute of the IDEInterface object
 java.lang.String getIDEProperty(java.lang.String prop, java.lang.String deflt)
          Gets the IDEProperty attribute of the IDEInterface 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
 PropertiesFile getProperties(java.lang.String type, java.lang.String project)
          Gets the Properties attribute of the IDEInterface object
 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 hideWaitCursor(java.awt.Frame parent)
          Description of the Method
 javax.swing.Icon loadIcon(java.lang.String name)
          Load an icon from the IDE
 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
 java.lang.Object openFile(java.awt.Frame view, java.lang.String fileName)
          Description of the Method
 void runInAWTThread(java.lang.Runnable runnable)
          Description of the Method
 void saveProperties()
          Description of the Method
 void setBuffer(java.awt.Frame view, java.lang.Object fileName)
          Description of the Method
 void setLineNumber(java.awt.Frame view, java.lang.Object buffer, int lineNumber)
          Get the line number of the cursor within the current buffer.
 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
 

Field Detail

DEBUG

static final int DEBUG
Debugging message urgency. Should be used for messages only useful when debugging a problem.

Since:
JRefactory 2.8.02
See Also:
Constant Field Values

MESSAGE

static final int MESSAGE
Message urgency. Should be used for messages which give more detail than notices.

Since:
JRefactory 2.8.02
See Also:
Constant Field Values

NOTICE

static final int NOTICE
Notice urgency. Should be used for messages that directly affect the user.

Since:
JRefactory 2.8.02
See Also:
Constant Field Values

WARNING

static final int WARNING
Warning urgency. Should be used for messages that warrant attention.

Since:
JRefactory 2.8.02
See Also:
Constant Field Values

ERROR

static final int ERROR
Error urgency. Should be used for messages that signal a failure.

Since:
JRefactory 2.8.02
See Also:
Constant Field Values

CODING_STANDARDS

static final int CODING_STANDARDS
Signals that this is to do with coding standards checking.

Since:
JRefactory 2.9.17
See Also:
Constant Field Values

CUT_AND_PASTE_DETECTOR

static final int CUT_AND_PASTE_DETECTOR
Signals that this is to do with cut and paste detection.

Since:
JRefactory 2.9.17
See Also:
Constant Field Values
Method Detail

getIDEProperty

java.lang.String getIDEProperty(java.lang.String prop)
Gets the IDEProperty attribute of the IDEInterface object

Parameters:
prop - Description of Parameter
Returns:
The IDEProperty value

getIDEProperty

java.lang.String getIDEProperty(java.lang.String prop,
                                java.lang.String deflt)
Gets the IDEProperty attribute of the IDEInterface object

Parameters:
prop - Description of Parameter
deflt - Description of Parameter
Returns:
The IDEProperty value

getIDEProjects

java.lang.String[] getIDEProjects(java.awt.Frame parent)
Gets the IDEProjects attribute of the IDEInterface object

Parameters:
parent - Description of Parameter
Returns:
The IDEProjects value

showWaitCursor

void showWaitCursor(java.awt.Frame parent)
Description of the Method

Parameters:
parent - Description of Parameter

hideWaitCursor

void hideWaitCursor(java.awt.Frame parent)
Description of the Method

Parameters:
parent - Description of Parameter

log

void log(int urgency,
         java.lang.Object source,
         java.lang.Object message)
Description of the Method

Parameters:
urgency - Description of Parameter
source - Description of Parameter
message - Description of Parameter

getProperties

PropertiesFile getProperties(java.lang.String type,
                             java.lang.String project)
Gets the Properties attribute of the IDEInterface object

Parameters:
type - Description of Parameter
project - Description of Parameter
Returns:
The Properties value

setBuffer

void setBuffer(java.awt.Frame view,
               java.lang.Object fileName)
Description of the Method

Parameters:
view - Description of Parameter
fileName - The new Buffer value

setSelection

void setSelection(java.awt.Frame view,
                  java.lang.Object buffer,
                  int start,
                  int end)
Description of the Method

Parameters:
view - Description of Parameter
start - The new Selection value
end - The new Selection value

cpdBuffer

void cpdBuffer(java.awt.Frame view,
               java.lang.Object buffer)
               throws java.io.IOException
Description of the Method

Parameters:
view - Description of Parameter
Throws:
java.io.IOException - Description of Exception

cpdAllOpenBuffers

void cpdAllOpenBuffers(java.awt.Frame view)
                       throws java.io.IOException
Description of the Method

Parameters:
view - Description of Parameter
Throws:
java.io.IOException - Description of Exception

cpdDir

void cpdDir(java.awt.Frame view,
            boolean recursive)
            throws java.io.IOException
Description of the Method

Parameters:
view - Description of Parameter
recursive - Description of Parameter
Throws:
java.io.IOException - Description of Exception

openFile

java.lang.Object openFile(java.awt.Frame view,
                          java.lang.String fileName)
                          throws java.io.IOException
Description of the Method

Parameters:
view - Description of Parameter
fileName - Description of Parameter
Returns:
Description of the Returned Value
Throws:
java.io.IOException - Description of Exception

getLineStartOffset

int getLineStartOffset(java.lang.Object buffer,
                       int begin)
Description of the Method

Parameters:
buffer - Description of Parameter
begin - Description of Parameter
Returns:
The BeginLine value

getLineEndOffset

int getLineEndOffset(java.lang.Object buffer,
                     int end)
Description of the Method

Parameters:
buffer - Description of Parameter
end - Description of Parameter
Returns:
The LineEndOffset value

moveCaretPosition

void moveCaretPosition(java.awt.Frame view,
                       java.lang.Object buffer,
                       int start)
Description of the Method

Parameters:
view - Description of Parameter
start - Description of Parameter

runInAWTThread

void runInAWTThread(java.lang.Runnable runnable)
Description of the Method

Parameters:
runnable - Description of Parameter

getText

java.lang.String getText(java.awt.Frame view,
                         java.lang.Object buffer)
Description of the Method

Parameters:
view - Description of Parameter
Returns:
The Text value

checkBuffer

void checkBuffer(java.awt.Frame view,
                 java.lang.Object buffer)
Description of the Method

Parameters:
view - Description of Parameter

checkAllOpenBuffers

void checkAllOpenBuffers(java.awt.Frame view)
Description of the Method

Parameters:
view - Description of Parameter

checkDirectory

void checkDirectory(java.awt.Frame view,
                    boolean recursive)
Description of the Method

Parameters:
view - Description of Parameter
recursive - Description of Parameter

goToBuffer

void goToBuffer(java.awt.Frame view,
                java.lang.Object buffer)
Description of the Method

Parameters:
view - Description of Parameter
buffer - Description of Parameter

getLineCount

int getLineCount(java.lang.Object buffer)
Description of the Method

Parameters:
buffer - Description of Parameter
Returns:
The LineCount value

getProjectName

java.lang.String getProjectName(java.awt.Frame view,
                                java.lang.Object buffer)
Description of the Method

Parameters:
view - Description of Parameter
buffer - Description of Parameter
Returns:
The ProjectName value

saveProperties

void saveProperties()
Description of the Method

Parameters:
view - Description of Parameter
buffer - Description of Parameter

getFilePathForBuffer

java.lang.String getFilePathForBuffer(java.lang.Object buffer)
Description of the Method

Parameters:
buffer - Description of Parameter
Returns:
The File path for this buffer

loadIcon

javax.swing.Icon loadIcon(java.lang.String name)
Load an icon from the IDE

Parameters:
name - The name of the icon.
Returns:
An icon (or null if the icon cannot be found).

getEditorFrame

java.awt.Frame getEditorFrame()
Returns the frame that contains the editor. If this is not available or you want dialog boxes to be centered on the screen return null from this operation.

Returns:
the frame

getCurrentBuffer

java.lang.Object getCurrentBuffer(java.awt.Frame view)
Get the current (atcive) buffer.

Parameters:
view - The frame containing the IDE.
Returns:
The active buffer or null if no active buffer.

getLineNumber

int getLineNumber(java.awt.Frame view,
                  java.lang.Object buffer)
Get the line number of the cursor within the current buffer.

Parameters:
view - The frame containing the IDE.
buffer - Description of Parameter
lineNumber - The line number of the cursor in the current buffer.

setLineNumber

void setLineNumber(java.awt.Frame view,
                   java.lang.Object buffer,
                   int lineNumber)
Get the line number of the cursor within the current buffer.

Parameters:
view - The frame containing the IDE.
buffer - Description of Parameter

bufferContainsJavaSource

boolean bufferContainsJavaSource(java.awt.Frame view,
                                 java.lang.Object buffer)
Does the buffer contain Java source code.

Parameters:
view - The frame containing the IDE.
buffer - Description of Parameter
Returns:
true if the buffer contains Java source code, false otherwise.

setText

void setText(java.awt.Frame view,
             java.lang.Object buffer,
             java.lang.String value)
Sets the string in the IDE

Parameters:
view - The frame containing the IDE.
buffer - Description of Parameter
value - The new file contained in a string

getFile

java.io.File getFile(java.awt.Frame view,
                     java.lang.Object buffer)
Gets the file that is being edited

Returns:
The File value

bufferParsed

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.

Parameters:
view - The frame containing the IDE.
buffer - The buffer (containing Java Source) that has been parsed.
compilationUnit - The root node of the AST.

bufferNavigatorTree

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.

Parameters:
view - The frame containing the IDE.
buffer - The buffer (containing Java Source) that has been parsed.
node - The root node of the tree.

addAnnotation

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.

Parameters:
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
lineNo - The line number of the annotation.
description - The annotation

clearAnnotations

void clearAnnotations(java.awt.Frame view,
                      java.lang.Object buffer,
                      int type)
Clears all annotation for an ide buffer.

Parameters:
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