1 package net.mograsim.plugin.asm.editor;
3 import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
4 import org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension;
5 import org.eclipse.core.filebuffers.LocationKind;
6 import org.eclipse.core.resources.IFile;
7 import org.eclipse.core.resources.ResourcesPlugin;
8 import org.eclipse.core.runtime.IPath;
9 import org.eclipse.jface.text.IDocument;
11 public class ValidatorDocumentSetupParticipant implements IDocumentSetupParticipant, IDocumentSetupParticipantExtension
15 public void setup(IDocument document)
20 public void setup(IDocument document, IPath location, LocationKind locationKind)
22 if (locationKind == LocationKind.IFILE)
24 IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(location);
25 document.addDocumentListener(new AsmDocumentValidator(file));