Skip to content

Commit

Permalink
Merge branch 'main' into terminal-bug-494
Browse files Browse the repository at this point in the history
  • Loading branch information
maxoleksiv-ifx committed Aug 18, 2023
2 parents 17c8c5c + c9a38e5 commit 684d8db
Show file tree
Hide file tree
Showing 84 changed files with 994 additions and 451 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# to allow github to index the build directory
# we need to override the defaults of github here
# see https://docs.github.com/en/search-github/searching-on-github/finding-files-on-github
build/** linguist-generated=false

* text=auto

# Generic files
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5
with:
maven-version: 3.9.2
- name: Install GCC & GDB & other build essentials
run: |
sudo apt-get -y install build-essential gcc g++ gdb gdbserver
Expand All @@ -42,7 +46,6 @@ jobs:
clean verify -B -V \
-Dmaven.test.failure.ignore=true \
-DexcludedGroups=flakyTest,slowTest \
-P baseline-compare-and-replace \
-P build-standalone-debugger-rcp \
-Ddsf.gdb.tests.timeout.multiplier=50 \
-Ddsf-gdb.skip.tests=$(test ${{ steps.filter.outputs.dsf }} == 'false' && echo 'true' || echo 'false') \
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/code-cleanliness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5
with:
maven-version: 3.9.2
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
Expand All @@ -25,7 +29,11 @@ jobs:
run: |
curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz | tar xz
- name: Run Check Code Cleanliness
run: ECLIPSE=$PWD/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh
run: ECLIPSE=$PWD/eclipse/eclipse ./releng/scripts/check_code_cleanliness_only.sh
- name: Run Bundle Versions Bumped
run: ./releng/scripts/check_bundle_versions.sh
- name: Report on Bundle Versions Bumped
run: ./releng/scripts/check_bundle_versions_report.sh
- name: Upload Logs
uses: actions/upload-artifact@v3
if: success() || failure()
Expand Down
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>3.0.3</version>
<version>4.0.1</version>
</extension>
</extensions>
4 changes: 4 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ replace. To do that run with the `baseline-compare-and-replace` profile.

Requires verify phase of maven to run, i.e. will not run with `mvn package` even if profile is specified.

#### api-baseline-check

`api-baseline-check` checks the API of CDT matches the [API policy](https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md#api)

#### production

Runs the production steps of the build. This profile can only be run on the CDT CI machines
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pipeline {
-Dmaven.test.failure.ignore=true \
-DexcludedGroups=flakyTest,slowTest \
-P baseline-compare-and-replace \
-P api-baseline-check \
-Ddsf.gdb.tests.timeout.multiplier=50 \
-Dindexer.timeout=300 \
-P production \
Expand Down
4 changes: 2 additions & 2 deletions build/org.eclipse.cdt.autotools.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.cdt.autotools.core;singleton:=true
Bundle-Version: 2.2.0.qualifier
Bundle-Version: 2.2.100.qualifier
Bundle-Activator: org.eclipse.cdt.autotools.core.AutotoolsPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
Expand All @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
org.eclipse.core.resources;bundle-version="3.4.0",
org.eclipse.ui.ide;bundle-version="3.4.0",
org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
org.eclipse.cdt.core;bundle-version="6.5.0",
org.eclipse.cdt.core;bundle-version="8.3.0",
org.eclipse.cdt.ui;bundle-version="5.1.0",
org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.util.Random;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature;
Expand All @@ -38,6 +37,7 @@
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfiguration.Option;
import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.cdt.managedbuilder.core.BuildException;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
Expand All @@ -55,6 +55,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Expand Down Expand Up @@ -203,8 +204,7 @@ private Map<String, IAConfiguration> getSavedConfigs(IProject project) {
IPath fileLocation = project.getLocation().append(CFG_FILE_NAME);
File dirFile = fileLocation.toFile();
Map<String, IAConfiguration> cfgList = new HashMap<>();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
if (dirFile.exists()) {
Document d = db.parse(dirFile);
Element e = d.getDocumentElement();
Expand Down Expand Up @@ -269,7 +269,8 @@ else if (nameNode != null) {
}
}
} catch (ParserConfigurationException | SAXException | IOException e) {
e.printStackTrace();
Platform.getLog(AutotoolsConfigurationManager.class)
.error("Error while parsing .autotools file in project", e); //$NON-NLS-1$
}
}
return list;
Expand Down
4 changes: 2 additions & 2 deletions build/org.eclipse.cdt.autotools.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.cdt.autotools.tests;singleton:=true
Bundle-Version: 2.1.0.qualifier
Bundle-Version: 2.1.100.qualifier
Bundle-Vendor: %provider
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Expand All @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
org.junit,
org.eclipse.ui.ide,
org.eclipse.jface.text,
org.eclipse.cdt.core,
org.eclipse.cdt.core;bundle-version="8.3.0",
org.eclipse.cdt.autotools.ui;bundle-version="1.0.0",
org.eclipse.cdt.core.tests
Bundle-ActivationPolicy: lazy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import java.util.Map;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.eclipse.cdt.autotools.core.AutotoolsOptionConstants;
import org.eclipse.cdt.autotools.core.IAutotoolsOption;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
Expand Down Expand Up @@ -535,8 +535,7 @@ public void testGetAndUpdateConfigureOptions() throws Exception {
try {
IPath fileLocation = testProject.getLocation().append(".autotools"); //$NON-NLS-1$
File dirFile = fileLocation.toFile();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
assertTrue(dirFile.exists());
Document d = db.parse(dirFile);
Element e = d.getDocumentElement();
Expand Down
4 changes: 2 additions & 2 deletions build/org.eclipse.cdt.autotools.ui.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.cdt.autotools.ui.tests
Bundle-Version: 1.1.0.qualifier
Bundle-Version: 1.1.100.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.swtbot.go,
org.eclipse.core.resources,
org.eclipse.cdt.core
org.eclipse.cdt.core;bundle-version="8.3.0"
Bundle-ActivationPolicy: lazy
Fragment-Host: org.eclipse.cdt.autotools.ui
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.regex.Pattern;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
Expand Down Expand Up @@ -108,8 +108,7 @@ public void t1canSetConfigParm() throws Exception {
File f = new File(path.toOSString());
assertTrue(f.exists());

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
Document d = db.parse(f);
Element e = d.getDocumentElement();
// Get the stored configuration data
Expand Down Expand Up @@ -320,8 +319,7 @@ public void t3newConfigCopiesParms() throws Exception {
path = project.getLocation().append(".autotools");
f = new File(path.toOSString());
assertTrue(f.exists());
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
DocumentBuilder db = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
Document d = db.parse(f);
Element e = d.getDocumentElement();
// Get the stored configuration data
Expand Down
4 changes: 2 additions & 2 deletions build/org.eclipse.cdt.autotools.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.cdt.autotools.ui;singleton:=true
Bundle-Version: 2.2.100.qualifier
Bundle-Version: 2.2.200.qualifier
Bundle-Activator: org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin
Bundle-Localization: plugin
Bundle-Vendor: %provider
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.cdt.autotools.core;bundle-version="1.0.0",
org.eclipse.cdt.core;bundle-version="5.1.0",
org.eclipse.cdt.core;bundle-version="8.3.0",
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.cdt.managedbuilder.core;bundle-version="6.0.0",
org.eclipse.jface.text;bundle-version="3.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.eclipse.cdt.internal.autotools.ui.HTMLPrinter;
import org.eclipse.cdt.internal.autotools.ui.HTMLTextPresenter;
import org.eclipse.cdt.internal.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -168,12 +169,14 @@ protected static Document getACDoc(String acDocVer) {
docStream = new FileInputStream(p.toFile());
}
}
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilderFactory factory = XmlProcessorFactoryCdt
.createDocumentBuilderFactoryIgnoringDOCTYPE();
factory.setValidating(false);
try {
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(docStream);
} catch (SAXException | ParserConfigurationException | IOException saxEx) {
AutotoolsPlugin.log(saxEx);
doc = null;
} finally {
if (docStream != null)
Expand Down Expand Up @@ -218,7 +221,8 @@ protected static Document getAMDoc(String amDocVer) {
docStream = new FileInputStream(p.toFile());
}
}
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilderFactory factory = XmlProcessorFactoryCdt
.createDocumentBuilderFactoryIgnoringDOCTYPE();
factory.setValidating(false);
try {
DocumentBuilder builder = factory.newDocumentBuilder();
Expand Down
4 changes: 2 additions & 2 deletions build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.make.core; singleton:=true
Bundle-Version: 7.6.200.qualifier
Bundle-Version: 7.6.300.qualifier
Bundle-Activator: org.eclipse.cdt.make.core.MakeCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand All @@ -19,7 +19,7 @@ Export-Package: org.eclipse.cdt.make.core,
org.eclipse.cdt.make.internal.core.scannerconfig.jobs;x-internal:=true,
org.eclipse.cdt.make.internal.core.scannerconfig.util;x-internal:=true,
org.eclipse.cdt.make.internal.core.scannerconfig2;x-internal:=true
Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.1.100,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
import java.util.List;
import java.util.Map.Entry;

import javax.xml.parsers.DocumentBuilderFactory;

import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ICDescriptor;
import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.XmlStorageUtil;
import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.cdt.make.core.IMakeCommonBuildInfo;
import org.eclipse.cdt.make.core.IMakeTarget;
import org.eclipse.cdt.make.core.MakeCorePlugin;
Expand Down Expand Up @@ -237,7 +236,7 @@ public void saveTargets() throws CoreException {
*/
protected ICStorageElement translateInputStreamToDocument(InputStream input) {
try {
Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(input);
Document document = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE().parse(input);
return XmlStorageUtil.createCStorageTree(document);
} catch (Exception e) {
MakeCorePlugin.log(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@
import java.util.Map;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.eclipse.cdt.internal.core.XmlProcessorFactoryCdt;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredScannerInfoSerializable;
import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
Expand Down Expand Up @@ -159,7 +158,7 @@ private Document getDocument(IProject project) throws CoreException {
Document document = ref != null ? ref.get() : null;
if (document == null) {
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
DocumentBuilder builder = XmlProcessorFactoryCdt.createDocumentBuilderWithErrorOnDOCTYPE();
IPath path = getDiscoveredScannerConfigStore(project);
if (path.toFile().exists()) {
// read form file
Expand Down Expand Up @@ -292,7 +291,8 @@ public void saveDiscoveredScannerInfoToState(IProject project, InfoContext conte

// Transform the document to something we can save in a file
ByteArrayOutputStream stream = new ByteArrayOutputStream();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
Transformer transformer = XmlProcessorFactoryCdt.createTransformerFactoryWithErrorOnDOCTYPE()
.newTransformer();
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Export-Package: org.eclipse.cdt.build.core.scannerconfig,
org.eclipse.cdt.managedbuilder.templateengine,
org.eclipse.cdt.managedbuilder.templateengine.processes,
org.eclipse.cdt.newmake.core
Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.0.0,9.0.0)",
Require-Bundle: org.eclipse.cdt.core;bundle-version="[8.3.0,9.0.0)",
org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
Expand Down
Loading

0 comments on commit 684d8db

Please sign in to comment.