JDeveloper SCM API

oracle.ide.scm.env
Interface SCMUtilitySet


public interface SCMUtilitySet

Interface for the full SCM client utility set, separating the client from the utility implementation, IDE and framework.


Method Summary
 SCMLogWriter createLogger(oracle.ide.log.MessagePage page)
          Creates a logger for SCM messages in the IDE, ensuring all written messages are displayed in the given custom log page.
 SCMLogWriter createLogger(java.lang.String name)
          Creates a logger for SCM messages in the IDE.
 SCMFile getActiveProjectFile()
          Gets the enviroment's active project, as a file wrapper.
 SCMFile getActiveWorkspaceFile()
          Gets the enviroment's active workspace, as a file wrapper.
 java.awt.Window getCurrentWindow()
          Gets the currently operational window in the application.
 java.lang.String getProjectFileExtension()
          Gets the extension of a JDeveloper project file.
 java.net.URL getWorkDirectory()
          Gets a file for the default root directory of all new Workspaces, according to current settings and state.
 java.lang.String getWorkspaceFileExtension()
          Gets the extension of a JDeveloper workspace file.
 java.io.File localizeURL(java.net.URL url)
          Localize the given URL into a file.
 void saveFiles(java.net.URL dir)
          Saves all modified files within the given directory identifier.
 void showTextDialog(java.lang.String title, java.lang.String text)
          Displays a modal text dialog in the IDE.
 void showTextWindow(java.net.URL context, java.lang.String text)
          Displays a non-modal text window in the IDE.
 void showTextWindow(java.net.URL context, java.lang.String title, java.lang.String text)
          Displays a non-modal text window in the IDE.
 java.net.URL writeTempFile(java.lang.String prefix, java.lang.String contents)
          Writes the given string to a file in the system's default temporary file directory.
 java.net.URL writeTextFile(java.net.URL url, java.lang.String contents)
          Writes the given string to a file.
 

Method Detail

createLogger

public SCMLogWriter createLogger(java.lang.String name)
Creates a logger for SCM messages in the IDE. If logging services are required, this method should be called each time the client is preparing for use since the framework removes all active loggers when the extension selection changes.
Parameters:
name - the name for the created page.

createLogger

public SCMLogWriter createLogger(oracle.ide.log.MessagePage page)
Creates a logger for SCM messages in the IDE, ensuring all written messages are displayed in the given custom log page.
Parameters:
page - the supplied page.

writeTempFile

public java.net.URL writeTempFile(java.lang.String prefix,
                                  java.lang.String contents)
                           throws java.io.IOException
Writes the given string to a file in the system's default temporary file directory. The suffix (or extension) of the file will be '.tmp'. This can be very useful, for example, as a location from which external processes can read check in comments.
Parameters:
prefix - the name of the file to write.
contents - data to write to the temporary file.
Returns:
the temporary file URL.

writeTextFile

public java.net.URL writeTextFile(java.net.URL url,
                                  java.lang.String contents)
                           throws java.io.IOException
Writes the given string to a file.
Parameters:
url - the destination of the file to write.
contents - data to write to the temporary file.
Returns:
the resulting file URL.

getWorkDirectory

public java.net.URL getWorkDirectory()
Gets a file for the default root directory of all new Workspaces, according to current settings and state.
Returns:
the work directory, as a File.

localizeURL

public java.io.File localizeURL(java.net.URL url)
Localize the given URL into a file. This method requires the URL parameter to represent a local location.
Parameters:
url - the URL to localize.

showTextWindow

public void showTextWindow(java.net.URL context,
                           java.lang.String text)
Displays a non-modal text window in the IDE. Suitable for results from diff operations and other information.
Parameters:
context - the file to use as the document context for the editor.
text - the text value for the window contents.

showTextWindow

public void showTextWindow(java.net.URL context,
                           java.lang.String title,
                           java.lang.String text)
Displays a non-modal text window in the IDE. Suitable for results from diff operations and other information.
Parameters:
context - the file to use as the document context for the editor.
text - the text value for the window title.
text - the text value for the window contents.

showTextDialog

public void showTextDialog(java.lang.String title,
                           java.lang.String text)
Displays a modal text dialog in the IDE. Suitable for informational messages resulting from source control client output.
Parameters:
title - the dialog title, or caption.
text - the text value fo dialog contents.

getActiveProjectFile

public SCMFile getActiveProjectFile()
Gets the enviroment's active project, as a file wrapper.
Returns:
a file for the IDE's active project.

getActiveWorkspaceFile

public SCMFile getActiveWorkspaceFile()
Gets the enviroment's active workspace, as a file wrapper.
Returns:
a file for the IDE's active workspace.

saveFiles

public void saveFiles(java.net.URL dir)
               throws SCMException
Saves all modified files within the given directory identifier. This includes any modified files in subfolders. May ask for confirmation from the user and throw a cancellation exception if the user does not agree to save files. To ensure the window is correctly parented, only call this method if no dialog is visible over the IDE's main window.
Parameters:
dir - the directory under which changed files should be saved.

getProjectFileExtension

public java.lang.String getProjectFileExtension()
Gets the extension of a JDeveloper project file.
Returns:
the project file extension.

getWorkspaceFileExtension

public java.lang.String getWorkspaceFileExtension()
Gets the extension of a JDeveloper workspace file.
Returns:
the workspace file extension.

getCurrentWindow

public java.awt.Window getCurrentWindow()
Gets the currently operational window in the application. This is the active modal window, or the IDE's main window if there are no visible modal windows in the container hierarchy. Use this method to correctly set the parent of an SCM dialog.
Returns:
the current window.

Copyright © 2002 Oracle Corporation