|
29 | 29 | import org.junit.jupiter.api.Assertions; |
30 | 30 |
|
31 | 31 | import org.eclipse.jdt.testplugin.JavaProjectHelper; |
| 32 | +import org.eclipse.jdt.testplugin.JavaTestPlugin; |
32 | 33 | import org.eclipse.jdt.testplugin.TestOptions; |
33 | 34 |
|
34 | 35 | import org.eclipse.core.runtime.CoreException; |
35 | 36 | import org.eclipse.core.runtime.NullProgressMonitor; |
| 37 | +import org.eclipse.core.runtime.Status; |
36 | 38 | import org.eclipse.core.runtime.preferences.IEclipsePreferences; |
37 | 39 | import org.eclipse.core.runtime.preferences.InstanceScope; |
38 | 40 |
|
|
74 | 76 | import org.eclipse.jdt.ui.PreferenceConstants; |
75 | 77 | import org.eclipse.jdt.ui.cleanup.CleanUpOptions; |
76 | 78 | import org.eclipse.jdt.ui.cleanup.ICleanUp; |
| 79 | +import org.eclipse.jdt.ui.tests.util.TestUtils; |
77 | 80 |
|
78 | 81 | import org.eclipse.jdt.internal.ui.JavaPlugin; |
79 | 82 | import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; |
@@ -144,16 +147,19 @@ private void disableAll() throws CoreException { |
144 | 147 | } |
145 | 148 |
|
146 | 149 | protected void disable(String key) throws CoreException { |
| 150 | + JavaTestPlugin.log(Status.info("Disabling: " + key)); |
147 | 151 | fProfile.getSettings().put(key, CleanUpOptions.FALSE); |
148 | 152 | commitProfile(); |
149 | 153 | } |
150 | 154 |
|
151 | 155 | protected void enable(String key) throws CoreException { |
| 156 | + JavaTestPlugin.log(Status.info("Enabling: " + key)); |
152 | 157 | fProfile.getSettings().put(key, CleanUpOptions.TRUE); |
153 | 158 | commitProfile(); |
154 | 159 | } |
155 | 160 |
|
156 | 161 | private void commitProfile() throws CoreException { |
| 162 | + TestUtils.waitForIndexer(); |
157 | 163 | List<Profile> profiles= CleanUpPreferenceUtil.getBuiltInProfiles(); |
158 | 164 | profiles.add(fProfile); |
159 | 165 |
|
|
0 commit comments