This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 192750
Collapse All | Expand All

(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/Bundle.properties (-11 lines)
Lines 55-81 Link Here
55
55
56
LBL_SynchronizeAction=&Synchronize
56
LBL_SynchronizeAction=&Synchronize
57
57
58
CTL_CreateJob=Create Build Job...
59
CreateJobPanel.projectLabel.text=&Project to Build:
58
CreateJobPanel.projectLabel.text=&Project to Build:
60
CreateJobPanel.nameLabel.text=Build &Name:
59
CreateJobPanel.nameLabel.text=Build &Name:
61
CreateJobPanel.browse.text=&Browse...
60
CreateJobPanel.browse.text=&Browse...
62
CreateJobPanel.serverLabel.text=Build &Server:
61
CreateJobPanel.serverLabel.text=Build &Server:
63
CreateJobPanel.addServer.text=&Add...
62
CreateJobPanel.addServer.text=&Add...
64
CreateJobPanel.explanationLabel.text=<html>Build Server will automatically get the sources and libraries from the same\n<br>source code repository and run the same build targets as your local project.
63
CreateJobPanel.explanationLabel.text=<html>Build Server will automatically get the sources and libraries from the same\n<br>source code repository and run the same build targets as your local project.
65
CreateJob.new_build=New Build...
66
CreateJob.title=New Continuous Build
67
CreateJob.create=Create
68
CreateJob.failure=Could not create job. Please check your server's log for details.
69
ShowChanges.label=Show Changes
64
ShowChanges.label=Show Changes
70
ShowChanges.no_changes=No changes.
65
ShowChanges.no_changes=No changes.
71
# {0} - job #build
66
# {0} - job #build
72
ShowChanges.title={0} changes
67
ShowChanges.title={0} changes
73
ShowFailures.label=Show Test Failures
74
# {0} - job #build
75
ShowFailures.title={0} Test Failures
76
# {0} - class & method name of failed test
77
# {1} - suite name of failed test
78
ShowFailures.from_suite={0} (from {1})
79
# {0} - file path in workspace
68
# {0} - file path in workspace
80
Hyperlinker.looking_for=Looking for {0}...
69
Hyperlinker.looking_for=Looking for {0}...
81
# {0} - file path in workspace
70
# {0} - file path in workspace
(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/CreateJob.java (-6 / +14 lines)
Lines 74-80 Link Here
74
import org.openide.awt.ActionRegistration;
74
import org.openide.awt.ActionRegistration;
75
import org.openide.awt.HtmlBrowser.URLDisplayer;
75
import org.openide.awt.HtmlBrowser.URLDisplayer;
76
import org.openide.util.Exceptions;
76
import org.openide.util.Exceptions;
77
import org.openide.util.NbBundle;
77
import org.openide.util.NbBundle.Messages;
78
import static org.netbeans.modules.hudson.ui.actions.Bundle.*;
78
import org.openide.util.RequestProcessor;
79
import org.openide.util.RequestProcessor;
79
import org.openide.xml.XMLUtil;
80
import org.openide.xml.XMLUtil;
80
import org.w3c.dom.Document;
81
import org.w3c.dom.Document;
Lines 85-109 Link Here
85
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.CreateJob")
86
@ActionID(category="Team", id="org.netbeans.modules.hudson.ui.actions.CreateJob")
86
@ActionRegistration(displayName="#CTL_CreateJob", iconInMenu=false)
87
@ActionRegistration(displayName="#CTL_CreateJob", iconInMenu=false)
87
@ActionReference(path="Menu/Versioning", position=400)
88
@ActionReference(path="Menu/Versioning", position=400)
89
@Messages("CTL_CreateJob=Create Build Job...")
88
public class CreateJob extends AbstractAction {
90
public class CreateJob extends AbstractAction {
89
91
90
    private final HudsonInstance instance;
92
    private final HudsonInstance instance;
91
93
92
    public CreateJob() {
94
    public CreateJob() {
93
        super(NbBundle.getMessage(CreateJob.class, "CTL_CreateJob"));
95
        super(CTL_CreateJob());
94
        this.instance = null;
96
        this.instance = null;
95
    }
97
    }
96
98
99
    @Messages("CreateJob.new_build=New Build...")
97
    public CreateJob(HudsonInstance instance) {
100
    public CreateJob(HudsonInstance instance) {
98
        super(NbBundle.getMessage(CreateJob.class, "CreateJob.new_build"));
101
        super(CreateJob_new_build());
99
        this.instance = instance;
102
        this.instance = instance;
100
    }
103
    }
101
104
105
    @Messages({
106
        "CreateJob.title=New Continuous Build",
107
        "CreateJob.create=Create"
108
    })
102
    public void actionPerformed(ActionEvent e) {
109
    public void actionPerformed(ActionEvent e) {
103
        final CreateJobPanel panel = new CreateJobPanel();
110
        final CreateJobPanel panel = new CreateJobPanel();
104
        final DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(CreateJob.class, "CreateJob.title"));
111
        final DialogDescriptor dd = new DialogDescriptor(panel, CreateJob_title());
105
        final AtomicReference<Dialog> dialog = new AtomicReference<Dialog>();
112
        final AtomicReference<Dialog> dialog = new AtomicReference<Dialog>();
106
        final JButton createButton = new JButton(NbBundle.getMessage(CreateJob.class, "CreateJob.create"));
113
        final JButton createButton = new JButton(CreateJob_create());
107
        createButton.addActionListener(new ActionListener() {
114
        createButton.addActionListener(new ActionListener() {
108
            public void actionPerformed(ActionEvent e) {
115
            public void actionPerformed(ActionEvent e) {
109
                RequestProcessor.getDefault().post(new Runnable() {
116
                RequestProcessor.getDefault().post(new Runnable() {
Lines 135-140 Link Here
135
        dialog.get().setVisible(true);
142
        dialog.get().setVisible(true);
136
    }
143
    }
137
144
145
    @Messages("CreateJob.failure=Could not create job. Please check your server's log for details.")
138
    private void finalizeJob(HudsonInstance instance, ProjectHudsonJobCreator creator, String name, Project project) {
146
    private void finalizeJob(HudsonInstance instance, ProjectHudsonJobCreator creator, String name, Project project) {
139
        try {
147
        try {
140
            Document doc = creator.configure();
148
            Document doc = creator.configure();
Lines 152-158 Link Here
152
            OpenProjects.getDefault().open(new Project[] {project}, false);
160
            OpenProjects.getDefault().open(new Project[] {project}, false);
153
            UI.selectNode(instance.getUrl(), name);
161
            UI.selectNode(instance.getUrl(), name);
154
        } catch (IOException x) {
162
        } catch (IOException x) {
155
            Exceptions.attachLocalizedMessage(x, NbBundle.getMessage(CreateJob.class, "CreateJob.failure"));
163
            Exceptions.attachLocalizedMessage(x, CreateJob_failure());
156
            Logger.getLogger(CreateJob.class.getName()).log(Level.WARNING, null, x);
164
            Logger.getLogger(CreateJob.class.getName()).log(Level.WARNING, null, x);
157
        }
165
        }
158
    }
166
    }
(-)a/hudson/src/org/netbeans/modules/hudson/ui/actions/ShowFailures.java (-4 / +8 lines)
Lines 60-66 Link Here
60
import org.netbeans.modules.hudson.api.HudsonJobBuild;
60
import org.netbeans.modules.hudson.api.HudsonJobBuild;
61
import org.netbeans.modules.hudson.api.HudsonMavenModuleBuild;
61
import org.netbeans.modules.hudson.api.HudsonMavenModuleBuild;
62
import org.openide.awt.HtmlBrowser.URLDisplayer;
62
import org.openide.awt.HtmlBrowser.URLDisplayer;
63
import org.openide.util.NbBundle;
63
import org.openide.util.NbBundle.Messages;
64
import static org.netbeans.modules.hudson.ui.actions.Bundle.*;
64
import org.openide.util.RequestProcessor;
65
import org.openide.util.RequestProcessor;
65
import org.openide.windows.IOProvider;
66
import org.openide.windows.IOProvider;
66
import org.openide.windows.InputOutput;
67
import org.openide.windows.InputOutput;
Lines 93-109 Link Here
93
        this(module.getBuild().getJob(), module.getUrl(), module.getBuildDisplayName());
94
        this(module.getBuild().getJob(), module.getUrl(), module.getBuildDisplayName());
94
    }
95
    }
95
96
97
    @Messages("ShowFailures.label=Show Test Failures")
96
    private ShowFailures(HudsonJob job, String url, String displayName) {
98
    private ShowFailures(HudsonJob job, String url, String displayName) {
97
        this.job = job;
99
        this.job = job;
98
        this.url = url;
100
        this.url = url;
99
        this.displayName = displayName;
101
        this.displayName = displayName;
100
        putValue(NAME, NbBundle.getMessage(ShowFailures.class, "ShowFailures.label"));
102
        putValue(NAME, ShowFailures_label());
101
    }
103
    }
102
104
103
    public void actionPerformed(ActionEvent e) {
105
    public void actionPerformed(ActionEvent e) {
104
        new RequestProcessor(url + "testReport").post(this); // NOI18N
106
        new RequestProcessor(url + "testReport").post(this); // NOI18N
105
    }
107
    }
106
108
109
    @Messages({"# {0} - job #build", "ShowFailures.title={0} Test Failures",
110
               "# {0} - class & method name of failed test", "# {1} - suite name of failed test", "ShowFailures.from_suite={0} (from {1})"})
107
    public void run() {
111
    public void run() {
108
        try {
112
        try {
109
            XMLReader parser = XMLUtil.createXMLReader();
113
            XMLReader parser = XMLUtil.createXMLReader();
Lines 113-119 Link Here
113
                Hyperlinker hyperlinker = new Hyperlinker(job);
117
                Hyperlinker hyperlinker = new Hyperlinker(job);
114
                private void prepareOutput() {
118
                private void prepareOutput() {
115
                    if (io == null) {
119
                    if (io == null) {
116
                        String title = NbBundle.getMessage(ShowFailures.class, "ShowFailures.title", displayName);
120
                        String title = ShowFailures_title(displayName);
117
                        io = IOProvider.getDefault().getIO(title, new Action[0]);
121
                        io = IOProvider.getDefault().getIO(title, new Action[0]);
118
                        io.select();
122
                        io.select();
119
                    }
123
                    }
Lines 191-197 Link Here
191
                        }
195
                        }
192
                        String name = c.className + "." + c.name;
196
                        String name = c.className + "." + c.name;
193
                        if (s.name != null && !s.name.equals(c.className)) {
197
                        if (s.name != null && !s.name.equals(c.className)) {
194
                            name = NbBundle.getMessage(ShowFailures.class, "ShowFailures.from_suite", name, s.name);
198
                            name = ShowFailures_from_suite(name, s.name);
195
                        }
199
                        }
196
                        println();
200
                        println();
197
                        out.println(name, new OutputListener() {
201
                        out.println(name, new OutputListener() {
(-)a/hudson/src/org/netbeans/modules/hudson/ui/notification/Bundle.properties (-15 lines)
Lines 38-56 Link Here
38
#
38
#
39
# Portions Copyrighted 2009 Sun Microsystems, Inc.
39
# Portions Copyrighted 2009 Sun Microsystems, Inc.
40
40
41
# {0} - job name
42
# {1} - build number
43
ProblemNotification.title.failed={0} #{1,number,#} failed
44
# {0} - job name
45
# {1} - build number
46
ProblemNotification.title.unstable={0} #{1,number,#} is unstable
47
ProblemNotification.description.failed=The build failed.
48
ProblemNotification.description.unstable=Some tests failed.
49
ProblemPanel.ignore.text=<html><u>Ignore
41
ProblemPanel.ignore.text=<html><u>Ignore
50
# {0} - job name
51
ProblemNotification.ignore.title=Ignore Failures in {0}
52
# {0} - job name
53
# {1} - server name
54
ProblemNotification.ignore.question=\
55
    Do you wish to cease to receive notifications of failures in {0}? \
56
    If you change your mind, use Services > Hudson Builders > {1} > {0} > Properties > Watched.
(-)a/hudson/src/org/netbeans/modules/hudson/ui/notification/ProblemNotification.java (-6 / +25 lines)
Lines 55-62 Link Here
55
import org.openide.awt.NotificationDisplayer;
55
import org.openide.awt.NotificationDisplayer;
56
import org.openide.awt.NotificationDisplayer.Priority;
56
import org.openide.awt.NotificationDisplayer.Priority;
57
import org.openide.util.ImageUtilities;
57
import org.openide.util.ImageUtilities;
58
import org.openide.util.NbBundle;
58
import org.openide.util.NbBundle.Messages;
59
import org.openide.util.RequestProcessor;
59
import org.openide.util.RequestProcessor;
60
import static org.netbeans.modules.hudson.ui.notification.Bundle.*;
60
61
61
/**
62
/**
62
 * Build failed or was unstable.
63
 * Build failed or was unstable.
Lines 76-89 Link Here
76
        this.failed = failed;
77
        this.failed = failed;
77
    }
78
    }
78
79
80
    @Messages({
81
        "# {0} - job name",
82
        "# {1} - build number",
83
        "ProblemNotification.title.failed={0} #{1,number,#} failed",
84
        "# {0} - job name",
85
        "# {1} - build number",
86
        "ProblemNotification.title.unstable={0} #{1,number,#} is unstable"
87
    })
79
    private String getTitle() {
88
    private String getTitle() {
80
        // XXX use HudsonJobBuild.getDisplayName
89
        // XXX use HudsonJobBuild.getDisplayName
81
        return NbBundle.getMessage(ProblemNotification.class, failed ? "ProblemNotification.title.failed" : "ProblemNotification.title.unstable",
90
        return failed ? ProblemNotification_title_failed(job.getDisplayName(), build) : ProblemNotification_title_unstable(job.getDisplayName(), build);
82
                job.getDisplayName(), build);
83
    }
91
    }
84
92
93
    @Messages({
94
        "ProblemNotification.description.failed=The build failed.",
95
        "ProblemNotification.description.unstable=Some tests failed."
96
    })
85
    String showFailureText() {
97
    String showFailureText() {
86
        return NbBundle.getMessage(ProblemNotification.class, failed ? "ProblemNotification.description.failed" : "ProblemNotification.description.unstable");
98
        return failed ? ProblemNotification_description_failed() : ProblemNotification_description_unstable();
87
    }
99
    }
88
100
89
    void showFailure() {
101
    void showFailure() {
Lines 113-122 Link Here
113
        });
125
        });
114
    }
126
    }
115
127
128
    @Messages({
129
        "# {0} - job name",
130
        "# {1} - server name",
131
        "ProblemNotification.ignore.question=Do you wish to cease to receive notifications of failures in {0}? If you change your mind, use Services > Hudson Builders > {1} > {0} > Properties > Watched.",
132
        "# {0} - job name",
133
        "ProblemNotification.ignore.title=Ignore Failures in {0}"
134
    })
116
    void ignore() { // #161601
135
    void ignore() { // #161601
117
        if (DialogDisplayer.getDefault().notify(new NotifyDescriptor.Confirmation(
136
        if (DialogDisplayer.getDefault().notify(new NotifyDescriptor.Confirmation(
118
                NbBundle.getMessage(ProblemNotification.class, "ProblemNotification.ignore.question", job.getDisplayName(), job.getInstance().getName()),
137
                ProblemNotification_ignore_question(job.getDisplayName(), job.getInstance().getName()),
119
                NbBundle.getMessage(ProblemNotification.class, "ProblemNotification.ignore.title", job.getDisplayName()),
138
                ProblemNotification_ignore_title(job.getDisplayName()),
120
                NotifyDescriptor.OK_CANCEL_OPTION)) == NotifyDescriptor.OK_OPTION) {
139
                NotifyDescriptor.OK_CANCEL_OPTION)) == NotifyDescriptor.OK_OPTION) {
121
            job.setSalient(false);
140
            job.setSalient(false);
122
        }
141
        }

Return to bug 192750