本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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);
}
示例5: postContextCreate
import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(IEclipseContext workbenchContext) {
}
示例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();
}
}
示例7: postContextCreate
import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
void postContextCreate(final IEventBroker eventBroker, IApplicationContext context) {
}
示例8: configureContext
import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate; //导入依赖的package包/类
@PostContextCreate
public void configureContext(IEclipseContext applicationContext){
CloudscaleContext.initialize(applicationContext);
}
示例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);
}
}
示例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());
}