com.pvx.ooadide.util
Class PvxUtil

java.lang.Object
  extended by com.pvx.ooadide.util.PvxUtil

public class PvxUtil
extends java.lang.Object


Nested Class Summary
static class PvxUtil.ConfirmDialShower
           
 
Field Summary
static java.lang.String BOOLEAN
           
static int BOOLEAN_DATA
           
static java.lang.String DIRECTORY
           
static int DIRECTORY_DATA
           
static java.lang.String FILE
           
static int FILE_DATA
           
static java.lang.String LIST
           
static int LIST_DATA
           
static int OS_APPLE_OSX
           
static int OS_LINUX
           
static int OS_UNIX
           
static int OS_WINDOWS
           
static java.lang.String RADIOGROUP
           
static int RADIOGROUP_DATA
           
static java.lang.String STRING
           
static int STRING_DATA
           
static int TRACE_TO_ERRORLOG
           
static int TRACE_TO_STANDARDOUT
           
static java.util.HashMap validExecutables
           
 
Constructor Summary
PvxUtil()
           
 
Method Summary
static void addBuilder(org.eclipse.core.resources.IProjectDescription desc, java.lang.String id, java.lang.String outputDir, java.lang.String outputLinkDir, java.lang.String inputDir, java.lang.String inputLinkDir)
           
static void addNature(org.eclipse.core.resources.IProjectDescription description)
           
static void addVersionPluginVersion(org.eclipse.core.resources.IResource resource)
           
static org.eclipse.core.resources.IProject createChooseProjectDial(org.eclipse.core.resources.IProject[] projects, org.eclipse.core.resources.IProject pvxProject, org.eclipse.swt.widgets.Shell shell)
           
static org.eclipse.core.resources.IResource createChooseResourceDial(org.eclipse.core.resources.IContainer rootContainer, org.eclipse.core.resources.IProject pvxProject, org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String msg, int type)
           
static org.eclipse.core.resources.IProject[] findPvxProjects()
           
static PvxEditor getActivePvxEditor()
           
static int getDataTypeForPref(java.lang.String key)
           
static java.lang.String getDefaultPvxPath()
           
static java.lang.String getFileProperty(org.eclipse.core.resources.IResource srcFile, java.lang.String propKey)
           
static org.eclipse.swt.graphics.Image getImage(java.lang.String pluginId, java.lang.String imagePath)
           
static org.eclipse.ui.views.navigator.ResourceNavigator getNavView()
           
static int getOperatingSystem()
           
static org.eclipse.jface.preference.IPreferenceStore getPrefsStore()
           
static org.eclipse.core.resources.IProject getProjectFromNavView()
           
static java.util.Hashtable getProjectsInPropertiesFile(java.lang.String filePth)
           
static org.eclipse.core.resources.IProject getProjectViaEditor()
           
static java.lang.String getPvxPath(org.eclipse.core.resources.IResource srcFile)
           
static org.eclipse.swt.widgets.Shell getShell()
           
static org.eclipse.core.resources.IWorkspaceRoot getWorkspaceRoot()
           
static int initOperatingSystem()
           
static boolean isNumericArg(java.lang.String str)
           
static boolean isPvxProject(org.eclipse.core.resources.IProject project)
           
static void log(java.lang.String message, java.lang.Throwable t)
           
static void log(java.lang.Throwable t)
           
static void openPvxEditor(org.eclipse.core.resources.IFile file)
           
static java.lang.String replaceAll(java.lang.String base, java.lang.String search, java.lang.String replace)
           
static boolean showConfirmDialogue(java.lang.String title, java.lang.String msg)
           
static void showErrorDialogue(java.lang.String title, java.lang.String msg)
           
static void showMessageDialogue(java.lang.String title, java.lang.String msg)
           
static void showMessageOnStatusBar(java.lang.String msg, org.eclipse.ui.IEditorPart editor)
           
static void showMessageOnStatusBar(java.lang.String msg, org.eclipse.ui.IViewPart view)
           
static void showPvxPrefPage()
           
static void showWarningDialogue(java.lang.String title, java.lang.String msg)
           
static void syncFolders(org.eclipse.core.resources.IResource resToSync, org.eclipse.core.resources.IResource targetRes)
           
static void toStandardOut(java.lang.String str)
           
static void traceEvent(java.lang.String eventName, java.lang.String detail, java.util.Properties buildProps)
           
