[netbeans] branch master updated: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows) (#1804)
This is an automated email from the ASF dual-hosted git repository. ebakke pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 7813792 [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows) (#1804) 7813792 is described below commit 78137924fbe8d8a51ccf4bc98ed746675ea3b4c7 Author: Eirik Bakke AuthorDate: Fri Jan 3 11:40:26 2020 +0100 [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows) (#1804) [NETBEANS-2954] Fix broken tab dragging in window system on HiDPI displays on Windows --- .../view/dnd/DragAndDropFeedbackVisualizer.java| 6 ++-- .../windows/view/dnd/TopComponentDragSupport.java | 6 ++-- .../core/windows/view/dnd/WindowDnDManager.java| 41 -- .../core/windows/view/ui/toolbars/DnDSupport.java | 17 + 4 files changed, 56 insertions(+), 14 deletions(-) diff --git a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragAndDropFeedbackVisualizer.java b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragAndDropFeedbackVisualizer.java index 9343b24..3a550b0 100644 --- a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragAndDropFeedbackVisualizer.java +++ b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/DragAndDropFeedbackVisualizer.java @@ -128,8 +128,10 @@ public class DragAndDropFeedbackVisualizer { } public void update(DragSourceDragEvent e) { -if( null != dragWindow ) -dragWindow.setLocation( e.getLocation().x-dragOffset.x, e.getLocation().y-dragOffset.y ); +if( null != dragWindow ) { +Point location = WindowDnDManager.getLocationWorkaround(e); +dragWindow.setLocation( location.x-dragOffset.x, location.y-dragOffset.y ); +} } public void dispose( boolean dropSuccessful ) { diff --git a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDragSupport.java b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDragSupport.java index 27e7572..58d2c24 100644 --- a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDragSupport.java +++ b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDragSupport.java @@ -568,11 +568,12 @@ implements AWTEventListener, DragSourceListener, DragSourceMotionListener { final Set floatingFrames = windowDnDManager.getFloatingFrames(); // Finally schedule the "drop" task later to be able to // detect if ESC was pressed. +final Point location = WindowDnDManager.getLocationWorkaround(evt); RequestProcessor.getDefault().post(new Runnable() { @Override public void run() { SwingUtilities.invokeLater(createDropIntoFreeAreaTask( -evt, evt.getLocation(), floatingFrames)); +evt, location, floatingFrames)); }}, 350 // XXX #21918, Neccessary to skip after possible ESC key event. ); @@ -589,8 +590,7 @@ implements AWTEventListener, DragSourceListener, DragSourceMotionListener { return true; } -// Gets location. -Point location = evt.getLocation(); +Point location = WindowDnDManager.getLocationWorkaround(evt); if(location == null) { return true; } diff --git a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java index a5206c8..7980960 100644 --- a/platform/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java +++ b/platform/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java @@ -35,6 +35,7 @@ import org.netbeans.core.windows.*; import org.netbeans.core.windows.view.*; import org.netbeans.core.windows.view.ui.*; import org.openide.util.Lookup; +import org.openide.util.Utilities; import org.openide.util.WeakSet; import org.openide.windows.TopComponent; @@ -111,8 +112,44 @@ implements DropTargetGlassPane.Observer, DropTargetGlassPane.Informer { AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK ); } - +/** + * Get the location of a {@link DragSourceEvent}, incorporating a workaround for a JDK bug on + * HiDPI screens on Windows. See NETBEANS-2954. This method should be called only while the + * mouse pointer is still likely to be in the same position as it was when the event was + * originally created. + */ +public static Point getLocationWorkaround(DragSourceEvent evt) { +Point ret = evt.getLocation(); +if (Utilities.isWindows() && ret != null) { +/* Workaround for JDK bug where D
[jira] [Resolved] (NETBEANS-2954) Tabs dragging errors on scaled Windows desktop
[ https://issues.apache.org/jira/browse/NETBEANS-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eirik Bakke resolved NETBEANS-2954. --- Fix Version/s: Next Resolution: Fixed > Tabs dragging errors on scaled Windows desktop > -- > > Key: NETBEANS-2954 > URL: https://issues.apache.org/jira/browse/NETBEANS-2954 > Project: NetBeans > Issue Type: Bug > Components: ide - UI >Affects Versions: 11.0, 11.1 > Environment: Windows 10, desktop scale 125% >Reporter: Eugene Pliskin >Priority: Minor > Labels: HiDPI, pull-request-available > Fix For: Next > > Time Spent: 1h > Remaining Estimate: 0h > > On Windows 10 having desktop scaled to 125% I experience difficulties > dragging tabs of two or more opened source files in NetBeans editor. Often > cannot move the second source tab before the first tab. It looks like the > dragged red tab outlines are not aligned with actual tabs widths. At 100% > desktop scale the problem is not experienced. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Created] (NETBEANS-3661) Console output sequence from PHP is in wrong order and changes randomly on errormessages
Nikolai Neff created NETBEANS-3661: -- Summary: Console output sequence from PHP is in wrong order and changes randomly on errormessages Key: NETBEANS-3661 URL: https://issues.apache.org/jira/browse/NETBEANS-3661 Project: NetBeans Issue Type: Bug Affects Versions: 11.2 Environment: Product Version: Apache NetBeans IDE 11.2 Java: 13.0.1; Java HotSpot(TM) 64-Bit Server VM 13.0.1+9 Runtime: Java(TM) SE Runtime Environment 13.0.1+9 System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) User directory: C:\Users\Niko\AppData\Roaming\NetBeans\11.2 Cache directory: C:\Users\Niko\AppData\Local\NetBeans\Cache\11.2 Windos 10 Proffesional v 1909 Build 18363.535 PHP 7.4.1 (cli) (built: Dec 17 2019 19:24:02) ( ZTS Visual C++ 2017 x64 ) with Zend OPcache v7.4.1, with Xdebug v2.9.0 Reporter: Nikolai Neff Attachments: ConsoleOutputErrorNBProjectFiles.zip, netbeanssettings.zip, resultScreenshots.zip The output from PHP scripts in the built-in console is not consistent with the output from running the same script without netbeans using just PHP directly. There seems to be some kind of output buffering which changes on each script run. As far as I can tell, only PHP Error-messages are affected. sample code: {code:java} php -f c:\users\niko\Documents\NetBeansProjects\ConsoleOutputError\index.php 1 PHP Fatal error: Uncaught Exception: help in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 Stack trace: #0 {main} thrown in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line 3 {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-3661) Console output sequence from PHP is in wrong order and changes randomly on errormessages
[ https://issues.apache.org/jira/browse/NETBEANS-3661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikolai Neff updated NETBEANS-3661: --- Description: The output from PHP scripts in the built-in console is not consistent with the output from running the same script without netbeans using just PHP directly. There seems to be some kind of output buffering which changes on each script run. As far as I can tell, only PHP Error-messages are affected. sample code: {code:java} php -f c:\users\niko\Documents\NetBeansProjects\ConsoleOutputError\index.php 1 PHP Fatal error: Uncaught Exception: help in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 Stack trace: #0 {main} thrown in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line 3 {code} was: The output from PHP scripts in the built-in console is not consistent with the output from running the same script without netbeans using just PHP directly. There seems to be some kind of output buffering which changes on each script run. As far as I can tell, only PHP Error-messages are affected. sample code: {code:java} php -f c:\users\niko\Documents\NetBeansProjects\ConsoleOutputError\index.php 1 PHP Fatal error: Uncaught Exception: help in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 Stack trace: #0 {main} thrown in C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line 3 {code} > Console output sequence from PHP is in wrong order and changes randomly on > errormessages > > > Key: NETBEANS-3661 > URL: https://issues.apache.org/jira/browse/NETBEANS-3661 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.2 > Environment: Product Version: Apache NetBeans IDE 11.2 > Java: 13.0.1; Java HotSpot(TM) 64-Bit Server VM 13.0.1+9 > Runtime: Java(TM) SE Runtime Environment 13.0.1+9 > System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) > User directory: C:\Users\Niko\AppData\Roaming\NetBeans\11.2 > Cache directory: C:\Users\Niko\AppData\Local\NetBeans\Cache\11.2 > Windos 10 Proffesional v 1909 Build 18363.535 > PHP 7.4.1 (cli) (built: Dec 17 2019 19:24:02) ( ZTS Visual C++ 2017 x64 ) > with Zend OPcache v7.4.1, > with Xdebug v2.9.0 >Reporter: Nikolai Neff >Priority: Minor > Labels: console, output, php, windows > Attachments: ConsoleOutputErrorNBProjectFiles.zip, > netbeanssettings.zip, resultScreenshots.zip > > > The output from PHP scripts in the built-in console is not consistent with > the output from running the same script without netbeans using just PHP > directly. There seems to be some kind of output buffering which changes on > each script run. > As far as I can tell, only PHP Error-messages are affected. > > sample code: > {code:java} > print ("1\n"); > throw new Exception('help'); > print ("2\n"); > {code} > expected output: > {code:java} > "C:\php\php.exe" > "C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php" > 1 > PHP Fatal error: Uncaught Exception: help in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 > Stack trace: > #0 {main} > thrown in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line > 3 > Done. > {code} > actual output: > (varies, see screenshots) > {code:java} > "C:\php\php.exe" > "C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php" > 1 > PHP Fatal error: Uncaught Exception: help in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 > Stack trace: > Done. > #0 {main} > thrown in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line > 3 > {code} > OR > {code:java} > "C:\php\php.exe" > "C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php" > PHP Fatal error: Uncaught Exception: help in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 > Stack trace: > 1 > #0 {main} > Done. > thrown in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line > 3 > {code} > OR > {code:java} > "C:\php\php.exe" > "C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php" > PHP Fatal error: Uncaught Exception: help in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php:3 > 1 > Stack trace: > Done. > #0 {main} > thrown in > C:\Users\Niko\Documents\NetBeansProjects\ConsoleOutputError\index.php on line > 3 > {code} > and so on. Interestingly the coloring is respected and not broken. Also, when > I use xdebug to step through the code, the order is always correct. PHP > Output buffering settings and/or using flush() has apparently no effect. > Running the script directly
[jira] [Created] (NETBEANS-3662) Copy over icon to settings
Christian Lenz created NETBEANS-3662: Summary: Copy over icon to settings Key: NETBEANS-3662 URL: https://issues.apache.org/jira/browse/NETBEANS-3662 Project: NetBeans Issue Type: Improvement Components: editor - Options Affects Versions: 11.3 Environment: Product Version: Apache NetBeans IDE DEV (Build dev-f25af78881f4ad29aec81c301c4d00974db2db76) Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) User directory: C:\Users\Chrl\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Chrl\AppData\Local\NetBeans\Cache\dev Reporter: Christian Lenz Assignee: Jan Lahoda Atm, only the lexer will be copied over to the settings of NetBeans, not the icon. The problem will be, when we export/import settings or copy the settings from one into another computer. This makes copying the folder easy w/o changing anything. Steps to reprocuce: * Open any project (Just to let NetBeans init the editor) * Go to Tools -> Options -> Editor -> Language Servers * Adding a new custom language with a lexer file and an icon. * NetBeans creates a folder with "x-ext-a" into the settings of NetBeans (On my windows machine it is this path: C:\Users\Chrl\AppData\Roaming\NetBeans\dev\config\Editors\text\x-ext-a) * Folder contains syntax.xml which is a copy of the file that I choose from the hard disk and a .nbattr file with registering the lexer. * No icon file is inside. What I expect is that the icon is also part of it and the name, that I've chosen should also be part of nbattr. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Created] (NETBEANS-3663) FileNotFound Exception when fields blank and hitting ok and apply
Christian Lenz created NETBEANS-3663: Summary: FileNotFound Exception when fields blank and hitting ok and apply Key: NETBEANS-3663 URL: https://issues.apache.org/jira/browse/NETBEANS-3663 Project: NetBeans Issue Type: Bug Components: editor - Options Affects Versions: 11.3 Environment: Product Version: Apache NetBeans IDE DEV (Build dev-f25af78881f4ad29aec81c301c4d00974db2db76) Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) User directory: C:\Users\Chrl\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Chrl\AppData\Local\NetBeans\Cache\dev Reporter: Christian Lenz Assignee: Jan Lahoda Its about the new LSP/Textmate UI integration and It is about error handling, because the behaviour is not very nice. Steps to reproduce: * Open a project (Only to initialize the editor and the specific options) * Open Tools -> Options -> Editor -> Language Servers * Click on Add * Leave everything empty * Click on on * Liune will be added with default icon and the placeholder word "files" * Hit apply in the options window. * See error message thrown. {code} java.io.FileNotFoundException: at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:219) at java.base/java.io.FileInputStream.(FileInputStream.java:157) at org.eclipse.tm4e.core.registry.Registry.loadGrammarFromPathSync(Registry.java:140) at org.netbeans.modules.lsp.client.options.LanguageStorage.findScope(LanguageStorage.java:231) [catch] at org.netbeans.modules.lsp.client.options.LanguageStorage.lambda$store$1(LanguageStorage.java:115) at org.openide.filesystems.FileUtil$2.run(FileUtil.java:413) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:397) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:417) at org.netbeans.modules.lsp.client.options.LanguageStorage.store(LanguageStorage.java:65) at org.netbeans.modules.lsp.client.options.LanguageServersPanel.store(LanguageServersPanel.java:193) at org.netbeans.modules.lsp.client.options.LanguageServersOptionsPanelController$1.run(LanguageServersOptionsPanelController.java:51) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) {code} So I prefer to add validation. Make the name not optional. It should have a name. thats all. Icon also but you add the default one, that is okish. Maybe the lexer file need also be required, I think this is why the error is thrown. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-7) Provide basic editor features (syntax highlighting, braces matching, completion, etc) for more file types
[ https://issues.apache.org/jira/browse/NETBEANS-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Lenz updated NETBEANS-7: -- Affects Version/s: 11.3 11.1 > Provide basic editor features (syntax highlighting, braces matching, > completion, etc) for more file types > - > > Key: NETBEANS-7 > URL: https://issues.apache.org/jira/browse/NETBEANS-7 > Project: NetBeans > Issue Type: Improvement > Components: ide - UI >Affects Versions: 11.1, 11.3 >Reporter: Emilian Bold >Priority: Major > > We could provide basic editor features (syntax highlighting, braces matching, > completion, etc) for more languages based on the existing corpus of > definitions from other editors/IDEs. See > * > http://docs.notepad-plus-plus.org/index.php?title=User_Defined_Language_Files > * http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html > * https://code.visualstudio.com/docs/extensionAPI/language-support > * http://www.ultraedit.com/downloads/extras/wordfiles.html#wordfiles > The basic editor features would usually get replaced once more proper plugins > are installed for a given language. > We could even introduce a mechanism to promote to users the full plugins > (from the Plugin Portal, etc) once they start editing given file types. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[netbeans] branch master updated (7813792 -> 79ad0e9)
This is an automated email from the ASF dual-hosted git repository. ebakke pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 7813792 [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows) (#1804) add 79ad0e9 [NETBEANS-3592] Workarounds for JDK Windows LAF bugs on HiDPI screens (#1777) No new revisions were added by this update. Summary of changes: .../src/org/netbeans/swing/plaf/AllLFCustoms.java | 1 + .../swing/plaf/windows8/DPISafeBorder.java | 135 --- .../swing/plaf/windows8/DPIUnscaledBorder.java | 105 + .../swing/plaf/windows8/Windows8LFCustoms.java | 148 ++-- .../plaf/windows8/WindowsDPIWorkaroundIcon.java| 254 + 5 files changed, 494 insertions(+), 149 deletions(-) delete mode 100644 platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/DPISafeBorder.java create mode 100644 platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/DPIUnscaledBorder.java create mode 100644 platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/WindowsDPIWorkaroundIcon.java - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-3569) unsuitable/failed-verification plugin not indicated as such by plugin portal
[ https://issues.apache.org/jira/browse/NETBEANS-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ernie Rael updated NETBEANS-3569: - Priority: Critical (was: Major) > unsuitable/failed-verification plugin not indicated as such by plugin portal > > > Key: NETBEANS-3569 > URL: https://issues.apache.org/jira/browse/NETBEANS-3569 > Project: NetBeans > Issue Type: Bug > Components: updatecenters - Pluginportal > Environment: Apache NetBeans Plugin Portal, build #191001 >Reporter: Ernie Rael >Assignee: Jan Pirek >Priority: Critical > Labels: pull-request-available > Attachments: verification.png > > Time Spent: 50m > Remaining Estimate: 0h > > I submitted a plugin to the apache portal and requested verification, I built > the plugin (maven) against NB-11.2. > The plugin correctly failed verification since it would not load on NB-11.0. > There is no indication on the plugin portal that this plugin failed > verification, or even that verification was requested. No indication either > publicly or privately when I look at things through "My plugins". -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3569) unsuitable/failed-verification plugin not indicated as such by plugin portal
[ https://issues.apache.org/jira/browse/NETBEANS-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007602#comment-17007602 ] Ernie Rael commented on NETBEANS-3569: -- After some initial effort, this issue seems to have been forgotten. The plugin portal shows plugins that have failed verification as compatible with NB-11. I question if the portal is ready for prime time. > unsuitable/failed-verification plugin not indicated as such by plugin portal > > > Key: NETBEANS-3569 > URL: https://issues.apache.org/jira/browse/NETBEANS-3569 > Project: NetBeans > Issue Type: Bug > Components: updatecenters - Pluginportal > Environment: Apache NetBeans Plugin Portal, build #191001 >Reporter: Ernie Rael >Assignee: Jan Pirek >Priority: Major > Labels: pull-request-available > Attachments: verification.png > > Time Spent: 50m > Remaining Estimate: 0h > > I submitted a plugin to the apache portal and requested verification, I built > the plugin (maven) against NB-11.2. > The plugin correctly failed verification since it would not load on NB-11.0. > There is no indication on the plugin portal that this plugin failed > verification, or even that verification was requested. No indication either > publicly or privately when I look at things through "My plugins". -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Created] (NETBEANS-3664) Using wrong LaF getDefaults() method slows down startup
Karl Tauber created NETBEANS-3664: - Summary: Using wrong LaF getDefaults() method slows down startup Key: NETBEANS-3664 URL: https://issues.apache.org/jira/browse/NETBEANS-3664 Project: NetBeans Issue Type: Bug Reporter: Karl Tauber There are (at least) two places where {{UIManager.getLookAndFeel().getDefaults()}} is used to get look and feel UI defaults. But this method creates a new hash table with about 600+ entries filled with colors, icons, fonts, insets, etc., which takes some milliseconds. In case of FlatLaf, also several properties files are read and parsed. The javadoc of {{LookAndFeel.getDefaults()}} also states that this method should only be invoked by the {{UIManager}}. The correct method to use would be {{UIManager.getLookAndFeelDefaults()}}, which returns an existing hash table that was created earlier with {{LookAndFeel.getDefaults()}}. I'll create a PR to fix this... -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[netbeans] branch master updated: [NETBEANS-3652] PAC: myIpAddress() returns "127.0.0.1" when executed in Travis env
This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 0d32553 [NETBEANS-3652] PAC: myIpAddress() returns "127.0.0.1" when executed in Travis env new 631618d Merge pull request #1835 from lbruun/NETBEANS-3652-ImprovedLocalIpDiscovery 0d32553 is described below commit 0d3255303c8707d49dda19992c8cda41416b430e Author: Lars Bruun-Hansen AuthorDate: Wed Jan 1 10:07:04 2020 +0100 [NETBEANS-3652] PAC: myIpAddress() returns "127.0.0.1" when executed in Travis env Improved local IP address discovery: An additional method is added to the multiple ways of finding own host's IP: UDP. In some environments this will be able to find the IP where the other methods fail. However, discovering the IP of the local host remains an imprecise discipline. Also, the getMostLikelyLocalInetAddresses() method is now more precise about filtering out loopback addresses. Returning the loopback address from this method should really, really be a last resort. --- .travis.yml| 2 +- .../core/network/utils/IpAddressUtils.java | 18 +++ .../core/network/utils/LocalAddressUtils.java | 135 +++-- 3 files changed, 147 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c84b97..13008df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -120,7 +120,7 @@ matrix: - hide-logs.sh ant $OPTS -f platform/core.kit test - hide-logs.sh ant $OPTS -f platform/core.multiview test - hide-logs.sh ant $OPTS -f platform/core.netigso test -#- hide-logs.sh ant $OPTS -f platform/core.network test +- hide-logs.sh ant $OPTS -f platform/core.network test - hide-logs.sh ant $OPTS -f platform/core.osgi test - hide-logs.sh ant $OPTS -f platform/core.output2 test - hide-logs.sh ant $OPTS -f platform/core.startup test diff --git a/platform/core.network/src/org/netbeans/core/network/utils/IpAddressUtils.java b/platform/core.network/src/org/netbeans/core/network/utils/IpAddressUtils.java index 7c745f5..cded068 100644 --- a/platform/core.network/src/org/netbeans/core/network/utils/IpAddressUtils.java +++ b/platform/core.network/src/org/netbeans/core/network/utils/IpAddressUtils.java @@ -26,6 +26,7 @@ import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; +import java.util.Iterator; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -427,6 +428,23 @@ public class IpAddressUtils { } /** + * Removes loopback addresses from the provided list. + * @param addresses + */ +public static void removeLoopback(List addresses) { +if (addresses == null) { +return; +} +Iterator iterator = addresses.iterator(); +while (iterator.hasNext()) { +InetAddress a = iterator.next(); +if (a.isLoopbackAddress()) { +iterator.remove(); +} +} +} + +/** * Sorts a list of IP addresses. * * @param addresses IP addresses diff --git a/platform/core.network/src/org/netbeans/core/network/utils/LocalAddressUtils.java b/platform/core.network/src/org/netbeans/core/network/utils/LocalAddressUtils.java index 68aa14f..92b739e 100644 --- a/platform/core.network/src/org/netbeans/core/network/utils/LocalAddressUtils.java +++ b/platform/core.network/src/org/netbeans/core/network/utils/LocalAddressUtils.java @@ -19,6 +19,8 @@ package org.netbeans.core.network.utils; +import java.net.DatagramSocket; +import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress; import java.net.InterfaceAddress; @@ -78,19 +80,42 @@ import org.openide.util.RequestProcessor; */ public class LocalAddressUtils { private static final Logger LOG = Logger.getLogger(LocalAddressUtils.class.getName()); -private static final RequestProcessor RP = new RequestProcessor("LocalNetworkAddressFinder", 3); +private static final RequestProcessor RP = new RequestProcessor("LocalNetworkAddressFinder", 4); + +// Create some static InetAddress'es. This is done in a somewhat convoluted +// way, but one which guarantees that no DNS lookup will be performed. private static final byte[] LOOPBACK_IPV4_RAW = new byte[]{0x7f,0x00,0x00,0x01}; private static final byte[] LOOPBACK_IPV6_RAW = new byte[]{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; + + +// 8.8.8.8 -- which incidentially is Google's DNS server, but we don't ever connect +private
[netbeans] branch master updated: Building on JDK9+ failes caused by -Werror
This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new c6379a4 Building on JDK9+ failes caused by -Werror new 378d7b8 Merge pull request #1830 from matthiasblaesing/build-jdk9+ c6379a4 is described below commit c6379a413806fad6c48ee8071b9b3b3bbc502794 Author: Matthias Bläsing AuthorDate: Sun Dec 29 20:11:12 2019 +0100 Building on JDK9+ failes caused by -Werror The two commits: - NETBEANS-3559 Corrected compiler warnings in Bootstrap project. https://github.com/apache/netbeans/commit/1f0916ad1a923 - NETBEANS-3534 Corrected compiler warnings in Classfile Reader project https://github.com/apache/netbeans/commit/0eb938809158b7515b404d834966768e7a3e63c0 introduced the `-Werror` javac argument. The argument causes the build to fail on JDK9+: -do-compile: [nb-javac] Compiling 40 source files to /home/matthias/src/netbeans/platform/o.n.bootstrap/build/classes [repeat] warning: [options] bootstrap class path not set in conjunction with -source 8 [repeat] error: warnings found and -Werror specified [repeat] error: warnings found and -Werror specified [repeat] error: warnings found and -Werror specified [repeat] error: warnings found and -Werror specified [repeat] 4 errors [repeat] 1 warning [nbmerge] Failed to build target: all-o.n.bootstrap --- java/classfile/nbproject/project.properties | 2 +- platform/o.n.bootstrap/nbproject/project.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/classfile/nbproject/project.properties b/java/classfile/nbproject/project.properties index c1794dd..b6c758f 100644 --- a/java/classfile/nbproject/project.properties +++ b/java/classfile/nbproject/project.properties @@ -16,7 +16,7 @@ # under the License. is.autoload=true -javac.compilerargs=-Xlint:all -Xlint:-serial -Werror +javac.compilerargs=-Xlint:all -Xlint:-serial javac.source=1.8 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/platform/o.n.bootstrap/nbproject/project.properties b/platform/o.n.bootstrap/nbproject/project.properties index f30c9e4..e10ee5b 100644 --- a/platform/o.n.bootstrap/nbproject/project.properties +++ b/platform/o.n.bootstrap/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -javac.compilerargs=-Xlint:all -Xlint:-serial -Xlint:-processing -Werror +javac.compilerargs=-Xlint:all -Xlint:-serial -Xlint:-processing javac.source=1.8 module.jar.dir=lib module.jar.basename=boot.jar - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3655) NB-Javac linkage error with JDK 14, can't generate class file version 58.65535
[ https://issues.apache.org/jira/browse/NETBEANS-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007700#comment-17007700 ] Stephen Bannasch commented on NETBEANS-3655: Thanks for the info. Is there an issue or epic I can track to follow this development? > NB-Javac linkage error with JDK 14, can't generate class file version 58.65535 > -- > > Key: NETBEANS-3655 > URL: https://issues.apache.org/jira/browse/NETBEANS-3655 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.2 > Environment: Product Version: Apache NetBeans IDE 11.2 > Java: 14-ea; OpenJDK 64-Bit Server VM 14-ea+29-1384 > Runtime: OpenJDK Runtime Environment 14-ea+29-1384 > System: Mac OS X version 10.15.2 running on x86_64; UTF-8; en_US (nb) > User directory: /Users/stephen/Library/Application Support/NetBeans/11.2 > Cache directory: /Users/stephen/Library/Caches/NetBeans/11.2 >Reporter: Stephen Bannasch >Priority: Major > Labels: jdk14, nbjavac > > Using NB 11.2 on macos 10.15.2 and am using JEP 354: Switch Expressions so am > compiling with JDK 14. > {noformat} > openjdk 14-ea 2020-03-17 > OpenJDK Runtime Environment (build 14-ea+29-1384) > OpenJDK 64-Bit Server VM (build 14-ea+29-1384, mixed mode, sharing) > {noformat} > > Am also setting these additional compiler options in the NB project: > {noformat} > --enable-preview --source 14 -Xlint:unchecked -Xlint:preview > {noformat} > Installed nb-javac today to see if I could get "Compile on save" working. > With "Compile on save" disabled I need to manually build the project every > time I want to test changes. > With "Compile on save" enabled I get this error when running the project. > {noformat} > Error: LinkageError occurred while loading main class GraphPanel.GraphDemo > java.lang.UnsupportedClassVersionError: GraphPanel/GraphDemo (class > file version 57.65535) was compiled with preview features that are > unsupported. This version of the Java Runtime only recognizes preview > features for class file version 58.65535 > /Users/stephen/Library/Caches/NetBeans/11.2/executor-snippets/run.xml:111: > The following error occurred while executing this line: > /Users/stephen/Library/Caches/NetBeans/11.2/executor-snippets/run.xml:68: > Java returned: 1 > BUILD FAILED (total time: 0 seconds) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-3664) Using wrong LaF getDefaults() method slows down startup
[ https://issues.apache.org/jira/browse/NETBEANS-3664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated NETBEANS-3664: - Labels: pull-request-available (was: ) > Using wrong LaF getDefaults() method slows down startup > --- > > Key: NETBEANS-3664 > URL: https://issues.apache.org/jira/browse/NETBEANS-3664 > Project: NetBeans > Issue Type: Bug >Reporter: Karl Tauber >Priority: Minor > Labels: pull-request-available > > There are (at least) two places where > {{UIManager.getLookAndFeel().getDefaults()}} is used to get look and feel UI > defaults. > But this method creates a new hash table with about 600+ entries filled with > colors, icons, fonts, insets, etc., which takes some milliseconds. In case of > FlatLaf, also several properties files are read and parsed. > The javadoc of {{LookAndFeel.getDefaults()}} also states that this method > should only be invoked by the {{UIManager}}. > The correct method to use would be {{UIManager.getLookAndFeelDefaults()}}, > which returns an existing hash table that was created earlier with > {{LookAndFeel.getDefaults()}}. > I'll create a PR to fix this... -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Created] (NETBEANS-3665) module using BaseDocument compile fails: "cannot access LineDocument"
Ernie Rael created NETBEANS-3665: Summary: module using BaseDocument compile fails: "cannot access LineDocument" Key: NETBEANS-3665 URL: https://issues.apache.org/jira/browse/NETBEANS-3665 Project: NetBeans Issue Type: Bug Components: editor - Other Environment: 11.2u1 Reporter: Ernie Rael I don't know enough about how intermodule dependencies work, or I'd try to fix this... In the code below, when I enter "BaseDocument" I request "search module dependency for BaseDocument"; it succeeds and adds a dependency on org.netbeans.modules.editor.lib. But it won't compile. there still needs to be a dependency on org.netbeans.modules.editor.document. I seem to recall that this dependency should have been added automatically. The interface LineDocument is implemented by BaseDocument. BTW, LineDocument doesn't show up in the docs. import org.netbeans.editor.BaseDocument; public class NewClass { void foo(BaseDocument doc) { doc.runAtomicAsUser(() -> System.err.println("")); }} Error: class file for org.netbeans.api.editor.document.LineDocument not found -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Resolved] (NETBEANS-3658) Rename field throws exception
[ https://issues.apache.org/jira/browse/NETBEANS-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laszlo Kishalmi resolved NETBEANS-3658. --- Resolution: Information Provided Please update your NetBeans in Tools > Plugins (need to do twice as the first one would install a new update center for the nb-javac fix) This issue has been patched with nb-javac 2.1 > Rename field throws exception > - > > Key: NETBEANS-3658 > URL: https://issues.apache.org/jira/browse/NETBEANS-3658 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.2 > Environment: Ubuntu 19, Java 13 >Reporter: Martin >Priority: Major > > --- > >Log Session: Thursday, January 2, 2020 at 5:06:34 PM Central European > >Standard Time > >System Info: > Product Version = Apache NetBeans IDE 11.2 > Operating System = Linux version 5.3.0-24-generic running on amd64 > Java; VM; Vendor = 13; OpenJDK 64-Bit Server VM 13+33-Ubuntu-1; Private Build > Runtime = OpenJDK Runtime Environment 13+33-Ubuntu-1 > Java Home = /usr/lib/jvm/java-13-openjdk-amd64 > System Locale; Encoding = en_US (nb); UTF-8 > Home Directory = /home/martin > Current Directory = /home/martin > User Directory = /home/martin/snap/netbeans/common/data/11.2 > Cache Directory = /home/martin/snap/netbeans/common/cache/11.2 > Installation = /snap/netbeans/18/netbeans/nb > /snap/netbeans/18/netbeans/ergonomics > /snap/netbeans/18/netbeans/ide > /snap/netbeans/18/netbeans/extide > /snap/netbeans/18/netbeans/java > /snap/netbeans/18/netbeans/apisupport > /snap/netbeans/18/netbeans/webcommon > /snap/netbeans/18/netbeans/websvccommon > /snap/netbeans/18/netbeans/enterprise > /snap/netbeans/18/netbeans/profiler > /snap/netbeans/18/netbeans/php > /snap/netbeans/18/netbeans/harness > /snap/netbeans/18/netbeans/groovy > /snap/netbeans/18/netbeans/extra > /snap/netbeans/18/netbeans/javafx > /snap/netbeans/18/netbeans/platform > Boot & Ext. Classpath = > Application Classpath = > /snap/netbeans/18/netbeans/platform/lib/boot.jar:/snap/netbeans/18/netbeans/platform/lib/org-openide-modules.jar:/snap/netbeans/18/netbeans/platform/lib/org-openide-util.jar:/snap/netbeans/18/netbeans/platform/lib/org-openide-util-lookup.jar:/snap/netbeans/18/netbeans/platform/lib/org-openide-util-ui.jar > Startup Classpath = > /snap/netbeans/18/netbeans/platform/core/asm-all-5.0.1.jar:/snap/netbeans/18/netbeans/platform/core/core-base.jar:/snap/netbeans/18/netbeans/platform/core/core.jar:/snap/netbeans/18/netbeans/platform/core/org-netbeans-libs-asm.jar:/snap/netbeans/18/netbeans/platform/core/org-openide-filesystems-compat8.jar:/snap/netbeans/18/netbeans/platform/core/org-openide-filesystems.jar:/snap/netbeans/18/netbeans/nb/core/org-netbeans-upgrader.jar:/snap/netbeans/18/netbeans/nb/core/locale/core_nb.jar > --- > INFO [org.netbeans.modules.netbinox]: Install area set to > file:/snap/netbeans/18/netbeans/ > WARNING [org.netbeans.core.modules]: the modules > [org.netbeans.modules.java.editor.lib, org.netbeans.modules.xml.text] use > org.netbeans.modules.editor.deprecated.pre65formatting which is deprecated. > WARNING [org.netbeans.core.modules]: the modules > [org.netbeans.modules.ide.kit, org.netbeans.modules.xml.text] use > org.netbeans.modules.editor.structure which is deprecated. > WARNING [org.netbeans.core.modules]: the modules > [org.netbeans.modules.ant.hints, org.netbeans.modules.java.hints, > org.netbeans.modules.jshell.support, org.netbeans.modules.maven.hints] use > org.netbeans.modules.java.hints.legacy.spi which is deprecated: Use Java > Hints SPI (org.netbeans.spi.java.hints) instead. > WARNING [org.openide.filesystems.Ordering]: Found same position 127 for both > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-PackageLockJsonDataObject-Registration.xml > and > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-NpmDebugLogDataObject-Registration.xml > WARNING [org.openide.filesystems.Ordering]: Found same position 127 for both > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-PackageLockJsonDataObject-Registration.xml > and > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-PackageJsonDataObject-Registration.xml > WARNING [org.openide.filesystems.Ordering]: Found same position 127 for both > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-NpmDebugLogDataObject-Registration.xml > and > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-file-PackageJsonDataObject-Registration.xml > WARNING [org.openide.filesystems.Ordering]: Found same position 127 for both > Services/MIMEResolver/org-netbeans-modules-javascript-nodejs-fil
[netbeans] branch master updated: [NETBEANS-3664] Fix usage of LaF getDefaults() method
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 38e2a66 [NETBEANS-3664] Fix usage of LaF getDefaults() method 38e2a66 is described below commit 38e2a66ddefbcbd25686d28566b9dd243a7ddf70 Author: Karl Tauber AuthorDate: Fri Jan 3 22:31:11 2020 +0100 [NETBEANS-3664] Fix usage of LaF getDefaults() method --- ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java | 11 --- .../src/org/netbeans/core/windows/view/ui/MainWindow.java| 12 ++-- .../src/org/netbeans/swing/plaf/LFCustoms.java | 9 - .../netbeans/modules/profiler/heapwalk/oql/ui/OQLEditor.java | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java b/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java index 0ded71a..c4076b9 100644 --- a/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java +++ b/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java @@ -25,8 +25,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -50,7 +48,6 @@ import javax.swing.Action; import javax.swing.JCheckBoxMenuItem; import javax.swing.JEditorPane; import javax.swing.KeyStroke; -import javax.swing.LookAndFeel; import javax.swing.UIDefaults; import javax.swing.UIManager; import javax.swing.text.Document; @@ -103,7 +100,6 @@ import org.openide.filesystems.FileUtil; import org.openide.util.ContextAwareAction; import org.openide.util.Lookup; import org.openide.util.NbBundle; -import org.openide.util.RequestProcessor; /** * Java editor kit with appropriate document @@ -137,9 +133,10 @@ public class NbEditorKit extends ExtKit implements Callable { static { // Ensure that Nimbus L&F does not have the scrollbar size too small for large files -LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); -UIDefaults defaults = lookAndFeel.getDefaults(); -defaults.put("ScrollBar.minimumThumbSize", new Dimension(20, 20)); +if (UIManager.getLookAndFeel().getID().equals("Nimbus")) { +UIDefaults defaults = UIManager.getLookAndFeelDefaults(); +defaults.put("ScrollBar.minimumThumbSize", new Dimension(20, 20)); +} contentTypeTable = new HashMap(); contentTypeTable.put("org.netbeans.modules.properties.syntax.PropertiesKit", "text/x-properties"); // NOI18N diff --git a/platform/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java b/platform/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java index 3f44af6..40b42e2 100755 --- a/platform/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java +++ b/platform/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java @@ -83,7 +83,7 @@ public final class MainWindow { private JComponent statusBar; private static final Logger LOGGER = Logger.getLogger(MainWindow.class.getName()); - + //update main window title bar when current document is modified (Mac OS X only) private final RequestProcessor RP = new RequestProcessor( "MainWndMac", 1 ); //NOI18N @@ -159,7 +159,7 @@ public final class MainWindow { return; } inited = true; - + JPanel contentPane = new JPanel(new BorderLayout()) { @Override public void paint(Graphics g) { @@ -475,7 +475,7 @@ public final class MainWindow { statusBarContainer.add( statusBar, BorderLayout.CENTER ); } } - + static private class StatusLineElementsListener implements LookupListener { private JPanel decoratingPanel; StatusLineElementsListener (JPanel decoratingPanel) { @@ -732,7 +732,7 @@ public final class MainWindow { public void setFullScreenMode( boolean fullScreenMode ) { - if( isFullScreenMode == fullScreenMode || isSwitchingFullScreenMode + if( isFullScreenMode == fullScreenMode || isSwitchingFullScreenMode || Utilities.isMac()) { //Mac OS X has its own built-in full screen support, see applemenu module return; } @@ -743,7 +743,7 @@ public final class MainWindow { isUndecorated = frame.isUndecorated(); windowDecorationStyle = frame.getRootPane().getWindowDecorationStyle(); } - + final TopComponent activeTc = TopComponent.getRegistry().getActivated(); GraphicsDevice device = null; @@ -885,7 +885,7 @@ public final class MainWindow { Logger logger = Logger.getLogger( "org.netbea
[jira] [Created] (NETBEANS-3666) Excessive amount of CPU used in multitab UI
Laszlo Kishalmi created NETBEANS-3666: - Summary: Excessive amount of CPU used in multitab UI Key: NETBEANS-3666 URL: https://issues.apache.org/jira/browse/NETBEANS-3666 Project: NetBeans Issue Type: Bug Components: ide - UI Reporter: Laszlo Kishalmi It seems there is a performance bottleneck in multitabs implementation. org.netbeans.core.multitabs.impl.TabDataRenderer.getPreferredWidth(Object) is being called several times spending considerable amount of time setting the text on a JLabel over and over: [https://github.com/apache/netbeans/blob/06b3e677d9ea4dbd9987c8245fe5be776e8245f8/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/TabDataRenderer.java#L144] The purpose of these calls is to properly measure the width of the rendered component. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists