edu.rice.cs.drjava
Class DrJavaRoot

java.lang.Object
  extended by edu.rice.cs.drjava.DrJavaRoot

public class DrJavaRoot
extends Object

Main class for DrJava.

Version:
$Id: DrJavaRoot.java 5236 2010-04-27 01:43:36Z mgricken $

Field Summary
private static PrintStream _consoleErr
           
private static PrintStream _consoleOut
           
private static SimpleInteractionsWindow _debugConsole
           
private static MainFrame _mainFrame
          Main frame of this DrJava instance.
private static boolean anyLineNumbersSpecified
           
static String PLASTIC_THEMES_PACKAGE
           
static String TEST_DEBUGGER_CLASS
          Class to probe to see if the debugger is available
 
Constructor Summary
DrJavaRoot()
           
 
Method Summary
private static void _openCommandLineFiles(MainFrame mf, String[] filesToOpen, int len, boolean jump)
           
static PrintStream consoleErr()
          Get the actual System.err stream.
static PrintStream consoleOut()
          Get the actual System.out stream.
static void dragEnter(DropTargetDragEvent dropTargetDragEvent)
          User dragged something into the component.
static void drop(DropTargetDropEvent dropTargetDropEvent)
          User dropped something on the component.
static void handleRemoteOpenFile(File f, int lineNo)
          Handles an "open file" request, either from the remote control server or the operating system.
static void installModalWindowAdapter(Window w, Runnable1<? super WindowEvent> toFrontAction, Runnable1<? super WindowEvent> closeAction)
          Installs the modal window adapter if available, otherwise installs a non-modal dummy listener.
static void main(String[] args)
           
(package private) static void openCommandLineFiles(MainFrame mf, String[] filesToOpen, boolean jump)
          Handle the list of files specified on the command line.
(package private) static void openCommandLineFiles(MainFrame mf, String[] filesToOpen, int len, boolean jump)
          Handle the list of files specified on the command line.
static void removeModalWindowAdapter(Window w)
          Removes the modal window adapter.
static void showDrJavaDebugConsole(MainFrame mf)
          Shows a separate interactions window with a reference to DrJava's MainFrame defined as "mainFrame".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_DEBUGGER_CLASS

public static final String TEST_DEBUGGER_CLASS
Class to probe to see if the debugger is available

See Also:
Constant Field Values

PLASTIC_THEMES_PACKAGE

public static final String PLASTIC_THEMES_PACKAGE
See Also:
Constant Field Values

_consoleOut

private static final PrintStream _consoleOut

_consoleErr

private static final PrintStream _consoleErr

_debugConsole

private static SimpleInteractionsWindow _debugConsole

anyLineNumbersSpecified

private static boolean anyLineNumbersSpecified

_mainFrame

private static MainFrame _mainFrame
Main frame of this DrJava instance.

Constructor Detail

DrJavaRoot

public DrJavaRoot()
Method Detail

main

public static void main(String[] args)

openCommandLineFiles

static void openCommandLineFiles(MainFrame mf,
                                 String[] filesToOpen,
                                 boolean jump)
Handle the list of files specified on the command line. Feature request #509701. If file exists, open it in DrJava. Otherwise, ignore it. Is there a better way to handle nonexistent files? Dialog box, maybe?


openCommandLineFiles

static void openCommandLineFiles(MainFrame mf,
                                 String[] filesToOpen,
                                 int len,
                                 boolean jump)
Handle the list of files specified on the command line. Feature request #509701. If the final element in filesToOpen is a pathSeparator, it opens the debug console. If file exists, open it in DrJava. Otherwise, ignore it. Is there a better way to handle nonexistent files? Dialog box, maybe? Why the wait?


_openCommandLineFiles

private static void _openCommandLineFiles(MainFrame mf,
                                          String[] filesToOpen,
                                          int len,
                                          boolean jump)

showDrJavaDebugConsole

public static void showDrJavaDebugConsole(MainFrame mf)
Shows a separate interactions window with a reference to DrJava's MainFrame defined as "mainFrame". Useful for debugging DrJava.

Parameters:
mf - MainFrame to define in the new window

consoleErr

public static PrintStream consoleErr()
Get the actual System.err stream.

Returns:
System.err

consoleOut

public static PrintStream consoleOut()
Get the actual System.out stream.

Returns:
System.out

dragEnter

public static void dragEnter(DropTargetDragEvent dropTargetDragEvent)
User dragged something into the component.


drop

public static void drop(DropTargetDropEvent dropTargetDropEvent)
User dropped something on the component.


installModalWindowAdapter

public static void installModalWindowAdapter(Window w,
                                             Runnable1<? super WindowEvent> toFrontAction,
                                             Runnable1<? super WindowEvent> closeAction)
Installs the modal window adapter if available, otherwise installs a non-modal dummy listener.

Parameters:
w - window trying to get the modal window listener
toFrontAction - action to be performed after the window has been moved to the front again
closeAction - action to be performed when the window is closing

removeModalWindowAdapter

public static void removeModalWindowAdapter(Window w)
Removes the modal window adapter.

Parameters:
w - window releasing the modal window adapter

handleRemoteOpenFile

public static void handleRemoteOpenFile(File f,
                                        int lineNo)
Handles an "open file" request, either from the remote control server or the operating system.

Parameters:
f - file to open
lineNo - line number to jump to, or -1 of not specified