-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Main Tab for Core Build local launch configurations.
A new Main Tab was created for Core Build local projects based on the Main Tab used for the classic Managed Build projects. It adds these features: * Option to select a different binary. * Option to control launch pre-builds. The default value for the binary is empty string. With empty string the behaviour for binary selection stays the same as it was. The project name is fixed and cannot be changed. A Core Build launch configuration is created with the project and tied to it. This change relates to #758. It affects all Core Build projects, including CMake projects.
- Loading branch information
1 parent
9b6bb07
commit 014da60
Showing
11 changed files
with
111 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/corebuild/CoreBuildMainTab2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Intel Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package org.eclipse.cdt.launch.ui.corebuild; | ||
|
||
import org.eclipse.cdt.launch.internal.ui.LaunchMessages; | ||
import org.eclipse.cdt.launch.ui.CMainTab2; | ||
import org.eclipse.debug.core.ILaunchConfiguration; | ||
import org.eclipse.swt.widgets.Composite; | ||
|
||
/** | ||
* @since 10.4 | ||
*/ | ||
public class CoreBuildMainTab2 extends CMainTab2 { | ||
|
||
/* | ||
* A Core Build launch configuration is created immediately upon the Core Build project creation. | ||
* It cannot be created by hand and it is not duplicatable and can't be renamed. | ||
* The launch configuration is tied to the project. The project name may not be changed. | ||
*/ | ||
@Override | ||
protected void createProjectGroup(Composite parent, int colSpan) { | ||
super.createProjectGroup(parent, colSpan); | ||
fProjText.setEnabled(false); | ||
fProjButton.setVisible(false); | ||
} | ||
|
||
@Override | ||
protected void createExeFileGroup(Composite parent, int colSpan) { | ||
super.createExeFileGroup(parent, colSpan); | ||
fProgText.setMessage(LaunchMessages.CoreBuildMainTab_Keep_empty_for_auto_selection); | ||
} | ||
|
||
/* | ||
* Don't check the program name if it is empty. When the program name is empty the default | ||
* CoreBuild binary is used. | ||
*/ | ||
@Override | ||
public boolean isValid(ILaunchConfiguration config) { | ||
String programName = fProgText.getText().trim(); | ||
setDontCheckProgram(programName.isEmpty()); | ||
return super.isValid(config); | ||
} | ||
} |