[jira] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:32 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! I attached the project as a zip file: [^sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: !Bildschirmfoto von 2021-03-01 11-30-57.png|width=427,height=331! was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: !Bildschirmfoto von 2021-03-01 11-30-57.png|width=427,height=331! > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png, Bildschirmfoto von 2021-03-01 11-30-57.png, sidebar_test.zip > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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:
[jira] [Updated] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Attachment: sidebar_test.zip > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png, Bildschirmfoto von 2021-03-01 11-30-57.png, sidebar_test.zip > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Attachment: Bildschirmfoto von 2021-03-01 11-30-57.png > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png, Bildschirmfoto von 2021-03-01 11-30-57.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:31 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:31 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: !Bildschirmfoto von 2021-03-01 11-30-57.png|width=427,height=331! was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: !Bildschirmfoto von 2021-03-01 11-30-57.png! > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png, Bildschirmfoto von 2021-03-01 11-30-57.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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:
[jira] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:31 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: !Bildschirmfoto von 2021-03-01 11-30-57.png! was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 and libraries with version 122, the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). With the attached zip, the bug can be reproduced: > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png, Bildschirmfoto von 2021-03-01 11-30-57.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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,
[jira] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:29 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is shifted down: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:29 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is shifted down: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is shifted down: You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:29 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files, the bar starts at line 1: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is offset by large amounts: !Bildschirmfoto von 2021-03-01 11-28-24.png|width=327,height=238! You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Attachment: Bildschirmfoto von 2021-03-01 11-28-24.png > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png, Bildschirmfoto von 2021-03-01 > 11-28-24.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Comment Edited] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger edited comment on NETBEANS-3355 at 3/1/21, 10:28 AM: --- Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a very large file to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). This is the expected result, which works for smaller files: !Bildschirmfoto von 2021-03-01 10-41-15.png|width=262,height=202! For very large files, the bar is shifted down: You can find the zipped project here: [https://share.cqse.eu/public/BS/sidebar_test.zip] With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). was (Author: bschlagberger): Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a file with more than 2000 lines to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). You can find the zipped project here: https://share.cqse.eu/public/BS/sidebar_test.zip With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Attachment: Bildschirmfoto von 2021-03-01 10-41-15.png > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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] [Reopened] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger reopened NETBEANS-3355: - > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png, > Bildschirmfoto von 2021-03-01 10-41-15.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17292804#comment-17292804 ] Benedikt Schlagberger commented on NETBEANS-3355: - Thanks a lot for your response! I tried again with NetBeans 12.0 LTS and 12.2. For 12.0 I could reproduce it. Note that you have to open up a file with more than 2000 lines to see the effect (e.g. [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java]). You can find the zipped project here: https://share.cqse.eu/public/BS/sidebar_test.zip With 12.2 the plugin is not loaded at all (breakpoint in {{createSideBar}} is not triggered). > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at > the top of the sidebar with height of 1000px > } > @Override > public Dimension getPreferredSize() { > Dimension dimension = new Dimension(this.getParent().getSize()); > dimension.width = 10; > return dimension; > } > } > } > {code} > Register the {{SideBarFactory}} using the following {{layers.xml}}: > {code:xml} > > "http://www.netbeans.org/dtds/filesystem-1_2.dtd;> > > > > > > > > > > {code} > Now start the plugin and open a project containing a large file for example > the > [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] > from the apache commons lib. > The painting is offset by a large amount as you can see in the attached > screenshot (blue rectangle should start in line 1, not 2150). When shortening > the file and re-opening it, the marker moves, so I suppose this is related to > the file size. -- 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-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Description: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at the top of the sidebar with height of 1000px } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot (blue rectangle should start in line 1, not 2150). When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. was: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at the top of the sidebar with height of 1000px } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot (blue rectangle should start in line 1). When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar
[jira] [Updated] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Description: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); // Paint blue rectangle starting at the top of the sidebar with height of 1000px } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot (blue rectangle should start in line 1). When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. was: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot (blue rectangle should start in line 1). When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g)
[jira] [Updated] (NETBEANS-3355) SideBarFactory painting offset with large files
[ https://issues.apache.org/jira/browse/NETBEANS-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedikt Schlagberger updated NETBEANS-3355: Description: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot (blue rectangle should start in line 1). When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. was: When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot. When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. > SideBarFactory painting offset with large files > --- > > Key: NETBEANS-3355 > URL: https://issues.apache.org/jira/browse/NETBEANS-3355 > Project: NetBeans > Issue Type: Bug >Affects Versions: 8.2, 11.0 >Reporter: Benedikt Schlagberger >Priority: Major > Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png > > > When painting in the sidebar using the {{SideBarFactory}}, the painted > Graphic is offset for large files. To reproduce, create a NetBeans plugin > project and add the following class: > {code:java} > package com.mycompany.sidebar_test; > import java.awt.Color; > import java.awt.Dimension; > import java.awt.Graphics; > import javax.swing.JComponent; > import javax.swing.text.JTextComponent; > import org.netbeans.spi.editor.SideBarFactory; > public class MySidebarFactory implements SideBarFactory { > @Override > public JComponent createSideBar(JTextComponent jtc) { > return new MySidebar(); > } > private class MySidebar extends JComponent { > @Override > protected void paintComponent(Graphics g) { > g.setColor(Color.BLUE); > g.fillRect(0, 0, 10, 1000); > } > @Override >
[jira] [Created] (NETBEANS-3355) SideBarFactory painting offset with large files
Benedikt Schlagberger created NETBEANS-3355: --- Summary: SideBarFactory painting offset with large files Key: NETBEANS-3355 URL: https://issues.apache.org/jira/browse/NETBEANS-3355 Project: NetBeans Issue Type: Bug Affects Versions: 11.0, 8.2 Reporter: Benedikt Schlagberger Attachments: Bildschirmfoto von 2019-11-07 19-34-21.png When painting in the sidebar using the {{SideBarFactory}}, the painted Graphic is offset for large files. To reproduce, create a NetBeans plugin project and add the following class: {code:java} package com.mycompany.sidebar_test; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JComponent; import javax.swing.text.JTextComponent; import org.netbeans.spi.editor.SideBarFactory; public class MySidebarFactory implements SideBarFactory { @Override public JComponent createSideBar(JTextComponent jtc) { return new MySidebar(); } private class MySidebar extends JComponent { @Override protected void paintComponent(Graphics g) { g.setColor(Color.BLUE); g.fillRect(0, 0, 10, 1000); } @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(this.getParent().getSize()); dimension.width = 10; return dimension; } } } {code} Register the {{SideBarFactory}} using the following {{layers.xml}}: {code:xml} http://www.netbeans.org/dtds/filesystem-1_2.dtd;> {code} Now start the plugin and open a project containing a large file for example the [StrBuilder.java|https://raw.githubusercontent.com/apache/commons-lang/master/src/main/java/org/apache/commons/lang3/text/StrBuilder.java] from the apache commons lib. The painting is offset by a large amount as you can see in the attached screenshot. When shortening the file and re-opening it, the marker moves, so I suppose this is related to the file size. -- 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