/* package */ void processChildren(Element element, CompositeExpression result) throws CoreException { Node child = element.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.ELEMENT_NODE) { Expression exp= perform((Element)child); if (exp == null) throw new CoreException(new Status(IStatus.ERROR, ExpressionPlugin.getPluginId(), IStatus.ERROR, Messages.format( ExpressionMessages.Expression_unknown_element, child.getNodeName()), null)); result.add(exp); } child = child.getNextSibling(); } } }
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; }
/* package */ void processChildren(Element element, CompositeExpression result) throws CoreException { Node child = element.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.ELEMENT_NODE) { Expression exp= perform((Element)child); if (exp == null) throw new CoreException(new Status(IStatus.ERROR, ExpressionPlugin.getPluginId(), IStatus.ERROR, Messages.format( ExpressionMessages.Expression_unknown_element, child.getNodeName()), null)); result.add(exp); } child = child.getNextSibling(); } } }
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; }
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]); } }
/* package */ void processChildren(IConfigurationElement element, CompositeExpression result) throws CoreException { IConfigurationElement[] children= element.getChildren(); if (children != null) { for (IConfigurationElement configElement : children) { Expression child= perform(configElement); if (child == null) throw new CoreException(new Status(IStatus.ERROR, ExpressionPlugin.getPluginId(), IStatus.ERROR, Messages.format( ExpressionMessages.Expression_unknown_element, getDebugPath(configElement)), null)); result.add(child); } } }
/* package */ void processChildren(IConfigurationElement element, CompositeExpression result) throws CoreException { IConfigurationElement[] children= element.getChildren(); if (children != null) { for (int i= 0; i < children.length; i++) { Expression child= perform(children[i]); if (child == null) throw new CoreException(new Status(IStatus.ERROR, ExpressionPlugin.getPluginId(), IStatus.ERROR, Messages.format( ExpressionMessages.Expression_unknown_element, getDebugPath(children[i])), null)); result.add(child); } } }
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; }
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; }