Bug 3382 - Java Import Conflicts
Summary: Java Import Conflicts
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 1839
  Show dependency treegraph
 
Reported: 2006-10-18 15:48 UTC by Mike Cvet
Modified: 2006-11-28 16:47 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2006-10-18 15:48:50 UTC
In the SourceWindow, both org.gnu.gtk.Action and frysk.proc.Action are imported.

When trying to return Action.BLOCK from within an Observer, Eclipse says 
"Action.BLOCK cannot be resolved."

The offending code is:

public Action updateExecuted(Task task)
    {
      hit++;
      Manager.eventLoop.requestStop ();
      return Action.BLOCK;
    }

This can be changed to:

public frysk.proc.Action updateExecuted(Task task)
    {
      hit++;
      Manager.eventLoop.requestStop ();
      return frysk.proc.Action.BLOCK;
    }

Eclipse doesn't complain about the above code. But upon compilation:

/home/varg/workspace/frysk/frysk-gui/frysk/gui/srcwin/SourceWindow.java: In 
class 'frysk.gui.srcwin.SourceWindow$InstructionObserver':
/home/varg/workspace/frysk/frysk-gui/frysk/gui/srcwin/SourceWindow.java: In 
method 
'frysk.gui.srcwin.SourceWindow$InstructionObserver.updateExecuted(frysk.proc.Task)':
/home/varg/workspace/frysk/frysk-gui/frysk/gui/srcwin/SourceWindow.java:1704: 
error: Can't access class ‘frysk’. Only public classes and interfaces in other 
packages can be accessed.
      return frysk.proc.Action.BLOCK;
                ^

This can be fixed by removing the org.gnu.gtk.Action import, and by changing 
all Actions from that import into org.gnu.gtk.Actions.