static void writeToConsole(java.lang.String msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final java.lang.String BOOLEAN
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

DIRECTORY

public static final java.lang.String DIRECTORY
See Also:
Constant Field Values

FILE

public static final java.lang.String FILE
See Also:
Constant Field Values

LIST

public static final java.lang.String LIST
See Also:
Constant Field Values

RADIOGROUP

public static final java.lang.String RADIOGROUP
See Also:
Constant Field Values

STRING_DATA

public static final int STRING_DATA
See Also:
Constant Field Values

BOOLEAN_DATA

public static final int BOOLEAN_DATA
See Also:
Constant Field Values

DIRECTORY_DATA

public static final int DIRECTORY_DATA
See Also:
Constant Field Values

FILE_DATA

public static final int FILE_DATA
See Also:
Constant Field Values

LIST_DATA

public static final int LIST_DATA
See Also:
Constant Field Values

RADIOGROUP_DATA

public static final int RADIOGROUP_DATA
See Also:
Constant Field Values

TRACE_TO_STANDARDOUT

public static final int TRACE_TO_STANDARDOUT
See Also:
Constant Field Values

TRACE_TO_ERRORLOG

public static final int TRACE_TO_ERRORLOG
See Also:
Constant Field Values

OS_WINDOWS

public static final int OS_WINDOWS
See Also:
Constant Field Values

OS_LINUX

public static final int OS_LINUX
See Also:
Constant Field Values

OS_UNIX

public static final int OS_UNIX
See Also:
Constant Field Values

OS_APPLE_OSX

public static final int OS_APPLE_OSX
See Also:
Constant Field Values

validExecutables

public static java.util.HashMap validExecutables
Constructor Detail

PvxUtil

public PvxUtil()
Method Detail

getPrefsStore

public static org.eclipse.jface.preference.IPreferenceStore getPrefsStore()

getOperatingSystem

public static int getOperatingSystem()

initOperatingSystem

public static int initOperatingSystem()

getFileProperty

public static java.lang.String getFileProperty(org.eclipse.core.resources.IResource srcFile,
                                               java.lang.String propKey)

getShell

public static org.eclipse.swt.widgets.Shell getShell()

replaceAll

public static java.lang.String replaceAll(java.lang.String base,
                                          java.lang.String search,
                                          java.lang.String replace)

getDefaultPvxPath

public static java.lang.String getDefaultPvxPath()

showPvxPrefPage

public static void showPvxPrefPage()

getPvxPath

public static java.lang.String getPvxPath(org.eclipse.core.resources.IResource srcFile)

traceEvent

public static final void traceEvent(java.lang.String eventName,
                                    java.lang.String detail,
                                    java.util.Properties buildProps)

log

public static final void log(java.lang.Throwable t)

log

public static final void log(java.lang.String message,
                             java.lang.Throwable t)

writeToConsole

public static void writeToConsole(java.lang.String msg)

showMessageDialogue

public static void showMessageDialogue(java.lang.String title,
                                       java.lang.String msg)

showMessageOnStatusBar

public static void showMessageOnStatusBar(java.lang.String msg,
                                          org.eclipse.ui.IViewPart view)

showMessageOnStatusBar

public static void showMessageOnStatusBar(java.lang.String msg,
                                          org.eclipse.ui.IEditorPart editor)

showConfirmDialogue

public static boolean showConfirmDialogue(java.lang.String title,
                                          java.lang.String msg)

showWarningDialogue

public static void showWarningDialogue(java.lang.String title,
                                       java.lang.String msg)

showErrorDialogue

public static void showErrorDialogue(java.lang.String title,
                                     java.lang.String msg)

createChooseProjectDial

public static org.eclipse.core.resources.IProject createChooseProjectDial(org.eclipse.core.resources.IProject[] projects,
                                                                          org.eclipse.core.resources.IProject pvxProject,
                                                                          org.eclipse.swt.widgets.Shell shell)

createChooseResourceDial

public static org.eclipse.core.resources.IResource createChooseResourceDial(org.eclipse.core.resources.IContainer rootContainer,
                                                                            org.eclipse.core.resources.IProject pvxProject,
                                                                            org.eclipse.swt.widgets.Shell shell,
                                                                            java.lang.String title,
                                                                            java.lang.String msg,
                                                                            int type)

isPvxProject

public static final boolean isPvxProject(org.eclipse.core.resources.IProject project)

findPvxProjects

public static final org.eclipse.core.resources.IProject[] findPvxProjects()

getWorkspaceRoot

public static org.eclipse.core.resources.IWorkspaceRoot getWorkspaceRoot()

getProjectsInPropertiesFile

public static java.util.Hashtable getProjectsInPropertiesFile(java.lang.String filePth)

addBuilder

public static void addBuilder(org.eclipse.core.resources.IProjectDescription desc,
                              java.lang.String id,
                              java.lang.String outputDir,
                              java.lang.String outputLinkDir,
                              java.lang.String inputDir,
                              java.lang.String inputLinkDir)

addNature

public static void addNature(org.eclipse.core.resources.IProjectDescription description)

isNumericArg

public static final boolean isNumericArg(java.lang.String str)

getDataTypeForPref

public static final int getDataTypeForPref(java.lang.String key)

syncFolders

public static final void syncFolders(org.eclipse.core.resources.IResource resToSync,
                                     org.eclipse.core.resources.IResource targetRes)
Parameters:
folderToSync - the folder to create all children in
targetFolder - the folder to duplicate

getNavView

public static final org.eclipse.ui.views.navigator.ResourceNavigator getNavView()

getProjectFromNavView

public static final org.eclipse.core.resources.IProject getProjectFromNavView()

getProjectViaEditor

public static org.eclipse.core.resources.IProject getProjectViaEditor()

openPvxEditor

public static void openPvxEditor(org.eclipse.core.resources.IFile file)

getActivePvxEditor

public static final PvxEditor getActivePvxEditor()

addVersionPluginVersion

public static final void addVersionPluginVersion(org.eclipse.core.resources.IResource resource)
                                          throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getImage

public static org.eclipse.swt.graphics.Image getImage(java.lang.String pluginId,
                                                      java.lang.String imagePath)
Parameters:
pluginId - Id of Plugin (E.G: "com.pvx.ooadide") for imageDescriptorFromPlugin
imagePath - path to image
Returns:

toStandardOut

public static final void toStandardOut(java.lang.String str)