public abstract class AbstractUtility
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATE_FORMAT_NOW
Constant
DATE_FORMAT_NOW="yyyyMMddHHmm" |
protected static org.apache.log4j.Logger |
logger |
protected static org.eclipse.jface.action.IStatusLineManager |
statusLineManager
Constant
statusLineManager |
Constructor and Description |
---|
AbstractUtility() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.core.runtime.IStatus |
executeMoniteredExport(java.lang.String label,
java.util.UUID uuid,
int pollInterval,
boolean cancelable,
IPostMoniteredOperationEnabled postOp,
IFeedbackGenerator feedbackGenerator,
java.lang.String urlString,
boolean createZip)
Executes a remoting monitored operation
|
static org.eclipse.core.runtime.IStatus |
executeMoniteredOperation(java.lang.String label,
java.util.UUID uuid,
int pollInterval,
boolean cancelable,
IPostMoniteredOperationEnabled postOp,
IFeedbackGenerator feedbackGenerator)
Executes a remoting monitored import
|
static org.eclipse.core.runtime.IStatus |
executeOperation(org.eclipse.core.commands.operations.AbstractOperation operation,
RemotingCdmHandlerE4 handler,
org.eclipse.e4.ui.di.UISynchronize sync) |
static org.eclipse.core.runtime.IStatus |
executeOperation(AbstractPostOperation operation,
org.eclipse.e4.ui.di.UISynchronize sync) |
static java.lang.Object |
getActiveEditor() |
static java.lang.Object |
getActivePart() |
static org.eclipse.swt.graphics.Color |
getColor(java.lang.String symbolicName) |
static DetailsPartE4 |
getDetailsView(org.eclipse.e4.ui.workbench.modeling.EPartService partService) |
static java.lang.Object |
getElementsFromSelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent event) |
static org.eclipse.swt.graphics.Font |
getFont(java.lang.String symbolicName) |
static org.eclipse.core.runtime.IProgressMonitor |
getMonitor() |
static org.eclipse.core.commands.operations.IOperationHistory |
getOperationHistory() |
static java.lang.String |
getPluginId() |
static java.lang.Object |
getService(java.lang.Class api) |
static org.eclipse.swt.widgets.Shell |
getShell() |
static org.eclipse.core.runtime.IProgressMonitor |
getSubProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
int ticks)
Creates a
SubProgressMonitor if the given
IProgressMonitor is not null and not a
NullProgressMonitor . |
static org.eclipse.ui.IWorkbench |
getWorkbench() |
static <T extends eu.etaxonomy.cdm.model.common.IEnumTerm<T>> |
orderTerms(java.util.Collection<T> terms)
Orders a Collection of
IEnumTerm s according to the term
hierarchy. |
static void |
reflowDetailsViewer(org.eclipse.e4.ui.workbench.modeling.EPartService partService) |
static void |
refreshDetailsViewer(org.eclipse.e4.ui.workbench.modeling.EPartService partService) |
static void |
setStatusLine(java.lang.String message) |
static org.eclipse.core.runtime.IProgressMonitor |
startMainMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
java.lang.String taskName,
int steps)
Starts either the given
IProgressMonitor if it's not
null or a new NullProgressMonitor . |
static void |
workedChecked(org.eclipse.core.runtime.IProgressMonitor newMonitor,
int steps)
Checks whether the user canceled this operation.
|
protected static final org.apache.log4j.Logger logger
protected static org.eclipse.jface.action.IStatusLineManager statusLineManager
statusLineManager
public static final java.lang.String DATE_FORMAT_NOW
DATE_FORMAT_NOW="yyyyMMddHHmm"
public static java.lang.Object getActivePart()
public static org.eclipse.swt.widgets.Shell getShell()
public static org.eclipse.ui.IWorkbench getWorkbench()
public static java.lang.Object getService(java.lang.Class api)
public static org.eclipse.swt.graphics.Font getFont(java.lang.String symbolicName)
public static org.eclipse.swt.graphics.Color getColor(java.lang.String symbolicName)
public static org.eclipse.core.runtime.IStatus executeOperation(AbstractPostOperation operation, org.eclipse.e4.ui.di.UISynchronize sync)
public static org.eclipse.core.runtime.IStatus executeOperation(org.eclipse.core.commands.operations.AbstractOperation operation, RemotingCdmHandlerE4 handler, org.eclipse.e4.ui.di.UISynchronize sync)
public static org.eclipse.core.runtime.IStatus executeMoniteredExport(java.lang.String label, java.util.UUID uuid, int pollInterval, boolean cancelable, IPostMoniteredOperationEnabled postOp, IFeedbackGenerator feedbackGenerator, java.lang.String urlString, boolean createZip)
label
- for the operationuuid
- of the remoting monitor already started on the serverpollInterval
- in millisecondscancelable
- flag which determines whether the operation can be cancelledpostOp
- callback for running post operation logicpublic static org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
public static void setStatusLine(java.lang.String message)
public static org.eclipse.core.runtime.IProgressMonitor getMonitor()
public static org.eclipse.core.runtime.IProgressMonitor startMainMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor, java.lang.String taskName, int steps)
IProgressMonitor
if it's not
null
or a new NullProgressMonitor
.progressMonitor
- The IProgressMonitor
or null
if no
progress should be reported.taskName
- The name of the main task.steps
- The number of steps this task is subdivided into.IProgressMonitor
.public static org.eclipse.core.runtime.IProgressMonitor getSubProgressMonitor(org.eclipse.core.runtime.IProgressMonitor progressMonitor, int ticks)
SubProgressMonitor
if the given
IProgressMonitor
is not null
and not a
NullProgressMonitor
.progressMonitor
- The parent IProgressMonitor
of the
SubProgressMonitor
to be created.ticks
- The number of steps this subtask is subdivided into. Must be a
positive number and must not be
IProgressMonitor.UNKNOWN
.IProgressMonitor
.public static void workedChecked(org.eclipse.core.runtime.IProgressMonitor newMonitor, int steps)
newMonitor
- a IProgressMonitor
object.steps
- a int.public static java.lang.String getPluginId()
public static java.lang.Object getActiveEditor()
public static DetailsPartE4 getDetailsView(org.eclipse.e4.ui.workbench.modeling.EPartService partService)
public static void refreshDetailsViewer(org.eclipse.e4.ui.workbench.modeling.EPartService partService)
public static void reflowDetailsViewer(org.eclipse.e4.ui.workbench.modeling.EPartService partService)
public static <T extends eu.etaxonomy.cdm.model.common.IEnumTerm<T>> java.util.LinkedHashMap<T,java.lang.String> orderTerms(java.util.Collection<T> terms)
IEnumTerm
s according to the term
hierarchy. terms
- A Collection
of IEnumTerm
s for which the term
hierarchy should be createdIKeyTerm.getMessage()
as valuespublic static java.lang.Object getElementsFromSelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent event)
public static org.eclipse.core.runtime.IStatus executeMoniteredOperation(java.lang.String label, java.util.UUID uuid, int pollInterval, boolean cancelable, IPostMoniteredOperationEnabled postOp, IFeedbackGenerator feedbackGenerator)
label
- for the importuuid
- of the remoting monitor already started on the serverpollInterval
- in millisecondscancelable
- flag which determines whether the operation can be cancelledpostOp
- callback for running post operation logicCopyright © 2007-2018. All Rights Reserved.