Search code examples
javapluginssyntax-errorjedit

What are the .1 .2 .3 .4 used like methods or properties on a Java class?


I'm working on an old jEdit plugin that used to work with jEdit 4.0. I'm trying to update it for jEdit 5.3. One of the main reasons I have to update the plugin (.jar) is BufferChangeListener and BufferChangeAdapter are now deprecated. I have to use use new BufferListener instead.

When compiling I run into what seems to be an unrelated issue. It doesn't like ".1" or ".2" or ".3" or ".4" (ex. AssetBrowserDockableWindow.1)

AssetBrowserDockableWindow is a class that has no methods or classes like ".1" or ".2" or ".3" or ".4". And as far as I can tell it doesn't inherit such methods or properties.

public class AssetBrowserDockableWindow
    extends JPanel
    implements EBComponent

However, in the previous code I see snippets like the following:

private class BufferChangeHandler extends BufferListener {

    BufferChangeHandler(AssetBrowserDockableWindow.1 x1) { this(); }

.

SwingUtilities.invokeAndWait(new AssetBrowserDockableWindow.1(this));

.

SwingUtilities.invokeLater(new AssetBrowserDockableWindow.2(this));

.

this.editPane.getTextArea().addFocusListener(new AssetBrowserDockableWindow.3(this));

I get "error: <identifier> expected" at those numbers. I was hoping someone could explain what those numbers might have been for. I'm sorry if it is something basic and I'm not looking for the right term. If anyone can provide any kind of insight that would point me in the right direction I would appreciate it.


Solution

  • That "previous code" was decompiled from .class files. Those are the identifiers assigned by the compiler to anonymous inner classes, although normally the separator is a dollar sign, as in AssetBrowserDockableWindow$2.