|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dawb.common.ui.util.EclipseUtils
public class EclipseUtils
| Constructor Summary | |
|---|---|
EclipseUtils()
|
|
| Method Summary | |
|---|---|
static void |
addBuilderToProject(org.eclipse.core.resources.IProject project,
java.lang.String id)
Delcare a builder id in a project, this is then called to build it. |
static void |
delay(long waitTimeMillis)
Process UI input but do not return for the specified time interval. |
static java.net.URL |
getAbsoluteUrl(java.net.URL bundleUrl)
|
static org.eclipse.ui.IEditorPart |
getActiveEditor()
|
static org.eclipse.ui.IWorkbenchPage |
getActivePage()
|
static org.eclipse.core.resources.IProject |
getActiveProject()
Returns the active project based on active selection |
static java.lang.Object |
getAdapter(java.lang.Object sourceObject,
java.lang.Class<?> adapterType)
If it is possible to adapt the given object to the given type, this returns the adapter. |
static org.eclipse.ui.IWorkbenchPage |
getDefaultPage()
|
static java.io.File |
getFile(org.eclipse.ui.IEditorInput fileInput)
|
static java.lang.String |
getFileName(org.eclipse.ui.IEditorInput input)
|
static java.lang.String |
getFilePath(org.eclipse.ui.IEditorInput fileInput)
Get the file path from a FileStoreEditorInput. |
static org.eclipse.core.resources.IFile |
getIFile(org.eclipse.ui.IEditorInput input)
Try to determine the IFile from the edit input |
static java.io.InputStream |
getInputStream(org.eclipse.ui.IEditorInput input)
Try to determine the IFile from the edit input |
static org.eclipse.ui.IWorkbenchPage |
getPage()
Gets the page, even during startup. |
static java.lang.String |
getUnique(org.eclipse.core.resources.IResource res)
|
static org.eclipse.core.resources.IFile |
getUniqueFile(org.eclipse.core.resources.IFile file,
java.lang.String extension)
Gets a unique file. |
static org.eclipse.core.resources.IFile |
getUniqueFile(org.eclipse.core.resources.IFile file,
java.lang.String conjunctive,
java.lang.String extension)
Gets a unique file. |
static boolean |
isActivePerspective(java.lang.String id)
Checks of the id passed in == the current perspectives. |
static org.eclipse.ui.IEditorPart |
openEditor(org.eclipse.core.resources.IFile file)
Opens an external editor on a file path |
static org.eclipse.ui.IEditorPart |
openExternalEditor(java.lang.String filename)
Opens an external editor on a file path |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EclipseUtils()
| Method Detail |
|---|
public static java.lang.String getFilePath(org.eclipse.ui.IEditorInput fileInput)
fileInput -
public static java.io.File getFile(org.eclipse.ui.IEditorInput fileInput)
fileInput -
public static org.eclipse.core.resources.IFile getIFile(org.eclipse.ui.IEditorInput input)
input -
public static java.lang.String getFileName(org.eclipse.ui.IEditorInput input)
public static java.io.InputStream getInputStream(org.eclipse.ui.IEditorInput input)
throws java.lang.Exception
input -
org.eclipse.core.runtime.CoreException
java.lang.Exceptionpublic static java.net.URL getAbsoluteUrl(java.net.URL bundleUrl)
bundleUrl -
public static org.eclipse.ui.IWorkbenchPage getPage()
public static org.eclipse.ui.IWorkbenchPage getActivePage()
public static org.eclipse.ui.IEditorPart getActiveEditor()
public static org.eclipse.ui.IWorkbenchPage getDefaultPage()
public static void addBuilderToProject(org.eclipse.core.resources.IProject project,
java.lang.String id)
throws org.eclipse.core.runtime.CoreException
project - id -
org.eclipse.core.runtime.CoreExceptionpublic static boolean isActivePerspective(java.lang.String id)
id -
public static void delay(long waitTimeMillis)
waitTimeMillis - the number of milliseconds
public static org.eclipse.core.resources.IFile getUniqueFile(org.eclipse.core.resources.IFile file,
java.lang.String extension)
file -
public static org.eclipse.core.resources.IFile getUniqueFile(org.eclipse.core.resources.IFile file,
java.lang.String conjunctive,
java.lang.String extension)
file -
public static java.lang.String getUnique(org.eclipse.core.resources.IResource res)
public static java.lang.Object getAdapter(java.lang.Object sourceObject,
java.lang.Class<?> adapterType)
sourceObject if it is an instance of the
adapter type.
sourceObject - object to adapt, or nulladapterType - type to adapt to
public static org.eclipse.ui.IEditorPart openEditor(org.eclipse.core.resources.IFile file)
throws org.eclipse.ui.PartInitException
file -
org.eclipse.ui.PartInitException
public static org.eclipse.ui.IEditorPart openExternalEditor(java.lang.String filename)
throws org.eclipse.ui.PartInitException
filename -
org.eclipse.ui.PartInitExceptionpublic static org.eclipse.core.resources.IProject getActiveProject()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||