-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Restored class CoreBuildMainTab, because it is used by others. Created a new class CoreBuildMainTab2. * Initialize CMainTab2.fDontCheckProgram.
- Loading branch information
1 parent
5639ba9
commit 9e9be4a
Showing
4 changed files
with
114 additions
and
32 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
60 changes: 60 additions & 0 deletions
60
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,60 @@ | ||
/******************************************************************************* | ||
* 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); | ||
} | ||
|
||
/* | ||
* For Core Build projects the build configuration is hidden and it is selected | ||
* via the LaunchBar Launch Mode. We remove the BuildConfigCombo. | ||
*/ | ||
@Override | ||
protected void createBuildConfigCombo(Composite parent, int colspan) { | ||
fBuildConfigCombo = null; | ||
} | ||
|
||
/* | ||
* 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); | ||
} | ||
} |