mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Merge pull request #72 from 15knots/main
make the cmake error parser public API
This commit is contained in:
commit
9c8986b3b1
8 changed files with 22 additions and 10 deletions
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.cmake.core.tests
|
Bundle-SymbolicName: org.eclipse.cdt.cmake.core.tests
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Fragment-Host: org.eclipse.cdt.cmake.core;bundle-version="1.3.0"
|
Fragment-Host: org.eclipse.cdt.cmake.core;bundle-version="1.5.0"
|
||||||
Automatic-Module-Name: org.eclipse.cdt.cmake.core.tests
|
Automatic-Module-Name: org.eclipse.cdt.cmake.core.tests
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Bundle-Copyright: %Bundle-Copyright
|
Bundle-Copyright: %Bundle-Copyright
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
* SPDX-License-Identifier: EPL-2.0
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.cmake.core.internal;
|
package org.eclipse.cdt.cmake.core;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.cmake.core;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.cmake.core;singleton:=true
|
||||||
Bundle-Version: 1.4.400.qualifier
|
Bundle-Version: 1.5.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.cmake.core.internal.Activator
|
Bundle-Activator: org.eclipse.cdt.cmake.core.internal.Activator
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
* SPDX-License-Identifier: EPL-2.0
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.cmake.core.internal;
|
package org.eclipse.cdt.cmake.core;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -17,6 +17,7 @@ import java.util.Objects;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.cmake.core.internal.Activator;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
@ -35,8 +36,9 @@ import org.eclipse.core.runtime.Status;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Martin Weber
|
* @author Martin Weber
|
||||||
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
/* package */ class CMakeErrorParser implements AutoCloseable {
|
public class CMakeErrorParser implements AutoCloseable {
|
||||||
|
|
||||||
/** matches the Start of a message, also ending the previous message */
|
/** matches the Start of a message, also ending the previous message */
|
||||||
private static final Pattern PTN_MSG_START;
|
private static final Pattern PTN_MSG_START;
|
|
@ -9,12 +9,14 @@
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
* SPDX-License-Identifier: EPL-2.0
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.cmake.core.internal;
|
package org.eclipse.cdt.cmake.core;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Objects;
|
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.IContainer;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -27,6 +29,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
* Default implementation of {@code ICMakeExecutionMarkerFactory}.
|
* Default implementation of {@code ICMakeExecutionMarkerFactory}.
|
||||||
*
|
*
|
||||||
* @author Martin Weber
|
* @author Martin Weber
|
||||||
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
public class CMakeExecutionMarkerFactory implements ICMakeExecutionMarkerFactory {
|
public class CMakeExecutionMarkerFactory implements ICMakeExecutionMarkerFactory {
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
* SPDX-License-Identifier: EPL-2.0
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.cmake.core.internal;
|
package org.eclipse.cdt.cmake.core;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.cmake.core.internal.Activator;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -21,9 +22,10 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* build.
|
* build.
|
||||||
*
|
*
|
||||||
* @author Martin Weber
|
* @author Martin Weber
|
||||||
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
interface ICMakeExecutionMarkerFactory {
|
public interface ICMakeExecutionMarkerFactory {
|
||||||
|
|
||||||
/** ID for error markers related to execution of the cmake tool.
|
/** ID for error markers related to execution of the cmake tool.
|
||||||
* @see IResource#createMarker(String)
|
* @see IResource#createMarker(String)
|
|
@ -9,7 +9,7 @@
|
||||||
* SPDX-License-Identifier: EPL-2.0
|
* SPDX-License-Identifier: EPL-2.0
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.cmake.core.internal;
|
package org.eclipse.cdt.cmake.core;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
@ -20,8 +20,9 @@ import org.eclipse.cdt.core.ConsoleOutputStream;
|
||||||
* Intercepts output to a console output stream and forwards it to a CMakeErrorParser for processing.
|
* Intercepts output to a console output stream and forwards it to a CMakeErrorParser for processing.
|
||||||
*
|
*
|
||||||
* @author Martin Weber
|
* @author Martin Weber
|
||||||
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
class ParsingConsoleOutputStream extends ConsoleOutputStream {
|
public class ParsingConsoleOutputStream extends ConsoleOutputStream {
|
||||||
|
|
||||||
private final ConsoleOutputStream os;
|
private final ConsoleOutputStream os;
|
||||||
private final CMakeErrorParser parser;
|
private final CMakeErrorParser parser;
|
|
@ -24,8 +24,12 @@ import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
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.ICMakeToolChainFile;
|
||||||
import org.eclipse.cdt.cmake.core.ICMakeToolChainManager;
|
import org.eclipse.cdt.cmake.core.ICMakeToolChainManager;
|
||||||
|
import org.eclipse.cdt.cmake.core.ParsingConsoleOutputStream;
|
||||||
import org.eclipse.cdt.cmake.core.internal.CommandDescriptorBuilder.CommandDescriptor;
|
import org.eclipse.cdt.cmake.core.internal.CommandDescriptorBuilder.CommandDescriptor;
|
||||||
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
|
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
|
||||||
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties;
|
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties;
|
||||||
|
|
Loading…
Add table
Reference in a new issue