public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
/** * Set the enablement test. * * @param element the element */ public void setEnablementTest(IConfigurationElement element) { try { enablement = ExpressionConverter.getDefault().perform(element); } catch (CoreException e) { WorkbenchPlugin.log(e); } }
private Expression getExpression(String id, IConfigurationElement element) throws InvalidRegistryObjectException, CoreException { Expression expr= ExpressionConverter.getDefault().perform(element.getChildren()[0]); if (expr != null) { getCache().put(id, expr); } return expr; }
private Expression getExpression(String id, IConfigurationElement element) throws InvalidRegistryObjectException, CoreException { Expression expr= ExpressionConverter.getDefault().perform(element.getChildren()[0]); if (expr != null) { getCache().put(id, expr); } return expr; }
private Expression getExpression(String id, IConfigurationElement element) throws InvalidRegistryObjectException, CoreException { Expression expr= ExpressionConverter.getDefault().perform(element.getChildren()[0]); if (expr != null) { getCache().put(id, expr); } return expr; }
private Expression getExpression(String id, IConfigurationElement element) throws InvalidRegistryObjectException, CoreException { Expression expr= ExpressionConverter.getDefault().perform(element.getChildren()[0]); if (expr != null) { getCache().put(id, expr); } return expr; }
/** * Returns an expression that represents the enablement logic for the * contextual launch element of this launch shortcut description or * <code>null</code> if none. * @return an evaluatable expression or <code>null</code> * @throws CoreException if the configuration element can't be * converted. Reasons include: (a) no handler is available to * cope with a certain configuration element or (b) the XML * expression tree is malformed. */ public Expression getContextualLaunchEnablementExpression() throws CoreException { if (fContextualLaunchExpr == null) { IConfigurationElement[] elements = element.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) fContextualLaunchExpr = ExpressionConverter.getDefault().perform(enablement); } return fContextualLaunchExpr; }
/** * Returns an expression that represents the enablement logic for the * contextual launch element of this launch shortcut description or * <code>null</code> if none. * @return an evaluatable expression or <code>null</code> * @throws CoreException if the configuration element can't be * converted. Reasons include: (a) no handler is available to * cope with a certain configuration element or (b) the XML * expression tree is malformed. */ public Expression getContextualLaunchEnablementExpression() throws CoreException { if (fContextualLaunchExpr == null) { IConfigurationElement[] elements = element.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) fContextualLaunchExpr = ExpressionConverter.getDefault().perform(enablement); } return fContextualLaunchExpr; }
/** * @return Returns an expression that represents the enablement logic * for the breakpoint toggle target. */ private Expression getEnablementExpression(){ if (fEnablementExpression == null) { try{ IConfigurationElement[] elements = fConfigElement.getChildren(ExpressionTagNames.ENABLEMENT); IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } catch (CoreException e){ DebugUIPlugin.log(e.getStatus()); fEnablementExpression = null; } } return fEnablementExpression; }
protected Expression createExpression(IConfigurationElement element) throws CoreException { IConfigurationElement[] children= element.getChildren(ExpressionTagNames.ENABLEMENT); if (children.length == 0) return Expression.FALSE; // TODO we should add some sort of syntax check and throw an core exception in this case Assert.isTrue(children.length == 1); return ExpressionConverter.getDefault().perform(children[0]); } }
private Expression getEnablementElement(IConfigurationElement element) { IConfigurationElement[] enablements = element.getChildren(ExpressionTagNames.ENABLEMENT); if (enablements.length == 0) return null; try { return ExpressionConverter.getDefault().perform(enablements[0]); } catch (CoreException ce) { Logger.getLogger().log(ce); } return null; }
/** * Initialize the enablement expression for this decorator */ protected void initializeEnablement(IConfigurationElement definingElement) { IConfigurationElement[] elements = definingElement .getChildren(CHILD_ENABLED_WHEN); if (elements.length == 0) return; try { IConfigurationElement[] enablement = elements[0].getChildren(); if (enablement.length == 0) return; enablementExpression = ExpressionConverter.getDefault().perform( enablement[0]); } catch (CoreException e) { WorkbenchPlugin.log(e); } }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) { String message = MessageFormat.format("{0} " +getLocalId() + " {1} " + getPluginId() + " {2}", new String[] {ConsoleMessages.PatternMatchListenerExtension_3,ConsoleMessages.PatternMatchListenerExtension_4,ConsoleMessages.PatternMatchListenerExtension_5}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null)); } IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) { String message = MessageFormat.format("{0} " + getLocalId() + " {1} " + getPluginId() + " {2}", new Object[] { ConsoleMessages.PatternMatchListenerExtension_3, ConsoleMessages.PatternMatchListenerExtension_4, ConsoleMessages.PatternMatchListenerExtension_5 }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null)); } IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public boolean matches(IEvaluationContext context, IParticipantDescriptorFilter filter, RefactoringStatus status) throws CoreException { IConfigurationElement[] elements= fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) return false; Assert.isTrue(elements.length == 1); Expression exp= ExpressionConverter.getDefault().perform(elements[0]); if (!convert(exp.evaluate(context))) return false; if (filter != null && !filter.select(fConfigurationElement, status)) return false; return true; }
public boolean matches(IEvaluationContext context, IParticipantDescriptorFilter filter, RefactoringStatus status) throws CoreException { IConfigurationElement[] elements= fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) return false; Assert.isTrue(elements.length == 1); Expression exp= ExpressionConverter.getDefault().perform(elements[0]); if (!convert(exp.evaluate(context))) return false; if (filter != null && !filter.select(fConfigurationElement, status)) return false; return true; }
public boolean matches(IEvaluationContext context, IParticipantDescriptorFilter filter, RefactoringStatus status) throws CoreException { IConfigurationElement[] elements= fConfigurationElement.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) return false; Assert.isTrue(elements.length == 1); Expression exp= ExpressionConverter.getDefault().perform(elements[0]); if (!convert(exp.evaluate(context))) return false; if (filter != null && !filter.select(fConfigurationElement, status)) return false; return true; }