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.

View | Details | Raw Unified | Return to bug 199452
Collapse All | Expand All

(-)a/openide.windows/apichanges.xml (+15 lines)
Lines 50-55 Link Here
50
<apidef name="winsys">Window System API</apidef>
50
<apidef name="winsys">Window System API</apidef>
51
</apidefs>
51
</apidefs>
52
<changes>
52
<changes>
53
<change id="role.in.TC.registration.annotation">
54
    <api name="winsys"/>
55
    <summary>Added optional <code>role</code> parameter to <code>TopComponent</code> <code>Registration</code> annotation.</summary>
56
    <version major="6" minor="45"/>
57
    <date day="16" month="6" year="2011"/>
58
    <author login="saubrecht"/>
59
    <compatibility addition="yes" source="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
60
    <description>
61
        Since the window system now supports multiple window layouts - roles -
62
        the annotation for TopComponent registration needs an optional parameter
63
        to specify the role the window should belong to.
64
    </description>
65
    <class package="org.openide.windows" name="TopComponent"/>
66
    <issue number="199452"/>
67
</change>
53
<change id="mode.enhancements">
68
<change id="mode.enhancements">
54
    <api name="winsys"/>
69
    <api name="winsys"/>
55
    <summary>Added more attributes to Mode DTD to support new winsys features.</summary>
70
    <summary>Added more attributes to Mode DTD to support new winsys features.</summary>
(-)a/openide.windows/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.windows
2
OpenIDE-Module: org.openide.windows
3
OpenIDE-Module-Specification-Version: 6.43
3
OpenIDE-Module-Specification-Version: 6.45
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)a/openide.windows/src/org/netbeans/modules/openide/windows/TopComponentProcessor.java (-2 / +9 lines)
Lines 84-96 Link Here
84
            Description info = findInfo(e);
84
            Description info = findInfo(e);
85
            String id = info.preferredID().replace('.', '-');
85
            String id = info.preferredID().replace('.', '-');
86
            
86
            
87
            String role = reg.role();
88
            if( role.trim().isEmpty() )
89
                role = null;
90
            String rootFolder = "Windows2";
91
            if( null != role )
92
                rootFolder += "/Roles/" + role;
93
            
87
            File settingsFile = layer(e).
94
            File settingsFile = layer(e).
88
                file("Windows2/Components/" + id + ".settings").
95
                file(rootFolder+"/Components/" + id + ".settings").
89
                contents(settingsFile(e));
96
                contents(settingsFile(e));
90
            settingsFile.write();
97
            settingsFile.write();
91
            
98
            
92
            File modeFile = layer(e).
99
            File modeFile = layer(e).
93
                file("Windows2/Modes/" + reg.mode() + "/" + id + ".wstcref").
100
                file(rootFolder+"/Modes/" + reg.mode() + "/" + id + ".wstcref").
94
                position(reg.position()).
101
                position(reg.position()).
95
                contents(modeFile(info.preferredID(), reg.openAtStartup()));
102
                contents(modeFile(info.preferredID(), reg.openAtStartup()));
96
            modeFile.write();
103
            modeFile.write();
(-)a/openide.windows/src/org/openide/windows/TopComponent.java (+6 lines)
Lines 1430-1435 Link Here
1430
        int position() default Integer.MAX_VALUE;
1430
        int position() default Integer.MAX_VALUE;
1431
        /** Shall the component be opened at start */
1431
        /** Shall the component be opened at start */
1432
        boolean openAtStartup();
1432
        boolean openAtStartup();
1433
        /** 
1434
         * Window layout role or an empty string for the default layout 
1435
         * @see WindowManager#setRole(java.lang.String) 
1436
         * @since 6.45
1437
         */
1438
        String role() default "";
1433
    }
1439
    }
1434
    
1440
    
1435
    /** Creates an action that can open the component.
1441
    /** Creates an action that can open the component.

Return to bug 199452