geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r815203 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui: ./ META-INF/ src/main/java/org/apache/geronimo/st/ui/refactoring/
Date Tue, 15 Sep 2009 08:08:26 GMT
Author: delos
Date: Tue Sep 15 08:08:26 2009
New Revision: 815203

URL: http://svn.apache.org/viewvc?rev=815203&view=rev
Log:
GERONIMODEVTOOLS-283 Refactoring a Dynamic Web Project's name doesn't refactor it's artifact
id & context root. Thanks a lot for Rodger's patch!

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/GeronimoWebProjectRenameParticipant.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/MovedTextFileChange.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanEditHelper.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanHandler.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebTextNode.java
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF?rev=815203&r1=815202&r2=815203&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF
Tue Sep 15 08:08:26 2009
@@ -26,7 +26,13 @@
  org.eclipse.core.resources,
  org.eclipse.wst.sse.ui,
  org.eclipse.text,
- org.eclipse.jface.text
+ org.eclipse.jface.text,
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.jem.util,
+ org.eclipse.jst.j2ee,
+ org.eclipse.jst.j2ee.web,
+ org.eclipse.ui,
+ org.eclipse.core.filebuffers
 Bundle-ActivationPolicy: lazy
 Export-Package: org.apache.geronimo.st.ui,
  org.apache.geronimo.st.ui.actions,
@@ -36,3 +42,4 @@
  org.apache.geronimo.st.ui.pages,
  org.apache.geronimo.st.ui.sections,
  org.apache.geronimo.st.ui.wizards
+ 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml?rev=815203&r1=815202&r2=815203&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml Tue
Sep 15 08:08:26 2009
@@ -216,5 +216,18 @@
         <action_URL class="org.apache.geronimo.st.ui.actions.LaunchGeronimoSupportAction"
                     URL="http://geronimo.apache.org/" />
     </extension>
- 
+    
+ 	<extension point="org.eclipse.ltk.core.refactoring.renameParticipants">    
+		<renameParticipant    
+			id="org.apache.geronimo.st.ui.refactoring.rename"    
+			name="Rename a project with rename additional info"     
+			class="org.apache.geronimo.st.ui.refactoring.GeronimoWebProjectRenameParticipant">
    
+			<enablement>
+				<with variable="element">
+					<instanceof value="org.eclipse.core.resources.IProject">
+					</instanceof>
+				</with> 
+			</enablement>        
+		</renameParticipant>    
+	</extension>
 </plugin>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/GeronimoWebProjectRenameParticipant.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/GeronimoWebProjectRenameParticipant.java?rev=815203&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/GeronimoWebProjectRenameParticipant.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/GeronimoWebProjectRenameParticipant.java
Tue Sep 15 08:08:26 2009
@@ -0,0 +1,132 @@
+package org.apache.geronimo.st.ui.refactoring;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+
+public class GeronimoWebProjectRenameParticipant extends
+	GeronimoProjectRenameParticipant {
+    private IFile geronimoWebDeploymentPlanFile;
+
+    @Override
+    protected boolean initialize(Object element) {
+	// if not a project, then stop this refactoring
+	if (!(element instanceof IProject)) {
+	    return false;
+	}
+
+	project = (IProject) element;
+
+	// if not a DynamicWebProject,then stop this refactoring
+	if (!JavaEEProjectUtilities.isDynamicWebProject(project)) {
+	    return false;
+	}
+
+	// sure that project is DynamicWebProject
+	geronimoWebDeploymentPlanFile = getWebDeploymentPlanFile(project);
+
+	// if no geronimo-web.xml, then stop this refactoring
+	if (geronimoWebDeploymentPlanFile == null) {
+	    return false;
+	}
+
+	return true;
+    }
+
+    @Override
+    public Change createChange(IProgressMonitor pm) throws CoreException,
+	    OperationCanceledException {
+	CompositeChange result = new CompositeChange(getName());
+	try {
+	    pm
+		    .beginTask(
+			    "beging create change for context-root and artifactId",
+			    100);
+	    String oldName=project.getName();
+	    String underProjectFilePath = getWebDeploymentPlanFileUnderProjectPath(project);
+	    String projectRelativeFilePath = geronimoWebDeploymentPlanFile
+		    .getFullPath().toString();
+	    String absoluteWorkspacePath = project.getParent().getLocation()
+		    .toString();
+	    String absoluteFilePath = absoluteWorkspacePath
+		    + projectRelativeFilePath;
+
+	    WebDeploymentPlanEditHelper editHelper = new WebDeploymentPlanEditHelper(
+		    absoluteFilePath);
+
+	    // Before this change being applied, the project has been
+	    // renamed. So, use a MovedTextFileChange instead of TextFileChange
+	    String newName = this.getArguments().getNewName();
+	    IProject newProject = ((IWorkspaceRoot) geronimoWebDeploymentPlanFile
+		    .getProject().getParent()).getProject(newName);
+	    IFile newFile = newProject.getFile(underProjectFilePath);
+
+	    // create change for context-root
+	    String oldName1 = editHelper.getContextRootValue();
+	    int offset1 = editHelper.getContextRootOffset();
+	    if (offset1 != -1 && oldName1.substring(1).equals(oldName)) {
+		MovedTextFileChange change1 = new MovedTextFileChange(
+			"Rename artifact-id's value", newFile,
+			geronimoWebDeploymentPlanFile);
+		MultiTextEdit rootEdit1 = new MultiTextEdit();
+		ReplaceEdit edit1 = new ReplaceEdit(offset1, oldName1.length(),
+			"/" + newName);
+		rootEdit1.addChild(edit1);
+		change1.setEdit(rootEdit1);
+		result.add(change1);
+	    }
+	    // create change for artifactId
+	    String oldName2 = editHelper.getArtifactIdValue();
+	    int offset2 = editHelper.getArtifactIdOffset();
+	    if (offset2 != -1 && oldName2.equals(oldName)) {
+		MovedTextFileChange change2 = new MovedTextFileChange(
+			"Rename context-root's value", newFile,
+			geronimoWebDeploymentPlanFile);
+		MultiTextEdit rootEdit2 = new MultiTextEdit();
+		ReplaceEdit edit2 = new ReplaceEdit(offset2, oldName2.length(),
+			newName);
+		rootEdit2.addChild(edit2);
+		change2.setEdit(rootEdit2);
+		result.add(change2);
+	    }
+
+	} finally {
+	    pm.done();
+	}
+	if(result.getChildren().length==0)
+	    return null;
+	return result;
+    }
+
+    @Override
+    public String getName() {
+	return "Rename artifact-id and context-root in geronimo-web.xml";
+    }
+
+    private IFile getWebDeploymentPlanFile(IProject project) {
+	IVirtualComponent comp = ComponentCore.createComponent(project);
+	IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder()
+		.getProjectRelativePath().append("WEB-INF").append(
+			"geronimo-web.xml");
+	return project.getFile(deployPlanPath);
+    }
+
+    private String getWebDeploymentPlanFileUnderProjectPath(IProject project) {
+	IVirtualComponent comp = ComponentCore.createComponent(project);
+	IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder()
+		.getProjectRelativePath().append("WEB-INF").append(
+			"geronimo-web.xml");
+	return deployPlanPath.toString();
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/MovedTextFileChange.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/MovedTextFileChange.java?rev=815203&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/MovedTextFileChange.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/MovedTextFileChange.java
Tue Sep 15 08:08:26 2009
@@ -0,0 +1,50 @@
+package org.apache.geronimo.st.ui.refactoring;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.core.filebuffers.LocationKind;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+
+public class MovedTextFileChange extends TextFileChange {
+
+	private IFile fCurrentFile;
+
+	public MovedTextFileChange(String name, IFile newFile, IFile currentFile) {
+		super(name, newFile);
+		fCurrentFile = currentFile;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ltk.core.refactoring.TextChange#getCurrentDocument(org.eclipse.core.runtime.IProgressMonitor)
+	 * 
+	 * Override getCurrentDocument to return the document of the fCurrentFile instead of the
fFile.  Since fFile
+	 * does not exist, it creates problems when displaying preview information
+	 */
+	public IDocument getCurrentDocument(IProgressMonitor pm) throws CoreException {
+		if (pm == null)
+			pm = new NullProgressMonitor();
+		IDocument result = null;
+		pm.beginTask("", 2); //$NON-NLS-1$
+		ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
+		try {
+			IPath path = fCurrentFile.getFullPath();
+			manager.connect(path, LocationKind.NORMALIZE, pm);
+			ITextFileBuffer buffer = manager.getTextFileBuffer(path, LocationKind.NORMALIZE);
+			result = buffer.getDocument();
+		} finally {
+			if (result != null)
+				manager.disconnect(fCurrentFile.getFullPath(), LocationKind.NORMALIZE, pm);
+		}
+		pm.done();
+		return result;
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanEditHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanEditHelper.java?rev=815203&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanEditHelper.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanEditHelper.java
Tue Sep 15 08:08:26 2009
@@ -0,0 +1,71 @@
+package org.apache.geronimo.st.ui.refactoring;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+public class WebDeploymentPlanEditHelper {
+	private String fileName;
+	private WebDeploymentPlanHandler handler;
+	
+	public WebDeploymentPlanEditHelper(String fileName){
+		this.fileName=fileName;
+		this.handler=new WebDeploymentPlanHandler(fileName);
+		init();
+	}
+	
+	private void init(){
+		SAXParserFactory factory=SAXParserFactory.newInstance();
+		try {
+			factory.setFeature("http://xml.org/sax/features/namespaces", true);
+			SAXParser p = factory.newSAXParser();
+			File file =new File(fileName);
+			p.parse(file, handler);
+		} catch (SAXNotRecognizedException e) {
+			e.printStackTrace();
+		} catch (SAXNotSupportedException e) {
+			e.printStackTrace();
+		} catch (ParserConfigurationException e) {
+			e.printStackTrace();
+		} catch (SAXException e) {
+			e.printStackTrace();
+		}catch (IOException e) {
+			e.printStackTrace();
+		}	
+	}
+	
+	public int getContextRootOffset(){
+		if(handler.getContextRootTextNode()!=null){
+			return handler.getContextRootTextNode().getOffset();
+		}
+		return -1;
+	}
+	
+	public String getContextRootValue(){
+		if(handler.getContextRootTextNode()!=null){
+			return handler.getContextRootTextNode().getValue();
+		}
+		return null;
+	}
+	
+	public int getArtifactIdOffset() {
+		if(handler.getArtifactIdTextNode()!=null){
+			return handler.getArtifactIdTextNode().getOffset();
+		}
+		return -1;
+	}
+	
+	public String getArtifactIdValue(){
+		if(handler.getArtifactIdTextNode()!=null){
+			return handler.getArtifactIdTextNode().getValue();
+		}
+		return null;
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanHandler.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanHandler.java?rev=815203&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanHandler.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebDeploymentPlanHandler.java
Tue Sep 15 08:08:26 2009
@@ -0,0 +1,168 @@
+package org.apache.geronimo.st.ui.refactoring;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+public class WebDeploymentPlanHandler extends DefaultHandler {
+	private String file;
+	private Locator locator;
+	private List<WebTextNode> nodeList = new ArrayList<WebTextNode>();
+
+	public List<WebTextNode> getNodeList() {
+		return nodeList;
+	}
+
+	public WebTextNode getContextRootTextNode() {
+		for (WebTextNode n : nodeList) {
+			if (n.getName().equals("context-root"))
+				return n;
+		}
+		return null;
+	}
+
+	public WebTextNode getArtifactIdTextNode() {
+		for (WebTextNode n : nodeList) {
+			if (n.getName().equals("artifactId"))
+				return n;
+		}
+		return null;
+	}
+
+	private static final int START = 0, IN_WEB_APP = 1, IN_CONTEXT_ROOT = 2,
+			IN_ENVIRONMENT = 3, IN_MODULEID = 4, IN_ARTIFACTID = 5;
+
+	private int state = START;
+
+	public WebDeploymentPlanHandler(String file) {
+		this.file = file;
+	}
+
+	public void setDocumentLocator(Locator locator) {
+		this.locator = locator;
+	}
+
+	public void characters(char[] ch, int start, int length)
+			throws SAXException {
+		String value = null;
+		WebTextNode wtn = null;
+		switch (state) {
+		case IN_CONTEXT_ROOT:
+			value = new String(ch, start, length);
+			wtn = new WebTextNode();
+			try {
+				int offset = getOffset(locator.getLineNumber(), locator
+						.getColumnNumber());
+				wtn.setName("context-root");
+				wtn.setValue(value);
+				wtn.setOffset(offset - length);
+				nodeList.add(wtn);
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			break;
+		case IN_ARTIFACTID:
+			value = new String(ch, start, length);
+			wtn = new WebTextNode();
+			try {
+				int offset = getOffset(locator.getLineNumber(), locator
+						.getColumnNumber());
+				wtn.setName("artifactId");
+				wtn.setValue(value);
+				wtn.setOffset(offset - length);
+				nodeList.add(wtn);
+
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			break;
+		default:
+			break;
+		}
+	}
+
+	public void startElement(String uri, String localName, String qName,
+			Attributes attributes) throws SAXException {
+		switch (state) {
+		case START:
+			if (localName.equals("web-app"))
+				state = IN_WEB_APP;
+			break;
+		case IN_WEB_APP:
+			if (localName.equals("environment"))
+				state = IN_ENVIRONMENT;
+			else if (localName.equals("context-root"))
+				state = IN_CONTEXT_ROOT;
+			break;
+		case IN_ENVIRONMENT:
+			if (localName.equals("moduleId"))
+				state = IN_MODULEID;
+			break;
+		case IN_MODULEID:
+			if (localName.equals("artifactId"))
+				state = IN_ARTIFACTID;
+			break;
+		default:
+			break;
+		}
+	}
+
+	public void endElement(String uri, String localName, String qName)
+			throws SAXException {
+		switch (state) {
+		case IN_WEB_APP:
+			if (localName.equals("web-app"))
+				state = START;
+			break;
+		case IN_ENVIRONMENT:
+			if (localName.equals("environment"))
+				state = IN_WEB_APP;
+			break;
+		case IN_MODULEID:
+			if (localName.equals("moduleId"))
+				state = IN_ENVIRONMENT;
+			break;
+		case IN_ARTIFACTID:
+			if (localName.equals("artifactId"))
+				state = IN_MODULEID;
+			break;
+		case IN_CONTEXT_ROOT:
+			if (localName.equals("context-root"))
+				state = IN_WEB_APP;
+			break;
+		default:
+			break;
+		}
+	}
+
+	// return the offset of the TextNode's end
+	private int getOffset(int lineNumber, int columnNumber) throws IOException {
+		BufferedReader br = new BufferedReader(new FileReader(file));
+
+		if (lineNumber < 1 || columnNumber < 1)
+			return -1;
+
+		int current;
+		int offset = 0;
+
+		for (int i = 1; i < lineNumber;) {
+			do {
+				current = br.read();
+				offset++;
+			} while (current != '\n');
+			i++;
+		}
+		offset += (columnNumber-1);
+
+		br.close();
+
+		return offset;
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebTextNode.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebTextNode.java?rev=815203&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebTextNode.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/refactoring/WebTextNode.java
Tue Sep 15 08:08:26 2009
@@ -0,0 +1,44 @@
+package org.apache.geronimo.st.ui.refactoring;
+
+public class WebTextNode {
+	private String name;
+	private String value;
+	private int offset;	
+	
+	public static final String CONTEXT_ROOT="context-root",ARTIFACT_ID="artifactId";
+	
+	public WebTextNode() {
+		this(null,null,-1);
+	}
+
+	public WebTextNode(String name, String value, int offset) {
+		this.name = name;
+		this.value = value;
+		this.offset = offset;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	public int getOffset() {
+		return offset;
+	}
+
+	public void setOffset(int offset) {
+		this.offset = offset;
+	}
+
+}



Mime
View raw message