You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Olof Andersson (JIRA)" <ji...@apache.org> on 2019/07/26 19:10:00 UTC

[jira] [Issue Comment Deleted] (NETBEANS-2899) Corrupted code generated when "reformat on save" is enabled

     [ https://issues.apache.org/jira/browse/NETBEANS-2899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olof Andersson updated NETBEANS-2899:
-------------------------------------
    Comment: was deleted

(was: Problem disappeared after removing ~/.netbeans/11.0/config/

(but that of course also reset all configuration settings, open projects, etc.))

> Corrupted code generated when "reformat on save" is enabled
> -----------------------------------------------------------
>
>                 Key: NETBEANS-2899
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2899
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 11.0
>         Environment: Product Version: Apache NetBeans IDE 11.0 (Build incubator-netbeans-release-404-on-20190319)
> Java: 11.0.3; Java HotSpot(TM) 64-Bit Server VM 11.0.3+12-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.3+12-LTS
> System: Linux version 4.15.0-54-generic running on amd64; UTF-8; en_US (nb)
>            Reporter: Olof Andersson
>            Priority: Major
>
> h3. *Steps:*
>  - Enable formatting on save  (Tools > Options > Editor > On Save > Uncheck "Use All Languages Settings" > Reformat > All lines)
>  - Project tree > Right-click a package > New > JPanel Form
>  - Dialog "New JPanel Form" is displayed
>  - Click "Finish"
> h3. *Expected result:*
> A new JPanel is generated successfully
> h3. *Actual result:*
> An error dialog with message:
> {quote}"The form seems to be corrupted. The GUI builder
>  is not able to find the sections with the generated code.
>  The special comments that denote the start and the end
>  of these sections were removed or modified.
> The form will be opened in read-only mode.
> See [http://wiki.netbeans.org/FormGuardedBlockError]
>  for additional information."
> {quote}
> And the generated code of NewJPanel.java is corrupted:
> {code:java}
> /*
>  * To change this license header, choose License Headers in Project Properties.
>  * To change this template file, choose Tools | Templates
>  * and open the template in the editor.
>  */
> ackage editor;
> /**
>  *
>  * @author olof
>  */
> public class NewJPanel extends javax.swing.JPanel {
> 			 *
> 	 * Creates new form NewJPanel
> 	 	 *	ublic NewJPanel() {
> 			ponents();
> 	}
> 	/*	* T	met
> 	 * od is called from within the constructor to initiali orm.
> 	 * WARNING: Do
> 	 * ify this code. The content of this method is always
> 	 * regener the Fo
> 	 * m Editor.
> 	 */
> 	@SuppressWarnin
> 	 che	")
> 	// <editor-fold defaultstat	ollapsed" desc=" Generated Code ">                          
> 	private void initComponents()
> 		javax.swing.GroupLayout layout		avax.swing.GroupLayout(this);
> 		this.setLayout(layout);
> 		layout.set		alGroup(
> 				layout.crea		elGroup(javax.swing.GroupL
> 				nt.LEADING)
> 						.addGap(0, 400, Short.MAX_VALUE)
> 		);
> 		layout.setV
> 				layout.createParallelGroup(
> 		ng.		out.Alignment.LEADING)
> 				0, 300, Short.MAX_VALUE)
> 		);
> 	}
> 	// </editor-fold>                  
> 						ariables declaration - do not mo
> 		-BE	va	les
> 	// End of variables declaration//GEN-E	riables
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists