Fixed the MograsimBuilder a bit, but it will likely get removed
authorChristian Femers <femers@in.tum.de>
Thu, 26 Sep 2019 04:57:08 +0000 (06:57 +0200)
committerChristian Femers <femers@in.tum.de>
Thu, 26 Sep 2019 04:57:08 +0000 (06:57 +0200)
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MograsimBuilder.java

index 44d9b51..a8a4d02 100644 (file)
@@ -22,6 +22,7 @@ import org.xml.sax.helpers.DefaultHandler;
 
 public class MograsimBuilder extends IncrementalProjectBuilder
 {
+       private MachineContext machineContext;
 
        class SampleDeltaVisitor implements IResourceDeltaVisitor
        {
@@ -93,9 +94,9 @@ public class MograsimBuilder extends IncrementalProjectBuilder
                }
        }
 
-       public static final String BUILDER_ID = "PluginTest.mograsimBuilder";
+       public static final String BUILDER_ID = "net.mograsim.plugin.core.mograsimBuilder";
 
-       private static final String MARKER_TYPE = "PluginTest.xmlProblem";
+       private static final String MARKER_TYPE = "net.mograsim.plugin.core.asmProblem";
 
        private SAXParserFactory parserFactory;
 
@@ -117,6 +118,13 @@ public class MograsimBuilder extends IncrementalProjectBuilder
                }
        }
 
+       @Override
+       protected void startupOnInitialize()
+       {
+               super.startupOnInitialize();
+               machineContext = ProjectMachineContext.getMachineContextOf(getProject());
+       }
+
        @Override
        protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException
        {
@@ -146,7 +154,7 @@ public class MograsimBuilder extends IncrementalProjectBuilder
 
        void checkXML(IResource resource)
        {
-               if (resource instanceof IFile && resource.getName().endsWith(".xml"))
+               if (resource instanceof IFile && resource.getName().endsWith(".asm"))
                {
                        IFile file = (IFile) resource;
                        deleteMarkers(file);