jlahoda commented on a change in pull request #1045: Support for TextMate 
grammars (from VS Code)
URL: 
https://github.com/apache/incubator-netbeans/pull/1045#discussion_r245899627
 
 

 ##########
 File path: ide/textmate.lexer/arch.xml
 ##########
 @@ -0,0 +1,1115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" 
"../../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
+  <!ENTITY api-questions SYSTEM 
"../../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
+]>
+
+<api-answers
+  question-version="1.29"
+  author="[email protected]"
+>
+
+  &api-questions;
+
+
+<!--
+        <question id="arch-overall" when="init">
+            Describe the overall architecture. 
+            <hint>
+            What will be API for 
+            <a 
href="http://wiki.netbeans.org/API_Design#Separate_API_for_clients_from_support_API";>
+                clients and what support API</a>? 
+            What parts will be pluggable?
+            How will plug-ins be registered? Please use <code>&lt;api 
type="export"/&gt;</code>
+            to describe your general APIs and specify their
+            <a href="http://wiki.netbeans.org/API_Stability#Private";>
+            stability categories</a>.
+            If possible please provide simple diagrams.
+            </hint>
+        </question>
+-->
+ <answer id="arch-overall">
+  <p>
+   This is a lexer an syntax highlighting for TextMate grammars. The grammars
+   may be regitered using the system layer.
+   <api name="register-grammar" group="layer" type="export" category="devel" />
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-quality" when="init">
+            How will the <a 
href="http://www.netbeans.org/community/guidelines/q-evangelism.html";>quality</a>
+            of your code be tested and 
+            how are future regressions going to be prevented?
+            <hint>
+            What kind of testing do
+            you want to use? How much functionality, in which areas,
+            should be covered by the tests? How you find out that your
+            project was successful?
+            </hint>
+        </question>
+-->
+ <answer id="arch-quality">
+  <p>
+   Unit tests for the lexer.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-time" when="init">
+            What are the time estimates of the work?
+            <hint>
+            Please express your estimates of how long the design, 
implementation,
+            stabilization are likely to last. How many people will be needed to
+            implement this and what is the expected milestone by which the 
work should be 
+            ready?
+            </hint>
+        </question>
+-->
+ <answer id="arch-time">
+  <p>
+   Unclear.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-usecases" when="init">
+            <hint>
+                Content of this answer will be displayed as part of page at
+                http://www.netbeans.org/download/dev/javadoc/usecases.html 
+                You can use tags &lt;usecase name="name&gt; regular html 
description &lt;/usecase&gt;
+                and if you want to use an URL you can prefix if with @TOP@ to 
begin
+                at the root of your javadoc
+            </hint>
+        
+            Describe the main <a 
href="http://wiki.netbeans.org/API_Design#The_Importance_of_Being_Use_Case_Oriented";>
+            use cases</a> of the new API. Who will use it under
+            what circumstances? What kind of code would typically need to be 
written
+            to use the module?
+        </question>
+-->
+ <answer id="arch-usecases">
+  <p>
+      <usecase id="register-grammar" name="Register grammar">
+          To register a new TextMate grammar, add it as a file into the system 
filesystem,
+          under "Editors/&lt;mime-type&gt;/", and make sure it has an 
attribute "textmate-grammar",&lt;/mime-type&gt;,
+          whose value is a string representing the TextMate top-level scope. 
For example:
+          <pre>
+    &lt;folder name="Editors"&gt;
+        &lt;folder name="text"&gt;
+            &lt;folder name="x-kotlin"&gt;
+                &lt;file name="Kotlin.tmLanguage.json" 
url="Kotlin.tmLanguage.json"&gt;
 
 Review comment:
   Not sure what you mean - if someone wants to integrate a grammar to 
NetBeans, they have the grammar, and this example shows them how to integrate 
them? Should the arch.xml list all known locations where the grammars could 
potentially be found?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to