Skip to content

Commit 07bbf0c

Browse files
authored
Merge pull request #38 from eharris369/37-changeAttachDebuggerLabelForNodeJS
Issue #37: Change attach debugger label for Node.js projects
2 parents 8319eec + c01b1ae commit 07bbf0c

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

dev/com.ibm.microclimate.ui/src/com/ibm/microclimate/ui/internal/actions/AttachDebuggerAction.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.ibm.microclimate.core.internal.MCEclipseApplication;
1919
import com.ibm.microclimate.core.internal.MCLogger;
2020
import com.ibm.microclimate.core.internal.constants.AppState;
21+
import com.ibm.microclimate.core.internal.constants.ProjectType;
2122
import com.ibm.microclimate.core.internal.constants.StartMode;
2223
import com.ibm.microclimate.ui.internal.messages.Messages;
2324

@@ -41,6 +42,11 @@ public void selectionChanged(IStructuredSelection sel) {
4142
Object obj = sel.getFirstElement();
4243
if (obj instanceof MCEclipseApplication) {
4344
app = (MCEclipseApplication) obj;
45+
if (app.projectType.isLanguage(ProjectType.LANGUAGE_NODEJS)) {
46+
this.setText(Messages.LaunchDebugSessionLabel);
47+
} else {
48+
this.setText(Messages.AttachDebuggerLabel);
49+
}
4450
if (app.isAvailable() && StartMode.DEBUG_MODES.contains(app.getStartMode()) && app.getDebugPort() != -1 &&
4551
(app.getAppState() == AppState.STARTED || app.getAppState() == AppState.STARTING)) {
4652
setEnabled(app.canAttachDebugger());

dev/com.ibm.microclimate.ui/src/com/ibm/microclimate/ui/internal/messages/Messages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public class Messages extends NLS {
6969

7070
public static String ValidateLabel;
7171
public static String AttachDebuggerLabel;
72+
public static String LaunchDebugSessionLabel;
7273
public static String refreshResourceJobLabel;
7374
public static String RefreshResourceError;
7475

dev/com.ibm.microclimate.ui/src/com/ibm/microclimate/ui/internal/messages/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ ActionNewConnection=&New Microclimate Connection
6262

6363
ValidateLabel=Validate
6464
AttachDebuggerLabel=A&ttach Debugger
65+
LaunchDebugSessionLabel=&Launch Debug Session
6566
refreshResourceJobLabel=Refreshing resource: {0}
6667
RefreshResourceError=An error occurred while trying to refresh the {0} resource.
6768

0 commit comments

Comments
 (0)