本文整理汇总了Java中org.eclipse.e4.core.services.log.Logger.error方法的典型用法代码示例。如果您正苦于以下问题:Java Logger.error方法的具体用法?Java Logger.error怎么用?Java Logger.error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.e4.core.services.log.Logger
的用法示例。
在下文中一共展示了Logger.error方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleDrop
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
@Override
public void handleDrop(final Object inEventData,
final IAssociationsModel inModel,
final IEclipseContext inContext) {
try {
final String lFileName = ((String[]) inEventData)[0];
final IMetadataExtractor lMetadataExtractor = inContext
.get(IMetadataExtractor.class);
final UniqueID lID = lMetadataExtractor
.extract(new File(lFileName));
addAsRelations(new UniqueID[] { lID }, inModel, inContext);
}
catch (final Exception exc) {
final Logger lLog = inContext.get(Logger.class);
if (lLog != null) {
lLog.error(exc, exc.getMessage());
}
}
}
示例2: createMinText
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
private UniqueID createMinText(IAssociationsModel model,
IEclipseContext context, String url, Logger log) {
try {
final String undefined = RelationsMessages
.getString("TextEditWizardPage.uncomplete.data"); //$NON-NLS-1$
final NewTextAction action = new NewTextAction.Builder(
undefined, undefined).type(AbstractText.TYPE_WEBPAGE)
.publication(url).build(context);
final IItem item = createText(action);
final UniqueID id = new UniqueID(item.getItemType(),
item.getID());
addAsRelations(new UniqueID[] { id }, model, context);
return id;
}
catch (final VException exc) {
log.error(exc);
}
return null;
}
示例3: dropTables
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
private static void dropTables(final Logger inLog) {
try {
final ICreatableHome[] lHomes = new ICreatableHome[4];
lHomes[0] = BOMHelper.getTermHome();
lHomes[1] = BOMHelper.getTextHome();
lHomes[2] = BOMHelper.getPersonHome();
lHomes[3] = BOMHelper.getRelationHome();
final DefaultStatement lStatement = new DefaultStatement();
for (int i = 0; i < lHomes.length; i++) {
final String[] lSQL = lHomes[i].getSQLDrop();
for (int j = 0; j < lSQL.length; j++) {
lStatement.execute(lSQL[j]);
}
}
}
catch (final SQLException exc) {
inLog.error(exc, exc.getMessage());
MessageDialog
.openError(
new Shell(Display.getCurrent()),
RelationsMessages
.getString("DBDeleteAction.error.title"), ERROR_MSG); //$NON-NLS-1$
}
}
示例4: reindexChecked
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
/**
* Check for reindex marker in the embedded database's catalog and reindex
* the catalog if marker exists. This is a workaround because a restore is
* not effective until a restart of the application.
*
* @param inDBSettings
* {@link IDBSettings}
* @param inContext
* {@link IEclipseContext}
*/
public static void reindexChecked(final IDBSettings lDBSettings,
final IEclipseContext inContext) {
// return, if not embedded database
if (!lDBSettings.getDBConnectionConfig().isEmbedded()) {
return;
}
final String lCatalog = lDBSettings.getCatalog();
// return, if not marked to reindex
if (!isMarkedToReindex(lCatalog)) {
return;
}
// delete marker file and start reindex
deleteMarker(lCatalog, REINDEX_MARKER);
final RelationsIndexer lIndexer = RelationsIndexerWithLanguage
.createRelationsIndexer(inContext);
if (!lIndexer.isIndexAvailable()) {
try {
lIndexer.initializeIndex();
}
catch (final IOException exc) {
final Logger lLog = inContext.get(Logger.class);
lLog.error(exc, exc.getMessage());
}
}
}
示例5: markDeleted
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
private static void markDeleted(final File inDirectory, final Logger inLog) {
final File lMarker = new File(inDirectory,
EmbeddedCatalogHelper.DELETED_MARKER);
try {
lMarker.createNewFile();
}
catch (final IOException exc) {
inLog.error(exc, exc.getMessage());
MessageDialog
.openError(
new Shell(Display.getCurrent()),
RelationsMessages
.getString("DBDeleteAction.error.title"), ERROR_MSG); //$NON-NLS-1$
}
}
示例6: init
import org.eclipse.e4.core.services.log.Logger; //导入方法依赖的package包/类
/**
* Initializes this scheme instance.
*
* @param scheme
* {@link Scheme}
* @param log
* {@link Logger}
*/
public void init(final Scheme scheme, final Logger log) {
setId(scheme.getId());
setModelObject(scheme);
try {
setName(scheme.getName());
setDescription(scheme.getDescription());
}
catch (final NotDefinedException exc) {
log.error(exc, exc.getMessage());
}
}