Code Search for Developers
 
 
  

Line.java from Groovy Eclipse Monkey at Krugle


Show Line.java syntax highlighted

package net.sf.groovyMonkey.dom.resources;
import static net.sf.groovyMonkey.dom.resources.Resources.standardMarkerName;
import static org.eclipse.core.resources.IMarker.LINE_NUMBER;
import static org.eclipse.core.resources.IMarker.MESSAGE;
import static org.eclipse.core.resources.IMarker.TASK;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;

public class Line
{
    private final String text;
    private final int lineNumber;
    private final File file;

    public Line( final String text, 
                 final int number, 
                 final File file )
    {
        this.text = text;
        this.lineNumber = number;
        this.file = file;
    }
    public String getString()
    {
        return text;
    }
    public int getLineNumber()
    {
        return lineNumber;
    }
    public void addMyTask( final String scriptID,
                           final String message ) 
    throws CoreException
    {
        final IMarker marker = file.getEclipseObject().createMarker( TASK );
        marker.setAttribute( standardMarkerName, scriptID );
        marker.setAttribute( MESSAGE, message );
        marker.setAttribute( LINE_NUMBER, lineNumber );
    }
}




See more files for this project here

Groovy Eclipse Monkey

Groovy Monkey is a Utility for Eclipse that enables you to create scripts in Groovy, Beanshell, Python or Ruby to run directly in Eclipse. This tool can be used to Eclipse API exploration, automation scripts, and rapid plugin prototyping.

Project homepage: http://sourceforge.net/projects/groovy-monkey
Programming language(s): Groovy,Java,XML
License: other

  File.java
  Line.java
  Resources.java
  ResourcesDOMFactory.java