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.
Summary: | extend the window system to allow a check for TopComponent's type - "editor" or "view" | ||
---|---|---|---|
Product: | platform | Reporter: | Stanislav Aubrecht <saubrecht> |
Component: | Window System | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dsimonek, santhosh |
Priority: | P2 | Keywords: | API, API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: | |
Attachments: |
proposed implementation
an extended patch with Mode.isEditorMode WindowManager.isEditorMode( Mode ) |
Description
Stanislav Aubrecht
2007-02-22 17:15:47 UTC
Created attachment 38818 [details]
proposed implementation
shouldn't it be other wasy needed; i.e Mode should have that ability; Mode.isEditorMode(); then we can also check whether a topcomponent is editorTC or not as below: tc.getMode().isEditorMode(); the issue 83024 requires such API santhosh, your proposal would require to find TopComponent's Mode first, check it for null value and then check the Mode type. my proposal is a bit easier on developers but i don't have any strong preferences either way. I agree with you in ease of use; but there might be usecases, where programmer might want to know whether a given mode is editor mode or not; may be u can provide both; the api in topcomponent can simply check for NULL and use mode.isEditorMode() as return value; Created attachment 38857 [details]
an extended patch with Mode.isEditorMode
y01 I do not like adding new methods into interfaces - e.g. I'd like to see other solution than just adding new method into Mode interface - maybe boolean WindowManager.isEditorMode(Mode) would also be acceptable? Created attachment 38919 [details]
WindowManager.isEditorMode( Mode )
if there are no more comments, i'll integrate the latest version of the patch tomorrow merged into trunk: Checking in openide/windows/apichanges.xml; /cvs/openide/windows/apichanges.xml,v <-- apichanges.xml new revision: 1.11; previous revision: 1.10 done Checking in openide/windows/manifest.mf; /cvs/openide/windows/manifest.mf,v <-- manifest.mf new revision: 1.13; previous revision: 1.12 done Checking in core/windows/src/org/netbeans/core/windows/WindowManagerImpl.java; /cvs/core/windows/src/org/netbeans/core/windows/WindowManagerImpl.java,v <-- WindowManagerImpl.java new revision: 1.57; previous revision: 1.56 done RCS file: /cvs/core/windows/test/unit/src/org/netbeans/core/windows/TopComponentTypeTest.java,v done Checking in core/windows/test/unit/src/org/netbeans/core/windows/TopComponentTypeTest.java; /cvs/core/windows/test/unit/src/org/netbeans/core/windows/TopComponentTypeTest.java,v <-- TopComponentTypeTest.java initial revision: 1.1 done Checking in openide/windows/src/org/openide/windows/WindowManager.java; /cvs/openide/windows/src/org/openide/windows/WindowManager.java,v <-- WindowManager.java new revision: 1.15; previous revision: 1.14 done |