1

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.

D.Sinn
  • 13
  • 3
  • 2
    Looks like that "previous code" was decompiled from a .class file. Those are the identifiers assigned by the compiler to anonymous inner classes, although normally the separator is a dollar sign, as in `AssetBrowserDockableWindow$2`. No idea why a dot was substituted. – Jim Garrison Apr 16 '16 at 06:50
  • Thank you @Jim. Your comment puts me in the right direction. You are correct that I'm working with decompiled code. I used the [JD GUI](http://jd.benow.ca/) tool to decompile. After doing some research on the 'correct' terms, I'm definitely dealing with anonymous classes. I can even see the AssetBrowserDockableWindow$1.class files (and $2~$4) in the original jar file. – D.Sinn Apr 17 '16 at 22:29

1 Answers1

0

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.

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190