blob: a6731a46009e213136ab2aee7b59e83f399d72eb [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
* 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:
* Andras Balogh - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.imports.vtml;
import org.eclipse.viatra2.core.IEntity;
import org.eclipse.viatra2.core.IModelSpace;
import org.eclipse.viatra2.errors.VPMCoreException;
/**
* @author babo
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class NamespaceImport extends ASTNode {
public NamespaceImport(int l, String n)
{
name = n;
setLine(l);
}
/* (non-Javadoc)
* @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)
*/
public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {
if (!ab.namespaceExists(name))
{
ab.log.error("Namespace "+name+" does not exists. Error in line "+getLine());
return false;
}
return true;
}
/* (non-Javadoc)
* @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)
*/
public void resolveReferences(ASTBuilder ab) throws VPMCoreException {
// TODO Auto-generated method stub
}
public void generateElements(ASTBuilder ab, IModelSpace m,IEntity temp) throws VPMCoreException
{
}
/* (non-Javadoc)
* @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)
*/
public void updateModelspace(ASTBuilder ab, IModelSpace m) throws VPMCoreException {
// TODO Auto-generated method stub
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
String name;
}