> How does anyone know where anything is?
It's actually quite easy--just find a user-visible text string somewhere in the
viscinity of what you're looking for, and grep for it in the git repository.
For example, some days ago I wanted to know which class implements the dropdown
button component that can be seen in some of the NetBeans toolbar. I hovered
over the one in the Java editor, and got a tooltip that said "Go back to
StringUtil.java". This meant that somewhere in the NetBeans codebase, there is
a string called "Go back to", which should bring me in the right direction.
Then, from the checked-out netbeans sources, I do:
git grep 'Go back to'
This shows me a few results, with one being relevant:
ide/editor/src/org/netbeans/modules/editor/impl/actions/Bundle.properties:NavigationHistoryBackAction_Tooltip=Go
back to {0}
Then I do:
git grep 'NavigationHistoryBackAction_Tooltip'
This takes me to
ide/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryBackAction.java
.
In that file I find a method call DropDownButtonFactory.createDropDownButton,
which is in the class org.openide.awt.DropDownButtonFactory. And that's the
class I was looking for.
In the end, you usually just end up having to open up one or two NetBeans
modules in the IDE to work on a particular bug, or inspect a particular feature.
-- Eirik
-----Original Message-----
From: Jeremy Cavanagh <[email protected]>
Sent: Thursday, November 7, 2019 3:47 AM
To: [email protected]
Subject: Re: NetBeans Design
Hi Tim,
That is most impressive, and yet terrifying at the same time. It raises even
more questions for me. How does anyone know where anything is?
Probably not for discussion here but, what use is software engineering, design
methodologies etc., is software development just an enormous hackathon?
Food for thought.
Many thanks to everyone who replied to my original post.
Jeremy
On 07/11/2019 03:29, Tim Boudreau wrote:
> A few people asked for a visual representation. I pulled this together
> a few years ago. Mostly it just illustrates why those kinds of
> representations are useless at scale.
>
> Package dependencies:
>
> https://timboudreau.com/files/nb-packagegraph/
>
> Classes (IIRC trimmed down a LOT):
>
> https://timboudreau.com/files/netbeans-classes/
>
> On Wed, Nov 6, 2019 at 7:57 PM Eric Bresie <[email protected]> wrote:
>
>> Is this a reason to push for the UML plugin ;-)
>
>
> There are no reasons to push for uml, ever :-)
>
> -Tim
>
>
>
>>
>> Eric Bresie
>> [email protected]
>>> On November 6, 2019 at 9:02:49 AM CST, Eric Barboni
>>> <[email protected]>
>> wrote:
>>> Hi,
>>> Not sure that is what you want.
>>>
>>> ((A small help can be
>>> If you get the sources, do a first build:
>>> ant
>>> you can then do
>>> ant index-layer-paths
>>>
>>> this will create in nbbuild/build/generated layers.txt and
>>> services.txt where given a " UI element" " mimetype" "project type"
>>> you can find
>> which module provide it (this is a bit too textual).
>>> ))
>>>
>>> Maybe you want a more complex visualization, with rectangle and edge
>>> but
>> I guess should be some layout and "dynamic page" to filter ( or 8K
>> monitors :p). Modules are legion.
>>>
>>> Best Regards
>>> Eric
>>> -----Message d'origine-----
>>> De : Christian Lenz <[email protected]> Envoyé : mercredi 6
>>> novembre 2019 15:43 À : [email protected] Objet : AW: NetBeans
>>> Design
>>>
>>> ➢ And this IMHO continues to be the best book on the NetBeans Platform:
>>>
>>> ➢ https://leanpub.com/nbp4beginners
>>>
>>> ➢ Gj
>>>
>>> Hey Geertjan,
>>>
>>> how does that fit in the reworked/categorized structure. Is the book
>> still up to date? Just asking.
>>>
>>>
>>> Cheers
>>>
>>> Chris
>>>
>>>
>>> Von: Geertjan Wielenga
>>> Gesendet: Mittwoch, 6. November 2019 15:34
>>> An: dev
>>> Betreff: Re: NetBeans Design
>>>
>>> On Wed, Nov 6, 2019 at 3:09 PM Christoph Theis <[email protected]> wrote:
>>>
>>>> I have the same problem:
>>>> E.g., NB doesn't accept a current javahl. So, where would I find
>>>> the module where the check happened (I grep'ed for the error
>>>> message and found it). Are there dependencies? If I want to improve
>>>> the error message (right now it is hidden in the log files), how to do it?
>>>>
>>>> So, summarizing, an eagles view of what NB is composed of, would be
>>>> a start. Sthg., that would help newcomers to understand the code of NB.
>>>>
>>>
>>>
>>> In many ways, the current GitHub structure provides the eagle's view
>>> you
>>> seek:
>>>
>>> https://github.com/apache/netbeans
>>>
>>> Rather than it being a long list of modules, the above categorizes
>>> them
>> into their clusters, reflecting what you see in your NetBeans
>> installation directory.
>>>
>>> Indeed, grepping is a good approach to find the code you need to
>>> work
>> with.
>>>
>>> You can also search directly in the GitHub repo on-line in the web
>> interface.
>>>
>>> The dependencies of any modules are always listed in the project.xml
>> file of a module.
>>>
>>> And this IMHO continues to be the best book on the NetBeans Platform:
>>>
>>> https://leanpub.com/nbp4beginners
>>>
>>> Gj
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> @Jeremy: I hope I got your point.
>>>>
>>>>
>>>> Best regards
>>>>
>>>> Christoph
>>>>
>>>> On 06.11.2019 14:24, Geertjan Wielenga wrote:
>>>>> What specific things are you looking for?
>>>>>
>>>>> Gj
>>>>>
>>>>> On Wed, 6 Nov 2019 at 14:05, Jeremy Cavanagh
>>>>> <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I was just wondering if there was a design document for NetBeans
>>>>>> which shows how all the pieces fit together? I ask this because
>>>>>> whenever I look at incubator-netbeans I have no idea of what I'm
>>>>>> looking at, or where to find things.
>>>>>>
>>>>>> I really hope there is, particularly if it includes structure
>>>>>> diagrams
>>>> etc.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Jeremy
>>>>
>>>> -------------------------------------------------------------------
>>>> -- 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
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>> - 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
>>>
>>>
>>>
>>
---------------------------------------------------------------------
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