Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3665

module using BaseDocument compile fails: "cannot access LineDocument"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: editor - Other
    • Labels:
      None
    • Environment:

      11.2u1

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              errael Ernie Rael
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: