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 229019
Collapse All | Expand All

(-)a/bugzilla.exceptionreporter/src/org/netbeans/modules/bugzilla/exceptionreporter/NBBugzillaAccessorImpl.java (-7 / +7 lines)
Lines 42-48 Link Here
42
42
43
package org.netbeans.modules.bugzilla.exceptionreporter;
43
package org.netbeans.modules.bugzilla.exceptionreporter;
44
44
45
import org.netbeans.lib.uihandler.NBBugzillaAccessor;
45
import org.netbeans.lib.uihandler.BugTrackingAccessor;
46
import org.netbeans.modules.bugzilla.api.NBBugzillaUtils;
46
import org.netbeans.modules.bugzilla.api.NBBugzillaUtils;
47
import org.openide.util.RequestProcessor;
47
import org.openide.util.RequestProcessor;
48
48
Lines 50-57 Link Here
50
 *
50
 *
51
 * @author Tomas Stupka
51
 * @author Tomas Stupka
52
 */
52
 */
53
@org.openide.util.lookup.ServiceProvider(service = org.netbeans.lib.uihandler.NBBugzillaAccessor.class)
53
@org.openide.util.lookup.ServiceProvider(service = org.netbeans.lib.uihandler.BugTrackingAccessor.class)
54
public class NBBugzillaAccessorImpl extends NBBugzillaAccessor {
54
public class NBBugzillaAccessorImpl extends BugTrackingAccessor {
55
55
56
    private RequestProcessor rp;
56
    private RequestProcessor rp;
57
57
Lines 66-87 Link Here
66
    }
66
    }
67
67
68
    @Override
68
    @Override
69
    public String getNBUsername() {
69
    public String getUsername() {
70
        return NBBugzillaUtils.getNBUsername();
70
        return NBBugzillaUtils.getNBUsername();
71
    }
71
    }
72
72
73
    @Override
73
    @Override
74
    public char[] getNBPassword() {
74
    public char[] getPassword() {
75
        return NBBugzillaUtils.getNBPassword();
75
        return NBBugzillaUtils.getNBPassword();
76
    }
76
    }
77
77
78
    @Override
78
    @Override
79
    public void saveNBUsername(String username) {
79
    public void saveUsername(String username) {
80
        NBBugzillaUtils.saveNBUsername(username);
80
        NBBugzillaUtils.saveNBUsername(username);
81
    }
81
    }
82
82
83
    @Override
83
    @Override
84
    public void saveNBPassword(char[] password) {
84
    public void savePassword(char[] password) {
85
        NBBugzillaUtils.saveNBPassword(password);
85
        NBBugzillaUtils.saveNBPassword(password);
86
    }
86
    }
87
87
(-)a/ide.branding/build.xml (+6 lines)
Lines 111-115 Link Here
111
      <branding name="nb"/>
111
      <branding name="nb"/>
112
    </locjar>
112
    </locjar>
113
113
114
    <locjar warnMissingDir="true"
115
      basedir="uihandler/src"
116
      jarfile="${cluster}/modules/org-netbeans-modules-uihandler.jar">
117
      <branding name="nb"/>
118
    </locjar>
119
114
  </target>
120
  </target>
115
</project>
121
</project>
(-)a/uihandler/src/org/netbeans/modules/exceptions/Bundle.properties (-37 / +42 lines)
Lines 1-56 Link Here
1
CTL_ReporterResultAction=E&xception Reporter
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
CTL_ReporterResultTopComponent=Exception Reporter
2
#
3
HINT_ReporterResultTopComponent=This is an Exception Reporter Window
3
# Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
7
#
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
26
# Contributor(s):
27
#
28
# The Original Software is NetBeans. The Initial Developer of the Original
29
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
# Microsystems, Inc. All Rights Reserved.
31
#
32
# If you wish your version of this file to be governed by only the CDDL
33
# or only the GPL Version 2, indicate your decision by adding
34
# "[Contributor] elects to include this software in this distribution
35
# under the [CDDL or GPL Version 2] license." If you do not indicate a
36
# single choice of license, a recipient has the option to distribute
37
# your version of this file under either the CDDL, the GPL Version 2 or
38
# to extend the choice of license to its licensees as provided above.
39
# However, if you add GPL Version 2 code and therefore, elected the GPL
40
# Version 2 license, then the option applies only if the new code is
41
# made subject to such option by the copyright holder.
42
4
#NOI18N
43
#NOI18N
5
userNameURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userName=
44
userNameURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userName=
6
#NOI18N
45
#NOI18N
7
userIdURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userId=
46
userIdURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userId=
8
47
9
ReportPanel.jLabel1.text=&Username:
10
ReportPanel.jLabel3.text=If you want to get informed about the state of this problem, you need to be a registered user.
11
ReportPanel.jLabel2.text=If you are not registered, you can send the report as a guest, or register now.
12
ReportPanel.jLabel6.text=Register
13
14
ReportPanel.AccessibleContext.accessibleDescription=Dialog for reporting issues
15
16
ReportPanel.AccessibleContext.accessibleName=Report Dialog
17
18
ReportPanel.loginField.AccessibleContext.accessibleName=NetBeans user name
48
ReportPanel.loginField.AccessibleContext.accessibleName=NetBeans user name
19
49
20
ReportPanel.loginField.AccessibleContext.accessibleDescription=NetBeans user name. You should fill this field if you are a registered user.
50
ReportPanel.loginField.AccessibleContext.accessibleDescription=NetBeans user name. You should fill this field if you are a registered user.
21
51
22
ReportPanel.summaryField.AccessibleContext.accessibleDescription=You should write short summary of the exception
23
24
ReportPanel.commentArea.AccessibleContext.accessibleDescription=You can describe here what you were doing when this issue rised.
25
ReportPanel.jLabel9.text=Su&mmary:
26
27
ReportPanel.jLabel4.text=&Describe what you were doing when the problem occurred, please:
28
ReportPanel.summaryField.AccessibleContext.accessibleName=Issue summary
29
30
ReportPanel.commentArea.AccessibleContext.accessibleName=Comment area
31
ReportPanel.summaryField.text=
32
33
#NOI18N
52
#NOI18N
34
REGISTRATION_URL=https://www.netbeans.org/people/new
53
REGISTRATION_URL=https://www.netbeans.org/people/new
35
ReportPanel.jLabel8.text_1=The report contains UI gesture data collected prior to the problem.
36
ReportPanel.jLabel5.text_1=&Password:
37
jCheckBox1.text=R&emember password
38
ReportPanel.jLabel10.text=Username or password is wrong
39
ReportPanel.checking_password=Checking your password
40
54
41
ReportPanel.jLabel11.text=(Your NetBeans.org username)
55
ReportPanel.jLabel11.text=(Your NetBeans.org username)
42
ReportPanel.asAGuestCheckBox.text=Send &Report as a Guest
43
ReportPanel.jPasswordField1.AccessibleContext.accessibleName=Password field
44
ReportPanel.jPasswordField1.AccessibleContext.accessibleDescription=Type your NetBeans.org password
56
ReportPanel.jPasswordField1.AccessibleContext.accessibleDescription=Type your NetBeans.org password
45
ReportPanel.rememberCheckBox.AccessibleContext.accessibleDescription=null
46
ReporterResultTopComponent.jButton1.text=Show my issues
47
no_data_found=<p>No data found at <a href="{0}">{0}</a>.\
57
no_data_found=<p>No data found at <a href="{0}">{0}</a>.\
48
<p>The problem can be caused by broken internet connection or on server side. \
58
<p>The problem can be caused by broken internet connection or on server side. \
49
Try to report problem later again. If you would face this problem repeatedly, \
59
Try to report problem later again. If you would face this problem repeatedly, \
50
submit a bug at <a href="https://netbeans.org/bugzilla/enter_bug.cgi?product=ide&component=Report%20Exception">\
60
submit a bug at <a href="https://netbeans.org/bugzilla/enter_bug.cgi?product=ide&component=Report%20Exception">\
51
https://netbeans.org/bugzilla/enter_bug.cgi</a> against Exception reporter, please.
61
https://netbeans.org/bugzilla/enter_bug.cgi</a> against Exception reporter, please.
52
LoadingMessage=Loading 
53
ReportPanel.oomInfo.text=HeapDump is needed to resolve this problem, the upload might have up to 30MB.
54
55
ExceptionsSettings.password.description=Exception reporter login
56
ReportPanel.commentArea.text=<Please provide a description of the problem or the steps to reproduce>
(-)a/uihandler/src/org/netbeans/modules/uihandler/Bundle.properties (-123 / +9 lines)
Lines 40-126 Link Here
40
# Version 2 license, then the option applies only if the new code is
40
# Version 2 license, then the option applies only if the new code is
41
# made subject to such option by the copyright holder.
41
# made subject to such option by the copyright holder.
42
42
43
Actions/Window/org-netbeans-modules-exceptions-ReporterResultAction.instance=ReporterResult
43
METRICS_LOGGER_NAME=org.netbeans.ui.metrics
44
CTL_SubmitAction=Submit UI Logs
44
UI_LOGGER_NAME=org.netbeans.ui
45
MSG_SubmitAction=Submit {0} Logged UI Events for Evaluation...
45
UI_PERFORMANCE_LOGGER_NAME=org.netbeans.ui.performance
46
MSG_ShowHints=Logs uploaded to server, see what hints the server has for you...
47
OpenIDE-Module-Display-Category=Testing Tools
48
OpenIDE-Module-Long-Description=\
49
    This module is capable of collecting various information about user actions. \
50
    It contains UI elements that allow inspection and submission of these data to the collecting server.
