本文整理汇总了Java中org.eclipse.ui.services.IEvaluationService类的典型用法代码示例。如果您正苦于以下问题:Java IEvaluationService类的具体用法?Java IEvaluationService怎么用?Java IEvaluationService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEvaluationService类属于org.eclipse.ui.services包,在下文中一共展示了IEvaluationService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
}
示例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 );
}
}
示例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 () );
}
}
示例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);
}
}
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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$
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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);
}
}
}
示例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;
}