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/notification/Bundle.properties (-15 / +1 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
41
# XXX convert to @NbBundle.Keys when Matisse supports it
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
42
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 / +18 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.Keys;
59
import org.openide.util.RequestProcessor;
59
import org.openide.util.RequestProcessor;
60
import static org.netbeans.modules.hudson.ui.notification.ProblemNotificationBundle.*;
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
    @Keys({
81
        "title_failed={0} #{1,number,#} failed",
82
        "title_unstable={0} #{1,number,#} is unstable"
83
    })
79
    private String getTitle() {
84
    private String getTitle() {
80
        // XXX use HudsonJobBuild.getDisplayName
85
        // XXX use HudsonJobBuild.getDisplayName
81
        return NbBundle.getMessage(ProblemNotification.class, failed ? "ProblemNotification.title.failed" : "ProblemNotification.title.unstable",
86
        return failed ? title_failed(job.getDisplayName(), build) : title_unstable(job.getDisplayName(), build);
82
                job.getDisplayName(), build);
83
    }
87
    }
84
88
89
    @Keys({
90
        "description_failed=The build failed.",
91
        "description_unstable=Some tests failed."
92
    })
85
    String showFailureText() {
93
    String showFailureText() {
86
        return NbBundle.getMessage(ProblemNotification.class, failed ? "ProblemNotification.description.failed" : "ProblemNotification.description.unstable");
94
        return failed ? description_failed() : description_unstable();
87
    }
95
    }
88
96
89
    void showFailure() {
97
    void showFailure() {
Lines 113-122 Link Here
113
        });
121
        });
114
    }
122
    }
115
123
124
    @Keys({
125
        "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.",
126
        "ignore_title=Ignore Failures in {0}"
127
    })
116
    void ignore() { // #161601
128
    void ignore() { // #161601
117
        if (DialogDisplayer.getDefault().notify(new NotifyDescriptor.Confirmation(
129
        if (DialogDisplayer.getDefault().notify(new NotifyDescriptor.Confirmation(
118
                NbBundle.getMessage(ProblemNotification.class, "ProblemNotification.ignore.question", job.getDisplayName(), job.getInstance().getName()),
130
                ignore_question(job.getDisplayName(), job.getInstance().getName()),
119
                NbBundle.getMessage(ProblemNotification.class, "ProblemNotification.ignore.title", job.getDisplayName()),
131
                ignore_title(job.getDisplayName()),
120
                NotifyDescriptor.OK_CANCEL_OPTION)) == NotifyDescriptor.OK_OPTION) {
132
                NotifyDescriptor.OK_CANCEL_OPTION)) == NotifyDescriptor.OK_OPTION) {
121
            job.setSalient(false);
133
            job.setSalient(false);
122
        }
134
        }

Return to bug 192750