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

Java IEvaluationService类代码示例

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

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



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

示例1: attachVisibleExpression

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
private void attachVisibleExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getVisibleExpression () != null )
    {
        this.visibileRef = evaluationService.addEvaluationListener ( descriptor.getVisibleExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_VISIBLE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setVisibleState ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_VISIBLE );
    }
    else
    {
        setVisibleState ( true );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java


示例2: attachLazyExpression

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
private void attachLazyExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getLazyExpression () != null )
    {
        this.lazyRef = evaluationService.addEvaluationListener ( descriptor.getLazyExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_LAZY.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setLazy ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_LAZY );
    }
    else
    {
        setLazy ( false );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java


示例3: attachDefaultInstanceExpression

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
private void attachDefaultInstanceExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getDefaultInstanceExpression () != null )
    {
        this.defaultInstanceRef = evaluationService.addEvaluationListener ( descriptor.getDefaultInstanceExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_DEFAULT_INSTANCE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setDefaultInstance ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_DEFAULT_INSTANCE );
    }
    else
    {
        setDefaultInstance ( descriptor.isDefaultInstance () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:AbstractViewInstance.java


示例4: refreshEvaluationService

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
/***************************************************************************
 * 
 **************************************************************************/
private void refreshEvaluationService()
{
	IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
	if (window != null)
	{
		IEvaluationService svc = (IEvaluationService) window.getService(IEvaluationService.class);
		if (svc != null)
		{
			Logger.debug("Refresh evaluation service", Level.PROC, this);
			svc.requestEvaluation(ProcedurePausedTester.ID);
			svc.requestEvaluation(ProcedureConfigurableTester.ID);
			svc.requestEvaluation(AsRunOpenTester.ID);
			svc.requestEvaluation(ProcedureOpenTester.ID);
		}
	}
}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:20,代码来源:GuiListeners.java


示例5: getElements

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public Object[] getElements(Object inputElement) {
	if(builders == null ){
		builders = HybridCore.getNativeProjectBuilders();
	}
	ArrayList<NativeProjectBuilder> elements = new ArrayList<NativeProjectBuilder>();
	IEvaluationService service = (IEvaluationService)PlatformUI.getWorkbench().getService(IEvaluationService.class);
	for (NativeProjectBuilder builder : builders) {
		try {
			if(builder.isEnabled(service.getCurrentState())){
				elements.add(builder);
			}
			
		} catch (CoreException e) {
			HybridUI.log(IStatus.ERROR, "Error filtering objects", e);
		}
	}

	
	return elements.toArray();
}
 
开发者ID:eclipse,项目名称:thym,代码行数:22,代码来源:NativeProjectBuilderContentProvider.java


示例6: getElements

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public Object[] getElements(Object inputElement) {
	if(platforms == null ){
		platforms = HybridCore.getPlatformSupports();
	}
	ArrayList<PlatformSupport> elements = new ArrayList<PlatformSupport>();
	IEvaluationService service = (IEvaluationService)PlatformUI.getWorkbench().getService(IEvaluationService.class);
	for (PlatformSupport generator : platforms) {
		try {
			if(generator.isEnabled(service.getCurrentState())){
				elements.add(generator);
			}
			
		} catch (CoreException e) {
			HybridUI.log(IStatus.ERROR, "Error filtering objects", e);
		}
	}
	return elements.toArray();
}
 
开发者ID:eclipse,项目名称:thym,代码行数:20,代码来源:ProjectGeneratorContentProvider.java


示例7: getElements

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public Object[] getElements(Object inputElement) {
	if (platforms == null) {
		List<PlatformSupport> allPlatforms = HybridCore.getPlatformSupports();
		ArrayList<PlatformSupport> elements = new ArrayList<PlatformSupport>();
		IEvaluationService service = (IEvaluationService) PlatformUI.getWorkbench()
				.getService(IEvaluationService.class);
		for (PlatformSupport generator : allPlatforms) {
			try {
				if (generator.isEnabled(service.getCurrentState())) {
					elements.add(generator);
				}

			} catch (CoreException e) {
				HybridUI.log(IStatus.ERROR, "Error filtering objects", e);
			}
		}
		platforms = elements.toArray(new PlatformSupport[elements.size()]);
	}
	return platforms;
}
 
开发者ID:eclipse,项目名称:thym,代码行数:22,代码来源:AvailableCordovaEnginesSection.java


示例8: getElements

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public Object[] getElements(Object inputElement) {
	if(platforms == null ){
		List<PlatformSupport> allPlatforms = HybridCore.getPlatformSupports();
		ArrayList<PlatformSupport> elements = new ArrayList<PlatformSupport>();
		IEvaluationService service = (IEvaluationService)PlatformUI.getWorkbench().getService(IEvaluationService.class);
		for (PlatformSupport generator : allPlatforms) {
			try {
				if(generator.isEnabled(service.getCurrentState())){
					elements.add(generator);
				}
				
			} catch (CoreException e) {
				HybridUI.log(IStatus.ERROR, "Error filtering objects", e);
			}
		}
		platforms = elements.toArray(new PlatformSupport[elements.size()]);
	}
	return platforms;
}
 
开发者ID:eclipse,项目名称:thym,代码行数:21,代码来源:EngineAddDialog.java


示例9: createViewInstance

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public ViewInstance createViewInstance ( final ViewManager viewManager, final ViewManagerContext viewManagerContext, final ViewInstanceDescriptor descriptor, final Composite viewHolder, final ResourceManager manager, final IWorkbenchPartSite site )
{
    final VisualInterfaceViewInstance instance = new VisualInterfaceViewInstance ( viewManager, viewManagerContext, viewHolder, descriptor, site.getService ( IEvaluationService.class ) );
    instance.init ();
    return instance;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:VisualInterfaceFactory.java


示例10: VisualInterfaceViewInstance

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
public VisualInterfaceViewInstance ( final ViewManager viewManager, final ViewManagerContext viewManagerContext, final Composite parent, final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    super ( viewManagerContext, descriptor, evaluationService );
    this.parent = parent;

    // create the visual interface view

    this.scriptObjects = new HashMap<String, Object> ();
    this.scriptObjects.put ( "viewManager", viewManager ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:VisualInterfaceViewInstance.java


示例11: ChartView

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
public ChartView ( final ViewManagerContext viewManagerContext, final ResourceManager manager, final ViewInstanceDescriptor descriptor, final Composite viewHolder, final IEvaluationService evaluationService, final boolean showSelector )
{
    super ( viewManagerContext, descriptor, evaluationService );
    this.showSelector = showSelector;
    this.viewHolder = viewHolder;
    this.viewManagerContext = viewManagerContext;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:ChartView.java


示例12: createViewInstance

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Override
public ViewInstance createViewInstance ( final ViewManager viewManager, final ViewManagerContext viewManagerContext, final ViewInstanceDescriptor descriptor, final Composite viewHolder, final ResourceManager manager, final IWorkbenchPartSite site )
{
    final ChartView view = new ChartView ( viewManagerContext, manager, descriptor, viewHolder, (IEvaluationService)site.getService ( IEvaluationService.class ), true );
    view.init ();
    return view;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:ChartViewFactory.java


示例13: refreshCommands

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
protected void refreshCommands(String... properties) {
IEvaluationService evalService = (IEvaluationService) getEditorSite().getService(IEvaluationService.class);
if (evalService != null) {
	for (String property: properties) {
		evalService.requestEvaluation(property);
	}
}        
  }
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:9,代码来源:AvroSchemaEditorPart.java


示例14: refreshCommands

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
protected void refreshCommands(IEditorPart editorPart, String... properties) {
IEvaluationService evalService = (IEvaluationService) editorPart.getEditorSite().getService(IEvaluationService.class);
if (evalService != null) {
	for (String property: properties) {
		evalService.requestEvaluation(property);
	}
}        
  }
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:9,代码来源:SearchNodeControl.java


示例15: eventOccured

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
public boolean eventOccured(SpecEvent event) {
	if (event.getType() == SpecEvent.TYPE_PARSE) {
		final IEvaluationService evalService = (IEvaluationService) PlatformUI.getWorkbench().getService(
				IEvaluationService.class);
		evalService.requestEvaluation(ParseErrorTester.PROPERTY_ID);
	}
	return false;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:9,代码来源:OpenParseErrorViewHandler.java


示例16: runCommand

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
public static void runCommand(String commandId) {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
    IEvaluationService evaluationService = (IEvaluationService) window.getService(IEvaluationService.class);
    try {
        Command cmd = commandService.getCommand(commandId);
        cmd.executeWithChecks(
                new ExecutionEvent(cmd, new HashMap<String, String>(), null, evaluationService.getCurrentState()));
    } catch (Exception exception) {
        log.log(Level.SEVERE, "Could not execute command " + commandId, exception);
    }
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:13,代码来源:RCPUtils.java


示例17: testEvaluate

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Test
public void testEvaluate() {
  IEvaluationService evaluationService = mock( IEvaluationService.class );
  when( workbench.getService( IEvaluationService.class ) ).thenReturn( evaluationService );

  new ExpressionEvaluator( workbench ).evaluate();

  verify( evaluationService ).requestEvaluation( PreferencePropertyTester.PROP_IS_TRUE );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:10,代码来源:ExpressionEvaluatorTest.java


示例18: setUp

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
@Before
public void setUp() {
  evaluationService = mock( IEvaluationService.class );
  workbench = mock( IWorkbench.class );
  when( workbench.getService( IEvaluationService.class ) ).thenReturn( evaluationService );
  preferences = new WorkspaceScopePreferences( new PreferenceStore() );
  action = new CloseJUnitStatusAction( workbench, preferences );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:9,代码来源:CloseJUnitStatusActionTest.java


示例19: getSelectedResource

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
public static IResource getSelectedResource()
{
	IEvaluationService evaluationService = (IEvaluationService) PlatformUI.getWorkbench().getService(
			IEvaluationService.class);
	if (evaluationService != null)
	{
		return getSelectedResource(evaluationService.getCurrentState());
	}
	return null;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:11,代码来源:UIUtils.java


示例20: refreshCommand

import org.eclipse.ui.services.IEvaluationService; //导入依赖的package包/类
/**
 * 刷新 Command 的可用状态
 * @param nameSpace
 * @param properties
 *            ;
 */
public static void refreshCommand(String nameSpace, String properties) {
	if (nameSpace != null && properties != null) {
		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		IEvaluationService evaluationService = (IEvaluationService) window.getService(IEvaluationService.class);
		if (evaluationService != null) {
			evaluationService.requestEvaluation(nameSpace + "." + properties);
		}
	}
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:16,代码来源:NattableUtil.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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