51
OpenIDE-Module-Name=UI Gestures Collector Infrastructure
52
53
54
MSG_SubmitDialogTitle=UI Gestures Collector
55
56
# {0} = getFileName()
57
# {1} = getClassName()
58
# {2} = getMethodName()
59
# {3} = getLineNumber()
60
# {4} = getClassName() without package
61
MSG_StackTraceElement={4}.{2}:{3}
62
63
# {0} number of log records
64
# {1} date right now
65
MSG_RootDisplayName=UI Gestures
66
67
MSG_DisplayNameParameters=Message Parameters
68
MSG_ParameterDisplayName=Param #{0}
69
MSG_ParameterShortDescription=Shows value of message parameter #{0}
70
71
MSG_DateDisplayName=When
72
MSG_DateShortDescription=Time when the event happened
73
74
MSG_LoggerDisplayName=Logger Name
75
MSG_LoggerShortDescription=Name of the logger that generated the event
76
77
MSG_MessageDisplayName=Message
78
MSG_MessageShortDescription=The actual message from the log
79
80
OpenIDE-Module-Short-Description=Collects Information about UI Gestures
81
82
HTML_toolbar={0} (<i>Toolbar Action</i>)
83
HTML_menu={0} (<i>Menu Action</i>)
84
HTML_key={0} (<i>Keyboard Action</i>)
85
HTML_exception= {0} (<i>Exception</i>)
86
87
MSG_EnabledModules=Enabled Modules
88
MSG_DisabledModules=Disabled Modules
89
90
Toolbars/UIGestures=UI Gestures
91
92
46
93
UI_USER_CONFIGURATION=The operating system is {0}, virtual machine {1}, NetBeans version {2} and user name {3}.
47
UI_USER_CONFIGURATION=The operating system is {0}, virtual machine {1}, NetBeans version {2} and user name {3}.
94
MSG_USER_CONFIGURATION=User Configuration
95
48
96
#
49
# A resource bundle the application version is read from
97
# Module UI Logger
50
ApplicationVersionResourceBundle=org.netbeans.core.startup.Bundle
98
#
51
# A key with the application version number
99
UI_DISABLED_MODULES=List of disabled modules {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} ...
52
ApplicationVersionResourceKey=currentVersion
100
UI_ENABLED_MODULES=List of enabled modules {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} ...
53
# A system property, that is used as an argument to the application version number key
54
ApplicationVersionSysPropertyResourceArg=netbeans.buildnumber
101
55
102
# messages on exit
103
EXIT_URL=
104
MSG_EXIT_URL_EXIT=E&xit without Getting Statistics
105
106
# messages on startup
107
INIT_URL=
108
MSG_INIT_URL_EXIT=Remind &Later
109
56
110
# URL to display to as a welcome text
57
# URL to display to as a welcome text
111
#NOI18N
58
#NOI18N
112
WELCOME_URL=https://netbeans.org/nonav/uigestures/index3.html
59
WELCOME_URL=https://netbeans.org/nonav/uigestures/index3.html
113
MSG_WELCOME_URL_EXIT=Cancel
114
60
115
#NOI18N
61
#NOI18N
116
METRICS_URL=https://netbeans.org/nonav/uigestures/index4.html
62
METRICS_URL=https://netbeans.org/nonav/uigestures/index4.html
117
MSG_METRICS_URL_EXIT=Cancel
118
63
119
# URL to display to as a welcome text in case of error
64
# URL to display to as a welcome text in case of error
120
#NOI18N
65
#NOI18N
121
ERROR_URL=https://netbeans.org/nonav/uigestures/error2.html
66
ERROR_URL=https://netbeans.org/nonav/uigestures/error2.html
122
MSG_ERROR_URL_EXIT=Cancel
123
MSG_SubmitButton=&Review and Report Problem
124
67
125
#NOI18N
68
#NOI18N
126
CHECKING_SERVER_URL=http://statistics.netbeans.org/analytics/authenticate?username={0}&secur_passwd={1}
69
CHECKING_SERVER_URL=http://statistics.netbeans.org/analytics/authenticate?username={0}&secur_passwd={1}
Lines 135-155 Link Here
135
# String between [TTC] and [/TTC] (Text To Copy) is possible to select and copy
78
# String between [TTC] and [/TTC] (Text To Copy) is possible to select and copy
136
MSG_ConnetionFailedReport=Upload of log failed, please report the original problem directly at [URL]http://www.netbeans.org/community/issues.html[/URL] and attach messages.log file.\
79
MSG_ConnetionFailedReport=Upload of log failed, please report the original problem directly at [URL]http://www.netbeans.org/community/issues.html[/URL] and attach messages.log file.\
137
\nThe messages.log file is located at [TTC]{2}[/TTC].
80
\nThe messages.log file is located at [TTC]{2}[/TTC].
138
MSG_UploadProgressHandle=Uploading log file
139
MSG_UploadConnecting=Connecting...
140
MSG_UploadSending=Sending logs...
141
MSG_UploadReading=Reading reply...
142
143
# view data
144
MSG_TabRaw=Structured
145
MSG_Tab_Text=Raw
146
147
#exceptions solving
148
ErrorDialogTitle=Connecting ...
149
150
SubmitPanel.jLabel1.text=Show Record\: 
151
152
SubmitPanel.jLabel1.text_1=Show Record\:
153
81
154
Metrics_title=Usage Statistics
82
Metrics_title=Usage Statistics
155
LBL_BottomText1=<html>Help us improve the NetBeans IDE by providing anonymous usage data.</html>
83
LBL_BottomText1=<html>Help us improve the NetBeans IDE by providing anonymous usage data.</html>
Lines 159-209 Link Here
159
requirements and prioritize improvements in future releases. We will never \
87
requirements and prioritize improvements in future releases. We will never \
160
reverse-engineer the collected data to find specific details about your projects.</html>
88
reverse-engineer the collected data to find specific details about your projects.</html>
161
89
162
LBL_MetricsEnable=I Agree
163
ACSN_MetricsEnable=Enable usage statistics
164
ACSD_MetricsEnable=Enable usage statistics
165
166
LBL_MetricsCancel=No, Thank You
167
ACSN_MetricsCancel=Disable usage statistics
168
ACSD_MetricsCancel=Disable usage statistics
169
170
#NOI18N
90
#NOI18N
171
METRICS_INFO_URL=https://www.netbeans.org/about/usage-tracking.html
91
METRICS_INFO_URL=https://www.netbeans.org/about/usage-tracking.html
172
92
173
LBL_LearnMore=<html><font color="#0000FF" <u>Learn more</u></font></html>
174
ACSN_LearnMore=Learn more
175
ACSD_LearnMore=Learn more
176
VIEW_DATA_TILTE=Data
177
UI_TAB_TITLE=UI Log
178
IDE_LOG_TAB_TITLE=IDE Log
93
IDE_LOG_TAB_TITLE=IDE Log
179
94
180
181
# Slowness Reporter
182
LowPerformance=Slowness detected. Was it a problem?
183
# {0} time in ms
184
# {1} time in s
185
BlockedForLowPerformance=Not responsive for {0,choice,0#{0} ms|5000#{1} s}. \
186
 Do you want to report it?
187
GoToType=Slow Go to Type detected. Was it a problem?
188
BlockedForGoToType=Go to Type Action took {0,choice,0#{0} ms|5000#{1} s}. \
189
 Do you want to report it?
190
CodeCompletion=Slow Code Completion detected. Was it a problem?
191
BlockedForCodeCompletion=Invoking Code Completion took {0,choice,0#{0} ms|5000#{1} s}. \
192
 Do you want to report it?
193
Report=Review and Report Problem.
194
195
IDE_STARTUP=IDE startup
95
IDE_STARTUP=IDE startup
196
SubmitPanel.profileData.text=Show profiler data
197
SubmitPanel.heapDump.text=Show heapdump
198
ReportPanel.sendButton.tooltip=Allows to send report once description or steps to reproduce are provided.
199
LOADING_TEXT=Loading ...
200
MSG_SCAN_CANCELLED=<html>It is not possible to interrupt the scanning process.<br>\
201
If you are encountering a problem related to the scanning process<br>\
202
and would like to send us your log file click Send Report.
203
TITLE_SCAN_CANCELLED=Scan canceled
204
LBL_SendReport=Send Report
205
MSG_SCAN_CANCELLED_EARLY=<html>It is not possible to interrupt the scanning process.<br>\
206
If you are encountering a problem related to scanning and would like to report it,<br>\
207
please wait for <b>several minutes</b> so statistics are gathered and then cancel <br>\
208
the scanning. You will get an option to <b>send a report</b> instead of this message.
209
TITLE_SCAN_CANCELLED_EARLY=Scan canceled
(-)a/lib.uihandler/apichanges.xml (-5 / +39 lines)
Lines 47-57 Link Here
47
47
48
<apichanges>
48
<apichanges>
49
<apidefs>
49
<apidefs>
50
<apidef name="uihandler">UI Handler Library</apidef>
50
<apidef name="uihandlerLib">UI Handler Library</apidef>
51
</apidefs>
51
</apidefs>
52
<changes>
52
<changes>
53
    <change id="MovedToPlatform">
54
      <api name="uihandlerLib"/>
55
      <summary>UI Handler Library module is moved to NetBeans platform cluster</summary>
56
      <version major="1" minor="37"/>
57
      <date day="10" month="5" year="2013"/>
58
      <author login="mentlicher"/>
59
      <compatibility addition="yes" modification="yes" binary="incompatible" source="incompatible" semantic="incompatible" deprecation="no" deletion="yes"/>
60
      <description>
61
          The module is moved to platform cluster and friend API is changed to
62
          public API. However, not all classes, that were exposed via friend
63
          API are exposed via public API.
64
          Following classes are made public:
65
          <ul>
66
              <li><code>BugTrackingAccessor</code> (renamed from NBBugzillaAccessor)</li>
67
              <li><code>Decorable</code></li>
68
              <li><code>InputGesture</code></li>
69
              <li><code>LogRecords</code></li>
70
              <li><code>PasswdEncryption</code></li>
71
          </ul>
72
          Following classes, that were a part of friend API are not public:
73
          <ul>
74
              <li><code>Decorations</code></li>
75
              <li><code>MultiPartHandler</code></li>
76
              <li><code>NBBugzillaAccessor)</code></li>
77
              <li><code>ProjectOp</code></li>
78
          </ul>
79
      </description>
80
      <class package="org.netbeans.lib.uihandler" name="BugTrackingAccessor"/>
81
      <class package="org.netbeans.lib.uihandler" name="Decorable"/>
82
      <class package="org.netbeans.lib.uihandler" name="InputGesture"/>
83
      <class package="org.netbeans.lib.uihandler" name="LogRecords"/>
84
      <class package="org.netbeans.lib.uihandler" name="PasswdEncryption"/>
85
      <issue number="229019"/>
86
    </change>
53
    <change id="ProjectOp.isStartup">
87
    <change id="ProjectOp.isStartup">
54
      <api name="uihandler"/>
88
      <api name="uihandlerLib"/>
55
      <summary>ProjectOp now recognizes info about startup as well</summary>
89
      <summary>ProjectOp now recognizes info about startup as well</summary>
56
      <version major="1" minor="16"/>
90
      <version major="1" minor="16"/>
57
      <date day="17" month="6" year="2008"/>
91
      <date day="17" month="6" year="2008"/>
Lines 64-70 Link Here
64
      <class package="org.netbeans.lib.uihandler" name="ProjectOp"/>
98
      <class package="org.netbeans.lib.uihandler" name="ProjectOp"/>
65
    </change>    
99
    </change>    
66
    <change id="LogRecords.decorate">
100
    <change id="LogRecords.decorate">
67
      <api name="uihandler"/>
101
      <api name="uihandlerLib"/>
68
      <summary>LogRecords.decorate extracts UI info about LogRecords</summary>
102
      <summary>LogRecords.decorate extracts UI info about LogRecords</summary>
69
      <version major="1" minor="13"/>
103
      <version major="1" minor="13"/>
70
      <date day="30" month="7" year="2007"/>
104
      <date day="30" month="7" year="2007"/>
Lines 77-83 Link Here
77
      <class package="org.netbeans.lib.uihandler" name="Decorable"/>
111
      <class package="org.netbeans.lib.uihandler" name="Decorable"/>
78
    </change>    
112
    </change>    
79
    <change id="LogRecords.scan.gzip">
113
    <change id="LogRecords.scan.gzip">
80
      <api name="uihandler"/>
114
      <api name="uihandlerLib"/>
81
      <summary>LogRecords.scan is able to recognize and read GZIP</summary>
115
      <summary>LogRecords.scan is able to recognize and read GZIP</summary>
82
      <version major="1" minor="10"/>
116
      <version major="1" minor="10"/>
83
      <date day="17" month="4" year="2007"/>
117
      <date day="17" month="4" year="2007"/>
Lines 89-95 Link Here
89
      <class package="org.netbeans.lib.uihandler" name="LogRecords"/>
123
      <class package="org.netbeans.lib.uihandler" name="LogRecords"/>
90
    </change>    
124
    </change>    
91
    <change id="LogRecords.read">
125
    <change id="LogRecords.read">
92
      <api name="uihandler"/>
126
      <api name="uihandlerLib"/>
93
      <summary>LogRecords.read removed</summary>
127
      <summary>LogRecords.read removed</summary>
94
      <version major="1" minor="9"/>
128
      <version major="1" minor="9"/>
95
      <date day="10" month="3" year="2007"/>
129
      <date day="10" month="3" year="2007"/>
(-)a/lib.uihandler/manifest.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: org.netbeans.lib.uihandler
2
OpenIDE-Module: org.netbeans.lib.uihandler
3
_OpenIDE-Module-Layer: org/netbeans/lib/uihandler/layer.xml
3
_OpenIDE-Module-Layer: org/netbeans/lib/uihandler/layer.xml
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/lib/uihandler/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/lib/uihandler/Bundle.properties
5
OpenIDE-Module-Specification-Version: 1.36
5
OpenIDE-Module-Specification-Version: 1.37
6
6
(-)a/lib.uihandler/nbproject/project.xml (-4 / +2 lines)
Lines 36-46 Link Here
36
                    </test-dependency>
36
                    </test-dependency>
37
                </test-type>
37
                </test-type>
38
            </test-dependencies>
38
            </test-dependencies>
39
            <friend-packages>
39
            <public-packages>
40
                <friend>org.netbeans.modules.uihandler</friend>
41
                <friend>org.netbeans.modules.bugzilla.exceptionreporter</friend>
42
                <package>org.netbeans.lib.uihandler</package>
40
                <package>org.netbeans.lib.uihandler</package>
43
            </friend-packages>
41
            </public-packages>
44
        </data>
42
        </data>
45
    </configuration>
43
    </configuration>
46
</project>
44
</project>
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/NBBugzillaAccessor.java (-13 / +13 lines)
Lines 43-89 Link Here
43
package org.netbeans.lib.uihandler;
43
package org.netbeans.lib.uihandler;
44
44
45
/**
45
/**
46
 * The implementation will provide access to netbeans.org specific bagzilla
46
 * The implementation will provide access to a bug tracking
47
 * functionality. Additionaly, methods are available to share the nb username
47
 * functionality. Additionally, methods are available to share the username
48
 * and password between the bugzilla and exeption reporter modules.
48
 * and password between the bug tracking and exception reporter modules.
49
 *
49
 *
50
 *
50
 *
51
 * @author Tomas Stupka
51
 * @author Tomas Stupka
52
 */
52
 */
53
public abstract class NBBugzillaAccessor {
53
public abstract class BugTrackingAccessor {
54
54
55
    /**
55
    /**
56
     * Opens in the IDE the given issue from netbeans.org/bugzilla
56
     * Opens in the IDE the given issue from bug tracking system.
57
     *
57
     *
58
     * @param issueID issue identifier
58
     * @param issueID issue identifier
59
     */
59
     */
60
    public abstract void openIssue(String issueID);
60
    public abstract void openIssue(String issueID);
61
61
62
    /**
62
    /**
63
     * Returns the netbeans.org username
63
     * Returns the bug tracking username
64
     * Shouldn't be called in awt
64
     * Shouldn't be called in awt
65
     *
65
     *
66
     * @return username
66
     * @return username
67
     */
67
     */
68
    public abstract String getNBUsername();
68
    public abstract String getUsername();
69
69
70
    /**
70
    /**
71
     * Returns the netbeans.org password
71
     * Returns the bug tracking password
72
     * Shouldn't be called in awt
72
     * Shouldn't be called in awt
73
     *
73
     *
74
     * @return password
74
     * @return password
75
     */
75
     */
76
    public abstract char[] getNBPassword();
76
    public abstract char[] getPassword();
77
77
78
    /**
78
    /**
79
     * Save the given username as a netbeans.org username.
79
     * Save the given username as a bug tracking username.
80
     * Shouldn't be called in awt
80
     * Shouldn't be called in awt
81
     */
81
     */
82
    public abstract void saveNBUsername(String username);
82
    public abstract void saveUsername(String username);
83
83
84
    /**
84
    /**
85
     * Saves the given value as a netbeans.org password
85
     * Saves the given value as a bug tracking password
86
     * Shouldn't be called in awt
86
     * Shouldn't be called in awt
87
     */
87
     */
88
    public abstract void saveNBPassword(char[] password);
88
    public abstract void savePassword(char[] password);
89
}
89
}
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/Decorable.java (-2 / +19 lines)
Lines 34-49 Link Here
34
34
35
/** A callback interface of a decorated representation of LogRecord.
35
/** A callback interface of a decorated representation of LogRecord.
36
 * Should be passed into {@link LogRecords#decorate} and will receive
36
 * Should be passed into {@link LogRecords#decorate} and will receive
37
 * appropriate callbacks.
37
 * appropriate call-backs.
38
 *
38
 *
39
 * @since 1.13
39
 * @since 1.13
40
 */
40
 */
41
public interface Decorable {
41
public interface Decorable {
42
    
43
    /**
44
     * Set the name.
45
     * @param n the name of the log record
46
     */
42
    public void setName(String n);
47
    public void setName(String n);
43
48
49
    /**
50
     * Set the display name.
51
     * @param n the display name of the log record
52
     */
44
    public void setDisplayName(String n);
53
    public void setDisplayName(String n);
45
54
55
    /**
56
     * Set the icon base.
57
     * @param base the icon base, including the extension, of the log record
58
     */
46
    public void setIconBaseWithExtension(String base);
59
    public void setIconBaseWithExtension(String base);
47
60
48
    public void setShortDescription(String format);
61
    /**
62
     * Set the short description.
63
     * @param shortDescription the short description of the log record
64
     */
65
    public void setShortDescription(String shortDescription);
49
}
66
}
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/Decorations.java (-2 / +2 lines)
Lines 43-53 Link Here
43
 *
43
 *
44
 * @author Jaroslav Tulach
44
 * @author Jaroslav Tulach
45
 */
45
 */
46
public final class Decorations {
46
final class Decorations {
47
    
47
    
48
    private static final SimpleFormatter FORMATTER = new SimpleFormatter();
48
    private static final SimpleFormatter FORMATTER = new SimpleFormatter();
49
    
49
    
50
    public static void decorate(LogRecord r, Decorable d) {
50
    static void decorate(LogRecord r, Decorable d) {
51
        if (r.getMessage() == null) {
51
        if (r.getMessage() == null) {
52
            d.setName("Seq: " + r.getSequenceNumber());
52
            d.setName("Seq: " + r.getSequenceNumber());
53
        } else {
53
        } else {
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/InputGesture.java (-1 / +1 lines)
Lines 46-52 Link Here
46
    
46
    
47
    /** Finds the right InputGesture for given LogRecord.
47
    /** Finds the right InputGesture for given LogRecord.
48
     * @param rec the record
48
     * @param rec the record
49
     * @return the gesture that initated the record or null if unknown
49
     * @return the gesture that initiated the record or <code>null</code> if unknown
50
     */
50
     */
51
    public static InputGesture valueOf(LogRecord rec) {
51
    public static InputGesture valueOf(LogRecord rec) {
52
        if ("UI_ACTION_BUTTON_PRESS".equals(rec.getMessage())) {
52
        if ("UI_ACTION_BUTTON_PRESS".equals(rec.getMessage())) {
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/LogRecords.java (+18 lines)
Lines 87-92 Link Here
87
        Decorations.decorate(r, d);
87
        Decorations.decorate(r, d);
88
    }
88
    }
89
    
89
    
90
    /**
91
     * Writhe log record to an output stream.
92
     * @param os the output stream
93
     * @param rec the log record
94
     * @throws IOException when an I/O error occurs.
95
     */
90
    public static void write(OutputStream os, LogRecord rec) throws IOException {           
96
    public static void write(OutputStream os, LogRecord rec) throws IOException {           
91
        String formated = FORMATTER.format(rec);
97
        String formated = FORMATTER.format(rec);
92
        byte[] arr = formated.getBytes("utf-8");
98
        byte[] arr = formated.getBytes("utf-8");
Lines 139-144 Link Here
139
145
140
    }
146
    }
141
147
148
    /**
149
     * Scan log records stored in a file.
150
     * @param f the file to read log records from
151
     * @param h handler that gets the log records
152
     * @throws IOException when an I/O error occurs.
153
     */
142
    public static void scan(File f, Handler h) throws IOException {
154
    public static void scan(File f, Handler h) throws IOException {
143
        HandlerDelegate hd = new HandlerDelegate(h);
155
        HandlerDelegate hd = new HandlerDelegate(h);
144
        InputStream is = null;
156
        InputStream is = null;
Lines 173-178 Link Here
173
        }
185
        }
174
    }
186
    }
175
    
187
    
188
    /**
189
     * Scan log records from an input stream.
190
     * @param is the input stream to read log records from
191
     * @param h handler that gets the log records
192
     * @throws IOException when an I/O error occurs.
193
     */
176
    public static void scan(InputStream is, Handler h) throws IOException {
194
    public static void scan(InputStream is, Handler h) throws IOException {
177
        List<LogRecord> errorLogRecords = new ArrayList<LogRecord>();
195
        List<LogRecord> errorLogRecords = new ArrayList<LogRecord>();
178
        try {
196
        try {
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/MultiPartHandler.java (-1 / +1 lines)
Lines 53-59 Link Here
53
import java.util.HashMap;
53
import java.util.HashMap;
54
import java.util.Vector;
54
import java.util.Vector;
55
55
56
public class MultiPartHandler {
56
class MultiPartHandler {
57
  public interface InputFacade {
57
  public interface InputFacade {
58
      public int readLine(byte[] arr, int off, int len) throws IOException;
58
      public int readLine(byte[] arr, int off, int len) throws IOException;
59
      public InputStream getInputStream();
59
      public InputStream getInputStream();
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/PasswdEncryption.java (-2 / +48 lines)
Lines 37-47 Link Here
37
import java.security.PrivateKey;
37
import java.security.PrivateKey;
38
import java.security.PublicKey;
38
import java.security.PublicKey;
39
import java.security.spec.X509EncodedKeySpec;
39
import java.security.spec.X509EncodedKeySpec;
40
import java.util.Arrays;
41
import javax.crypto.Cipher;
40
import javax.crypto.Cipher;
42
41
43
/**
42
/**
44
 *
43
 * Password encryption/decryption utilities.
44
 * 
45
 * @author Jindrich Sedek
45
 * @author Jindrich Sedek
46
 */
46
 */
47
public class PasswdEncryption {
47
public class PasswdEncryption {
Lines 49-62 Link Here
49
    private static final String delimiter = ":"; //NOI18N
49
    private static final String delimiter = ":"; //NOI18N
50
    public static final int MAX_ENCRYPTION_LENGHT = 100;
50
    public static final int MAX_ENCRYPTION_LENGHT = 100;
51
    
51
    
52
    /**
53
     * Encrypt a text with a default public key.
54
     * @param text text to encrypt
55
     * @return encrypted text
56
     * @throws IOException when I/O error occurs
57
     * @throws GeneralSecurityException when transformation error occurs
58
     */
52
    public static String encrypt(String text) throws IOException, GeneralSecurityException {
59
    public static String encrypt(String text) throws IOException, GeneralSecurityException {
53
        return encrypt(text, getPublicKey());
60
        return encrypt(text, getPublicKey());
54
    }
61
    }
55
62
63
    /**
64
     * Encrypt a sequence of bytes a default public key.
65
     * @param text byte array to encrypt
66
     * @return encrypted bytes
67
     * @throws IOException when I/O error occurs
68
     * @throws GeneralSecurityException when transformation error occurs
69
     */
56
    public static byte[] encrypt(byte[] text) throws IOException, GeneralSecurityException {
70
    public static byte[] encrypt(byte[] text) throws IOException, GeneralSecurityException {
57
        return encrypt(text, getPublicKey());
71
        return encrypt(text, getPublicKey());
58
    }
72
    }
59
73
74
    /**
75
     * Encrypt a sequence of bytes.
76
     * @param text byte array to encrypt
77
     * @param key the public key used for the encryption
78
     * @return encrypted bytes
79
     * @throws IOException when I/O error occurs
80
     * @throws GeneralSecurityException when transformation error occurs
81
     */
60
    public static byte[] encrypt(byte[] text, PublicKey key) throws IOException, GeneralSecurityException {
82
    public static byte[] encrypt(byte[] text, PublicKey key) throws IOException, GeneralSecurityException {
61
        assert (text.length <= MAX_ENCRYPTION_LENGHT);
83
        assert (text.length <= MAX_ENCRYPTION_LENGHT);
62
        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); // NOI18N
84
        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); // NOI18N
Lines 66-71 Link Here
66
        return encoded;
88
        return encoded;
67
    }
89
    }
68
90
91
    /**
92
     * Decrypt a sequence of bytes.
93
     * @param text byte array to decrypt
94
     * @param key the private key used for the decryption
95
     * @return decrypted bytes
96
     * @throws IOException when I/O error occurs
97
     * @throws GeneralSecurityException when transformation error occurs
98
     */
69
    public static byte[] decrypt(byte[] text, PrivateKey key) throws IOException, GeneralSecurityException {
99
    public static byte[] decrypt(byte[] text, PrivateKey key) throws IOException, GeneralSecurityException {
70
        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); // NOI18N
100
        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); // NOI18N
71
        rsaCipher.init(Cipher.DECRYPT_MODE, key);
101
        rsaCipher.init(Cipher.DECRYPT_MODE, key);
Lines 74-84 Link Here
74
        return decoded;
104
        return decoded;
75
    }
105
    }
76
106
107
    /**
108
     * Encrypt a text.
109
     * @param text text to encrypt
110
     * @param key the public key used for the encryption
111
     * @return encrypted text
112
     * @throws IOException when I/O error occurs
113
     * @throws GeneralSecurityException when transformation error occurs
114
     */
77
    public static String encrypt(String text, PublicKey key) throws IOException, GeneralSecurityException {
115
    public static String encrypt(String text, PublicKey key) throws IOException, GeneralSecurityException {
78
        byte[] encrypted = encrypt(text.getBytes(), key);
116
        byte[] encrypted = encrypt(text.getBytes(), key);
79
        return arrayToString(encrypted);
117
        return arrayToString(encrypted);
80
    }
118
    }
81
119
120
    /**
121
     * Decrypt a text.
122
     * @param text text to decrypt
123
     * @param key the private key used for the decryption
124
     * @return decrypted text
125
     * @throws IOException when I/O error occurs
126
     * @throws GeneralSecurityException when transformation error occurs
127
     */
82
    public static String decrypt(String text, PrivateKey key) throws IOException, GeneralSecurityException {
128
    public static String decrypt(String text, PrivateKey key) throws IOException, GeneralSecurityException {
83
        byte[] decrypted = decrypt(stringToArray(text), key);
129
        byte[] decrypted = decrypt(stringToArray(text), key);
84
        return new String(decrypted);
130
        return new String(decrypted);
(-)a/lib.uihandler/src/org/netbeans/lib/uihandler/ProjectOp.java (-1 / +1 lines)
Lines 38-44 Link Here
38
 * @author Jaroslav Tulach
38
 * @author Jaroslav Tulach
39
 * @since 1.7
39
 * @since 1.7
40
 */
40
 */
41
public final class ProjectOp {
41
final class ProjectOp {
42
    private final String name;
42
    private final String name;
43
    private final String type;
43
    private final String type;
44
    private final boolean startup;
44
    private final boolean startup;
(-)a/lib.uihandler/test/unit/src/org/netbeans/lib/uihandlerserver/ProjectOpTest.java (-1 / +1 lines)
Lines 29-35 Link Here
29
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
29
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
30
 */
30
 */
31
31
32
package org.netbeans.lib.uihandlerserver;
32
package org.netbeans.lib.uihandler;
33
33
34
import java.io.ByteArrayInputStream;
34
import java.io.ByteArrayInputStream;
35
import java.io.InputStream;
35
import java.io.InputStream;
(-)a/nbbuild/build.properties (-3 / +3 lines)
Lines 159-165 Link Here
159
    db,\
159
    db,\
160
    spi.quicksearch,\
160
    spi.quicksearch,\
161
    print,\
161
    print,\
162
    extexecution
162
    extexecution,\
163
    lib.uihandler,\
164
    uihandler
163
165
164
#FIXME: changes for retouche merge:
166
#FIXME: changes for retouche merge:
165
#   editor/codetemplates,\
167
#   editor/codetemplates,\
Lines 205-213 Link Here
205
    java.api.common,\
207
    java.api.common,\
206
    java.j2seproject,\
208
    java.j2seproject,\
207
    junit,\
209
    junit,\
208
    uihandler,\
209
    versioning.core,\
210
    versioning.core,\
210
    lib.uihandler,\
211
    masterfs,\
211
    masterfs,\
212
    projectui
212
    projectui
213
213
(-)a/nbbuild/cluster.properties (-3 / +3 lines)
Lines 179-184 Link Here
179
        javahelp,\
179
        javahelp,\
180
        keyring,\
180
        keyring,\
181
        keyring.impl,\
181
        keyring.impl,\
182
        lib.uihandler,\
182
        libs.felix,\
183
        libs.felix,\
183
        libs.jna,\
184
        libs.jna,\
184
        libs.jsr223,\
185
        libs.jsr223,\
Lines 222-228 Link Here
222
        sendopts,\
223
        sendopts,\
223
        settings,\
224
        settings,\
224
        spi.actions,\
225
        spi.actions,\
225
        spi.quicksearch
226
        spi.quicksearch,\
227
        uihandler
226
validation.nb.cluster.platform=\
228
validation.nb.cluster.platform=\
227
        o.n.core,\
229
        o.n.core,\
228
        core.windows,\
230
        core.windows,\
Lines 736-744 Link Here
736
        bugzilla.exceptionreporter,\
738
        bugzilla.exceptionreporter,\
737
        ide.branding,\
739
        ide.branding,\
738
        ide.branding.kit,\
740
        ide.branding.kit,\
739
        lib.uihandler,\
740
        o.n.upgrader,\
741
        o.n.upgrader,\
741
        uihandler,\
742
        uihandler.exceptionreporter,\
742
        uihandler.exceptionreporter,\
743
        updatecenters,\
743
        updatecenters,\
744
        welcome
744
        welcome
(-)a/uihandler/arch.xml (-13 / +139 lines)
Lines 111-123 Link Here
111
            </p>
111
            </p>
112
            
112
            
113
            <p>
113
            <p>
114
                <api name="org.netbeans.ui" group="logger" category="devel" type="export">
114
                <api name="UI_LOGGER_NAME" group="logger" category="devel" type="export">
115
                    The info about various UI events in the system is collected thru
115
                    The info about various UI events in the system is collected thru
116
                    listening on 
116
                    listening on 
117
                    <a href="@JDK@/java/util/logging/LogRecord.html">log records</a> send to
117
                    <a href="@JDK@/java/util/logging/LogRecord.html">log records</a> send to
118
                    <a href="@JDK@/java/util/logging/Logger.html">
118
                    <a href="@JDK@/java/util/logging/Logger.html">
119
                        Logger.getLogger("org.netbeans.ui")
119
                        Logger.getLogger(UI_LOGGER_NAME_VALUE)
120
                    </a>. Any code in the system can get instance of this logger
120
                    </a>, where UI_LOGGER_NAME_VALUE is a value of UI_LOGGER_NAME
121
                    resource bundle key, defining the name of the UI usage logger.
122
                    Any code in the system can get instance of this logger
123
                    or any child logger and send useful informations to it. 
124
                    At the end of the session the last few hundereds events
125
                    is taken and displayed to the user for further processing.
126
                </api>
127
                <api name="METRICS_LOGGER_NAME" group="logger" category="devel" type="export">
128
                    The info about various UI events in the system is collected thru
129
                    listening on 
130
                    <a href="@JDK@/java/util/logging/LogRecord.html">log records</a> send to
131
                    <a href="@JDK@/java/util/logging/Logger.html">
132
                        Logger.getLogger(METRICS_LOGGER_NAME_VALUE)
133
                    </a>, where METRICS_LOGGER_NAME_VALUE is a value of
134
                    METRICS_LOGGER_NAME resource bundle key, defining the name
135
                    of the metrics logger.
136
                    Any code in the system can get instance of this logger
121
                    or any child logger and send useful informations to it. 
137
                    or any child logger and send useful informations to it. 
122
                    At the end of the session the last few hundereds events
138
                    At the end of the session the last few hundereds events
123
                    is taken and displayed to the user for further processing.
139
                    is taken and displayed to the user for further processing.
Lines 139-145 Link Here
139
                    There is a key in the <code>org.netbeans.modules.uihandler.Bundle</code>
155
                    There is a key in the <code>org.netbeans.modules.uihandler.Bundle</code>
140
                    that specifies the location of the page on a server one shall
156
                    that specifies the location of the page on a server one shall
141
                    query and display to the user when the module is about the
157
                    query and display to the user when the module is about the
142
                    submit data for analysis.
158
                    submit usage data for analysis.
159
                </api>
160
                <api name="METRICS_URL" group="property" category="private" type="export">
161
                    There is a key in the <code>org.netbeans.modules.uihandler.Bundle</code>
162
                    that specifies the location of the page on a server one shall
163
                    query and display to the user when the module is about the
164
                    submit metrics data for analysis.
165
                </api>
166
                <api name="ERROR_URL" group="property" category="private" type="export">
167
                    There is a key in the <code>org.netbeans.modules.uihandler.Bundle</code>
168
                    that specifies the location of the page on a server one shall
169
                    query and display to the user when the module is about the
170
                    submit an error report.
143
                </api>
171
                </api>
144
                <api name="WelcomePageContent" group="java.io.File" category="friend" type="export">
172
                <api name="WelcomePageContent" group="java.io.File" category="friend" type="export">
145
                    The page pointed by <code>WELCOME_URL</code> can contain
173
                    The page pointed by <code>WELCOME_URL</code> can contain
Lines 177-185 Link Here
177
            <p>
205
            <p>
178
                To feed own data about special UI gestures one can just create own
206
                To feed own data about special UI gestures one can just create own
179
                <a href="@JDK@/java/util/logging/Logger.html">
207
                <a href="@JDK@/java/util/logging/Logger.html">
180
                    Logger.getLogger("org.netbeans.ui.ownname")
208
                    Logger.getLogger(UI_LOGGER_NAME_VALUE+".ownname")
181
                </a> and send own log records to it. The format of the log
209
                </a> and send own log records to it.
182
                messages shall follow the one described by the
210
                UI_LOGGER_NAME_VALUE is a value of UI_LOGGER_NAME
211
                resource bundle key, defining the name of the logger.
212
                The format of the log messages shall follow the one described by the
183
                <a href="@org-openide-util@/org/openide/util/doc-files/logging.html">
213
                <a href="@org-openide-util@/org/openide/util/doc-files/logging.html">
184
                    structured logging 
214
                    structured logging 
185
                </a> document, e.g. the 
215
                </a> document, e.g. the 
Lines 293-301 Link Here
293
        </question>
323
        </question>
294
-->
324
-->
295
    <answer id="compat-i18n">
325
    <answer id="compat-i18n">
296
        <p>
326
            There are several resource bundle keys related to branding.
297
            XXX no answer for compat-i18n
327
            These are:
298
        </p>
328
            <ul>
329
                <li>
330
                    <code>userNameURL</code> - The URL used to report Exception
331
                    reporter results, the user name is appended to the URL.
332
                </li>
333
                <li>
334
                    <code>userIdURL</code> - The URL used to report by user identity,
335
                    when user name is not defined. The user identity is appended
336
                    to the URL.
337
                </li>
338
                <li>
339
                    <code>ReportPanel.loginField.AccessibleContext.accessibleName</code> -
340
                    The accessible name of the application's user name field
341
                </li>
342
                <li>
343
                    <code>ReportPanel.loginField.AccessibleContext.accessibleDescription</code> -
344
                    The accessible description of the application's user name field
345
                </li>
346
                <li>
347
                    <code>REGISTRATION_URL</code> - The URL to register a new user
348
                </li>
349
                <li>
350
                    <code>ReportPanel.jLabel11.text</code> - A label next to the
351
                    application's user name field
352
                </li>
353
                <li>
354
                    <code>ReportPanel.jPasswordField1.AccessibleContext.accessibleDescription</code> -
355
                    The accessible description of the application's user password field
356
                </li>
357
                <li>
358
                    <code>no_data_found</code> - Description text about
359
                    a connection problem.
360
                </li>
361
                <li>
362
                    <code>METRICS_LOGGER_NAME</code> - The logger name of metrics
363
                    logging.
364
                </li>
365
                <li>
366
                    <code>UI_LOGGER_NAME</code> - The logger name of UI usages
367
                    logging.
368
                </li>
369
                <li>
370
                    <code>UI_PERFORMANCE_LOGGER_NAME</code> - The logger name
371
                    of performance-related logging.
372
                </li>
373
                <li>
374
                    <code>UI_USER_CONFIGURATION</code> - Text of a configuration
375
                    log message. Following three keys are used to provide the
376
                    application version:
377
                    <ul>
378
                        <li>
379
                            <code>ApplicationVersionResourceBundle</code> -
380
                            A resource bundle the application version is read from
381
                        </li>
382
                        <li>
383
                            <code>ApplicationVersionResourceKey</code> -
384
                            A key with the application version number
385
                        </li>
386
                        <li>
387
                            <code>ApplicationVersionSysPropertyResourceArg</code> -
388
                            A system property, that is used as an argument to the
389
                            application version number key
390
                        </li>
391
                    </ul>
392
                </li>
393
                <li>
394
                    <code>WELCOME_URL</code> - The URL with the welcome text
395
                </li>
396
                <li>
397
                    <code>METRICS_URL</code> - The URL to upload metrics logs to
398
                </li>
399
                <li>
400
                    <code>ERROR_URL</code> - The URL to upload errors to
401
                </li>
402
                <li>
403
                    <code>CHECKING_SERVER_URL</code> - The URL to authenticate
404
                    the user with password
405
                </li>
406
                <li>
407
                    <code>LOG_FILE</code> - The application's log file relative
408
                    to the user directory
409
                </li>
410
                <li>
411
                    <code>MSG_ConnetionFailedReport</code> - This message is
412
                    displayed when connection to the server fails.
413
                </li>
414
                <li>
415
                    <code>LBL_BottomText1</code>, <code>LBL_BottomText2</code>,
416
                    <code>LBL_BottomText3</code> - Text displayed on the usage
417
                    statistics dialog.
418
                </li>
419
                <li>
420
                    <code>METRICS_INFO_URL</code> - This URL is displayed in
421
                    a browser to provide more information about the metrics
422
                    usage tracking.
423
                </li>
424
            </ul>
299
    </answer>
425
    </answer>
300
    
426
    
301
    
427
    
Lines 491-497 Link Here
491
            and registering <a href="@TOP@/org/netbeans/modules/uihandler/api/Deactivated.html">callback interfaces</a> 
617
            and registering <a href="@TOP@/org/netbeans/modules/uihandler/api/Deactivated.html">callback interfaces</a> 
492
            provided by its API. Or the modules do not need to depend on this module at all,
618
            provided by its API. Or the modules do not need to depend on this module at all,
493
            and just generate <a href="@JDK@/java/util/logging/LogRecord.html">log records</a>
619
            and just generate <a href="@JDK@/java/util/logging/LogRecord.html">log records</a>
494
            to the <code>org.netbeans.ui.someloggername</code> log. These records are 
620
            to the <code>UI_LOGGER_NAME_VALUE+".someloggername"</code> logger. These records are 
495
            then going to be consumed by this module, if enabled.
621
            then going to be consumed by this module, if enabled.
496
        </p>
622
        </p>
497
    </answer>
623
    </answer>
Lines 716-722 Link Here
716
-->
842
-->
717
    <answer id="exec-property">
843
    <answer id="exec-property">
718
        <p>
844
        <p>
719
            <api name="org.netbeans.ui.MSG_USER_CONFIGURATION" group="logger" category="devel" type="export">
845
            <api name="MSG_USER_CONFIGURATION" group="logger" category="devel" type="export">
720
                Before the results are submitted one more LogRecord is added. This LogRecord message is
846
                Before the results are submitted one more LogRecord is added. This LogRecord message is
721
                set to <code>MSG_USER_CONFIGURATION</code> . Four upto six parameters are added.
847
                set to <code>MSG_USER_CONFIGURATION</code> . Four upto six parameters are added.
722
                Four common parameters are added always before sending logger info and two error 
848
                Four common parameters are added always before sending logger info and two error 
Lines 725-731 Link Here
725
                <ul title="common parameters">
851
                <ul title="common parameters">
726
                    <li>Operating system name, version and architecture</li>
852
                    <li>Operating system name, version and architecture</li>
727
                    <li>Virtual machine name and version</li>
853
                    <li>Virtual machine name and version</li>
728
                    <li>NetBeans version and build number</li>
854
                    <li>Application version and build number</li>
729
                    <li>User name</li>
855
                    <li>User name</li>
730
                </ul>
856
                </ul>
731
                <ul title="error parameters">
857
                <ul title="error parameters">
(-)a/uihandler/nbproject/project.xml (-1 / +1 lines)
Lines 63-69 Link Here
63
                    <build-prerequisite/>
63
                    <build-prerequisite/>
64
                    <compile-dependency/>
64
                    <compile-dependency/>
65
                    <run-dependency>
65
                    <run-dependency>
66
                        <specification-version>1.33</specification-version>
66
                        <specification-version>1.37</specification-version>
67
                    </run-dependency>
67
                    </run-dependency>
68
                </dependency>
68
                </dependency>
69
                <dependency>
69
                <dependency>
(-)a/uihandler/src/org/netbeans/modules/exceptions/Bundle.properties (-10 / +52 lines)
Lines 1-10 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
7
#
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
26
# Contributor(s):
27
#
28
# The Original Software is NetBeans. The Initial Developer of the Original
29
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
# Microsystems, Inc. All Rights Reserved.
31
#
32
# If you wish your version of this file to be governed by only the CDDL
33
# or only the GPL Version 2, indicate your decision by adding
34
# "[Contributor] elects to include this software in this distribution
35
# under the [CDDL or GPL Version 2] license." If you do not indicate a
36
# single choice of license, a recipient has the option to distribute
37
# your version of this file under either the CDDL, the GPL Version 2 or
38
# to extend the choice of license to its licensees as provided above.
39
# However, if you add GPL Version 2 code and therefore, elected the GPL
40
# Version 2 license, then the option applies only if the new code is
41
# made subject to such option by the copyright holder.
42
1
CTL_ReporterResultAction=E&xception Reporter
43
CTL_ReporterResultAction=E&xception Reporter
2
CTL_ReporterResultTopComponent=Exception Reporter
44
CTL_ReporterResultTopComponent=Exception Reporter
3
HINT_ReporterResultTopComponent=This is an Exception Reporter Window
45
HINT_ReporterResultTopComponent=This is an Exception Reporter Window
4
#NOI18N
46
#NOI18N
5
userNameURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userName=
47
userNameURL=http://statistics.myapplication.org/analytics/feedback.do?userName=
6
#NOI18N
48
#NOI18N
7
userIdURL=http://statistics.netbeans.org/analytics/nbfeedback_69.do?userId=
49
userIdURL=http://statistics.myapplication.org/analytics/feedback.do?userId=
8
50
9
ReportPanel.jLabel1.text=&Username:
51
ReportPanel.jLabel1.text=&Username:
10
ReportPanel.jLabel3.text=If you want to get informed about the state of this problem, you need to be a registered user.
52
ReportPanel.jLabel3.text=If you want to get informed about the state of this problem, you need to be a registered user.
Lines 15-27 Link Here
15
57
16
ReportPanel.AccessibleContext.accessibleName=Report Dialog
58
ReportPanel.AccessibleContext.accessibleName=Report Dialog
17
59
18
ReportPanel.loginField.AccessibleContext.accessibleName=NetBeans user name
60
ReportPanel.loginField.AccessibleContext.accessibleName=My Application user name
19
61
20
ReportPanel.loginField.AccessibleContext.accessibleDescription=NetBeans user name. You should fill this field if you are a registered user.
62
ReportPanel.loginField.AccessibleContext.accessibleDescription=My Application user name. You should fill this field if you are a registered user.
21
63
22
ReportPanel.summaryField.AccessibleContext.accessibleDescription=You should write short summary of the exception
64
ReportPanel.summaryField.AccessibleContext.accessibleDescription=You should write short summary of the exception
23
65
24
ReportPanel.commentArea.AccessibleContext.accessibleDescription=You can describe here what you were doing when this issue rised.
66
ReportPanel.commentArea.AccessibleContext.accessibleDescription=You can describe here what you were doing when this issue arose.
25
ReportPanel.jLabel9.text=Su&mmary:
67
ReportPanel.jLabel9.text=Su&mmary:
26
68
27
ReportPanel.jLabel4.text=&Describe what you were doing when the problem occurred, please:
69
ReportPanel.jLabel4.text=&Describe what you were doing when the problem occurred, please:
Lines 31-54 Link Here
31
ReportPanel.summaryField.text=
73
ReportPanel.summaryField.text=
32
74
33
#NOI18N
75
#NOI18N
34
REGISTRATION_URL=https://www.netbeans.org/people/new
76
REGISTRATION_URL=https://www.myapplication.org/people/new
35
ReportPanel.jLabel8.text_1=The report contains UI gesture data collected prior to the problem.
77
ReportPanel.jLabel8.text_1=The report contains UI gesture data collected prior to the problem.
36
ReportPanel.jLabel5.text_1=&Password:
78
ReportPanel.jLabel5.text_1=&Password:
37
jCheckBox1.text=R&emember password
79
jCheckBox1.text=R&emember password
38
ReportPanel.jLabel10.text=Username or password is wrong
80
ReportPanel.jLabel10.text=Username or password is wrong
39
ReportPanel.checking_password=Checking your password
81
ReportPanel.checking_password=Checking your password
40
82
41
ReportPanel.jLabel11.text=(Your NetBeans.org username)
83
ReportPanel.jLabel11.text=(Your MyApplication.org username)
42
ReportPanel.asAGuestCheckBox.text=Send &Report as a Guest
84
ReportPanel.asAGuestCheckBox.text=Send &Report as a Guest
43
ReportPanel.jPasswordField1.AccessibleContext.accessibleName=Password field
85
ReportPanel.jPasswordField1.AccessibleContext.accessibleName=Password field
44
ReportPanel.jPasswordField1.AccessibleContext.accessibleDescription=Type your NetBeans.org password
86
ReportPanel.jPasswordField1.AccessibleContext.accessibleDescription=Type your MyApplication.org password
45
ReportPanel.rememberCheckBox.AccessibleContext.accessibleDescription=null
87
ReportPanel.rememberCheckBox.AccessibleContext.accessibleDescription=null
46
ReporterResultTopComponent.jButton1.text=Show my issues
88
ReporterResultTopComponent.jButton1.text=Show my issues
47
no_data_found=<p>No data found at <a href="{0}">{0}</a>.\
89
no_data_found=<p>No data found at <a href="{0}">{0}</a>.\
48
<p>The problem can be caused by broken internet connection or on server side. \
90
<p>The problem can be caused by broken internet connection or on server side. \
49
Try to report problem later again. If you would face this problem repeatedly, \
91
Try to report problem later again. If you would face this problem repeatedly, \
50
submit a bug at <a href="https://netbeans.org/bugzilla/enter_bug.cgi?product=ide&component=Report%20Exception">\
92
submit a bug at <a href="https://myapplication.org/bugzilla/enter_bug.cgi?product=app&component=Report%20Exception">\
51
https://netbeans.org/bugzilla/enter_bug.cgi</a> against Exception reporter, please.
93
https://myapplication.org/bugzilla/enter_bug.cgi</a> against Exception reporter, please.
52
LoadingMessage=Loading 
94
LoadingMessage=Loading 
53
ReportPanel.oomInfo.text=HeapDump is needed to resolve this problem, the upload might have up to 30MB.
95
ReportPanel.oomInfo.text=HeapDump is needed to resolve this problem, the upload might have up to 30MB.
54
96
(-)a/uihandler/src/org/netbeans/modules/exceptions/ExceptionsSettings.java (-7 / +7 lines)
Lines 46-52 Link Here
46
import java.awt.EventQueue;
46
import java.awt.EventQueue;
47
import java.util.prefs.Preferences;
47
import java.util.prefs.Preferences;
48
import org.netbeans.api.keyring.Keyring;
48
import org.netbeans.api.keyring.Keyring;
49
import org.netbeans.lib.uihandler.NBBugzillaAccessor;
49
import org.netbeans.lib.uihandler.BugTrackingAccessor;
50
import org.openide.util.Lookup;
50
import org.openide.util.Lookup;
51
import org.openide.util.NbBundle;
51
import org.openide.util.NbBundle;
52
import org.openide.util.NbPreferences;
52
import org.openide.util.NbPreferences;
Lines 62-68 Link Here
62
    private static final String passwdKey = "exceptionreporter"; // NOI18N
62
    private static final String passwdKey = "exceptionreporter"; // NOI18N
63
    private static final String guestProp = "Guest";
63
    private static final String guestProp = "Guest";
64
    private static final String rememberProp = "RememberPasswd";
64
    private static final String rememberProp = "RememberPasswd";
65
    private final NBBugzillaAccessor nba;
65
    private final BugTrackingAccessor nba;
66
    private String userName;
66
    private String userName;
67
    private char[] passwd;
67
    private char[] passwd;
68
    private boolean changed = false;
68
    private boolean changed = false;
Lines 70-79 Link Here
70
    /** Creates a new instance of ExceptionsSettings */
70
    /** Creates a new instance of ExceptionsSettings */
71
    public ExceptionsSettings() {
71
    public ExceptionsSettings() {
72
        assert !EventQueue.isDispatchThread();
72
        assert !EventQueue.isDispatchThread();
73
        nba = Lookup.getDefault().lookup(NBBugzillaAccessor.class);
73
        nba = Lookup.getDefault().lookup(BugTrackingAccessor.class);
74
        if (nba != null) {
74
        if (nba != null) {
75
            userName = nba.getNBUsername();
75
            userName = nba.getUsername();
76
            passwd = nba.getNBPassword();
76
            passwd = nba.getPassword();
77
        } else {
77
        } else {
78
            userName = prefs().get(userProp, "");
78
            userName = prefs().get(userProp, "");
79
            String old = prefs().get(passwdProp, null);
79
            String old = prefs().get(passwdProp, null);
Lines 100-107 Link Here
100
            return;
100
            return;
101
        }
101
        }
102
        if (nba != null){
102
        if (nba != null){
103
            nba.saveNBUsername(userName);
103
            nba.saveUsername(userName);
104
            nba.saveNBPassword(passwd);
104
            nba.savePassword(passwd);
105
        }else{
105
        }else{
106
            prefs().put(userProp, userName);
106
            prefs().put(userProp, userName);
107
            Keyring.save(passwdKey, passwd,
107
            Keyring.save(passwdKey, passwd,
(-)a/uihandler/src/org/netbeans/modules/exceptions/ReporterResultTopComponent.java (-2 / +2 lines)
Lines 58-64 Link Here
58
import javax.swing.text.AttributeSet;
58
import javax.swing.text.AttributeSet;
59
import javax.swing.text.SimpleAttributeSet;
59
import javax.swing.text.SimpleAttributeSet;
60
import javax.swing.text.html.HTML;
60
import javax.swing.text.html.HTML;
61
import org.netbeans.lib.uihandler.NBBugzillaAccessor;
61
import org.netbeans.lib.uihandler.BugTrackingAccessor;
62
import org.netbeans.modules.uihandler.Installer;
62
import org.netbeans.modules.uihandler.Installer;
63
import org.openide.awt.HtmlBrowser;
63
import org.openide.awt.HtmlBrowser;
64
import org.openide.util.ImageUtilities;
64
import org.openide.util.ImageUtilities;
Lines 374-380 Link Here
374
        if (!HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())) {
374
        if (!HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())) {
375
            return;
375
            return;
376
        }
376
        }
377
        NBBugzillaAccessor accessor = Lookup.getDefault().lookup(NBBugzillaAccessor.class);
377
        BugTrackingAccessor accessor = Lookup.getDefault().lookup(BugTrackingAccessor.class);
378
        if (accessor != null){
378
        if (accessor != null){
379
            AttributeSet ats = e.getSourceElement().getAttributes();
379
            AttributeSet ats = e.getSourceElement().getAttributes();
380
            Object attribute = ats.getAttribute(HTML.getTag("a"));
380
            Object attribute = ats.getAttribute(HTML.getTag("a"));
(-)a/uihandler/src/org/netbeans/modules/uihandler/Bundle.properties (-13 / +22 lines)
Lines 1-6 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
2
#
3
# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
3
# Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
4
#
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
6
# Other names may be trademarks of their respective owners.
Lines 50-55 Link Here
50
    It contains UI elements that allow inspection and submission of these data to the collecting server.
50
    It contains UI elements that allow inspection and submission of these data to the collecting server.
51
OpenIDE-Module-Name=UI Gestures Collector Infrastructure
51
OpenIDE-Module-Name=UI Gestures Collector Infrastructure
52
52
53
METRICS_LOGGER_NAME=org.myapplication.ui.metrics
54
UI_LOGGER_NAME=org.myapplication.ui
55
UI_PERFORMANCE_LOGGER_NAME=org.myapplication.ui.performance
53
56
54
MSG_SubmitDialogTitle=UI Gestures Collector
57
MSG_SubmitDialogTitle=UI Gestures Collector
55
58
Lines 90-97 Link Here
90
Toolbars/UIGestures=UI Gestures
93
Toolbars/UIGestures=UI Gestures
91
94
92
95
93
UI_USER_CONFIGURATION=The operating system is {0}, virtual machine {1}, NetBeans version {2} and user name {3}.
96
UI_USER_CONFIGURATION=The operating system is {0}, virtual machine {1}, Application version {2} and user name {3}.
94
MSG_USER_CONFIGURATION=User Configuration
97
MSG_USER_CONFIGURATION=User Configuration
98
# A resource bundle the application version is read from
99
ApplicationVersionResourceBundle=org.myapplication.Bundle
100
# A key with the application version number
101
ApplicationVersionResourceKey=currentVersion
102
# A system property, that is used as an argument to the application version number key
103
ApplicationVersionSysPropertyResourceArg=buildnumber
95
104
96
#
105
#
97
# Module UI Logger
106
# Module UI Logger
Lines 109-129 Link Here
109
118
110
# URL to display to as a welcome text
119
# URL to display to as a welcome text
111
#NOI18N
120
#NOI18N
112
WELCOME_URL=https://netbeans.org/nonav/uigestures/index3.html
121
WELCOME_URL=https://myapplication.org/uigestures/welcome.html
113
MSG_WELCOME_URL_EXIT=Cancel
122
MSG_WELCOME_URL_EXIT=Cancel
114
123
115
#NOI18N
124
#NOI18N
116
METRICS_URL=https://netbeans.org/nonav/uigestures/index4.html
125
METRICS_URL=https://myapplication.org/uigestures/metrics.html
117
MSG_METRICS_URL_EXIT=Cancel
126
MSG_METRICS_URL_EXIT=Cancel
118
127
119
# URL to display to as a welcome text in case of error
128
# URL to display to as a welcome text in case of error
120
#NOI18N
129
#NOI18N
121
ERROR_URL=https://netbeans.org/nonav/uigestures/error2.html
130
ERROR_URL=https://myapplication.org/uigestures/error.html
122
MSG_ERROR_URL_EXIT=Cancel
131
MSG_ERROR_URL_EXIT=Cancel
123
MSG_SubmitButton=&Review and Report Problem
132
MSG_SubmitButton=&Review and Report Problem
124
133
125
#NOI18N
134
#NOI18N
126
CHECKING_SERVER_URL=http://statistics.netbeans.org/analytics/authenticate?username={0}&secur_passwd={1}
135
CHECKING_SERVER_URL=http://statistics.myapplication.org/analytics/authenticate?username={0}&secur_passwd={1}
127
LOG_FILE=var/log/messages.log
136
LOG_FILE=var/log/messages.log
128
# {0} - host
137
# {0} - host
129
# {1} - url of upload
138
# {1} - url of upload
Lines 133-139 Link Here
133
# {2} - the absolute path to the IDE's log file (defined by the LOG_FILE key above)
142
# {2} - the absolute path to the IDE's log file (defined by the LOG_FILE key above)
134
# String between [URL] and [/URL] is rendered as an URL and it opens in a browser upon a click
143
# String between [URL] and [/URL] is rendered as an URL and it opens in a browser upon a click
135
# String between [TTC] and [/TTC] (Text To Copy) is possible to select and copy
144
# String between [TTC] and [/TTC] (Text To Copy) is possible to select and copy
136
MSG_ConnetionFailedReport=Upload of log failed, please report the original problem directly at [URL]http://www.netbeans.org/community/issues.html[/URL] and attach messages.log file.\
145
MSG_ConnetionFailedReport=Upload of log failed, please report the original problem directly at [URL]http://www.myapplication.org/bugs.html[/URL] and attach messages.log file.\
137
\nThe messages.log file is located at [TTC]{2}[/TTC].
146
\nThe messages.log file is located at [TTC]{2}[/TTC].
138
MSG_UploadProgressHandle=Uploading log file
147
MSG_UploadProgressHandle=Uploading log file
139
MSG_UploadConnecting=Connecting...
148
MSG_UploadConnecting=Connecting...
Lines 152-160 Link Here
152
SubmitPanel.jLabel1.text_1=Show Record\:
161
SubmitPanel.jLabel1.text_1=Show Record\:
153
162
154
Metrics_title=Usage Statistics
163
Metrics_title=Usage Statistics
155
LBL_BottomText1=<html>Help us improve the NetBeans IDE by providing anonymous usage data.</html>
164
LBL_BottomText1=<html>Help us improve the MyApplication by providing anonymous usage data.</html>
156
LBL_BottomText2=<html>If you agree to participate, the IDE will send anonymous \
165
LBL_BottomText2=<html>If you agree to participate, the application will send anonymous \
157
information about the high-level features that you use to a database at netbeans.org.</html>
166
information about the high-level features that you use to a database at myapplication.org.</html>
158
LBL_BottomText3=<html>The usage statistics help us better understand user \
167
LBL_BottomText3=<html>The usage statistics help us better understand user \
159
requirements and prioritize improvements in future releases. We will never \
168
requirements and prioritize improvements in future releases. We will never \
160
reverse-engineer the collected data to find specific details about your projects.</html>
169
reverse-engineer the collected data to find specific details about your projects.</html>
Lines 168-181 Link Here
168
ACSD_MetricsCancel=Disable usage statistics
177
ACSD_MetricsCancel=Disable usage statistics
169
178
170
#NOI18N
179
#NOI18N
171
METRICS_INFO_URL=https://www.netbeans.org/about/usage-tracking.html
180
METRICS_INFO_URL=https://www.myapplication.org/about/usage-tracking.html
172
181
173
LBL_LearnMore=<html><font color="#0000FF" <u>Learn more</u></font></html>
182
LBL_LearnMore=<html><font color="#0000FF" <u>Learn more</u></font></html>
174
ACSN_LearnMore=Learn more
183
ACSN_LearnMore=Learn more
175
ACSD_LearnMore=Learn more
184
ACSD_LearnMore=Learn more
176
VIEW_DATA_TILTE=Data
185
VIEW_DATA_TILTE=Data
177
UI_TAB_TITLE=UI Log
186
UI_TAB_TITLE=UI Log
178
IDE_LOG_TAB_TITLE=IDE Log
187
IDE_LOG_TAB_TITLE=Application Log
179
188
180
189
181
# Slowness Reporter
190
# Slowness Reporter
Lines 192-198 Link Here
192
 Do you want to report it?
201
 Do you want to report it?
193
Report=Review and Report Problem.
202
Report=Review and Report Problem.
194
203
195
IDE_STARTUP=IDE startup
204
IDE_STARTUP=Application startup
196
SubmitPanel.profileData.text=Show profiler data
205
SubmitPanel.profileData.text=Show profiler data
197
SubmitPanel.heapDump.text=Show heapdump
206
SubmitPanel.heapDump.text=Show heapdump
198
ReportPanel.sendButton.tooltip=Allows to send report once description or steps to reproduce are provided.
207
ReportPanel.sendButton.tooltip=Allows to send report once description or steps to reproduce are provided.
(-)a/uihandler/src/org/netbeans/modules/uihandler/CPUInfo.java (-1 / +1 lines)
Lines 59-64 Link Here
59
        OperatingSystemMXBean bean = ManagementFactory.getOperatingSystemMXBean();
59
        OperatingSystemMXBean bean = ManagementFactory.getOperatingSystemMXBean();
60
        Object [] params = new Object[]{bean.getAvailableProcessors()};
60
        Object [] params = new Object[]{bean.getAvailableProcessors()};
61
        log.setParameters(params);
61
        log.setParameters(params);
62
        Logger.getLogger("org.netbeans.ui.performance").log(log);
62
        Logger.getLogger(Installer.UI_PERFORMANCE_LOGGER_NAME).log(log);
63
    }
63
    }
64
}
64
}
(-)a/uihandler/src/org/netbeans/modules/uihandler/EarlyHandler.java (-1 / +1 lines)
Lines 67-73 Link Here
67
67
68
    @Override
68
    @Override
69
    public void publish(LogRecord record) {
69
    public void publish(LogRecord record) {
70
        if (record.getLoggerName() != null && record.getLoggerName().startsWith("org.netbeans.ui")) { // NOI18N
70
        if (record.getLoggerName() != null && record.getLoggerName().startsWith(Installer.UI_LOGGER_NAME)) {
71
            disable();
71
            disable();
72
            Installer.findObject(Installer.class, true).restored();
72
            Installer.findObject(Installer.class, true).restored();
73
            // one again for the Installer's logs
73
            // one again for the Installer's logs
(-)a/uihandler/src/org/netbeans/modules/uihandler/Installer.java (-7 / +12 lines)
Lines 178-184 Link Here
178
178
179
    private String cmd;
179
    private String cmd;
180
180
181
    static final String METRICS_LOGGER_NAME = "org.netbeans.ui.metrics"; // NOI18N
181
    static final String METRICS_LOGGER_NAME = NbBundle.getMessage(Installer.class, "METRICS_LOGGER_NAME");
182
    static final String UI_LOGGER_NAME = NbBundle.getMessage(Installer.class, "UI_LOGGER_NAME");
183
    static final String UI_PERFORMANCE_LOGGER_NAME = NbBundle.getMessage(Installer.class, "UI_PERFORMANCE_LOGGER_NAME");
182
    private static Pattern ENCODING = Pattern.compile(
184
    private static Pattern ENCODING = Pattern.compile(
183
        "<meta.*http-equiv=['\"]Content-Type['\"]" +
185
        "<meta.*http-equiv=['\"]Content-Type['\"]" +
184
        ".*content=.*charset=([A-Za-z0-9\\-]+)['\"]>", Pattern.CASE_INSENSITIVE
186
        ".*content=.*charset=([A-Za-z0-9\\-]+)['\"]>", Pattern.CASE_INSENSITIVE
Lines 229-235 Link Here
229
    @Override
231
    @Override
230
    public void restored() {
232
    public void restored() {
231
        TimeToFailure.logAction();
233
        TimeToFailure.logAction();
232
        Logger log = Logger.getLogger("org.netbeans.ui"); // NOI18N
234
        Logger log = Logger.getLogger(UI_LOGGER_NAME);
233
        log.setUseParentHandlers(false);
235
        log.setUseParentHandlers(false);
234
        log.setLevel(Level.FINEST);
236
        log.setLevel(Level.FINEST);
235
        log.addHandler(ui);
237
        log.addHandler(ui);
Lines 292-298 Link Here
292
    }
294
    }
293
    
295
    
294
    private void logIdeStartup() {
296
    private void logIdeStartup() {
295
        Logger.getLogger("org.netbeans.ui").log(new LogRecord(Level.CONFIG, IDE_STARTUP));
297
        Logger.getLogger(UI_LOGGER_NAME).log(new LogRecord(Level.CONFIG, IDE_STARTUP));
296
    }
298
    }
297
299
298
    private void usageStatisticsReminder () {
300
    private void usageStatisticsReminder () {
Lines 402-408 Link Here
402
    }
404
    }
403
405
404
    public final void doClose() {
406
    public final void doClose() {
405
        Logger log = Logger.getLogger("org.netbeans.ui"); // NOI18N
407
        Logger log = Logger.getLogger(UI_LOGGER_NAME);
406
        log.removeHandler(ui);
408
        log.removeHandler(ui);
407
        Logger all = Logger.getLogger(""); // NOI18N
409
        Logger all = Logger.getLogger(""); // NOI18N
408
        all.removeHandler(handler);
410
        all.removeHandler(handler);
Lines 985-991 Link Here
985
    }
987
    }
986
988
987
    static void logDeactivated(){
989
    static void logDeactivated(){
988
        Logger log = Logger.getLogger("org.netbeans.ui"); // NOI18N
990
        Logger log = Logger.getLogger(UI_LOGGER_NAME);
989
        for (Deactivated a : Lookup.getDefault().lookupAll(Deactivated.class)) {
991
        for (Deactivated a : Lookup.getDefault().lookupAll(Deactivated.class)) {
990
            a.deactivated(log);
992
            a.deactivated(log);
991
        }
993
        }
Lines 2106-2115 Link Here
2106
2108
2107
        private static String getVersion(){
2109
        private static String getVersion(){
2108
            String str = ""; // NOI18N
2110
            String str = ""; // NOI18N
2111
            String versionResourceBundle = NbBundle.getMessage(Installer.class, "ApplicationVersionResourceBundle");    // NOI18N
2112
            String versionResourceKey = NbBundle.getMessage(Installer.class, "ApplicationVersionResourceKey");          // NOI18N
2113
            String sysPropertyVersionResourceArg = NbBundle.getMessage(Installer.class, "ApplicationVersionSysPropertyResourceArg");// NOI18N
2109
            try {
2114
            try {
2110
                str = MessageFormat.format(
2115
                str = MessageFormat.format(
2111
                        NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"), // NOI18N
2116
                        NbBundle.getBundle(versionResourceBundle).getString(versionResourceKey),
2112
                        new Object[] {System.getProperty("netbeans.buildnumber")} // NOI18N
2117
                        new Object[] {System.getProperty(sysPropertyVersionResourceArg)}
2113
                );
2118
                );
2114
            } catch (MissingResourceException ex) {
2119
            } catch (MissingResourceException ex) {
2115
                LOG.log(Level.FINE, ex.getMessage(), ex);
2120
                LOG.log(Level.FINE, ex.getMessage(), ex);
(-)a/uihandler/src/org/netbeans/modules/uihandler/ScreenSize.java (-1 / +1 lines)
Lines 69-74 Link Here
69
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
69
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
70
        params.add(ge.getScreenDevices().length);
70
        params.add(ge.getScreenDevices().length);
71
        log.setParameters(params.toArray());
71
        log.setParameters(params.toArray());
72
        Logger.getLogger("org.netbeans.ui").log(log);
72
        Logger.getLogger(Installer.UI_LOGGER_NAME).log(log);
73
    }
73
    }
74
}
74
}
(-)a/uihandler/src/org/netbeans/modules/uihandler/UINode.java (-3 / +3 lines)
Lines 184-195 Link Here
184
                if (full == null) {
184
                if (full == null) {
185
                    return null;
185
                    return null;
186
                }
186
                }
187
                if (full.startsWith("org.netbeans.ui")) {
187
                if (full.startsWith(Installer.UI_LOGGER_NAME)) {
188
                    if (full.equals("org.netbeans.ui")) {
188
                    if (full.equals(Installer.UI_LOGGER_NAME)) {
189
                        return "UI General";
189
                        return "UI General";
190
                    }
190
                    }
191
                    
191
                    
192
                    return full.substring("org.netbeans.ui.".length());
192
                    return full.substring(Installer.UI_LOGGER_NAME.length());
193
                }
193
                }
194
                return full;
194
                return full;
195
            }
195
            }
(-)a/uihandler/src/org/netbeans/modules/uihandler/api/Activated.java (+5 lines)
Lines 53-57 Link Here
53
 * @author Jaroslav Tulach
53
 * @author Jaroslav Tulach
54
 */
54
 */
55
public interface Activated {
55
public interface Activated {
56
    
57
    /**
58
     * Called when the UI logger is activated.
59
     * @param uiLogger the activated UI logger
60
     */
56
    public void activated(Logger uiLogger);
61
    public void activated(Logger uiLogger);
57
}
62
}
(-)a/uihandler/src/org/netbeans/modules/uihandler/api/Deactivated.java (+5 lines)
Lines 53-57 Link Here
53
 * @author Jaroslav Tulach
53
 * @author Jaroslav Tulach
54
 */
54
 */
55
public interface Deactivated {
55
public interface Deactivated {
56
    
57
    /**
58
     * Called when the UI logger is deactivated.
59
     * @param uiLogger the deactivated UI logger
60
     */
56
    public void deactivated(Logger uiLogger);
61
    public void deactivated(Logger uiLogger);
57
}
62
}
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/ActivatedDeativatedTest.java (-1 / +1 lines)
Lines 84-90 Link Here
84
    }
84
    }
85
    
85
    
86
    public void testActivatedAndDeativated() {
86
    public void testActivatedAndDeativated() {
87
        CharSequence log = Log.enable("org.netbeans.ui", Level.ALL);
87
        CharSequence log = Log.enable(Installer.UI_LOGGER_NAME, Level.ALL);
88
        
88
        
89
        o.restored();
89
        o.restored();
90
        if (log.toString().indexOf("A start") == -1) {
90
        if (log.toString().indexOf("A start") == -1) {
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/AutoSubmitTest.java (-2 / +2 lines)
Lines 151-158 Link Here
151
            //Installer.writeOut(r);
151
            //Installer.writeOut(r);
152
            MemoryURL.registerURL("memory://auto.html", utf8);
152
            MemoryURL.registerURL("memory://auto.html", utf8);
153
            LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING"+i);
153
            LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING"+i);
154
            r.setLoggerName("org.netbeans.ui.anything");
154
            r.setLoggerName(Installer.UI_LOGGER_NAME + ".anything");
155
            Logger.getLogger("org.netbeans.ui.anything").log(r);
155
            Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").log(r);
156
        }
156
        }
157
        UIHandler.waitFlushed();
157
        UIHandler.waitFlushed();
158
        
158
        
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/EnabledModulesCollectorTest.java (-1 / +1 lines)
Lines 77-83 Link Here
77
77
78
    public void testSetOfEnabledModulesIsListed() {
78
    public void testSetOfEnabledModulesIsListed() {
79
        // just log something
79
        // just log something
80
        Logger.getLogger("org.netbeans.ui.empty").warning("say anything");
80
        Logger.getLogger(Installer.UI_LOGGER_NAME + ".empty").warning("say anything");
81
81
82
        Installer.logDeactivated();
82
        Installer.logDeactivated();
83
        assertTrue("ok", installer.closing());
83
        assertTrue("ok", installer.closing());
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/ExceptionsTest.java (-1 / +1 lines)
Lines 81-87 Link Here
81
    }
81
    }
82
    
82
    
83
    public void testExceptionThrown() throws Exception{
83
    public void testExceptionThrown() throws Exception{
84
        Logger uiLogger = Logger.getLogger("org.netbeans.ui");
84
        Logger uiLogger = Logger.getLogger(Installer.UI_LOGGER_NAME);
85
        LogRecord log1 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
85
        LogRecord log1 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
86
        LogRecord log2 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
86
        LogRecord log2 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
87
        LogRecord log3 = new LogRecord(Level.SEVERE, "NO EXCEPTION LOG");
87
        LogRecord log3 = new LogRecord(Level.SEVERE, "NO EXCEPTION LOG");
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/InstallerInitTest.java (-2 / +2 lines)
Lines 131-137 Link Here
131
131
132
    public void testGenerateEnoughLogsExit() throws Exception {
132
    public void testGenerateEnoughLogsExit() throws Exception {
133
        LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
133
        LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
134
        r.setLoggerName("org.netbeans.ui.anything");
134
        r.setLoggerName(Installer.UI_LOGGER_NAME + ".anything");
135
135
136
        String utf8 = 
136
        String utf8 = 
137
            "<html><head>" +
137
            "<html><head>" +
Lines 146-152 Link Here
146
        MemoryURL.registerURL("memory://start.html", is);
146
        MemoryURL.registerURL("memory://start.html", is);
147
        
147
        
148
        for (int i = 0; i < 1500; i++) {
148
        for (int i = 0; i < 1500; i++) {
149
            Logger.getLogger("org.netbeans.ui.anything").log(r);
149
            Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").log(r);
150
        }
150
        }
151
        assertEquals("full buffer", 1000, InstallerTest.getLogsSize());
151
        assertEquals("full buffer", 1000, InstallerTest.getLogsSize());
152
        
152
        
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/InstallerLittleTest.java (-2 / +2 lines)
Lines 117-123 Link Here
117
117
118
    public void testGenerateTooLittleLogs() throws Exception {
118
    public void testGenerateTooLittleLogs() throws Exception {
119
        LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
119
        LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
120
        r.setLoggerName("org.netbeans.ui.anything");
120
        r.setLoggerName(Installer.UI_LOGGER_NAME + ".anything");
121
121
122
        String utf8 = 
122
        String utf8 = 
123
            "<html><head>" +
123
            "<html><head>" +
Lines 132-138 Link Here
132
        MemoryURL.registerURL("memory://start.html", is);
132
        MemoryURL.registerURL("memory://start.html", is);
133
        
133
        
134
        for (int i = 0; i < 500; i++) {
134
        for (int i = 0; i < 500; i++) {
135
            Logger.getLogger("org.netbeans.ui.anything").log(r);
135
            Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").log(r);
136
        }
136
        }
137
        assertEquals("not full buffer", 500, InstallerTest.getLogsSize());
137
        assertEquals("not full buffer", 500, InstallerTest.getLogsSize());
138
        
138
        
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/InstallerReadPageTest.java (-1 / +1 lines)
Lines 123-129 Link Here
123
123
124
    @RandomlyFails // NB-Core-Build #7964
124
    @RandomlyFails // NB-Core-Build #7964
125
    public void testSendLogWithException() throws Exception {
125
    public void testSendLogWithException() throws Exception {
126
        Logger uiLogger = Logger.getLogger("org.netbeans.ui");
126
        Logger uiLogger = Logger.getLogger(Installer.UI_LOGGER_NAME);
127
        LogRecord log1 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
127
        LogRecord log1 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
128
        LogRecord log2 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
128
        LogRecord log2 = new LogRecord(Level.SEVERE, "TESTING MESSAGE");
129
        LogRecord log3 = new LogRecord(Level.SEVERE, "NO EXCEPTION LOG");
129
        LogRecord log3 = new LogRecord(Level.SEVERE, "NO EXCEPTION LOG");
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/InstallerTest.java (-2 / +2 lines)
Lines 155-161 Link Here
155
    
155
    
156
    @RandomlyFails // #9267, #9435, #9436, #9437, #9949
156
    @RandomlyFails // #9267, #9435, #9436, #9437, #9949
157
    public void testLogsRereadOnStartup() throws Exception {
157
    public void testLogsRereadOnStartup() throws Exception {
158
        Logger log = Logger.getLogger("org.netbeans.ui"); // NOI18N
158
        Logger log = Logger.getLogger(Installer.UI_LOGGER_NAME);
159
        log.warning("Something happened");
159
        log.warning("Something happened");
160
160
161
        SwingUtilities.invokeAndWait(new Runnable() {
161
        SwingUtilities.invokeAndWait(new Runnable() {
Lines 188-194 Link Here
188
    }
188
    }
189
189
190
    public void testWeCanGetLast1000If1500Logged() throws Exception {
190
    public void testWeCanGetLast1000If1500Logged() throws Exception {
191
        Logger log = Logger.getLogger("org.netbeans.ui"); // NOI18N
191
        Logger log = Logger.getLogger(Installer.UI_LOGGER_NAME);
192
        
192
        
193
        for (int i = 0; i < 1500; i++) {
193
        for (int i = 0; i < 1500; i++) {
194
            log.warning("" + i);
194
            log.warning("" + i);
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/LogFileIsKeptAtSizeOf1000Test.java (-2 / +2 lines)
Lines 130-139 Link Here
130
        
130
        
131
        for (int repeat = 0; repeat < 10; repeat++) {
131
        for (int repeat = 0; repeat < 10; repeat++) {
132
            LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
132
            LogRecord r = new LogRecord(Level.INFO, "MSG_SOMETHING");
133
            r.setLoggerName("org.netbeans.ui.anything");
133
            r.setLoggerName(Installer.UI_LOGGER_NAME + ".anything");
134
134
135
            for (int i = 0; i < 1500; i++) {
135
            for (int i = 0; i < 1500; i++) {
136
                Logger.getLogger("org.netbeans.ui.anything").log(r);
136
                Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").log(r);
137
            }
137
            }
138
            assertEquals("full buffer", 1000, InstallerTest.getLogsSize());
138
            assertEquals("full buffer", 1000, InstallerTest.getLogsSize());
139
139
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/LogsTooEarlyTest.java (-1 / +1 lines)
Lines 105-111 Link Here
105
    }
105
    }
106
106
107
    public void testLogsReceivedOnStartup() throws Exception {
107
    public void testLogsReceivedOnStartup() throws Exception {
108
        Logger.getLogger("org.netbeans.ui.anything").warning("Ahoj");
108
        Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").warning("Ahoj");
109
109
110
        installer.restored();
110
        installer.restored();
111
        
111
        
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/LogsTooLateTest.java (-1 / +1 lines)
Lines 86-92 Link Here
86
        assertEquals("no logs", 0, InstallerTest.getLogsSize());
86
        assertEquals("no logs", 0, InstallerTest.getLogsSize());
87
        installer.closing();
87
        installer.closing();
88
        installer.close();
88
        installer.close();
89
        Logger.getLogger("org.netbeans.ui.anything").warning("Ahoj");
89
        Logger.getLogger(Installer.UI_LOGGER_NAME + ".anything").warning("Ahoj");
90
        
90
        
91
        assertEquals("one logger received", 1, InstallerTest.getLogsSize());
91
        assertEquals("one logger received", 1, InstallerTest.getLogsSize());
92
    }
92
    }
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/ScreenSizeTest.java (-1 / +1 lines)
Lines 69-75 Link Here
69
    }
69
    }
70
70
71
    public void testScreenResolutionLogging() {
71
    public void testScreenResolutionLogging() {
72
        Logger logger = Logger.getLogger("org.netbeans.ui");
72
        Logger logger = Logger.getLogger(Installer.UI_LOGGER_NAME);
73
        logger.setLevel(Level.ALL);
73
        logger.setLevel(Level.ALL);
74
        logger.addHandler(new Handler() {
74
        logger.addHandler(new Handler() {
75
75
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/ShutdownFromAWTTest.java (-1 / +1 lines)
Lines 77-83 Link Here
77
        inst.restored();
77
        inst.restored();
78
78
79
        MockServices.setServices(DD.class);
79
        MockServices.setServices(DD.class);
80
        Logger.getLogger("org.netbeans.ui").warning("ONE_LOG");
80
        Logger.getLogger(Installer.UI_LOGGER_NAME).warning("ONE_LOG");
81
    }
81
    }
82
82
83
    protected void tearDown() throws Exception {
83
    protected void tearDown() throws Exception {
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/SlownessReporterTest.java (-4 / +6 lines)
Lines 55-60 Link Here
55
 */
55
 */
56
public class SlownessReporterTest extends NbTestCase {
56
public class SlownessReporterTest extends NbTestCase {
57
    
57
    
58
    private static final String TEST_LOGGER = Installer.UI_LOGGER_NAME + ".test"; // NOI18N
59
    
58
    private long now;
60
    private long now;
59
61
60
    public SlownessReporterTest(String name) {
62
    public SlownessReporterTest(String name) {
Lines 80-96 Link Here
80
        Object[] params = new Object[]{null, null, null, null, "undo"};
82
        Object[] params = new Object[]{null, null, null, null, "undo"};
81
        rec.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/2);
83
        rec.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/2);
82
        rec.setParameters(params);
84
        rec.setParameters(params);
83
        Logger.getLogger("org.netbeans.ui.test").log(rec);
85
        Logger.getLogger(TEST_LOGGER).log(rec);
84
        LogRecord rec2 = new LogRecord(Level.FINE, "UI_ACTION_EDITOR");
86
        LogRecord rec2 = new LogRecord(Level.FINE, "UI_ACTION_EDITOR");
85
        params = new Object[]{null, null, null, null, "redo"};
87
        params = new Object[]{null, null, null, null, "redo"};
86
        rec2.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/5);
88
        rec2.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/5);
87
        rec2.setParameters(params);
89
        rec2.setParameters(params);
88
        Logger.getLogger("org.netbeans.ui.test").log(rec2);
90
        Logger.getLogger(TEST_LOGGER).log(rec2);
89
        LogRecord rec3 = new LogRecord(Level.FINE, "SOME OTHER LOG");
91
        LogRecord rec3 = new LogRecord(Level.FINE, "SOME OTHER LOG");
90
        params = new Object[]{null, null, null, null, "redo"};
92
        params = new Object[]{null, null, null, null, "redo"};
91
        rec3.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/10);
93
        rec3.setMillis(now - SlownessReporter.LATEST_ACTION_LIMIT/10);
92
        rec3.setParameters(params);
94
        rec3.setParameters(params);
93
        Logger.getLogger("org.netbeans.ui.test").log(rec3);
95
        Logger.getLogger(TEST_LOGGER).log(rec3);
94
    }
96
    }
95
97
96
    @Test
98
    @Test
Lines 110-116 Link Here
110
    @Test
112
    @Test
111
    public void testGetIdeStartup() {
113
    public void testGetIdeStartup() {
112
        SlownessReporter reporter = new SlownessReporter();
114
        SlownessReporter reporter = new SlownessReporter();
113
        Logger.getLogger("org.netbeans.ui.test").log(new LogRecord(Level.CONFIG, Installer.IDE_STARTUP));
115
        Logger.getLogger(TEST_LOGGER).log(new LogRecord(Level.CONFIG, Installer.IDE_STARTUP));
114
        String latestAction = reporter.getLatestAction(100L, now);
116
        String latestAction = reporter.getLatestAction(100L, now);
115
        assertNotNull(latestAction);
117
        assertNotNull(latestAction);
116
        assertEquals(NbBundle.getMessage(SlownessReporter.class, "IDE_STARTUP"), latestAction);
118
        assertEquals(NbBundle.getMessage(SlownessReporter.class, "IDE_STARTUP"), latestAction);
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/UIHandlerTest.java (-1 / +1 lines)
Lines 59-65 Link Here
59
 * @author Jaroslav Tulach
59
 * @author Jaroslav Tulach
60
 */
60
 */
61
public class UIHandlerTest extends NbTestCase {
61
public class UIHandlerTest extends NbTestCase {
62
    private static Logger UILOG = Logger.getLogger("org.netbeans.ui.actions");
62
    private static Logger UILOG = Logger.getLogger(Installer.UI_LOGGER_NAME + ".actions");
63
63
64
    
64
    
65
    public UIHandlerTest(String testName) {
65
    public UIHandlerTest(String testName) {
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/UIHandlerWhenInterruptedTest.java (-1 / +1 lines)
Lines 57-63 Link Here
57
 * @author Jaroslav Tulach
57
 * @author Jaroslav Tulach
58
 */
58
 */
59
public class UIHandlerWhenInterruptedTest extends NbTestCase {
59
public class UIHandlerWhenInterruptedTest extends NbTestCase {
60
    private static Logger UILOG = Logger.getLogger("org.netbeans.ui.actions");
60
    private static Logger UILOG = Logger.getLogger(Installer.UI_LOGGER_NAME + ".actions");
61
61
62
    
62
    
63
    public UIHandlerWhenInterruptedTest(String testName) {
63
    public UIHandlerWhenInterruptedTest(String testName) {
(-)a/uihandler/test/unit/src/org/netbeans/modules/uihandler/UploadLogsTest.java (-5 / +7 lines)
Lines 64-70 Link Here
64
import javax.xml.parsers.DocumentBuilderFactory;
64
import javax.xml.parsers.DocumentBuilderFactory;
65
import org.netbeans.junit.NbTestCase;
65
import org.netbeans.junit.NbTestCase;
66
import org.netbeans.lib.uihandler.LogRecords;
66
import org.netbeans.lib.uihandler.LogRecords;
67
import org.netbeans.lib.uihandler.MultiPartHandler;
67
//import org.netbeans.lib.uihandler.MultiPartHandler;
68
import org.w3c.dom.Document;
68
import org.w3c.dom.Document;
69
import org.xml.sax.SAXException;
69
import org.xml.sax.SAXException;
70
70
Lines 97-103 Link Here
97
        URL redir = Installer.uploadLogs(new URL("memory://upload"), "myId", Collections.<String,String>emptyMap(), recs, false);
97
        URL redir = Installer.uploadLogs(new URL("memory://upload"), "myId", Collections.<String,String>emptyMap(), recs, false);
98
    }
98
    }
99
    
99
    
100
    public void testSendsCorrectlyEncoded() throws Exception {
100
    public void ignoreTestSendsCorrectlyEncoded() throws Exception {
101
        
101
        
102
        for (int times = 0; times < 10; times++) {
102
        for (int times = 0; times < 10; times++) {
103
            LOG.log(Level.INFO, "Running for {0} times", times);
103
            LOG.log(Level.INFO, "Running for {0} times", times);
Lines 115-120 Link Here
115
                fail("There should be an empty line:\n" + new String(content, "utf-8"));
115
                fail("There should be an empty line:\n" + new String(content, "utf-8"));
116
            }
116
            }
117
117
118
            /*
118
            class RFImpl implements MultiPartHandler.RequestFacade, MultiPartHandler.InputFacade {
119
            class RFImpl implements MultiPartHandler.RequestFacade, MultiPartHandler.InputFacade {
119
                private ByteArrayInputStream is = new ByteArrayInputStream(content);
120
                private ByteArrayInputStream is = new ByteArrayInputStream(content);
120
121
Lines 151-162 Link Here
151
                }
152
                }
152
            }
153
            }
153
            RFImpl request = new RFImpl();
154
            RFImpl request = new RFImpl();
155
            */
154
156
155
            File dir = new File(getWorkDir(), "ui");
157
            File dir = new File(getWorkDir(), "ui");
156
            dir.mkdirs();
158
            dir.mkdirs();
157
159
158
            MultiPartHandler handler = new MultiPartHandler(request, dir.getPath());
160
            //MultiPartHandler handler = new MultiPartHandler(request, dir.getPath());
159
            handler.parseMultipartUpload();
161
            //handler.parseMultipartUpload();
160
162
161
            File[] files = dir.listFiles();
163
            File[] files = dir.listFiles();
162
            assertEquals(times + "th file created", times + 1, files.length);
164
            assertEquals(times + "th file created", times + 1, files.length);
Lines 168-174 Link Here
168
            LOG.info("Sorted to files: " + Arrays.asList(files));
170
            LOG.info("Sorted to files: " + Arrays.asList(files));
169
171
170
172
171
            assertEquals("Handler keeps name of the right file", files[times], handler.getFile("logs"));
173
            //assertEquals("Handler keeps name of the right file", files[times], handler.getFile("logs"));
172
174
173
            DataInputStream is = new DataInputStream(new FileInputStream(files[0]));
175
            DataInputStream is = new DataInputStream(new FileInputStream(files[0]));
174
            class H extends Handler {
176
            class H extends Handler {

Return to bug 229019