当前位置: 首页>>代码示例>>Java>>正文


Java Logger.error方法代码示例

本文整理汇总了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());
		}
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:20,代码来源:DropDataHelper.java

示例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;
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:20,代码来源:DropDataHelper.java

示例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$
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:26,代码来源:DBDeleteAction.java

示例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());
		}
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:40,代码来源:EmbeddedCatalogHelper.java

示例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$
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:16,代码来源:DBDeleteAction.java

示例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());
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:20,代码来源:SchemeElement.java


注:本文中的org.eclipse.e4.core.services.log.Logger.error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。