And a third update with some additional information: when using Ctrl-O to
open the "Go to Type" dialog and typing the class name (StringUtils) it
lists BOTH the classes in the respective modules.

On Thu, Nov 26, 2020 at 2:20 PM Humphrey Clerx <[email protected]> wrote:

> For this problem, the following additional information is present in the
> messages.log of NetBeans 12.2:
>
> INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null
> for kind = CLASS
> INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve:
> ElementHandle[kind=CLASS; sigs=common.util.StringUtils ]
> INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot
> resolve type element "ElementHandle[kind=CLASS;
> sigs=common.util.StringUtils ]".
>
>
> On Thu, Nov 26, 2020 at 2:16 PM Humphrey Clerx <[email protected]> wrote:
>
>> I've just updated from NetBeans 8.2 to NetBeans 12.2 under Windows 10.
>>
>> NetBeans 12.2 Runs under JDK 11 (OpenJDK 64-Bit Server VM 11.0.9+11) and
>> I've defined a Java Platform JDK 1.8 (OpenJDK 64-Bit Server VM
>> 1.8.0_272-b10) to be used by all the projects. nb-javac is also installed.
>>
>> My project is a NetBeans RCP Module Project. For historical (and
>> visibility) reasons two of the modules define a class StringUtils.
>>
>> In NetBeans 8.2 everything was working fine, but when using NetBeans 12.2
>> all the files in all the modules importing this class, an "error badge"
>> show up on the module and the file, stating:
>>
>> cannot find symbol
>>   symbol: class StringUtils
>>   location: package common.util
>>
>>
>> When selecting the "error badge" it asks to "Change to import <package
>> name>.StringUtils", suggesting the other StringUtils.java class. I know
>> it's not recommended two have two classes with the same name in different
>> packages/modules, but this was no problem with NetBeans 8.2 and exists in
>> our project for historical (and module dependency/visibility) reasons.
>>
>> Enabling/Disabling nb-javac makes NO difference. The only thing that did
>> seem to fix it was installing NetBeans 12.2 and cancelling the
>> download/installation of nb-javac altogether. But then NetBeans 12.2
>> continuously asks to install this missing plugin.
>>
>> Is there any way this can be resolved?
>>
>> Greets,
>>     Humphrey.
>>
>> --
>> In the mountains of truth, you never climb in vain - Nietzsche
>> #-------------------------------------------------------------
>>  \_O
>> ,__/>
>>   <"
>>    '
>>
>
>
> --
> In the mountains of truth, you never climb in vain - Nietzsche
> #-------------------------------------------------------------
>  \_O
> ,__/>
>   <"
>    '
>


-- 
In the mountains of truth, you never climb in vain - Nietzsche
#-------------------------------------------------------------
 \_O
,__/>
  <"
   '

Reply via email to