JBuilder X "Format all" bug
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alex_Thales
Posted On:   Friday, July 16, 2004 06:35 AM

Here's a bug in JBuilder X: Having some comments inside the code you're formatting with "Edit > Format all" menu command may cripple the code. Here is an example: Before "Format all": switch (action) { case ACTION_PREV_REC: /* recordDetails.setRecId( recId ); recordDetails.readNearRecordDetails( recId, dbCon, -1 ); session.removeAttribute("processErrors"); break; */ case ACTION_NEXT_REC: /* recordDetails.setRecId( recId ); recordDetails.readNearRecordDetails( recId, dbCon, 1 ); session.removeAttribute("processErrors"); break; */ case   More>>

Here's a bug in JBuilder X:

Having some comments inside the code you're formatting with "Edit > Format all" menu command may cripple the code.

Here is an example:

Before "Format all":

			
switch (action)
{
case ACTION_PREV_REC:
/*
recordDetails.setRecId( recId );
recordDetails.readNearRecordDetails( recId, dbCon, -1 );
session.removeAttribute("processErrors");
break;
*/
case ACTION_NEXT_REC:
/*
recordDetails.setRecId( recId );
recordDetails.readNearRecordDetails( recId, dbCon, 1 );
session.removeAttribute("processErrors");
break;
*/
case ACTION_GOTO_REC:
recordDetails.setRecId( recId );
recordDetails.readRecordDetails( recId, dbCon );
session.removeAttribute("processErrors");
break;
}


and after "Format all":
			
switch( action )
{
case ACTION_PREV_REC:

/*
recordDetails.setRecId( recId );
recordDetails.readNearRecordDetails( recId, dbCon, -1 );
session.removeAttribute("processErrors");
break;
case
ACTION_NEXT_REC:
*/

/*
recordDetails.setRecId( recId );
recordDetails.readNearRecordDetails( recId, dbCon, 1 );
session.removeAttribute("processErrors");
break;
case
ACTION_GOTO_REC:
*/
recordDetails.setRecId( recId );
recordDetails.readRecordDetails( recId, dbCon );
session.removeAttribute( "processErrors" );
break;
}



As you can see, some code has been commented out:

the
case ACTION_NEXT_REC:

and
case ACTION_GOTO_REC:
lines.

Is there something that can be done, maybe from the format options, besides not using "Format all"?    <<Less
About | Sitemap | Contact