• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Logger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.e4.core.services.log.Logger的典型用法代码示例。如果您正苦于以下问题:Java Logger类的具体用法?Java Logger怎么用?Java Logger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Logger类属于org.eclipse.e4.core.services.log包,在下文中一共展示了Logger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		context = StaticAccessController.getContext();
		corpusController = context.get(CorpusNavigatorController.class);
		prefs = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.app");
		IEclipsePreferences defaultpref = DefaultScope.INSTANCE.getNode("org.bbaw.bts.app");

		main_corpus_key = prefs.get(BTSPluginIDs.PREF_MAIN_CORPUS_KEY, defaultpref.get(BTSPluginIDs.PREF_MAIN_CORPUS_KEY, null));
		active_corpora = prefs.get(BTSPluginIDs.PREF_ACTIVE_CORPORA, defaultpref.get(BTSPluginIDs.PREF_ACTIVE_CORPORA, null));
		logger = context.get(Logger.class);
		
		loadListInput();
		
		activate = prefs.getBoolean(BTSPluginIDs.PREF_CORPUS_ACTIVATE_MAIN_CORPUS_SELECTION, false);
		initialActivate = new Boolean(activate);
		mainCorpusComboViewer.getCombo().setEnabled(activate);
		activateButton.setSelection(activate);

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:23,代码来源:CorpusSettingsPage.java


示例2: execute

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@Execute
public void execute(@OSGiBundle BundleContext bundleContext,
		@Named(PLUGIN_ID_PARAMETER) String pluginId, @Optional Logger logger) {
	Bundle bundle = Platform.getBundle(pluginId);
	if (bundle != null) {
		try {
			bundle.uninstall();
			Activator.getDefault().removeDynamicBundle(bundle);
		} catch (BundleException e) {
			logger.warn(
					e,
					"Failed to uninstall bundle "
							+ bundle.getSymbolicName());
		}
	}
}
 
开发者ID:scela,项目名称:EclipseCon2014,代码行数:17,代码来源:UnloadPluginHandler.java


示例3: setUp

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
	image = new Image(device, 1, 1);
	languages = new LanguageService(Locale.ENGLISH.getLanguage());

	context = EclipseContextFactory.create("test context");
	context.set(Logger.class, log);
	context.set(IEventBroker.class, eventBroker);
	context.set(LanguageService.class, languages);
	context.set(IDataService.class, dataService);
	context.set(IBrowserManager.class, browserManager);

	term1 = data.createTerm("term 1");
	term2 = data.createTerm("term 2");
	person1 = data.createPerson("person1", "1");
	person2 = data.createPerson("person2", "2");
	person3 = data.createPerson("person3", "3");
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:19,代码来源:CentralAssociationsModelTest.java


示例4: 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


示例5: 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


