[jira] [Assigned] (NETBEANS-5596) No syntax coloring with the Java Editor Kit
[ https://issues.apache.org/jira/browse/NETBEANS-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Baumann reassigned NETBEANS-5596: - Assignee: Nicolas Baumann > No syntax coloring with the Java Editor Kit > --- > > Key: NETBEANS-5596 > URL: https://issues.apache.org/jira/browse/NETBEANS-5596 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 12.3 >Reporter: Nicolas Baumann >Assignee: Nicolas Baumann >Priority: Minor > > I think this is somewhere between a bug and an improvement request because I > have no doubt that syntax coloring works well inside the IDE but my issue > happens when I use the java editor as a dependency for a plain java > application rather than a netbeans platform application. > I have to activate syntax coloring programatically with the line of code > below whereas it should be done automatically based on the mime type of the > editor which is text/x-java. > {code:java} > doc.putProperty(Language.class, JavaTokenId.language()){code} > There are some cases where the editor is not accessible due to member > visibility, for example with the the DiffView from org-netbeans-modules-diff. > Here is a mininal code sample to reproduce : > > {code:java} > final JFrame f = new JFrame("JAVA Syntax Coloring"); > final JEditorPane pane = new JEditorPane(); > > pane.setEditorKit(CloneableEditorSupport.getEditorKit(JavaKit.JAVA_MIME_TYPE)); > //pane.getDocument().putProperty(Language.class, JavaTokenId.language()); // > activates syntax coloring > try { > SwingUtilities.invokeAndWait(() -> { > try { > pane.getDocument().insertString(0, "public class Hello {}", null); > } catch (final BadLocationException e) { > e.printStackTrace(); > } > }); > } catch (final Exception e) { > e.printStackTrace(); > } > f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > f.getContentPane().add(new JScrollPane(pane)); > f.setSize(400, 300); > f.setVisible(true); > {code} > > From the javadoc : > [https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-lexer/org/netbeans/api/lexer/TokenHierarchy.html#get-D-] > _Get or create mutable token hierarchy for the given swing document._ > _The document may define a top language by doing > {{doc.putProperty("mimeType", mimeType)}} (a language defined for the given > mime type will be searched and used) or by doing > {{putProperty(Language.class, language)}}. Otherwise the returned hierarchy > will be inactive and > [{{TokenHierarchy.tokenSequence()}}|https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-lexer/org/netbeans/api/lexer/TokenHierarchy.html#tokenSequence--] > will return null._ > In my case setting the mimeType property on the document was not enough to > activate the token hierarchy for syntax coloring. Only setting the > Language.class property resulted in activating it. But it's not possible with > an editor that I did not create myself and which I cannot have access to. > > Suggestion : > In the JavaKit class there is method createDefaultDocument() which creates a > default document. Is it possible for you to set the Langage.class property > here ? > > Here is a workaround that I use to activate syntax coloring in the diff view. > In the file org/netbeans/modules/java/editor/resources/layer.xml : > {code:java} > > > {code} > > > {code:java} > public class SyntaxColoringJavaKit extends > org.netbeans.modules.editor.java.JavaKit { > private static final long serialVersionUID = 1L; > @Override > public Document createDefaultDocument() { >final Document document = super.createDefaultDocument(); >document.putProperty(Language.class, JavaTokenId.language()); >return document; > } > > } > {code} > > Below the maven dependencies that I use in this example : > {code:java} > > > org.netbeans.modules > org-netbeans-modules-editor-mimelookup-impl > RELEASE123 > > > org.netbeans.modules > org-netbeans-modules-editor-plain > RELEASE123 > > > org.netbeans.modules > org-netbeans-modules-java-editor > RELEASE123 > > org.frgaal > compiler > 14.0.0 > > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - 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-website] branch master updated: Remove Upcoming events paragraph as the events already happened
This is an automated email from the ASF dual-hosted git repository. jtulach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-website.git The following commit(s) were added to refs/heads/master by this push: new 9776e00 Remove Upcoming events paragraph as the events already happened new 6245a1b Merge pull request #586 from jhorvath/clean-upcoming 9776e00 is described below commit 9776e0056cbefd5fb7b4adaa0958046c988a27eb Author: Jan Horvath AuthorDate: Wed Feb 9 22:57:51 2022 +0100 Remove Upcoming events paragraph as the events already happened --- .../src/content/community/events.asciidoc | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/netbeans.apache.org/src/content/community/events.asciidoc b/netbeans.apache.org/src/content/community/events.asciidoc index 9b012db..65b6713 100644 --- a/netbeans.apache.org/src/content/community/events.asciidoc +++ b/netbeans.apache.org/src/content/community/events.asciidoc @@ -37,22 +37,10 @@ An "Apache NetBeans Day" is a class of event that happens regularly, with a clea For publicizing NetBeans events, the Apache News posts at https://blogs.apache.org/foundation/ can mention those events, best is to contact pr...@apache.org for that. Apache has an Event Listing (https://events.apache.org/), that we'd also like to make use of. -=== Upcoming NetBeans related events in 2019/2020 - -16-19th September 2019 Oracle CodeOne conference is Oracle's big developer conference for Java and other languages. You have to pay to attend but there are lots of excellent talks. It takes place at the Moscone Center in San Francisco, USA. link:https://www.oracle.com/code-one/[CodeOne Website] Here are the NetBeans related talks link:https://events.rainfocus.com/widget/oracle/oow19/catalogcodeone19?search=netbeans[NetBeans specific talks] - -27th September 2019 Apache NetBeans Day 2019 UK is a free one day conference in London, UK. link:https://www.eventbrite.co.uk/e/apache-netbeans-day-2019-uk-tickets-56803479737[free tickets and more details] - -10th January 2020 Dawscon is a one day software development conference in Montreal, Canada. It will have several NetBeans enthusiastists speaking and at least one dedicated NetBeans talk. link:https://www.dawsoncollege.qc.ca/dawscon/ - -This is a link to the next Apache Community major events: - -[caption="Apache Current Event", link=https://www.apache.org/events/current-event.html] -image::https://www.apache.org/events/current-event-234x60.png[CurrentEvent,234,60] - == Past NetBeans related events -link:https://www.omnijava.com/2019/01/20/dawscon-2019/[Dawscon 2019 write-up] -link:https://blog.idrsolutions.com/2018/04/key-takeaways-from-apache-netbeans-day-uk/[My Key Takeaways from Apache NetBeans Day UK 2018] +- link:https://www.youtube.com/watch?v=ivPjmsSS8iU/[Dawscon 2021 - Everyday coding in NetBeans] +- link:https://www.omnijava.com/2019/01/20/dawscon-2019/[Dawscon 2019 write-up] +- link:https://blog.idrsolutions.com/2018/04/key-takeaways-from-apache-netbeans-day-uk/[My Key Takeaways from Apache NetBeans Day UK 2018] == Apache Software Foundation Resources For Events And Conferences - 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-6458) Cyclic reference. Somebody is trying to get value from FolderInstance (org.openide.awt.Toolbar$Folder) from the same thread that is processing the instance.
Martin Entlicher created NETBEANS-6458: -- Summary: Cyclic reference. Somebody is trying to get value from FolderInstance (org.openide.awt.Toolbar$Folder) from the same thread that is processing the instance. Key: NETBEANS-6458 URL: https://issues.apache.org/jira/browse/NETBEANS-6458 Project: NetBeans Issue Type: Bug Components: platform - Other Reporter: Martin Entlicher {code} INFO [org.openide.loaders.FolderInstance.Toolbars]: Cannot create org.openide.loaders.FolderInstance$HoldInstance@1d0068b[Toolbars/File] [junit] java.io.IOException: Cyclic reference. Somebody is trying to get value from FolderInstance (org.openide.awt.Toolbar$Folder) from the same thread that is processing the instance [junit] at org.openide.loaders.FolderInstance.instanceCreate(FolderInstance.java:274) [junit] at org.openide.loaders.FolderInstance.instanceForCookie(FolderInstance.java:555) [junit] at org.openide.loaders.FolderInstance$HoldInstance.instanceCreate(FolderInstance.java:1132) [junit] [catch] at org.openide.loaders.FolderInstance$1R.instances(FolderInstance.java:675) [junit] at org.openide.loaders.FolderInstance$1R.run(FolderInstance.java:696) [junit] at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) [junit] at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) [junit] at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) [junit] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) [junit] INFO [org.openide.awt.Toolbar]: Too long AWTTask: 1,811 ms for org.openide.awt.Toolbar$Folder@512070e2(FolderList{MultiFileObject@3a04eb7f[Toolbars/UndoRedo]}) {code} It has happened during test org.netbeans.modules.debugger.jpda.truffle.DebugRubyTest. See https://app.travis-ci.com/github/apache/netbeans/jobs/559303759 for details. -- This message was sent by Atlassian Jira (v8.20.1#820001) - 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: Integration tests of Truffle/Graal scripts debugger.
This is an automated email from the ASF dual-hosted git repository. entl 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 aa1f69f Integration tests of Truffle/Graal scripts debugger. aa1f69f is described below commit aa1f69f3fb50defdda5aab682275d35be49557fa Author: Martin Entlicher AuthorDate: Sun Feb 6 11:22:23 2022 +0100 Integration tests of Truffle/Graal scripts debugger. --- .../nbproject/project.properties | 1 + java/debugger.jpda.truffle/nbproject/project.xml | 23 ++ .../debugger/jpda/truffle/TruffleDebugManager.java | 5 +- .../impl/TruffleBreakpointsHandler.java| 2 + .../debugger/jpda/truffle/DebugAllBaseTest.java| 247 + .../modules/debugger/jpda/truffle/DebugJSTest.java | 99 + .../debugger/jpda/truffle/DebugPythonTest.java | 87 .../modules/debugger/jpda/truffle/DebugRTest.java | 86 +++ .../debugger/jpda/truffle/DebugRubyTest.java | 101 + .../modules/debugger/jpda/truffle/DebugSLTest.java | 193 .../debugger/jpda/truffle/JPDATestCase.java| 144 .../debugger/jpda/truffle/PolyglotTest.java| 194 .../TestApp.sl => scripts/DebuggerBase.js} | 35 ++- .../debugger/jpda/truffle/scripts/DebuggerBase.py} | 41 +++- .../debugger/jpda/truffle/scripts/DebuggerBase.r} | 41 +++- .../jpda/truffle/scripts/DebuggerBase.ruby}| 41 +++- .../{testapps/TestApp.sl => scripts/Types.js} | 47 +++- .../debugger/jpda/truffle/scripts/Types.py}| 33 ++- .../modules/debugger/jpda/truffle/scripts/Types.r} | 33 ++- .../debugger/jpda/truffle/scripts/Types.ruby} | 43 +++- .../debugger/jpda/truffle/scripts/Weather.js | 124 +++ .../debugger/jpda/truffle/scripts/Weather.py} | 28 ++- .../debugger/jpda/truffle/scripts/Weather.r| 56 + .../debugger/jpda/truffle/scripts/Weather.rb} | 21 +- ...{SLAppFromFile.java => PolyglotWeatherApp.java} | 25 +-- .../debugger/jpda/truffle/testapps/SLApp.java | 65 -- .../jpda/truffle/testapps/WeatherCity.java | 52 + .../jpda/truffle/testapps/WeatherCityService.java | 67 ++ .../jpda/backend/truffle/JPDATruffleAccessor.java | 1 + .../netbeans/api/debugger/jpda/JPDASupport.java| 148 nbbuild/travis/scripting.sh| 2 + 31 files changed, 1684 insertions(+), 401 deletions(-) diff --git a/java/debugger.jpda.truffle/nbproject/project.properties b/java/debugger.jpda.truffle/nbproject/project.properties index adfab1c..3d3ba96 100644 --- a/java/debugger.jpda.truffle/nbproject/project.properties +++ b/java/debugger.jpda.truffle/nbproject/project.properties @@ -23,4 +23,5 @@ requires.nb.javac=true truffle.sl=external/antlr4-runtime-4.7.2.jar:external/truffle-sl-1.0.0-rc6.jar cp.extra=${tools.jar}:${truffle.sl} test-unit-sys-prop.test.dir.src=${basedir}/test/unit/src/ +test-unit-sys-prop.test.dir.classes=${basedir}/build/test/unit/classes test-unit-sys-prop.netbeans.user=${basedir}/work/nb_user_dir diff --git a/java/debugger.jpda.truffle/nbproject/project.xml b/java/debugger.jpda.truffle/nbproject/project.xml index f15d913..3d345ab 100644 --- a/java/debugger.jpda.truffle/nbproject/project.xml +++ b/java/debugger.jpda.truffle/nbproject/project.xml @@ -259,12 +259,35 @@ unit + org.netbeans.core.startup + + + + org.netbeans.libs.freemarker + + + + org.netbeans.libs.javacapi + + + org.netbeans.modules.debugger.jpda + + + + + org.netbeans.api.debugger.jpda + + + org.netbeans.libs.junit4 + + org.netbeans.modules.nbjunit + diff --git a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/TruffleDebugManager.java b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/TruffleDebugManager.java index 01f209f..14aa3f0 100644 --- a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/TruffleDebugManager.java +++ b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/TruffleDebugManager.java @