# HG changeset patch
# Parent eec381a17245c703727aa1f5b67e70d0673e4030
Sample usage of @NbBundle.Messages.
diff --git a/hudson/src/org/netbeans/modules/hudson/ui/actions/Bundle.properties b/hudson/src/org/netbeans/modules/hudson/ui/actions/Bundle.properties
--- a/hudson/src/org/netbeans/modules/hudson/ui/actions/Bundle.properties
+++ b/hudson/src/org/netbeans/modules/hudson/ui/actions/Bundle.properties
@@ -55,27 +55,16 @@
LBL_SynchronizeAction=&Synchronize
-CTL_CreateJob=Create Build Job...
CreateJobPanel.projectLabel.text=&Project to Build:
CreateJobPanel.nameLabel.text=Build &Name:
CreateJobPanel.browse.text=&Browse...
CreateJobPanel.serverLabel.text=Build &Server:
CreateJobPanel.addServer.text=&Add...
CreateJobPanel.explanationLabel.text=Build Server will automatically get the sources and libraries from the same\n
source code repository and run the same build targets as your local project.
-CreateJob.new_build=New Build...
-CreateJob.title=New Continuous Build
-CreateJob.create=Create
-CreateJob.failure=Could not create job. Please check your server's log for details.
ShowChanges.label=Show Changes
ShowChanges.no_changes=No changes.
# {0} - job #build
ShowChanges.title={0} changes
-ShowFailures.label=Show Test Failures
-# {0} - job #build
-ShowFailures.title={0} Test Failures
-# {0} - class & method name of failed test
-# {1} - suite name of failed test
-ShowFailures.from_suite={0} (from {1})
# {0} - file path in workspace
Hyperlinker.looking_for=Looking for {0}...
# {0} - file path in workspace
diff --git a/hudson/src/org/netbeans/modules/hudson/ui/actions/CreateJob.java b/hudson/src/org/netbeans/modules/hudson/ui/actions/CreateJob.java
--- a/hudson/src/org/netbeans/modules/hudson/ui/actions/CreateJob.java
+++ b/hudson/src/org/netbeans/modules/hudson/ui/actions/CreateJob.java
@@ -74,7 +74,8 @@
import org.openide.awt.ActionRegistration;
import org.openide.awt.HtmlBrowser.URLDisplayer;
import org.openide.util.Exceptions;
-import org.openide.util.NbBundle;
+import org.openide.util.NbBundle.Messages;
+import static org.netbeans.modules.hudson.ui.actions.Bundle.*;
import org.openide.util.RequestProcessor;
import org.openide.xml.XMLUtil;
import org.w3c.dom.Document;
@@ -85,25 +86,31 @@
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.CreateJob")
@ActionRegistration(displayName="#CTL_CreateJob", iconInMenu=false)
@ActionReference(path="Menu/Versioning", position=400)
+@Messages("CTL_CreateJob=Create Build Job...")
public class CreateJob extends AbstractAction {
private final HudsonInstance instance;
public CreateJob() {
- super(NbBundle.getMessage(CreateJob.class, "CTL_CreateJob"));
+ super(CTL_CreateJob());
this.instance = null;
}
+ @Messages("CreateJob.new_build=New Build...")
public CreateJob(HudsonInstance instance) {
- super(NbBundle.getMessage(CreateJob.class, "CreateJob.new_build"));
+ super(CreateJob_new_build());
this.instance = instance;
}
+ @Messages({
+ "CreateJob.title=New Continuous Build",
+ "CreateJob.create=Create"
+ })
public void actionPerformed(ActionEvent e) {
final CreateJobPanel panel = new CreateJobPanel();
- final DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(CreateJob.class, "CreateJob.title"));
+ final DialogDescriptor dd = new DialogDescriptor(panel, CreateJob_title());
final AtomicReference