X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Feclipse%2Fequinox%2Finternal%2Fp2%2Fui%2Fquery%2FRequiredIUsQuery.java;fp=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Feclipse%2Fequinox%2Finternal%2Fp2%2Fui%2Fquery%2FRequiredIUsQuery.java;h=61333bcc66c441130d8bed6603d70211da2322c6;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=465732bb9279c779c2130050dd7e47a3d31792fb;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.project/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java b/bundles/org.simantics.project/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java index 465732bb9..61333bcc6 100644 --- a/bundles/org.simantics.project/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java +++ b/bundles/org.simantics.project/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java @@ -1,45 +1,45 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Cloudsmith Inc. - converted into expression based query - *******************************************************************************/ -package org.eclipse.equinox.internal.p2.ui.query; - -import org.eclipse.equinox.p2.query.ExpressionMatchQuery; - -import org.eclipse.equinox.p2.metadata.IInstallableUnit; -import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil; -import org.eclipse.equinox.p2.metadata.expression.IExpression; - -/** -/** - * A query matching every {@link IInstallableUnit} that is meets - * any requirement of the specified IU. This query is used when - * drilling down to show the children of an available IU. For example, - * when installing an IU, we want to show all the IU's that are in the provisioning - * plan that are required by this IU. This is usually used in combination with - * other queries (such as show all Required IUs which also are visible to - * the user as available). - * - * @since 2.0 - */ -public class RequiredIUsQuery extends ExpressionMatchQuery { - - private static final IExpression expression = ExpressionUtil.parse("$0.exists(rc | this ~= rc)"); //$NON-NLS-1$ - - /** - * Creates a new query that will return any IU that meets any - * one of the requirements of the specified IU. - * - * @param iu The IU whose requirements are to be checked - */ - public RequiredIUsQuery(IInstallableUnit iu) { - super(IInstallableUnit.class, expression, iu.getRequirements()); - } -} +/******************************************************************************* + * Copyright (c) 2010 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Cloudsmith Inc. - converted into expression based query + *******************************************************************************/ +package org.eclipse.equinox.internal.p2.ui.query; + +import org.eclipse.equinox.p2.query.ExpressionMatchQuery; + +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil; +import org.eclipse.equinox.p2.metadata.expression.IExpression; + +/** +/** + * A query matching every {@link IInstallableUnit} that is meets + * any requirement of the specified IU. This query is used when + * drilling down to show the children of an available IU. For example, + * when installing an IU, we want to show all the IU's that are in the provisioning + * plan that are required by this IU. This is usually used in combination with + * other queries (such as show all Required IUs which also are visible to + * the user as available). + * + * @since 2.0 + */ +public class RequiredIUsQuery extends ExpressionMatchQuery { + + private static final IExpression expression = ExpressionUtil.parse("$0.exists(rc | this ~= rc)"); //$NON-NLS-1$ + + /** + * Creates a new query that will return any IU that meets any + * one of the requirements of the specified IU. + * + * @param iu The IU whose requirements are to be checked + */ + public RequiredIUsQuery(IInstallableUnit iu) { + super(IInstallableUnit.class, expression, iu.getRequirements()); + } +}