Skip to content

Commit 368f055

Browse files
author
jantje
committed
minor fixes #1126
I keep fighting enablement stuff Not sure it is the right way to go
1 parent c15897f commit 368f055

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

io.sloeber.ManagedBuild/src/io/sloeber/schema/internal/InputType.java

+2
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ public boolean isAssociatedWith(IFile file, IOutputType outputType) {
237237
if (curContentType.isAssociatedWith(file.getName())) {
238238
return true;
239239
}
240+
}
241+
if (mySourceContentTypes.size() > 0) {
240242
return false;
241243
}
242244
if (inputExtensions.contains(file.getFileExtension())) {

io.sloeber.ManagedBuild/src/io/sloeber/schema/internal/enablement/CheckOptionExpression.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public EvaluationResult evaluate(IEvaluationContext context) throws CoreExceptio
5050
AutoBuildConfigurationData autoData = (AutoBuildConfigurationData) context.getDefaultVariable();
5151
IResource resource = (IResource) context.getVariable(KEY_RESOURCE);
5252
String selectedOption = autoData.getSelectedOptions(resource).get(myOptionID);
53-
if ("true".equals(myExpectedValue) && selectedOption != null) { //$NON-NLS-1$
54-
return EvaluationResult.TRUE;
55-
}
56-
if ("false".equals(myExpectedValue) && selectedOption == null) { //$NON-NLS-1$
53+
boolean selectedBoolean = "true".equals(selectedOption); //$NON-NLS-1$
54+
boolean expectedBoolean = "true".equals(myExpectedValue); //$NON-NLS-1$
55+
if (selectedBoolean == expectedBoolean) {
56+
int a = 0;
5757
return EvaluationResult.TRUE;
5858
}
5959
return EvaluationResult.FALSE;

io.sloeber.autoBuild.test/src/io/sloeber/autoBuild/regression/CreateProject.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static Stream<Arguments> projectCreationInfoProvider() {
5656
} else {
5757
ret.add(Arguments.of(projectName, extensionPointID, extensionID, projectID));
5858
}
59-
if (testCounter > 3) {
59+
if (testCounter > 4) {
6060
return ret.stream();
6161
}
6262
}

0 commit comments

Comments
 (0)