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 206031 - Do not open design tab of a form by default
Summary: Do not open design tab of a form by default
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: issues@guibuilder
URL:
Keywords: PERFORMANCE, USABILITY
Depends on:
Blocks:
 
Reported: 2011-12-06 19:17 UTC by Jesse Glick
Modified: 2017-07-27 19:12 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 Jesse Glick 2011-12-06 19:17:16 UTC
Various UI gestures to "open" a file, when applied to a form, open it in design view:

- ENTER or double-click in Projects/Files [FormDataNode.getPreferredAction]
- CLI --open [DefaultOpenFileImpl.openDataObjectByCookie]

Others open in source view, e.g.

- Go to Type [FileDescription.open]
- other Navigate menu items oriented to Java elements [UiUtils.doOpen]

When you did in fact mean to manipulate the GUI form itself, it is fine to open to this tab. But in my experience most of the time during code maintenance, i.e. most of the times you open a form, you want to work on the Java code. Of course if you are on the "wrong" tab you can easily switch to the other one. But opening the design tab carries penalties:

1. It is slow. I frequently observe pauses of multiple seconds waiting for the form to be loaded.

2. The form editor often makes modifications merely because the form was opened, without any explicit edit gesture - meaning you have to do a VCS revert before editing plain old Java code just so your diff is minimal. For example, guarded blocks might be regenerated. And the .form file may be modified too:

-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>

Given these problems, I think it is better to always open the Source tab initially; if the user wants the Design view, they can explicitly switch to it. An exception might be when the form is first created from template, when you presumably want to work on the design immediately.
Comment 1 shoujin 2017-07-13 11:36:38 UTC
Many years later, this would still be a welcome change.
Comment 2 BaneDad 2017-07-27 19:12:00 UTC
This would be a very useful feature.