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 109543 - static class modifier for nested class lost
Summary: static class modifier for nested class lost
Status: RESOLVED DUPLICATE of bug 86135
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-12 17:46 UTC by Sherry Zhou
Modified: 2009-01-26 19:16 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sherry Zhou 2007-07-12 17:46:14 UTC
CB 20070711

Steps:
1. Create an UML project using class diagram
2. Add 2 class elements. One is nested to the another.
-- Note there is no way to define  the nested class as static in the properties sheet.
3. Generate code and navigate to the code. Manually add static modifier to the nested class as:
    public class OutterClass {
    
    public OutterClass () {
    }

    public static class InnerClass {
        public InnerClass () {
        }

    }
}  
4. Call reverse engineer via the context menu.
5. Go the class diagram. Make some change, for example, add an attribute in the OuterClass.
6. Generate code and navigate to source
-- the keyword static is lost.
public class OutterClass {
    private int i;

    public OutterClass () {
    }

    public class InnerClass {
        public InnerClass () {
        }

    }
}
Comment 1 Trey Spiva 2007-07-12 18:10:20 UTC
I have not been able to find that in the UML specification that a class can be static.  All I çøuld find what that features have an static (or scope) reference.  Also 
I would not look for static on the nested link.  If there was a static property it should be on a class.  

Since it does not look like the UML specification supports static classifiers we also do not support static classifiers :(
Comment 2 Peter Lam 2007-07-12 21:13:26 UTC
since we're supporting java language in the java-platform model, we should support static for classes.
Comment 3 Sergey Petrov 2009-01-26 19:16:43 UTC

*** This issue has been marked as a duplicate of 86135 ***