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 33531 - "Editable" actions should be disabled in popup menu on generated servlet
Summary: "Editable" actions should be disabled in popup menu on generated servlet
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: -S1S-
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 31345 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-11 10:51 UTC by sva
Modified: 2009-11-07 11:38 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 sva 2003-05-11 10:51:31 UTC
Steps to reproduce:
1. Create JSP file. Insert following string to JSP: <%! 
int i = 5;%>
2. Compile JSP and open generated servlet.
3. Select string " int i = 5; " in servlet code and press 
right mouse button.
4. Click Add->Field popup menu.
5. Click ok in Add New Field dialog.
6. Switch to JSP view and press F11.

Result: exception occured:

JSP_2.jsp [-1:-1] 
org.openide.filesystems.FileAlreadyLockedException
        at
org.openide.filesystems.AbstractFileObject.lock
(AbstractFileObject.java:204)
        at org.openide.filesystems.FileObject.delete
(FileObject.java:274)
        at
org.netbeans.modules.tomcat.tomcat40.compile.TomcatCompileC
ontext$TomcatDevelopmentCompilation.cleanJSP
(TomcatCompileContext.java:311)
        at
org.netbeans.modules.web.core.jsploader.CleanCompiler$Group
.start(CleanCompiler.java:107)
        at
org.netbeans.core.compiler.CompilationEngineImpl$CompilerTh
read$GroupCompiler.run(CompilationEngineImpl.java:280)
Errors compiling JSP_0005f2$jsp.


I think user shouldn't have ability to add new 
fields/constructor/methods, etc to generated 
servlet. "Add" context menu item should be always disabled
in generated servlet. The same problem exist 
with "Customize" popup menu item.

Reproduced with Nevada 030502.
Comment 1 Martin Grebac 2003-05-12 20:02:29 UTC
Agreed. All 'editable' actions should be disabled for generated servlet.
Comment 2 Martin Grebac 2004-01-13 21:36:48 UTC
*** Issue 31345 has been marked as a duplicate of this issue. ***
Comment 3 Martin Grebac 2004-01-23 13:40:30 UTC
Reassigning to editor:

Editable actions (like cut/paste/delete) shouldn't be enabled on
readonly file.
Comment 4 Roman Strobl 2004-12-07 15:22:06 UTC
Changing subcomponent to menu.
Comment 5 Vitezslav Stejskal 2007-10-19 11:14:31 UTC
The generated servlet file is not readonly. I'm not sure how exactly this should be fixed. I tried 'Generate' action
(alt-insert) to override a method and it seemed to work fine. Switching back to JSP and Design view was ok too.
Comment 6 Marek Fukala 2007-10-29 16:49:01 UTC
The actions are handled by java editor, reassigning to Honza.
Comment 7 Jan Lahoda 2008-11-19 12:24:17 UTC
later.
Comment 8 Quality Engineering 2009-11-02 11:04:10 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX