本文整理汇总了Java中org.eclipse.e4.ui.model.application.MApplication类的典型用法代码示例。如果您正苦于以下问题:Java MApplication类的具体用法?Java MApplication怎么用?Java MApplication使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MApplication类属于org.eclipse.e4.ui.model.application包,在下文中一共展示了MApplication类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeWithCurrentContext
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
public EclipseCommandProvider initializeWithCurrentContext() {
commandsAvailableWithCurrentContext.clear();
WorkbenchWindow workbenchWindow = (WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow();
final org.eclipse.e4.ui.model.application.ui.basic.MWindow model = workbenchWindow.getModel();
providers = new ArrayList<>();
//providers.add(new EditorProvider());
providers.add(new ViewProvider(model.getContext().get(MApplication.class), model));
providers.add(new PerspectiveProvider());
providers.add(new CommandProvider(new ExpressionContext(model.getContext().getActiveLeaf())));
providers.add(new ActionProvider());
providers.add(new PreferenceProvider());
providers.add(new PropertiesProvider());
providers.add(new WizardProvider());
providers.add(new LaunchProvider());
getAllCommands();
return this;
}
示例2: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteDBConnectionProvider dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteDBConnectionProvider.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException(
"No DaoFactory found for DBConnectionProvider and factory name: " + daoFactoryName, e);
}
context.set(RemoteDBConnectionProvider.class, dao);
return dao;
}
示例3: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteDBLeaseDao dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteDBLeaseDao.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for DBLeaseDao and factory name: " + daoFactoryName, e);
}
context.set(RemoteDBLeaseDao.class, dao);
return dao;
}
示例4: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteBTSUserGroupDao dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteBTSUserGroupDao.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for BTSUserGroupDao and factory name: " + daoFactoryName, e);
}
context.set(RemoteBTSUserGroupDao.class, dao);
return dao;
}
示例5: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteBTSUserDao dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteBTSUserDao.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for BTSUserDao and factory name: " + daoFactoryName, e);
}
context.set(RemoteBTSUserDao.class, dao);
return dao;
}
示例6: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteDBManager manager;
try
{
manager = loadDaoFactory(context).createDao(RemoteDBManager.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for manager and factory name: " + daoFactoryName, e);
}
context.set(RemoteDBManager.class, manager);
return manager;
}
示例7: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteBTSIDReservationObjectDao dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteBTSIDReservationObjectDao.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for BTSUserDao and factory name: " + daoFactoryName, e);
}
context.set(RemoteBTSIDReservationObjectDao.class, dao);
return dao;
}
示例8: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null) {
context = application.getContext();
}
RemoteBTSProjectDao dao;
try {
dao = loadDaoFactory(context).createDao(RemoteBTSProjectDao.class,
context);
} catch (CoreException e) {
e.printStackTrace();
throw new BTSDBException(
"No RemoteDaoFactory found for BTSProjectDao and factory name: "
+ remotedaoFactoryName, e);
}
context.set(RemoteBTSProjectDao.class, dao);
return dao;
}
示例9: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
RemoteGeneralPurposeDao dao;
try
{
dao = loadDaoFactory(context).createDao(RemoteGeneralPurposeDao.class, context);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for GeneralPurposeDao and factory name: " + daoFactoryName, e);
}
context.set(RemoteGeneralPurposeDao.class, dao);
return dao;
}
示例10: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context) {
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null) {
context = application.getContext();
}
UserActionCounterDao dao;
try {
dao = loadDao(context, daoFactoryName,
UserActionCounterDao.class);
} catch (CoreException e) {
e.printStackTrace();
throw new BTSDBException(
"No DaoFactory found for GraphicSelectionCounterDao and factory name: "
+ daoFactoryName, e);
}
context.set(UserActionCounterDao.class, dao);
return dao;
}
示例11: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
GeneralPurposeDao dao;
try
{
dao = loadDao(context, daoFactoryName,GeneralPurposeDao.class);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for GeneralPurposeDao and factory name: " + daoFactoryName, e);
}
context.set(GeneralPurposeDao.class, dao);
return dao;
}
示例12: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
DBLeaseDao dao;
try
{
dao = loadDao(context, daoFactoryName,DBLeaseDao.class);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for DBLeaseDao and factory name: " + daoFactoryName, e);
}
context.set(DBLeaseDao.class, dao);
return dao;
}
示例13: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
BTSConfigurationDao dao;
try
{
dao = loadDao(context, daoFactoryName, BTSConfigurationDao.class);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for BTSConfigurationDao and factory name: " + daoFactoryName,
e);
}
context.set(BTSConfigurationDao.class, dao);
return dao;
}
示例14: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
BTSCommentDao dao;
try
{
dao = loadDao(context, daoFactoryName, BTSCommentDao.class);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for BTSCommentDao and factory name: " + daoFactoryName, e);
}
context.set(BTSCommentDao.class, dao);
return dao;
}
示例15: compute
import org.eclipse.e4.ui.model.application.MApplication; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
MApplication application = context.get(MApplication.class);
if (application != null && application.getContext() != null)
{
context = application.getContext();
}
Backend2ClientUpdateDao dao;
try
{
dao = loadDao(context, daoFactoryName, Backend2ClientUpdateDao.class);
} catch (CoreException e)
{
e.printStackTrace();
throw new BTSDBException("No DaoFactory found for Backend2ClientUpdateDao and factory name: "
+ daoFactoryName, e);
}
context.set(Backend2ClientUpdateDao.class, dao);
return dao;
}