blob: 5a099a3183f5ffab83b8ab6dca629eaf9f455bf5 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath 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 Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.modelChecker.impl;
import java.util.Collection;
import org.eclipse.viatra2.core.IModelElement;
import org.eclipse.viatra2.modelChecker.IProblem;
import org.eclipse.viatra2.tags.TagKind;
public class ProblemCounter {
//TreeMap<IModelElement, Collection<IProblem>> element2Problems = new TreeMap<IModelElement, Collection<IProblem>>();
ProblemManager pm;
ProblemCounter(Collection<IProblem> problems, ProblemManager pm) {
this.pm = pm;
setProblems(problems);
}
/**
* 1) Clear all "problem" tags.
* 2) Add all new "problem" tags passed in the parameter.
*/
void setProblems(Collection<IProblem> problems)
{
pm.tm.clearTags(TagKind.MODELING_PROBLEM);
for (IProblem p : problems)
{
pm.tm.addTag(p);
}
}
void setProblems(IModelElement me, Collection<IProblem> problems)
{
// pm.tm.clearTags(me);
// add new tags
for (IProblem p : problems)
{
pm.tm.addTag(p);
}
}
}