mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
This commit is contained in:
parent
db189e5935
commit
34411d80e6
19 changed files with 58 additions and 37 deletions
|
@ -1,4 +1,16 @@
|
|||
2005-09-01 Mikhail Khodjaiants
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
|
||||
* CDebugUtils.java
|
||||
* CDIDebugModel.java
|
||||
* CBreakpointManager.java
|
||||
* CDebugTarget.java
|
||||
* CGlobalValue.java
|
||||
* CRegisterGroup.java
|
||||
* CDirectorySourceLocation.java
|
||||
* CProjectSourceLocation.java
|
||||
* CSourceLocator.java
|
||||
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Bug 108636: mi level selection option should be moved to the gdb page.
|
||||
* ICDTLaunchConfigurationConstants.java
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ public class CDIDebugModel {
|
|||
HashMap attributes = new HashMap( 10 );
|
||||
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||
attributes.put( IBreakpoint.ENABLED, Boolean.valueOf( enabled ) );
|
||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||
attributes.put( ICBreakpoint.SOURCE_HANDLE, sourceHandle );
|
||||
|
@ -211,7 +211,7 @@ public class CDIDebugModel {
|
|||
attributes.put( IMarker.CHAR_END, new Integer( -1 ) );
|
||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||
attributes.put( ICLineBreakpoint.ADDRESS, address.toHexAddressString() );
|
||||
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||
attributes.put( IBreakpoint.ENABLED, Boolean.valueOf( enabled ) );
|
||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||
attributes.put( ICBreakpoint.SOURCE_HANDLE, sourceHandle );
|
||||
|
@ -244,13 +244,13 @@ public class CDIDebugModel {
|
|||
public static ICWatchpoint createWatchpoint( String sourceHandle, IResource resource, boolean writeAccess, boolean readAccess, String expression, boolean enabled, int ignoreCount, String condition, boolean register ) throws CoreException {
|
||||
HashMap attributes = new HashMap( 10 );
|
||||
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||
attributes.put( IBreakpoint.ENABLED, Boolean.valueOf( enabled ) );
|
||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||
attributes.put( ICBreakpoint.SOURCE_HANDLE, sourceHandle );
|
||||
attributes.put( ICWatchpoint.EXPRESSION, expression );
|
||||
attributes.put( ICWatchpoint.READ, new Boolean( readAccess ) );
|
||||
attributes.put( ICWatchpoint.WRITE, new Boolean( writeAccess ) );
|
||||
attributes.put( ICWatchpoint.READ, Boolean.valueOf( readAccess ) );
|
||||
attributes.put( ICWatchpoint.WRITE, Boolean.valueOf( writeAccess ) );
|
||||
return new CWatchpoint( resource, attributes, register );
|
||||
}
|
||||
|
||||
|
@ -291,13 +291,13 @@ public class CDIDebugModel {
|
|||
attributes.put( IMarker.CHAR_START, new Integer( charStart ) );
|
||||
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||
attributes.put( IBreakpoint.ENABLED, Boolean.valueOf( enabled ) );
|
||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||
attributes.put( ICBreakpoint.SOURCE_HANDLE, sourceHandle );
|
||||
attributes.put( ICWatchpoint.EXPRESSION, expression );
|
||||
attributes.put( ICWatchpoint.READ, new Boolean( readAccess ) );
|
||||
attributes.put( ICWatchpoint.WRITE, new Boolean( writeAccess ) );
|
||||
attributes.put( ICWatchpoint.READ, Boolean.valueOf( readAccess ) );
|
||||
attributes.put( ICWatchpoint.WRITE, Boolean.valueOf( writeAccess ) );
|
||||
return new CWatchpoint( resource, attributes, register );
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ public class CDIDebugModel {
|
|||
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||
attributes.put( ICLineBreakpoint.FUNCTION, function );
|
||||
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||
attributes.put( IBreakpoint.ENABLED, Boolean.valueOf( enabled ) );
|
||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||
attributes.put( ICBreakpoint.SOURCE_HANDLE, sourceHandle );
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.w3c.dom.Document;
|
|||
public class CDebugUtils {
|
||||
|
||||
public static boolean question( IStatus status, Object source ) {
|
||||
Boolean result = new Boolean( false );
|
||||
Boolean result = Boolean.FALSE;
|
||||
IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler( status );
|
||||
if ( handler != null ) {
|
||||
try {
|
||||
|
|
|
@ -473,10 +473,10 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
|||
Map map = new HashMap( 3 );
|
||||
try {
|
||||
if ( !fSkipBreakpoint && DebugPlugin.getDefault().getBreakpointManager().isEnabled() ) {
|
||||
map.put( IBreakpoint.ENABLED, new Boolean( cdiBreakpoint.isEnabled() ) );
|
||||
map.put( IBreakpoint.ENABLED, Boolean.valueOf( cdiBreakpoint.isEnabled() ) );
|
||||
}
|
||||
else {
|
||||
map.put( IBreakpoint.ENABLED, new Boolean( breakpoint.isEnabled() ) );
|
||||
map.put( IBreakpoint.ENABLED, Boolean.valueOf( breakpoint.isEnabled() ) );
|
||||
}
|
||||
}
|
||||
catch( CDIException e ) {
|
||||
|
@ -768,7 +768,7 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
|||
Boolean enabled0 = null;
|
||||
ICDICondition condition0 = null;
|
||||
if ( enabled != oldEnabled && enabled != cdiBreakpoint.isEnabled() ) {
|
||||
enabled0 = ( enabled ) ? Boolean.TRUE : Boolean.FALSE;
|
||||
enabled0 = Boolean.valueOf( enabled );
|
||||
}
|
||||
if ( ignoreCount != oldIgnoreCount || condition.compareTo( oldCondition ) != 0 || areThreadFiltersChanged( newThreadIs, cdiBreakpoint ) ) {
|
||||
ICDICondition cdiCondition = cdiTarget.createCondition( ignoreCount, condition, newThreadIs );
|
||||
|
|
|
@ -1246,7 +1246,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
|||
IBinaryObject file;
|
||||
file = getBinaryFile();
|
||||
if ( file != null ) {
|
||||
fIsLittleEndian = new Boolean( file.isLittleEndian() );
|
||||
fIsLittleEndian = Boolean.valueOf( file.isLittleEndian() );
|
||||
}
|
||||
}
|
||||
return fIsLittleEndian.booleanValue();
|
||||
|
|
|
@ -13,12 +13,6 @@ package org.eclipse.cdt.debug.internal.core.model;
|
|||
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter type comment.
|
||||
*
|
||||
* @since: Oct 2, 2002
|
||||
*/
|
||||
public class CGlobalValue extends CValue
|
||||
{
|
||||
private Boolean fHasChildren = null;
|
||||
|
@ -41,7 +35,7 @@ public class CGlobalValue extends CValue
|
|||
{
|
||||
if ( fHasChildren == null )
|
||||
{
|
||||
fHasChildren = new Boolean( super.hasVariables() );
|
||||
fHasChildren = Boolean.valueOf( super.hasVariables() );
|
||||
}
|
||||
return fHasChildren.booleanValue();
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ public class CRegisterGroup extends CDebugElement implements IPersistableRegiste
|
|||
Document document = DebugPlugin.newDocument();
|
||||
Element element = document.createElement( ELEMENT_REGISTER_GROUP );
|
||||
element.setAttribute( ATTR_REGISTER_GROUP_NAME, getName() );
|
||||
element.setAttribute( ATTR_REGISTER_GROUP_ENABLED, isEnabled() ? Boolean.TRUE.toString() : Boolean.FALSE.toString() );
|
||||
element.setAttribute( ATTR_REGISTER_GROUP_ENABLED, Boolean.valueOf( isEnabled() ).toString() );
|
||||
for ( int i = 0; i < fRegisterDescriptors.length; ++i ) {
|
||||
Element child = document.createElement( ELEMENT_REGISTER );
|
||||
child.setAttribute( ATTR_REGISTER_NAME, fRegisterDescriptors[i].getName() );
|
||||
|
|
|
@ -309,7 +309,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation
|
|||
node.setAttribute( ATTR_DIRECTORY, getDirectory().toOSString() );
|
||||
if ( getAssociation() != null )
|
||||
node.setAttribute( ATTR_ASSOCIATION, getAssociation().toOSString() );
|
||||
node.setAttribute( ATTR_SEARCH_SUBFOLDERS, new Boolean( searchSubfolders() ).toString() );
|
||||
node.setAttribute( ATTR_SEARCH_SUBFOLDERS, Boolean.valueOf( searchSubfolders() ).toString() );
|
||||
return CDebugUtils.serializeDocument( document );
|
||||
}
|
||||
catch( ParserConfigurationException e )
|
||||
|
|
|
@ -245,7 +245,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation
|
|||
Element node = document.createElement( ELEMENT_NAME );
|
||||
document.appendChild( node );
|
||||
node.setAttribute( ATTR_PROJECT, getProject().getName() );
|
||||
node.setAttribute( ATTR_GENERIC, new Boolean( isGeneric() ).toString() );
|
||||
node.setAttribute( ATTR_GENERIC, Boolean.valueOf( isGeneric() ).toString() );
|
||||
return CDebugUtils.serializeDocument( document );
|
||||
}
|
||||
catch( ParserConfigurationException e )
|
||||
|
|
|
@ -281,7 +281,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
|
|||
ICSourceLocation[] locations = getSourceLocations();
|
||||
saveDisabledGenericSourceLocations( locations, document, node );
|
||||
saveAdditionalSourceLocations( locations, document, node );
|
||||
node.setAttribute( ATTR_DUPLICATE_FILES, new Boolean( searchForDuplicateFiles() ).toString() );
|
||||
node.setAttribute( ATTR_DUPLICATE_FILES, Boolean.valueOf( searchForDuplicateFiles() ).toString() );
|
||||
return CDebugUtils.serializeDocument( document );
|
||||
}
|
||||
catch( ParserConfigurationException e ) {
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
2005-09-01 Mikhail Khodjaiants
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
|
||||
* GDBSolibBlock.java
|
||||
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Bug 108636: mi level selection option should be moved to the gdb page.
|
||||
* MIUIMessages.properties
|
||||
* GDBDebuggerPage.java
|
||||
|
|
|
@ -115,9 +115,9 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
try {
|
||||
Map attrs = configuration.getAttributes();
|
||||
if ( fAutoSoLibButton != null )
|
||||
attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, new Boolean( fAutoSoLibButton.getSelection() ) );
|
||||
attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, Boolean.valueOf( fAutoSoLibButton.getSelection() ) );
|
||||
if ( fStopOnSolibEventsButton != null )
|
||||
attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, new Boolean( fStopOnSolibEventsButton.getSelection() ) );
|
||||
attrs.put( IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, Boolean.valueOf( fStopOnSolibEventsButton.getSelection() ) );
|
||||
configuration.setAttributes( attrs );
|
||||
}
|
||||
catch( CoreException e ) {
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2005-09-06 Mikhail Khodjaiants
|
||||
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
|
||||
* QuestionStatusHandler.java
|
||||
* ShowFullPathsAction.java
|
||||
* CBreakpointPreferenceStore.java
|
||||
* ModuleProperties.java
|
||||
|
||||
2005-08-24 Mikhail Khodjaiants
|
||||
Bug 107208: toggle breakpoint with external sources doesn't work.
|
||||
* ToggleBreakpointAdapter.java
|
||||
|
|
|
@ -37,6 +37,6 @@ public class QuestionStatusHandler implements IStatusHandler {
|
|||
}
|
||||
} );
|
||||
}
|
||||
return new Boolean( result[0] );
|
||||
return Boolean.valueOf( result[0] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ShowFullPathsAction extends ViewFilterAction {
|
|||
if (view != null) {
|
||||
IDebugModelPresentation pres = view.getPresentation( CDIDebugModel.getPluginIdentifier() );
|
||||
if ( pres != null ) {
|
||||
pres.setAttribute( CDebugModelPresentation.DISPLAY_FULL_PATHS, ( getValue() ? Boolean.TRUE : Boolean.FALSE ) );
|
||||
pres.setAttribute( CDebugModelPresentation.DISPLAY_FULL_PATHS, Boolean.valueOf( getValue() ) );
|
||||
BusyIndicator.showWhile( viewer.getControl().getDisplay(),
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
|
|
|
@ -351,9 +351,9 @@ public class CBreakpointPreferenceStore implements IPreferenceStore {
|
|||
public void setValue( String name, boolean newValue ) {
|
||||
boolean oldValue = getBoolean( name );
|
||||
if ( oldValue != newValue ) {
|
||||
fProperties.put( name, new Boolean( newValue ) );
|
||||
fProperties.put( name, Boolean.valueOf( newValue ) );
|
||||
setDirty( true );
|
||||
firePropertyChangeEvent( name, new Boolean( oldValue ), new Boolean( newValue ) );
|
||||
firePropertyChangeEvent( name, Boolean.valueOf( oldValue ), Boolean.valueOf( newValue ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public class ModuleProperties {
|
|||
fProperties.add( new Property( CPU, module.getCPU() ) );
|
||||
fProperties.add( new Property( BASE_ADDRESS, module.getBaseAddress() ) );
|
||||
fProperties.add( new Property( SIZE, new Long( module.getSize() ) ) );
|
||||
fProperties.add( new Property( SYMBOLS_LOADED, new Boolean( module.areSymbolsLoaded() ) ) );
|
||||
fProperties.add( new Property( SYMBOLS_LOADED, Boolean.valueOf( module.areSymbolsLoaded() ) ) );
|
||||
fProperties.add( new Property( SYMBOLS_FILE, module.getSymbolsFileName() ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
2005-09-01 Mikhail Khodjaiants
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
|
||||
* CDebuggerTab.java
|
||||
|
||||
2005-09-06 Mikhail Khodjaiants
|
||||
Bug 108636: mi level selection option should be moved to the gdb page.
|
||||
* CDebuggerTab.java
|
||||
|
||||
|
|
|
@ -99,9 +99,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
|
||||
private void saveValues() {
|
||||
Map attr = getAdvancedAttributes();
|
||||
Boolean varBookkeeping = (fVarBookKeeping.getSelection()) ? Boolean.FALSE : Boolean.TRUE;
|
||||
Boolean varBookkeeping = Boolean.valueOf( fVarBookKeeping.getSelection() );
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping);
|
||||
Boolean regBookkeeping = (fRegBookKeeping.getSelection()) ? Boolean.FALSE : Boolean.TRUE;
|
||||
Boolean regBookkeeping = Boolean.valueOf( fRegBookKeeping.getSelection() );
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||
updateLaunchConfigurationDialog();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue