diff options
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.xpand/src/org/eclipse/papyrus/gmf/internal/xpand/model/AnalysationIssue.java')
-rw-r--r-- | plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.xpand/src/org/eclipse/papyrus/gmf/internal/xpand/model/AnalysationIssue.java | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.xpand/src/org/eclipse/papyrus/gmf/internal/xpand/model/AnalysationIssue.java b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.xpand/src/org/eclipse/papyrus/gmf/internal/xpand/model/AnalysationIssue.java deleted file mode 100644 index 4120881640d..00000000000 --- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.xpand/src/org/eclipse/papyrus/gmf/internal/xpand/model/AnalysationIssue.java +++ /dev/null @@ -1,114 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2005, 2020 Sven Efftinge, CEA LIST, Artal and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Sven Efftinge - Initial API and implementation - * Artem Tikhomirov (Borland) - Migration to OCL expressions - * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174 - *****************************************************************************/ -package org.eclipse.papyrus.gmf.internal.xpand.model; - -import org.eclipse.papyrus.gmf.internal.xpand.expression.ast.SyntaxElement; -import org.eclipse.papyrus.gmf.internal.xpand.ocl.ExpressionHelper; - -/** - * FIXME: refactor - hide enum type into factory method, check all types are still in use, get rid of isWarningNotError - * @author Sven Efftinge - * @author Arno Haase - */ -public class AnalysationIssue { - - public enum Type { - INCOMPATIBLE_TYPES("Incompatible types"), - UNNECESSARY_CAST("Unnecessary cast"), - FEATURE_NOT_FOUND("Callable not found"), - TYPE_NOT_FOUND ("Type not found"), - INTERNAL_ERROR("Internal error"), - JAVA_TYPE_NOT_FOUND("Java Type not found"), - SYNTAX_ERROR("Syntax error"), - DEFINITION_NOT_FOUND("Definition not found"), - EXTENSION_NOT_FOUND("Extension not found"), - NAMESPACE_NOT_FOUND("Namespace not found"), - UNUSED_IMPORT("Unused import"); - - private String name; - - private Type(final String name) { - this.name = name; - } - - @Override - public String toString() { - return name; - } - } - - private final Type type; - - private final String message; - - private final boolean isWarningNotError; - - private final int start; - - private final int end; - - private final int line; - - public AnalysationIssue(final Type type, final String message, final SyntaxElement element) { - this(type, message, element, false); - } - - public AnalysationIssue(final Type type, final String message, final SyntaxElement element, boolean isWarning) { - this(type, message, element.getStart(), element.getEnd(), element.getLine(), isWarning); - } - - public AnalysationIssue(final Type type, final String message, final ExpressionHelper exprHelper) { - this(type, message, exprHelper.getStart(), exprHelper.getEnd(), -1, false); - } - - private AnalysationIssue(final Type type, final String message, final int start, int end, int line, boolean isWarningNotError) { - this.type = type; - this.message = message; - this.isWarningNotError = isWarningNotError; - this.start = start; - this.end = end; - this.line = line; - } - - public boolean isWarningNotError() { - return isWarningNotError; - } - - public String getMessage() { - return message; - } - - public Type getType() { - return type; - } - - public int getStart() { - return start; - } - - public int getEnd() { - return end; - } - - public int getLine() { - return line; - } - - @Override - public String toString() { - return "[" + type.name + "] - " + message; - } - -} |