Package: AbstractVdmBuilder

AbstractVdmBuilder

nameinstructionbranchcomplexitylinemethod
AbstractVdmBuilder()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
addErrorMarker(File, String, ILexLocation, String)
M: 11 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addErrorMarker(IFile, String, int)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addWarningMarker(File, String, ILexLocation, String)
M: 11 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addWarningMarker(IFile, String, int)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
buildModel(IVdmProject, IVdmModel)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getProject()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setProject(IVdmProject)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%~
3: * org.overture.ide.core
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ide.core.builder;
23:
24: import java.io.File;
25:
26: import org.eclipse.core.resources.IFile;
27: import org.eclipse.core.resources.IMarker;
28: import org.eclipse.core.runtime.IStatus;
29: import org.overture.ast.intf.lex.ILexLocation;
30: import org.overture.ide.core.ICoreConstants;
31: import org.overture.ide.core.IVdmModel;
32: import org.overture.ide.core.resources.IVdmProject;
33: import org.overture.ide.core.utility.FileUtility;
34:
35: public abstract class AbstractVdmBuilder
36: {
37:         private IVdmProject project;
38:         
39:         public IStatus buildModel(IVdmProject project,IVdmModel rooList)
40:         {
41:                 this.setProject(project);
42:                 return buildModel(rooList);
43:         }
44:         
45:         public abstract IStatus buildModel(IVdmModel rooList);
46:
47: //        public abstract String getNatureId();
48:         
49:         
50:
51:         protected void addWarningMarker(File file, String message, ILexLocation location,
52:                         String sourceId)
53:         {
54:                 FileUtility.addMarker(project.findIFile( file),message,location,IMarker.SEVERITY_WARNING,sourceId,-1);
55:         }
56:         
57:         protected void addErrorMarker(File file, String message, ILexLocation location,
58:                         String sourceId)
59:         {
60:                 FileUtility.addMarker(project.findIFile(file), message, location, IMarker.SEVERITY_ERROR,sourceId,-1);
61:         }
62:
63:         protected void addWarningMarker(IFile file, String message, int lineNumber)
64:         {
65:                 FileUtility.addMarker(file,message,lineNumber,IMarker.SEVERITY_WARNING,ICoreConstants.PLUGIN_ID);
66:         }
67:
68:         protected void addErrorMarker(IFile file, String message, int lineNumber)
69:         {
70:                 FileUtility.addMarker(file, message, lineNumber, IMarker.SEVERITY_ERROR,ICoreConstants.PLUGIN_ID);
71:         }
72:
73:         private void setProject(IVdmProject project)
74:         {
75:                 this.project = project;
76:         }
77:
78:         protected IVdmProject getProject()
79:         {
80:                 return project;
81:         }
82:         
83:         
84:
85:
86:
87: }