public final class ModificationResult extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ModificationResult.Difference |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Once all of the changes have been collected, this method can be used
to commit the changes to the source files
|
List<? extends ModificationResult.Difference> |
getDifferences(FileObject fo) |
Set<? extends FileObject> |
getModifiedFileObjects() |
Set<File> |
getNewFiles() |
String |
getResultingSource(FileObject fileObject)
Returned string represents preview of resulting source.
|
int[] |
getSpan(Object tag)
Provides span of tree tagged with
tag |
static ModificationResult |
runModificationTask(Collection<Source> sources,
UserTask task)
Runs a task over given sources, the task has an access to the
WorkingCopy
using the WorkingCopy.get(org.netbeans.modules.parsing.spi.Parser.Result) method. |
@NonNull public static ModificationResult runModificationTask(@NonNull Collection<Source> sources, @NonNull UserTask task) throws ParseException
WorkingCopy
using the WorkingCopy.get(org.netbeans.modules.parsing.spi.Parser.Result) method.sources - on which the given task will be performedtask - to be performedModificationResultParseException@NonNull public Set<? extends FileObject> getModifiedFileObjects()
public List<? extends ModificationResult.Difference> getDifferences(@NonNull FileObject fo)
public void commit()
throws IOException
IOException@NonNull public String getResultingSource(@NonNull FileObject fileObject) throws IOException, IllegalArgumentException
isExcluded() flag of difference.there - can be more resulting source, user has to specify
which wants to preview.IllegalArgumentException - if the provided FileObject is not
modified in this ModificationResultIOException@NullUnknown public int[] getSpan(@NonNull Object tag)
tagtag - Built on June 18 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.