示例6: getItemDeleteAction

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@Override
public IAction getItemDeleteAction(final Logger inLog) {
	return new IAction() {
		@Override
		public void run() throws BOMException {
			try {
				IItemFactory lHome = BOMHelper.getTermHome(); // default
				switch (getItemType()) {
				case IItem.TERM:
					lHome = BOMHelper.getTermHome();
					break;
				case IItem.TEXT:
					lHome = BOMHelper.getTextHome();
					break;
				case IItem.PERSON:
					lHome = BOMHelper.getPersonHome();
					break;
				}
				lHome.deleteItem(getID());
			}
			catch (final VException exc) {
				throw new BOMException(exc);
			}
		}
	};
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:27,代码来源:ItemAdapter.java


示例7: 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


示例8: handleEvent

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@Override
public void handleEvent(Event event) {
	Object textId = event.getProperty(IEventBroker.DATA);
	if (textId instanceof UniqueID) {
		IEclipseContext context = (IEclipseContext) event
		        .getProperty(PARAM_CONTEXT);
		try {
			IDataService dataService = context.get(IDataService.class);
			ItemEditHandler.openEditDialog(new ItemAdapter(
			        dataService.retrieveItem((UniqueID) textId), context),
			        context);
		}
		catch (BOMException exc) {
			context.get(Logger.class).error(exc);
		}
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:18,代码来源:ShowTextItemForm.java


示例9: managePostContextCreate

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@PostContextCreate
	void managePostContextCreate(final IEclipseContext context, BTSProjectService projectService,
			IApplicationContext appContext, Logger logger, ApplicationStartupController applicationStartupController) 
//			@Optional MWindow window,
//			IEventBroker eventBroker)
	{
//		if (window != null)
//		{
//		try {
//			setWindowImage(window);
//		} catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		}
//		else
//		{
//			// The should be a better way to close the Splash
//			eventBroker.subscribe(UIEvents.UILifeCycle.ACTIVATE,
//					new EventHandler() {
//						@Override
//						public void handleEvent(Event event) {
//							MWindow w = context.get(MWindow.class);
//							if (w == null) return;
//							try {
//								setWindowImage(w);
//							} catch (Exception e) {
//								// TODO Auto-generated catch block
//								e.printStackTrace();
//							}
//						}
//			});
//		}
		logger.info("ApplicationStartupControllerImpl.applicationStartup");
		applicationStartupController.applicationStartup(context, projectService, appContext);

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:38,代码来源:ApplicationLifeCyleManager.java


示例10: fetchAndIndexChangesSeq

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
public static int fetchAndIndexChangesSeq(String collection, BulkProcessor bulkProcessor, Client esClient, CouchDbClient dbClient, int seq, IProgressMonitor monitor, Logger logger)
{
	List<String> lines = fetchLine(collection, dbClient, seq);
	Object returnSeq = processLines(lines, collection, bulkProcessor, monitor, logger);
	if (returnSeq instanceof String)
	{
		seq = new Integer(((String) returnSeq)).intValue();
	}
	return seq;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:11,代码来源:CouchDBIndexHelper.java


示例11: processLines

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
private static Object processLines(List<String> lines, String indexName,
		BulkProcessor bulkProcessor, IProgressMonitor monitor, Logger logger) {
	for (String line : lines)
	{
		processLine(line, indexName, bulkProcessor, monitor, logger);
	}
	return null;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:9,代码来源:CouchDBIndexHelper.java


示例12: processDocLine

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
private static void processDocLine(String docString, String indexName,
	Client esClient, BulkProcessor bulkProcessor, IProgressMonitor monitor, Logger logger) {
Map<String, Object> doc;
      try {
          doc = XContentFactory.xContent(XContentType.JSON).createParser(docString).mapAndClose();
      } catch (IOException e) {
          logger.warn("failed to parse {}", e, docString);
          return;
      }
      if (doc.containsKey("error")) {
          logger.warn("received error {}", docString);
          return;
      }
       Object oId = doc.get("_id");
       if (oId == null) {
           return;
       }

       String id = oId.toString();
       IndexResponse response = esClient.prepareIndex(indexName, indexName, id)
               .setSource(docString)
               .execute()
               .actionGet();
           if (monitor != null)
           {
           	monitor.worked(1);
           	if (monitor.isCanceled()) return;
           }
       return;
   }
 
开发者ID:cplutte,项目名称:bts,代码行数:31,代码来源:CouchDBIndexHelper.java


示例13: LoginDialog

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
public LoginDialog(Shell parentShell, IEclipseContext context,
		BTSUserController userController)
{
	super(parentShell);
	this.shell = parentShell;
	this.userController = userController;
	this.logger = context.get(Logger.class);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:9,代码来源:LoginDialog.java


示例14: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		context = StaticAccessController.getContext();
		projectController = context.get(BTSProjectController.class);
		prefs = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.app");
		main_project = prefs.get(BTSPluginIDs.PREF_MAIN_PROJECT_KEY, null);
		active_projects = prefs.get(BTSPluginIDs.PREF_ACTIVE_PROJECTS, null);
		logger = context.get(Logger.class);
		
		loadListInput();

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:ProjectSettingsPage.java


示例15: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		IEclipseContext context = StaticAccessController.getContext();
		logger = context.get(Logger.class);
		if (isRemembered())
		{
			btnCheckButton.setSelection(true);
		}
		else
		{
			btnCheckButton.setSelection(false);
		}
	}
 
开发者ID:cplutte,项目名称:bts,代码行数:17,代码来源:LoginRememberMePage.java


示例16: InstallationWizard

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
public InstallationWizard(IEclipseContext context,
		ApplicationStartupController startupController, UISynchronize sync,
		BTSUserController userController) {
	this.context = context;
	this.startupController = startupController;
	this.preferences = DefaultScope.INSTANCE.getNode("org.bbaw.bts.app");
	this.logger = context.get(Logger.class);
	this.sync = sync;
	this.userController = userController;
	setWindowTitle("BTS Installation Wizard");
}
 
开发者ID:cplutte,项目名称:bts,代码行数:12,代码来源:InstallationWizard.java


示例17: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		context = StaticAccessController.getContext();
		projectController = context.get(BTSProjectController.class);
		prefs = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.app");
		main_thsList = prefs.get(BTSPluginIDs.PREF_MAIN_THS_KEY, prefs.get(BTSPluginIDs.PREF_MAIN_PROJECT_KEY, null));
		active_thsLists = prefs.get(BTSPluginIDs.PREF_ACTIVE_THSS, prefs.get(BTSPluginIDs.PREF_ACTIVE_PROJECTS, null));
		logger = context.get(Logger.class);
		
		loadListInput();

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:ThsSettingsPage.java


示例18: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		context = StaticAccessController.getContext();
		projectController = context.get(BTSProjectController.class);
		prefs = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.app");
		main_atexts = prefs.get(BTSPluginIDs.PREF_MAIN_ATEXT_KEY, prefs.get(BTSPluginIDs.PREF_MAIN_PROJECT_KEY, null));
		active_atexts = prefs.get(BTSPluginIDs.PREF_ACTIVE_ATEXTS, prefs.get(BTSPluginIDs.PREF_ACTIVE_PROJECTS, null));
		logger = context.get(Logger.class);
		
		loadListInput();

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:ATextSettingsPage.java


示例19: init

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
/**
	 * Initialize the preference page.
	 */
	public void init(IWorkbench workbench) {
//		BundleContext bundleContext = Platform.getBundle("org.bbaw.bts.ui.main").getBundleContext();
		context = StaticAccessController.getContext();
		projectController = context.get(BTSProjectController.class);
		prefs = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.app");
		main_lemmaList = prefs.get(BTSPluginIDs.PREF_MAIN_LEMMALIST_KEY, prefs.get(BTSPluginIDs.PREF_MAIN_PROJECT_KEY, null));
		active_lemmaLists = prefs.get(BTSPluginIDs.PREF_ACTIVE_LEMMALISTS, prefs.get(BTSPluginIDs.PREF_ACTIVE_PROJECTS, null));
		logger = context.get(Logger.class);
		
		loadListInput();

	}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:LemmaListSettingsPage.java


示例20: setUp

import org.eclipse.e4.core.services.log.Logger; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
	bibTex = new File(FILE_NAME);

	context = EclipseContextFactory.create("test context");
	context.set(Logger.class, log);
	context.set(IDataService.class, data);
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:9,代码来源:MetadataFormatBibtexTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FlowSequenceStartToken类代码示例发布时间:2022-05-23
下一篇:
Java Configurable类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap