diff --git a/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF b/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF index e1c1eadc09f..e805cfdfcc0 100644 --- a/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF +++ b/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.cmake.core;singleton:=true -Bundle-Version: 1.5.600.qualifier +Bundle-Version: 1.6.0.qualifier Bundle-Activator: org.eclipse.cdt.cmake.core.internal.Activator Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime, diff --git a/cmake/org.eclipse.cdt.cmake.core/plugin.xml b/cmake/org.eclipse.cdt.cmake.core/plugin.xml index 2eddfcaddac..d123f4c83ae 100644 --- a/cmake/org.eclipse.cdt.cmake.core/plugin.xml +++ b/cmake/org.eclipse.cdt.cmake.core/plugin.xml @@ -15,7 +15,7 @@ diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfiguration.java similarity index 97% rename from cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java rename to cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfiguration.java index 3645c1f4948..5b437b7bd35 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfiguration.java @@ -8,7 +8,7 @@ * * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.cdt.cmake.core.internal; +package org.eclipse.cdt.cmake.core; import java.io.File; import java.io.IOException; @@ -26,13 +26,13 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import org.eclipse.cdt.cmake.core.CMakeErrorParser; -import org.eclipse.cdt.cmake.core.CMakeExecutionMarkerFactory; -import org.eclipse.cdt.cmake.core.ICMakeExecutionMarkerFactory; -import org.eclipse.cdt.cmake.core.ICMakeToolChainFile; -import org.eclipse.cdt.cmake.core.ICMakeToolChainManager; -import org.eclipse.cdt.cmake.core.ParsingConsoleOutputStream; +import org.eclipse.cdt.cmake.core.internal.Activator; +import org.eclipse.cdt.cmake.core.internal.CMakeConsoleWrapper; +import org.eclipse.cdt.cmake.core.internal.CMakePropertiesController; +import org.eclipse.cdt.cmake.core.internal.CMakeUtils; +import org.eclipse.cdt.cmake.core.internal.CommandDescriptorBuilder; import org.eclipse.cdt.cmake.core.internal.CommandDescriptorBuilder.CommandDescriptor; +import org.eclipse.cdt.cmake.core.internal.IOsOverridesSelector; import org.eclipse.cdt.cmake.core.properties.CMakeGenerator; import org.eclipse.cdt.cmake.core.properties.ICMakeProperties; import org.eclipse.cdt.cmake.core.properties.ICMakePropertiesController; @@ -71,6 +71,9 @@ import org.eclipse.debug.core.ILaunchManager; import org.osgi.service.prefs.Preferences; +/** + * @since 1.6 + */ public class CMakeBuildConfiguration extends CBuildConfiguration { public static final String CMAKE_USE_UI_OVERRIDES = "cmake.use.ui.overrides"; //$NON-NLS-1$ @@ -86,7 +89,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration { private ICMakeToolChainFile toolChainFile; // lazily instantiated.. - private CMakePropertiesController pc; + private ICMakePropertiesController pc; private Map infoPerResource; /** @@ -385,7 +388,7 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx /** Lazily creates the CMakePropertiesController for the project. */ - private CMakePropertiesController getPropertiesController() { + private ICMakePropertiesController getPropertiesController() { if (pc == null) { final Path filePath = Path.of(getProject().getFile(".settings/CDT-cmake.yaml").getLocationURI()); //$NON-NLS-1$ pc = new CMakePropertiesController(filePath, () -> { diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfigurationProvider.java similarity index 97% rename from cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java rename to cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfigurationProvider.java index 4775a04a234..ab2b976a532 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfigurationProvider.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeBuildConfigurationProvider.java @@ -8,14 +8,13 @@ * * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.cdt.cmake.core.internal; +package org.eclipse.cdt.cmake.core; import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.eclipse.cdt.cmake.core.ICMakeToolChainFile; -import org.eclipse.cdt.cmake.core.ICMakeToolChainManager; +import org.eclipse.cdt.cmake.core.internal.Activator; import org.eclipse.cdt.core.build.ICBuildConfiguration; import org.eclipse.cdt.core.build.ICBuildConfigurationManager; import org.eclipse.cdt.core.build.ICBuildConfigurationProvider; @@ -27,6 +26,9 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platform; +/** + * @since 1.6 + */ public class CMakeBuildConfigurationProvider implements ICBuildConfigurationProvider { public static final String ID = "org.eclipse.cdt.cmake.core.provider"; //$NON-NLS-1$ diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeExecutionMarkerFactory.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeExecutionMarkerFactory.java index 42836613ab8..ddc855e42cf 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeExecutionMarkerFactory.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/CMakeExecutionMarkerFactory.java @@ -16,7 +16,6 @@ import java.util.Objects; import org.eclipse.cdt.cmake.core.internal.Activator; -import org.eclipse.cdt.cmake.core.internal.Messages; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/Messages.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/Messages.java similarity index 86% rename from cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/Messages.java rename to cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/Messages.java index 03e52d66e9f..9942be793b2 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/Messages.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/Messages.java @@ -8,12 +8,15 @@ * * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.cdt.cmake.core.internal; +package org.eclipse.cdt.cmake.core; import org.eclipse.osgi.util.NLS; +/** + * @since 1.6 + */ public class Messages extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.cdt.cmake.core.internal.messages"; //$NON-NLS-1$ + private static final String BUNDLE_NAME = "org.eclipse.cdt.cmake.core.messages"; //$NON-NLS-1$ public static String CMakeBuildConfiguration_Building; public static String CMakeBuildConfiguration_BuildingIn; public static String CMakeBuildConfiguration_BuildingComplete; @@ -22,8 +25,6 @@ public class Messages extends NLS { public static String CMakeBuildConfiguration_Configuring; public static String CMakeBuildConfiguration_ExitFailure; public static String CMakeBuildConfiguration_NotFound; - public static String CMakeBuildConfiguration_ProcCompCmds; - public static String CMakeBuildConfiguration_ProcCompJson; public static String CMakeBuildConfiguration_Failure; public static String CMakeErrorParser_NotAWorkspaceResource; static { diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeConsoleWrapper.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeConsoleWrapper.java index 05a9263ff1f..c00fbd7e519 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeConsoleWrapper.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeConsoleWrapper.java @@ -21,9 +21,10 @@ /** Intercepts output to a console and forwards its error stream to a stream that does error parsing for processing. * @author Martin Weber - * + * @noinstantiate + * @noextend */ -class CMakeConsoleWrapper implements IConsole { +public class CMakeConsoleWrapper implements IConsole { private final IConsole delegate; private final ConsoleOutputStream err; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakePropertiesController.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakePropertiesController.java index 27560eec006..ffdb2f6b85e 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakePropertiesController.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakePropertiesController.java @@ -40,8 +40,10 @@ * A {@code ICMakePropertiesController} that monitors modifications to the project properties that force * us to delete file CMakeCache.txt to avoid complaints by cmake. * @author Martin Weber + * @noinstantiate + * @noextend */ -class CMakePropertiesController implements ICMakePropertiesController { +public class CMakePropertiesController implements ICMakePropertiesController { private final Path storageFile; private final Runnable cmakeCacheDirtyMarker; @@ -62,7 +64,7 @@ class CMakePropertiesController implements ICMakePropertiesController { * the object to notify when modifications to the project properties force * us to delete file CMakeCache.txt to avoid complaints by cmake */ - CMakePropertiesController(Path storageFile, Runnable cmakeCacheDirtyMarker) { + public CMakePropertiesController(Path storageFile, Runnable cmakeCacheDirtyMarker) { this.storageFile = Objects.requireNonNull(storageFile); this.cmakeCacheDirtyMarker = Objects.requireNonNull(cmakeCacheDirtyMarker); } diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainFile.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainFile.java index b99b792451c..01d7b0a2290 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainFile.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainFile.java @@ -15,6 +15,7 @@ import java.util.HashMap; import java.util.Map; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; import org.eclipse.cdt.cmake.core.ICMakeToolChainFile; import org.eclipse.cdt.core.build.IToolChain; import org.eclipse.cdt.core.build.IToolChainManager; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainManager.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainManager.java index b4121d0b5aa..be78a65aa96 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainManager.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeToolChainManager.java @@ -22,6 +22,7 @@ import java.util.Map; import java.util.Map.Entry; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; import org.eclipse.cdt.cmake.core.CMakeToolChainEvent; import org.eclipse.cdt.cmake.core.ICMakeToolChainFile; import org.eclipse.cdt.cmake.core.ICMakeToolChainListener; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CommandDescriptorBuilder.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CommandDescriptorBuilder.java index 715ce1b8743..d8e20b778cb 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CommandDescriptorBuilder.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CommandDescriptorBuilder.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Objects; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; import org.eclipse.cdt.cmake.core.properties.CMakeGenerator; import org.eclipse.cdt.cmake.core.properties.ICMakeProperties; import org.eclipse.cdt.cmake.core.properties.IOsOverrides; @@ -28,8 +29,10 @@ * and/or for performing the actual build of a project. * * @author Martin Weber + * @noinstantiate + * @noextend */ -class CommandDescriptorBuilder { +public class CommandDescriptorBuilder { private final ICMakeProperties cmakeProperties; private final IOsOverridesSelector overridesSelector; @@ -37,7 +40,7 @@ class CommandDescriptorBuilder { /** * @param cmakeProperties the project properties related to the cmake command */ - CommandDescriptorBuilder(ICMakeProperties cmakeProperties, IOsOverridesSelector overridesSelector) { + public CommandDescriptorBuilder(ICMakeProperties cmakeProperties, IOsOverridesSelector overridesSelector) { this.cmakeProperties = Objects.requireNonNull(cmakeProperties); this.overridesSelector = Objects.requireNonNull(overridesSelector); } @@ -51,7 +54,7 @@ class CommandDescriptorBuilder { * @return the command-line arguments and environment to invoke cmake. * @throws CoreException */ - CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException { + public CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException { List args = new ArrayList<>(); List env = new ArrayList<>(); @@ -107,7 +110,7 @@ CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException * @return the command-line arguments and environment to invoke cmake. * @throws CoreException */ - CommandDescriptor makeCMakeBuildCommandline(String buildscriptTarget) throws CoreException { + public CommandDescriptor makeCMakeBuildCommandline(String buildscriptTarget) throws CoreException { List args = new ArrayList<>(); List env = new ArrayList<>(); @@ -171,7 +174,7 @@ private static void appendCMakeOsOverrideArgs(List args, final IOsOverri * Command-line arguments and additional environment variables to be used to run a process. * @author Martin Weber */ - static final class CommandDescriptor { + public static final class CommandDescriptor { private final List arguments; private final List environment; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/IOsOverridesSelector.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/IOsOverridesSelector.java index 4154551728c..9eaf9e40062 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/IOsOverridesSelector.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/IOsOverridesSelector.java @@ -19,8 +19,9 @@ * project build. * * @author Martin Weber + * @noimplement */ -interface IOsOverridesSelector { +public interface IOsOverridesSelector { /** * Gets the overrides from the specified {@code ICMakeProperties} object that match the target * operating system.
diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/properties/AbstractOsOverrides.java b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/properties/AbstractOsOverrides.java index d2b644ce404..8d5909c74d5 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/properties/AbstractOsOverrides.java +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/properties/AbstractOsOverrides.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.Objects; -import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfiguration; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; import org.eclipse.cdt.cmake.core.properties.CMakeGenerator; import org.eclipse.cdt.cmake.core.properties.IOsOverrides; diff --git a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/messages.properties b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/messages.properties similarity index 89% rename from cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/messages.properties rename to cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/messages.properties index caf58d32a5b..5d914f644aa 100644 --- a/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/messages.properties +++ b/cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/messages.properties @@ -16,7 +16,5 @@ CMakeBuildConfiguration_Configuring=Configuring in: %s\n CMakeBuildConfiguration_Cleaning=Cleaning %s CMakeBuildConfiguration_ExitFailure=%1$s exited with status %2$d. See CDT build console for details. CMakeBuildConfiguration_NotFound=CMakeFiles not found. Assuming clean. -CMakeBuildConfiguration_ProcCompCmds=Processing compile commands %s -CMakeBuildConfiguration_ProcCompJson=Processing compile_commands.json CMakeBuildConfiguration_Failure=Failure running cmake: %s\n CMakeErrorParser_NotAWorkspaceResource=Could not map %s to a workspace resource. Did the build run in a container? diff --git a/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java b/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java index 8d8b77064d2..8ab0d8db6b7 100644 --- a/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java +++ b/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java @@ -13,8 +13,8 @@ import java.util.HashMap; import java.util.Map; -import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfiguration; -import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfigurationProvider; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; +import org.eclipse.cdt.cmake.core.CMakeBuildConfigurationProvider; import org.eclipse.cdt.core.build.ICBuildConfiguration; import org.eclipse.cdt.launch.ui.corebuild.CommonBuildTab; import org.eclipse.debug.core.ILaunchConfiguration; diff --git a/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/NewCMakeToolChainFilePage.java b/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/NewCMakeToolChainFilePage.java index 9fddd8e91e7..783089b62fd 100644 --- a/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/NewCMakeToolChainFilePage.java +++ b/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/NewCMakeToolChainFilePage.java @@ -12,9 +12,9 @@ import java.nio.file.Paths; +import org.eclipse.cdt.cmake.core.CMakeBuildConfiguration; import org.eclipse.cdt.cmake.core.ICMakeToolChainFile; import org.eclipse.cdt.cmake.core.ICMakeToolChainManager; -import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfiguration; import org.eclipse.cdt.core.build.IToolChain; import org.eclipse.cdt.core.build.IToolChainManager; import org.eclipse.core.runtime.CoreException; diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java index 33b5772d208..d897779d807 100644 --- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java +++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java @@ -14,8 +14,8 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import org.eclipse.cdt.cmake.core.CMakeBuildConfigurationProvider; import org.eclipse.cdt.cmake.core.CMakeNature; -import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfigurationProvider; import org.eclipse.cdt.core.CCProjectNature; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CProjectNature;