Skip to content

Commit 3869eb5

Browse files
author
jantje
committed
#1297 Only generate the ino file once per build
I don't know why all files are given for a build This way sloeber.ino.cpp is always build
1 parent 215b881 commit 3869eb5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

io.sloeber.core/src/io/sloeber/core/builder/inoToCpp.java

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
public class inoToCpp extends IncrementalProjectBuilder {
1616

1717
class SampleDeltaVisitor implements IResourceDeltaVisitor {
18+
private boolean inoFileProcessed = false;
1819
/*
1920
* (non-Javadoc)
2021
*
@@ -23,6 +24,9 @@ class SampleDeltaVisitor implements IResourceDeltaVisitor {
2324
*/
2425
@Override
2526
public boolean visit(IResourceDelta delta) throws CoreException {
27+
if (inoFileProcessed) {
28+
return false;
29+
}
2630
IResource resource = delta.getResource();
2731
if (resource.getFileExtension() != null) {
2832
if (resource.getFileExtension().equalsIgnoreCase("ino") //$NON-NLS-1$
@@ -32,6 +36,7 @@ public boolean visit(IResourceDelta delta) throws CoreException {
3236
} catch (CoreException e) {
3337
e.printStackTrace();
3438
}
39+
inoFileProcessed = true;
3540
return false;
3641
}
3742
}

0 commit comments

Comments
 (0)