|
org.netbeans.modules.java.source 0.80.1 17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.java.source.ModificationResult
public final class ModificationResult
Class that collects changes built during a modification task run.
Nested Class Summary | |
---|---|
static class |
ModificationResult.Difference
|
Method Summary | |
---|---|
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<org.netbeans.modules.parsing.api.Source> sources,
org.netbeans.modules.parsing.api.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@NonNull public static ModificationResult runModificationTask(@NonNull Collection<org.netbeans.modules.parsing.api.Source> sources, @NonNull org.netbeans.modules.parsing.api.UserTask task) throws org.netbeans.modules.parsing.spi.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 performed
ModificationResult
org.netbeans.modules.parsing.spi.ParseException
@NonNull public Set<? extends FileObject> getModifiedFileObjects()
public List<? extends ModificationResult.Difference> getDifferences(@NonNull FileObject fo)
@NonNull public Set<File> getNewFiles()
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 ModificationResult
IOException
@NullUnknown public int[] getSpan(@NonNull Object tag)
tag
tag
-
|
org.netbeans.modules.java.source 0.80.1 17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |