Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove no longer needed reflections #3234

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014, 2022 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2014, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down Expand Up @@ -33,7 +33,6 @@ import org.junit.Test
import static org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil.*
import static extension org.eclipse.xtext.util.Strings.*
import static org.junit.Assert.*
import org.osgi.framework.Version

/**
* @author Jan Koehnlein - Initial contribution and API
Expand Down Expand Up @@ -487,33 +486,18 @@ class BuildAffectionTest {
int foo;
}
''')
if (isCoreResourceGreaterOrEqual_3_17_0) {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
} else {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}

@Test
Expand All @@ -530,33 +514,17 @@ class BuildAffectionTest {
protected int foo;
}
''')
if (isCoreResourceGreaterOrEqual_3_17_0) {
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
} else {
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.client
Built test.client in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}

@Test
Expand All @@ -577,33 +545,17 @@ class BuildAffectionTest {
protected int foo;
}
''')
if (isCoreResourceGreaterOrEqual_3_17_0) {
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
} else {
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.client
Built test.client in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}
assertBuildLogs('''
Building test.project
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}

@Test
Expand Down Expand Up @@ -640,33 +592,18 @@ class BuildAffectionTest {
}
}
''')
if (isCoreResourceGreaterOrEqual_3_17_0) {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
} else {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}

@Test
Expand Down Expand Up @@ -700,35 +637,19 @@ class BuildAffectionTest {
}
}
''')
if (isCoreResourceGreaterOrEqual_3_17_0) {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Bar.xtend
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
} else {
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Bar.xtend
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}
assertBuildLogs('''
Building test.project
indexing platform:/resource/test.project/src/Bar.xtend
indexing platform:/resource/test.project/src/Foo.xtend
Built test.project in \d+ ms
Building test.project
Built test.project in \d+ ms
Building test.client
indexing platform:/resource/test.client/src/Client.xtend
Built test.client in \d+ ms
Building test.client
Built test.client in \d+ ms
''')
}

private def assertBuildLogs(CharSequence expected) {
Expand All @@ -754,10 +675,4 @@ class BuildAffectionTest {
createFile(new Path('test.client/src/' + name + '.xtend'), content.toString)
}

def private static boolean isCoreResourceGreaterOrEqual_3_17_0() {
var version_3_17_0 = new Version(3,17,0)
var installed = ResourcesPlugin.getPlugin().getBundle().getVersion()
return installed >= version_3_17_0
}

}
Loading
Loading