DefaultDebugRunnable Class

com.bea.ide.sourceeditor.driver
DefaultDebugRunnable Class

public class DefaultDebugRunnable

    extends DefaultDocumentDriver
    implements IWebRunnable

An implementation of DefaultDocumentDriver for document types that support being run directly as part of a webapp.


Hierarchy
Object
  DefaultDocumentDriver
    DefaultDebugRunnable
All Implemented Interfaces

IWebRunnable

Nested Class Summary

protected classDefaultDebugRunnable.DocChangeListener
           Listener to add to the document's URI to listen for file renames or moves.

Field Summary

protected boolean
buildable
boolean
protected boolean
fCheckedProperty
boolean
protected boolean
fScriptEnvironment
boolean
protected DefaultDebugRunnable.DocChangeListener
pcs
DefaultDebugRunnable.DocChangeListener
protected boolean
runnable
boolean
 

Constructor Summary

DefaultDebugRunnable(ISourceDocument file, boolean runnable, boolean buildable)

Creates a new DefaultDebugRunnable for the given file
 

Method Summary

public boolean
canRun()
Gets called right before the IDE start to run a file.
public URI
getPreferredUri()
This returns the URI for the document that should get run instead of this one.
public URL
getRunnableUrl()
This returns the URL to hit in the case of running
public boolean
isBuildable()
Tells if the file type can be built.
public boolean
isRunnable()
Tells if the file type can be run via Debug/Start.
public boolean
showPreferredDialog(URI prefUri)
This shows a dialog to the user informing them that the document they clicked on is not the one that will be run.
 
Methods from  com.bea.ide.sourceeditor.driver.DefaultDocumentDriver
getDocument, setDocument
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.workspace.IWebRunnable
canRun, getPreferredUri, getRunnableUrl, isBuildable, isRunnable, showPreferredDialog
 

Field Detail

buildable

protected boolean buildable


fCheckedProperty

protected boolean fCheckedProperty


fScriptEnvironment

protected boolean fScriptEnvironment


pcs

protected DefaultDebugRunnable.DocChangeListener pcs


runnable

protected boolean runnable

 

Constructor Detail

DefaultDebugRunnable

public DefaultDebugRunnable(ISourceDocument file, 
                            boolean runnable, 
                            boolean buildable)
Creates a new DefaultDebugRunnable for the given file
 

Method Detail

canRun() Method

public boolean canRun()
Description copied from IWebRunnable.canRun()
Gets called right before the IDE start to run a file. This allows the document to determine if there is anything that needs to be done before the document is run.

Returns

true -- Everything is O.K. the RunDriver can run the file false-- Cancel the run.

getPreferredUri() Method

public URI getPreferredUri()
Description copied from IWebRunnable.getPreferredUri()
This returns the URI for the document that should get run instead of this one. This can return null, if the current document is the correct one to run. This will be used by Start and StartWithDebugging, however, there can be other actions that do not obey this.

Returns

null if the current document is the prefered document, otherwise an IDocument for the file to run.

getRunnableUrl() Method

public URL getRunnableUrl()
Description copied from IWebRunnable.getRunnableUrl()
This returns the URL to hit in the case of running


isBuildable() Method

public boolean isBuildable()
Description copied from IWebRunnable.isBuildable()
Tells if the file type can be built.


isRunnable() Method

public boolean isRunnable()
Description copied from IWebRunnable.isRunnable()
Tells if the file type can be run via Debug/Start.


showPreferredDialog(URI) Method

public boolean showPreferredDialog(URI prefUri)
Description copied from IWebRunnable.showPreferredDialog(URI)
This shows a dialog to the user informing them that the document they clicked on is not the one that will be run.

Returns

false -- the user dissented, so the request should be canceled true -- the user accepted, so the preferred URI should be used.