Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2005, 2023 IBM Corporation and others.
* Copyright (c) 2005, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -24,7 +24,9 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
Expand Down Expand Up @@ -105,8 +107,11 @@ protected void createMainTypeExtensions(Composite parent) {
fConsiderInheritedMainButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_22, null, false, 2);
fConsiderInheritedMainButton.addSelectionListener(getDefaultListener());

fStopInMainCheckButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_St_op_in_main_1, null, false, 1);
fStopInMainCheckButton.addSelectionListener(getDefaultListener());
ILaunchConfigurationDialog dialog = getLaunchConfigurationDialog();
if (dialog != null && ILaunchManager.DEBUG_MODE.equals(dialog.getMode())) {
fStopInMainCheckButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_Suspend_In_Main, null, false, 1);
fStopInMainCheckButton.addSelectionListener(getDefaultListener());
}
Comment thread
elsazac marked this conversation as resolved.
}

@Override
Expand Down Expand Up @@ -231,7 +236,7 @@ public void performApply(ILaunchConfigurationWorkingCopy config) {
mapResources(config);

// attribute added in 2.1, so null must be used instead of false for backwards compatibility
if (fStopInMainCheckButton.getSelection()) {
if (fStopInMainCheckButton != null && fStopInMainCheckButton.getSelection()) {
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, true);
}
else {
Expand Down Expand Up @@ -315,7 +320,9 @@ private void updateStopInMainFromConfig(ILaunchConfiguration config) {
stop = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, false);
}
catch (CoreException e) {JDIDebugUIPlugin.log(e);}
fStopInMainCheckButton.setSelection(stop);
if (fStopInMainCheckButton != null) {
fStopInMainCheckButton.setSelection(stop);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class LauncherMessages extends NLS {
public static String JavaMainTab_E_xt__jars_6;
public static String JavaMainTab_Main_cla_ss__4;
public static String JavaMainTab_Main_type_not_specified_16;
public static String JavaMainTab_St_op_in_main_1;
public static String JavaMainTab_Suspend_In_Main;
public static String JavaMainTab_19;
public static String JavaMainTab_20;
public static String JavaMainTab_21;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2000, 2022 IBM Corporation and others.
# Copyright (c) 2000, 2026 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -78,7 +78,7 @@ JavaMainTab__Main_19=Main
JavaMainTab_E_xt__jars_6=Includ&e system libraries when searching for a main class
JavaMainTab_Main_cla_ss__4=&Main class:
JavaMainTab_Main_type_not_specified_16=Main type not specified
JavaMainTab_St_op_in_main_1=St&op in main
JavaMainTab_Suspend_In_Main=Suspend in main
JavaMainTab_19=Illegal project name: {0}
JavaMainTab_20=Project {0} does not exist
JavaMainTab_21=Project {0} is closed
Expand Down
Loading