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


Java PostContextCreate类代码示例

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


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

示例1: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(final IEventBroker eventBroker, IApplicationContext context) {
	// configure log4j
	BasicConfigurator.configure();
	Logger.getRootLogger().setLevel(Level.INFO);
	// register for startup completed event
	eventBroker.subscribe(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE, new EventHandler() {
		@Override
		public void handleEvent(Event event) {
			// close dynamic splash screen
			Loading.close();
			eventBroker.unsubscribe(this);
		}
	});
	// close static splash screen
	context.applicationRunning();
	// open dynamic splash screen
	Loading.open();
}
 
开发者ID:DaveVoorhis,项目名称:Rel,代码行数:20,代码来源:E4LifeCycle.java

示例2: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(IApplicationContext context,  IEclipseContext cont,
		 ILoggerProvider loggerProvider
		) throws BackingStoreException {
	
	this.logger = loggerProvider.getClassLogger(this.getClass());
	configureLogging();  
	logStartup();		
	checkPreferences();
	logContextualInfo();
	logBundles();
	addServicesToContext(cont);
	WorkspaceUtil.deleteTermSuiteTempFiles();
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:15,代码来源:LifeCycleManager.java

示例3: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
public void postContextCreate(final IApplicationContext appContext, final Display display) {

	for (final String str : (String[]) appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS)) {
		System.out.println(str);
	}

	appContext.applicationRunning();
}
 
开发者ID:amitjoy,项目名称:Kura-MQTT-Client-Utility,代码行数:10,代码来源:Manager.java

示例4: managePostContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的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

示例5: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(IEclipseContext workbenchContext) {
}
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:4,代码来源:E4LifeCycle.java

示例6: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(IApplicationContext context, Display display,
    final IEventBroker broker, final INxtService nxt, IWallet wallet,
    UISynchronize sync, IUserService userService, IDataProviderPool pool) {

  logger.info("LifeCycleManager.postContextCreate");

  String appId = "com.dgex.offspring.application.lifecycle.LifeCycleManager";
  boolean alreadyRunning;
  try {
    JUnique.acquireLock(appId);
    alreadyRunning = false;
  }
  catch (AlreadyLockedException e) {
    alreadyRunning = true;
  }
  if (alreadyRunning) {
    File home = new File(System.getProperty("user.home") + File.separator
        + ".junique");

    MessageDialog
        .openWarning(
            display.getActiveShell(),
            "Offspring Already Running",
            "Offspring is already running.\n\n"
                + "If you keep seeing this dialog close Offspring with your taskmanager.\n\n"
                + "Cannot find Offspring in your taskmanager?\n"
                + "Then delete this folder " + home.getAbsolutePath());
    System.exit(0);
    return;
  }

  context.applicationRunning();

  final LoginDialog loginDialog = new LoginDialog(Display.getCurrent()
      .getActiveShell(), wallet);
  loginDialog.setBlockOnOpen(true);

  if (loginDialog.open() != Window.OK)
    System.exit(0);

  /* Must re-initialize if user selected to use test net (write new config) */
  if (Config.nxtIsTestNet) {
    Config.initialize();
  }
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:47,代码来源:LifeCycleManager.java

示例7: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(final IEventBroker eventBroker, IApplicationContext context) {
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:4,代码来源:LifeCycleManager.java

示例8: configureContext

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
public void configureContext(IEclipseContext applicationContext){
	CloudscaleContext.initialize(applicationContext);
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:5,代码来源:LifeCycleManager.java

示例9: initializeApp

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void initializeApp(final IEclipseContext inContext,
        final IEventBroker inEventBroker) {

	// set db settings and controller to workspace context
	if (dbSettings != null && inContext.get(DBSettings.class) == null) {
		inContext.set(DBSettings.class, dbSettings);
	}
	ContextInjectionFactory.inject(dbController, inContext);

	// set DataSourceRegistry to eclipse context to make instance available
	// in application
	final DataSourceRegistry lDbAccess = DataSourceRegistry.INSTANCE;
	inContext.set(RelationsConstants.DB_ACCESS_HANDLER, lDbAccess);

	// do some cleanup of former sessions
	EmbeddedCatalogHelper.cleanUp();

	// set language service to the context
	inContext.set(LanguageService.class,
	        ContextInjectionFactory.make(LanguageService.class, inContext));

	// set a suitable implementation of the IDataService to the context
	final DataService lDataService = ContextInjectionFactory
	        .make(DataService.class, inContext);
	inContext.set(IDataService.class, lDataService);

	// set a suitable implementation of the IBrowserManager to the context
	browserManager = ContextInjectionFactory
	        .make(RelationsBrowserManager.class, inContext);
	inContext.set(IBrowserManager.class, browserManager);

	// register a special event handler
	inEventBroker.subscribe(ShowTextItemForm.TOPIC, new ShowTextItemForm());

	boolean lDBConfigured = false;
	if (dbSettings != null && dbSettings.getDBConnectionConfig() != null
	        && dbSettings.getDBConnectionConfig().isEmbedded()
	        && RelationsConstants.DFT_DBCONFIG_PLUGIN_ID
	                .equals(dbSettings.getDBConnectionConfig().getName())) {
		// check existence of default database and create one, if needed
		if (!EmbeddedCatalogHelper.hasDefaultEmbedded()) { // NOPMD
			if (dbController.checkEmbedded()) {
				lDbAccess.setActiveConfiguration(
				        createDftDBAccessConfiguration());
				lDBConfigured = true;
				final DbEmbeddedCreateHandler lDBCreate = ContextInjectionFactory
				        .make(DbEmbeddedCreateHandler.class, inContext);
				lDBCreate.execute(dbSettings, inContext);

			} else {
				MessageDialog.openError(new Shell(Display.getDefault()),
				        RelationsMessages.getString(
				                "relations.life.cycle.db.open.error.title"), //$NON-NLS-1$
				        RelationsMessages.getString(
				                "relations.life.cycle.db.open.error.msg")); //$NON-NLS-1$
			}
		}
	}
	if (!lDBConfigured) {
		lDbAccess.setActiveConfiguration(
		        ActionHelper.createDBConfiguration(dbSettings));
	}
	lDataService.loadData(RelationsConstants.TOPIC_DB_CHANGED_RELOAD);

	if (dbSettings != null) {
		EmbeddedCatalogHelper.reindexChecked(dbSettings, inContext);
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:70,代码来源:RelationsLifeCycle.java

示例10: postContextCreate

import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
public void postContextCreate(IEventBroker eventBroker) {
    log.info("postContextCreate()"); //$NON-NLS-1$

    eventBroker.subscribe(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE, new AppStartupCompleteEventHandler());

}
 
开发者ID:e4c,项目名称:EclipseCommander,代码行数:8,代码来源:LifeCycleManager.java


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