Skip to content

Commit 6a99583

Browse files
author
jan
committed
remove isSimplerule as this needs to be true anyway
1 parent 7532c65 commit 6a99583

File tree

3 files changed

+23
-41
lines changed

3 files changed

+23
-41
lines changed

io.sloeber.autoBuild/src/io/sloeber/autoBuild/api/IAutoBuildMakeRule.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public interface IAutoBuildMakeRule {
3636
* otherwise false
3737
*/
3838

39-
boolean isSimpleRule();
4039

4140
int getSequenceGroupID();
4241

io.sloeber.autoBuild/src/io/sloeber/autoBuild/extensionPoint/providers/AutoBuildMakeRule.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -373,21 +373,6 @@ public void addPrerequisites(IInputType inputType, Set<IFile> files) {
373373
}
374374
}
375375

376-
/**
377-
* A simple rule is a rule that takes exactly 1 input type and exactly 1 output
378-
* type containing exactly 1 file
379-
*
380-
* @return true if this rule is a simple rule otherwise false
381-
*/
382-
383-
@Override
384-
public boolean isSimpleRule() {
385-
if ((myTargets.size() != 1) || (myPrerequisites.size() != 1)) {
386-
return false;
387-
}
388-
return true;
389-
390-
}
391376

392377
@Override
393378
public boolean isTool(ITool tool) {

io.sloeber.autoBuild/src/io/sloeber/autoBuild/extensionPoint/providers/AutoBuildMakeRules.java

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -53,35 +53,33 @@ public Set<IContainer> getFoldersThatContainSourceFiles(){
5353

5454
@Override
5555
public void addRule(IAutoBuildMakeRule newMakeRule) {
56-
if (newMakeRule.isSimpleRule()) {
57-
Map<IOutputType, Set<IFile>> targets = newMakeRule.getTargets();
58-
59-
IOutputType outputType = null;
60-
IFile correctOutputPath = null;
61-
for (Entry<IOutputType, Set<IFile>> curTarget : targets.entrySet()) {
62-
outputType = curTarget.getKey();
63-
correctOutputPath = curTarget.getValue().toArray(new IFile[1])[0];
64-
}
65-
AutoBuildMakeRule makerule = (AutoBuildMakeRule)findTarget(outputType, correctOutputPath);
66-
if (makerule != null) {
67-
Map<IInputType, Set<IFile>> prerequisites = newMakeRule.getPrerequisites();
56+
Map<IOutputType, Set<IFile>> targets = newMakeRule.getTargets();
6857

69-
IInputType inputType = null;
70-
Set<IFile> files = null;
58+
IOutputType outputType = null;
59+
IFile correctOutputPath = null;
60+
for (Entry<IOutputType, Set<IFile>> curTarget : targets.entrySet()) {
61+
outputType = curTarget.getKey();
62+
correctOutputPath = curTarget.getValue().toArray(new IFile[1])[0];
63+
}
64+
AutoBuildMakeRule makerule = (AutoBuildMakeRule) findTarget(outputType, correctOutputPath);
65+
if (makerule != null) {
66+
Map<IInputType, Set<IFile>> prerequisites = newMakeRule.getPrerequisites();
7167

72-
for (Entry<IInputType, Set<IFile>> curTarget : prerequisites.entrySet()) {
73-
inputType = curTarget.getKey();
74-
files = curTarget.getValue();
75-
makerule.addPrerequisites(inputType, files);
76-
}
68+
IInputType inputType = null;
69+
Set<IFile> files = null;
7770

78-
makerule.setSequenceGroupID(newMakeRule.getSequenceGroupID());
79-
} else {
80-
myMakeRules.add(newMakeRule);
81-
}
82-
}
71+
for (Entry<IInputType, Set<IFile>> curTarget : prerequisites.entrySet()) {
72+
inputType = curTarget.getKey();
73+
files = curTarget.getValue();
74+
makerule.addPrerequisites(inputType, files);
75+
}
8376

84-
}
77+
makerule.setSequenceGroupID(newMakeRule.getSequenceGroupID());
78+
} else {
79+
myMakeRules.add(newMakeRule);
80+
}
81+
82+
}
8583

8684
public IAutoBuildMakeRule findTarget(IOutputType outputType, IFile correctOutputPath) {
8785
for (IAutoBuildMakeRule makeRule : myMakeRules) {

0 commit comments

Comments
 (0)