de.uni_paderborn.fujaba.app.action
Class CompileAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byde.uni_paderborn.fujaba.app.action.CompileAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class CompileAction
extends javax.swing.AbstractAction

Compiles Java Sources.

Version:
$Revision: 1.44.2.8 $
Author:
$Author: cschneid $
See Also:
Serialized Form

Nested Class Summary
static interface CompileAction.Compiler
          No comment provided by developer, please add a comment to improve documentation.
 
Field Summary
static java.lang.String FILE_SUFFIX
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String MESSAGE_CLASS_COMPILE_ERROR
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String MESSAGE_CLASS_COMPILE_WARNING
          No comment provided by developer, please add a comment to improve documentation.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CompileAction()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 boolean compile(java.awt.event.ActionEvent e)
          Compile all sources
static javax.swing.Action createGotoSourceAction(CompilerMessage compilerMessage)
          No comment provided by developer, please add a comment to improve documentation.
static Message createMessage(java.lang.String filename, boolean warning, int lineNr, int colNr, java.lang.String text, java.lang.String context)
          No comment provided by developer, please add a comment to improve documentation.
static void fillMessage(Message message, java.lang.String filename, boolean warning, int lineNr, int colNr, java.lang.String text, java.lang.String context)
          Create a new Message and return it.
static java.lang.String getClassPath()
          Get the classPath attribute of the CompileAction class
static CompileAction.Compiler getCompiler()
          Get the compiler attribute of the CompileAction class
static java.lang.String getExpPath()
          Deprecated. Use GeneralPreferences.get().getExportFolder() instead.
static java.lang.String getIncrementIdForGeneratedCodeLine(java.lang.String file, int lineNr)
          Get the incrementIdForGeneratedCodeLine attribute of the CompileAction class
 ProcessOutputViewer getProcessOutputViewer()
          gets the ProcessOutputViewer that was used to compile the project
static void setCompiler(CompileAction.Compiler compiler)
          Sets the compiler attribute of the CompileAction class
 void setExitAction(java.awt.event.ActionListener act)
          Sets the exitAction attribute of the CompileAction object
 void setOutputPath(java.lang.String value)
          Sets the outputPath attribute of the CompileAction object
 void setProcessOutputViewer(ProcessOutputViewer myView)
          sets the ProcessOutputViewer to compile a project if no one is set, CompileAction generates a new one
 void setQuiet(boolean value)
          sets CompileAction to quiet (no ProcessOutputViewer)
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_CLASS_COMPILE_ERROR

public static final java.lang.String MESSAGE_CLASS_COMPILE_ERROR
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

MESSAGE_CLASS_COMPILE_WARNING

public static final java.lang.String MESSAGE_CLASS_COMPILE_WARNING
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

FILE_SUFFIX

public static final java.lang.String FILE_SUFFIX
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values
Constructor Detail

CompileAction

public CompileAction()
Method Detail

setProcessOutputViewer

public void setProcessOutputViewer(ProcessOutputViewer myView)
sets the ProcessOutputViewer to compile a project if no one is set, CompileAction generates a new one

Parameters:
myView - The new processOutputViewer value

getProcessOutputViewer

public ProcessOutputViewer getProcessOutputViewer()
gets the ProcessOutputViewer that was used to compile the project

Returns:
ProcessOutputViewer

setQuiet

public void setQuiet(boolean value)
sets CompileAction to quiet (no ProcessOutputViewer)

Parameters:
value - The new quiet value

setOutputPath

public void setOutputPath(java.lang.String value)
Sets the outputPath attribute of the CompileAction object

Parameters:
value - The new outputPath value

setExitAction

public void setExitAction(java.awt.event.ActionListener act)
Sets the exitAction attribute of the CompileAction object

Parameters:
act - The new exitAction value

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
e - No description provided

compile

public boolean compile(java.awt.event.ActionEvent e)
Compile all sources

Parameters:
e - action event
Returns:
true when compile was successful if e==null, when e is not null returns always true

createGotoSourceAction

public static javax.swing.Action createGotoSourceAction(CompilerMessage compilerMessage)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
compilerMessage - No description provided
Returns:
No description provided

getClassPath

public static java.lang.String getClassPath()
Get the classPath attribute of the CompileAction class

Returns:
The classPath value

getExpPath

public static java.lang.String getExpPath()
Deprecated. Use GeneralPreferences.get().getExportFolder() instead.

Returns:
the export path

createMessage

public static Message createMessage(java.lang.String filename,
                                    boolean warning,
                                    int lineNr,
                                    int colNr,
                                    java.lang.String text,
                                    java.lang.String context)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
filename - No description provided
warning - No description provided
lineNr - No description provided
colNr - No description provided
text - No description provided
context - No description provided
Returns:
No description provided

fillMessage

public static void fillMessage(Message message,
                               java.lang.String filename,
                               boolean warning,
                               int lineNr,
                               int colNr,
                               java.lang.String text,
                               java.lang.String context)
Create a new Message and return it.

Parameters:
filename - No description provided
warning - No description provided
lineNr - No description provided
colNr - No description provided
text - No description provided
context - No description provided
message - No description provided

getIncrementIdForGeneratedCodeLine

public static java.lang.String getIncrementIdForGeneratedCodeLine(java.lang.String file,
                                                                  int lineNr)
Get the incrementIdForGeneratedCodeLine attribute of the CompileAction class

Parameters:
file - No description provided
lineNr - No description provided
Returns:
The incrementIdForGeneratedCodeLine value

getCompiler

public static CompileAction.Compiler getCompiler()
Get the compiler attribute of the CompileAction class

Returns:
The compiler value

setCompiler

public static void setCompiler(CompileAction.Compiler compiler)
Sets the compiler attribute of the CompileAction class

Parameters:
compiler - The new compiler value