This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 87498 - Generated code is uncompilable for Generalization link between class and interface
Summary: Generated code is uncompilable for Generalization link between class and inte...
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Trey Spiva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 10:40 UTC by Alexandr Scherbatiy
Modified: 2007-10-19 21:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-10-19 10:40:29 UTC
I am able to draw a generalization link from class to interface.
But generated code contains 'class extends interface' string and it is not
compilable.
See also issue 79835 and issue 80551.

Steps to reproduce:

- Create a Java-Model UML project
- Create a Class diagram
- Put a Class element on the diagram and name it 'MyClass'
- Put an Interface element on the diagram and name it 'Myinterface'
- Generate code for the UML project
  'MyClass.java' and 'MyInterface.java' files are generated

- Draw a Generalization link from class to interface
- Generate code for the UML project
  The generated code is:
  -------------------------------------------------------------------
  public class MyClass extends MyInterface {
    public MyClass() {
    }
  }
  ---------------------------------------------------------------------

  The code is not compiled:
  ---------------------------------------------------------------------
  UMLProject1Sources\src\MyClass.java:3: no interface expected here
  public class MyClass extends MyInterface {
  1 error
  BUILD FAILED (total time: 3 seconds)
  ---------------------------------------------------------------------
Comment 1 Trey Spiva 2006-10-19 22:15:26 UTC
Retrieving the source file path from a relative file name was not working correctly.  Also, we where 
defaulting to the UML language instead of the projects default language.
Comment 2 Andrew Korostelev 2006-10-20 09:47:45 UTC
verified in all-nbms-griffin-061019_8