blob: b55d67dc2fbe4952c968629883d4d2b8cbfb4554 [file] [log] [blame]
/**
* Copyright (c) 2009 Mia-Software.
* 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:
* Nicolas Guyomar (Mia-Software) - initial API and implementation
* Gregoire DUPE (Mia-Software) - initial API and implementation
*/
package org.eclipse.gmt.modisco.java.queries.text;
import org.eclipse.gmt.modisco.infra.query.core.exception.ModelQueryExecutionException;
import org.eclipse.gmt.modisco.infra.query.core.java.IJavaModelQuery;
import org.eclipse.gmt.modisco.infra.query.core.java.ParameterValueList;
import org.eclipse.gmt.modisco.java.FieldDeclaration;
import org.eclipse.gmt.modisco.java.Initializer;
import org.eclipse.gmt.modisco.java.NamedElement;
import org.eclipse.gmt.modisco.java.internal.util.JavaUtil;
public class GetQualifiedName implements IJavaModelQuery<NamedElement, String> {
public String evaluate(final NamedElement context, final ParameterValueList parameterValues)
throws ModelQueryExecutionException {
if (context instanceof FieldDeclaration || context instanceof Initializer) {
return ""; // TODO temporary fix, see 305662 //$NON-NLS-1$
}
return JavaUtil.getQualifiedName(context);
}
}