mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
bug 319769: Unnecessary type casts
patch from Petri Tuononen
This commit is contained in:
parent
dbe5a12393
commit
73ea2efa7d
30 changed files with 64 additions and 64 deletions
|
@ -146,7 +146,7 @@ public class ManagedBuildCoreTests extends TestCase {
|
||||||
for (i = 0; i < expectedOSListTokens.length; ++i) {
|
for (i = 0; i < expectedOSListTokens.length; ++i) {
|
||||||
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
||||||
}
|
}
|
||||||
assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
assertTrue(Arrays.equals(platform.getOSList(), expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
||||||
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
||||||
String[] binaryParsers = platform.getBinaryParserList();
|
String[] binaryParsers = platform.getBinaryParserList();
|
||||||
assertEquals(binaryParsers.length, 2);
|
assertEquals(binaryParsers.length, 2);
|
||||||
|
@ -214,7 +214,7 @@ public class ManagedBuildCoreTests extends TestCase {
|
||||||
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
|
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
|
||||||
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
|
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
|
||||||
}
|
}
|
||||||
assertTrue(Arrays.equals(option.getApplicableValues(), (String[]) expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
|
assertTrue(Arrays.equals(option.getApplicableValues(), expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
|
||||||
|
|
||||||
// Fetch the debug other option and verify
|
// Fetch the debug other option and verify
|
||||||
//
|
//
|
||||||
|
@ -324,14 +324,14 @@ public class ManagedBuildCoreTests extends TestCase {
|
||||||
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
||||||
}
|
}
|
||||||
assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
|
assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
|
||||||
assertTrue(Arrays.equals(toolChain.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
assertTrue(Arrays.equals(toolChain.getOSList(), expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
||||||
assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
|
assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
|
||||||
assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
|
assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
|
||||||
|
|
||||||
// Fetch and check platform
|
// Fetch and check platform
|
||||||
//
|
//
|
||||||
ITargetPlatform platform = toolChain.getTargetPlatform();
|
ITargetPlatform platform = toolChain.getTargetPlatform();
|
||||||
assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
assertTrue(Arrays.equals(platform.getOSList(), expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
||||||
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
||||||
String[] binaryParsers = platform.getBinaryParserList();
|
String[] binaryParsers = platform.getBinaryParserList();
|
||||||
assertEquals(binaryParsers.length, 1);
|
assertEquals(binaryParsers.length, 1);
|
||||||
|
@ -518,14 +518,14 @@ public class ManagedBuildCoreTests extends TestCase {
|
||||||
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
expectedOSListarr.add(expectedOSListTokens[i].trim());
|
||||||
}
|
}
|
||||||
assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
|
assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
|
||||||
assertTrue(Arrays.equals(toolChain.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
assertTrue(Arrays.equals(toolChain.getOSList(), expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
||||||
assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
|
assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
|
||||||
assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
|
assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
|
||||||
|
|
||||||
// Fetch and check platform
|
// Fetch and check platform
|
||||||
//
|
//
|
||||||
ITargetPlatform platform = toolChain.getTargetPlatform();
|
ITargetPlatform platform = toolChain.getTargetPlatform();
|
||||||
assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
assertTrue(Arrays.equals(platform.getOSList(), expectedOSListarr.toArray(new String[expectedSizeOSList])));
|
||||||
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
|
||||||
String[] binaryParsers = platform.getBinaryParserList();
|
String[] binaryParsers = platform.getBinaryParserList();
|
||||||
assertEquals(binaryParsers.length, 1);
|
assertEquals(binaryParsers.length, 1);
|
||||||
|
@ -587,7 +587,7 @@ public class ManagedBuildCoreTests extends TestCase {
|
||||||
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
|
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
|
||||||
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
|
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
|
||||||
}
|
}
|
||||||
assertTrue(Arrays.equals(option.getApplicableValues(), (String[]) expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
|
assertTrue(Arrays.equals(option.getApplicableValues(), expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
|
||||||
|
|
||||||
// Fetch the other flags option and verify
|
// Fetch the other flags option and verify
|
||||||
//
|
//
|
||||||
|
|
|
@ -366,7 +366,7 @@ public class ManagedBuildCoreTests_SharedToolOptions extends TestCase {
|
||||||
sizeCategoryTop = testCategoryTop.length;
|
sizeCategoryTop = testCategoryTop.length;
|
||||||
for (i=0; i < sizeCategoryTop; i++, categoryNo++)
|
for (i=0; i < sizeCategoryTop; i++, categoryNo++)
|
||||||
{
|
{
|
||||||
String ID = ((IOptionCategory)testCategoryTop[i]).getId();
|
String ID = testCategoryTop[i].getId();
|
||||||
// Categories are always extension elements, so check
|
// Categories are always extension elements, so check
|
||||||
// for an identical match
|
// for an identical match
|
||||||
assertEquals(ID, topCategoryIDs+categoryNo);
|
assertEquals(ID, topCategoryIDs+categoryNo);
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class ManagedCProjectNature implements IProjectNature {
|
||||||
* Get the correct builderID
|
* Get the correct builderID
|
||||||
*/
|
*/
|
||||||
public static String getBuilderID() {
|
public static String getBuilderID() {
|
||||||
Plugin plugin = (Plugin)ManagedBuilderCorePlugin.getDefault();
|
Plugin plugin = ManagedBuilderCorePlugin.getDefault();
|
||||||
if (Platform.getExtensionRegistry().getExtension(BUILDER_NAME) != null) {
|
if (Platform.getExtensionRegistry().getExtension(BUILDER_NAME) != null) {
|
||||||
return ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
|
return ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class ManagedOptionValueHandler implements
|
||||||
// Figure out which type the option is and implement default behaviour for it.
|
// Figure out which type the option is and implement default behaviour for it.
|
||||||
switch (option.getValueType()) {
|
switch (option.getValueType()) {
|
||||||
case IOption.STRING:
|
case IOption.STRING:
|
||||||
if (option.getStringValue().equals((String)defaultValue)) {
|
if (option.getStringValue().equals(defaultValue)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class BuildCommand implements IBuildCommand {
|
||||||
public BuildCommand(IPath cmd, String args[], Map env, IPath cwd, BuildStep step){
|
public BuildCommand(IPath cmd, String args[], Map env, IPath cwd, BuildStep step){
|
||||||
fCmd = cmd;
|
fCmd = cmd;
|
||||||
if(args != null)
|
if(args != null)
|
||||||
fArgs = (String[])args.clone();
|
fArgs = args.clone();
|
||||||
if(env != null)
|
if(env != null)
|
||||||
fEnv = new HashMap(env);
|
fEnv = new HashMap(env);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class BuildCommand implements IBuildCommand {
|
||||||
*/
|
*/
|
||||||
public String[] getArgs() {
|
public String[] getArgs() {
|
||||||
if(fArgs != null)
|
if(fArgs != null)
|
||||||
return (String[])fArgs.clone();
|
return fArgs.clone();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
keepEnvVarInBuildfile = builder.keepEnvVarInBuildfile;
|
keepEnvVarInBuildfile = builder.keepEnvVarInBuildfile;
|
||||||
supportsManagedBuild = builder.supportsManagedBuild;
|
supportsManagedBuild = builder.supportsManagedBuild;
|
||||||
if(builder.customizedErrorParserIds != null)
|
if(builder.customizedErrorParserIds != null)
|
||||||
customizedErrorParserIds = (String[])builder.customizedErrorParserIds.clone();
|
customizedErrorParserIds = builder.customizedErrorParserIds.clone();
|
||||||
if(builder.customizedEnvironment != null)
|
if(builder.customizedEnvironment != null)
|
||||||
customizedEnvironment = (HashMap)builder.customizedEnvironment.clone();
|
customizedEnvironment = (HashMap)builder.customizedEnvironment.clone();
|
||||||
appendEnvironment = builder.appendEnvironment;
|
appendEnvironment = builder.appendEnvironment;
|
||||||
|
@ -301,7 +301,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
isVariableCaseSensitive = new Boolean(builder.isVariableCaseSensitive.booleanValue());
|
isVariableCaseSensitive = new Boolean(builder.isVariableCaseSensitive.booleanValue());
|
||||||
|
|
||||||
if(builder.reservedMacroNames != null)
|
if(builder.reservedMacroNames != null)
|
||||||
reservedMacroNames = (String[])builder.reservedMacroNames.clone();
|
reservedMacroNames = builder.reservedMacroNames.clone();
|
||||||
|
|
||||||
reservedMacroNameSupplierElement = builder.reservedMacroNameSupplierElement;
|
reservedMacroNameSupplierElement = builder.reservedMacroNameSupplierElement;
|
||||||
reservedMacroNameSupplier = builder.reservedMacroNameSupplier;
|
reservedMacroNameSupplier = builder.reservedMacroNameSupplier;
|
||||||
|
@ -315,7 +315,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
parallelBuildOn = builder.parallelBuildOn;
|
parallelBuildOn = builder.parallelBuildOn;
|
||||||
|
|
||||||
if(builder.outputEntries != null){
|
if(builder.outputEntries != null){
|
||||||
outputEntries = (ICOutputEntry[])builder.outputEntries.clone();
|
outputEntries = builder.outputEntries.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(copyIds){
|
if(copyIds){
|
||||||
|
@ -383,7 +383,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(builder.customizedErrorParserIds != null)
|
if(builder.customizedErrorParserIds != null)
|
||||||
customizedErrorParserIds = (String[])builder.customizedErrorParserIds.clone();
|
customizedErrorParserIds = builder.customizedErrorParserIds.clone();
|
||||||
if(builder.customizedEnvironment != null)
|
if(builder.customizedEnvironment != null)
|
||||||
customizedEnvironment = (HashMap)builder.customizedEnvironment.clone();
|
customizedEnvironment = (HashMap)builder.customizedEnvironment.clone();
|
||||||
appendEnvironment = builder.appendEnvironment;
|
appendEnvironment = builder.appendEnvironment;
|
||||||
|
@ -1463,7 +1463,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
// If 'superClass' is null, then there is no builder available in
|
// If 'superClass' is null, then there is no builder available in
|
||||||
// plugin manifest file with the same 'id' & version.
|
// plugin manifest file with the same 'id' & version.
|
||||||
// Look for the 'versionsSupported' attribute
|
// Look for the 'versionsSupported' attribute
|
||||||
String high = (String) ManagedBuildManager
|
String high = ManagedBuildManager
|
||||||
.getExtensionBuilderMap().lastKey();
|
.getExtensionBuilderMap().lastKey();
|
||||||
|
|
||||||
SortedMap subMap = null;
|
SortedMap subMap = null;
|
||||||
|
@ -1653,7 +1653,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
|
|
||||||
public String[] getErrorParsers() {
|
public String[] getErrorParsers() {
|
||||||
if(isCustomBuilder() && customizedErrorParserIds != null)
|
if(isCustomBuilder() && customizedErrorParserIds != null)
|
||||||
return (String[])customizedErrorParserIds.clone();
|
return customizedErrorParserIds.clone();
|
||||||
|
|
||||||
IToolChain parent = getParent();
|
IToolChain parent = getParent();
|
||||||
IConfiguration parentConfig = parent.getParent();
|
IConfiguration parentConfig = parent.getParent();
|
||||||
|
@ -1662,7 +1662,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
|
|
||||||
public String[] getCustomizedErrorParserIds(){
|
public String[] getCustomizedErrorParserIds(){
|
||||||
if(customizedErrorParserIds != null)
|
if(customizedErrorParserIds != null)
|
||||||
return (String[])customizedErrorParserIds.clone();
|
return customizedErrorParserIds.clone();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2669,12 +2669,12 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
return (ICOutputEntry[])outputEntries.clone();
|
return outputEntries.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOutputEntries(ICOutputEntry[] entries){
|
public void setOutputEntries(ICOutputEntry[] entries){
|
||||||
if(entries != null)
|
if(entries != null)
|
||||||
outputEntries = (ICOutputEntry[])entries.clone();
|
outputEntries = entries.clone();
|
||||||
else
|
else
|
||||||
outputEntries = null;
|
outputEntries = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,7 +512,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
postannouncebuildStep = baseCfg.postannouncebuildStep;
|
postannouncebuildStep = baseCfg.postannouncebuildStep;
|
||||||
|
|
||||||
if(baseCfg.sourceEntries != null)
|
if(baseCfg.sourceEntries != null)
|
||||||
sourceEntries = (ICSourceEntry[])baseCfg.sourceEntries.clone();
|
sourceEntries = baseCfg.sourceEntries.clone();
|
||||||
|
|
||||||
// enableInternalBuilder(baseCfg.isInternalBuilderEnabled());
|
// enableInternalBuilder(baseCfg.isInternalBuilderEnabled());
|
||||||
// setInternalBuilderIgnoreErr(baseCfg.getInternalBuilderIgnoreErr());
|
// setInternalBuilderIgnoreErr(baseCfg.getInternalBuilderIgnoreErr());
|
||||||
|
@ -668,7 +668,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
postannouncebuildStep = new String(cloneConfig.postannouncebuildStep);
|
postannouncebuildStep = new String(cloneConfig.postannouncebuildStep);
|
||||||
}
|
}
|
||||||
if(cloneConfig.sourceEntries != null)
|
if(cloneConfig.sourceEntries != null)
|
||||||
sourceEntries = (ICSourceEntry[])cloneConfig.sourceEntries.clone();
|
sourceEntries = cloneConfig.sourceEntries.clone();
|
||||||
|
|
||||||
// enableInternalBuilder(cloneConfig.isInternalBuilderEnabled());
|
// enableInternalBuilder(cloneConfig.isInternalBuilderEnabled());
|
||||||
// setInternalBuilderIgnoreErr(cloneConfig.getInternalBuilderIgnoreErr());
|
// setInternalBuilderIgnoreErr(cloneConfig.getInternalBuilderIgnoreErr());
|
||||||
|
@ -990,14 +990,14 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getProjectType()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getProjectType()
|
||||||
*/
|
*/
|
||||||
public IProjectType getProjectType() {
|
public IProjectType getProjectType() {
|
||||||
return (IProjectType)projectType;
|
return projectType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getManagedProject()
|
* @see org.eclipse.cdt.core.build.managed.IConfiguration#getManagedProject()
|
||||||
*/
|
*/
|
||||||
public IManagedProject getManagedProject() {
|
public IManagedProject getManagedProject() {
|
||||||
return (IManagedProject)managedProject;
|
return managedProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -2323,7 +2323,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return new ICSourceEntry[]{new CSourceEntry(Path.EMPTY, null, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED)}; //$NON-NLS-1$
|
return new ICSourceEntry[]{new CSourceEntry(Path.EMPTY, null, ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED)}; //$NON-NLS-1$
|
||||||
|
|
||||||
}
|
}
|
||||||
return (ICSourceEntry[])sourceEntries.clone();
|
return sourceEntries.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSourceEntries(ICSourceEntry[] entries) {
|
public void setSourceEntries(ICSourceEntry[] entries) {
|
||||||
|
@ -2389,7 +2389,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
oldSet = new LinkedHashSet<String>();
|
oldSet = new LinkedHashSet<String>();
|
||||||
|
|
||||||
oldSet.removeAll(set);
|
oldSet.removeAll(set);
|
||||||
setErrorParserAttribute((String[])oldSet.toArray(new String[oldSet.size()]));
|
setErrorParserAttribute(oldSet.toArray(new String[oldSet.size()]));
|
||||||
|
|
||||||
IResourceInfo rcInfos[] = getResourceInfos();
|
IResourceInfo rcInfos[] = getResourceInfos();
|
||||||
for(int i = 0; i < rcInfos.length; i++){
|
for(int i = 0; i < rcInfos.length; i++){
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
if(conflicts != null && conflicts.length != 0){
|
if(conflicts != null && conflicts.length != 0){
|
||||||
fToolConflicts = new ITool[conflicts.length][];
|
fToolConflicts = new ITool[conflicts.length][];
|
||||||
for(int i = 0; i < conflicts.length; i++){
|
for(int i = 0; i < conflicts.length; i++){
|
||||||
fToolConflicts[i] = (ITool[])conflicts[i].clone();
|
fToolConflicts[i] = conflicts[i].clone();
|
||||||
}
|
}
|
||||||
flags |= TOOLS_CONFLICT;
|
flags |= TOOLS_CONFLICT;
|
||||||
if(severity == IStatus.OK)
|
if(severity == IStatus.OK)
|
||||||
|
@ -87,7 +87,7 @@ public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nonMbsTools != null && nonMbsTools.length != 0){
|
if(nonMbsTools != null && nonMbsTools.length != 0){
|
||||||
fNonManagedBuildTools = (ITool[])nonMbsTools.clone();;
|
fNonManagedBuildTools = nonMbsTools.clone();;
|
||||||
flags |= TOOLS_DONT_SUPPORT_MANAGED_BUILD;
|
flags |= TOOLS_DONT_SUPPORT_MANAGED_BUILD;
|
||||||
severity = IStatus.ERROR;
|
severity = IStatus.ERROR;
|
||||||
} else {
|
} else {
|
||||||
|
@ -119,12 +119,12 @@ public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
public ITool[][] getToolsConflicts(){
|
public ITool[][] getToolsConflicts(){
|
||||||
ITool[][] copy = new ITool[fToolConflicts.length][];
|
ITool[][] copy = new ITool[fToolConflicts.length][];
|
||||||
for(int i = 0; i < fToolConflicts.length; i++){
|
for(int i = 0; i < fToolConflicts.length; i++){
|
||||||
copy[i] = (ITool[])fToolConflicts[i].clone();
|
copy[i] = fToolConflicts[i].clone();
|
||||||
}
|
}
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITool[] getNonManagedBuildTools(){
|
public ITool[] getNonManagedBuildTools(){
|
||||||
return (ITool[])fNonManagedBuildTools.clone();
|
return fNonManagedBuildTools.clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
|
||||||
public IConfiguration createConfiguration(IConfiguration parent, String id, String name) {
|
public IConfiguration createConfiguration(IConfiguration parent, String id, String name) {
|
||||||
Configuration config = new Configuration(this, parent, id, name);
|
Configuration config = new Configuration(this, parent, id, name);
|
||||||
// ManagedBuildManager.performValueHandlerEvent(config, IManagedOptionValueHandler.EVENT_OPEN);
|
// ManagedBuildManager.performValueHandlerEvent(config, IManagedOptionValueHandler.EVENT_OPEN);
|
||||||
return (IConfiguration)config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -247,7 +247,7 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Configuration config = (Configuration)iter.next();
|
Configuration config = (Configuration)iter.next();
|
||||||
configs[i++] = (IConfiguration)config;
|
configs[i++] = config;
|
||||||
}
|
}
|
||||||
return configs;
|
return configs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
||||||
for (int i = 0; i < configElements.length; ++i) {
|
for (int i = 0; i < configElements.length; ++i) {
|
||||||
ICStorageElement configElement = configElements[i];
|
ICStorageElement configElement = configElements[i];
|
||||||
if (configElement.getName().equals(ITool.TOOL_ELEMENT_NAME)) {
|
if (configElement.getName().equals(ITool.TOOL_ELEMENT_NAME)) {
|
||||||
Tool tool = new Tool((IBuildObject)this, configElement, getManagedBuildRevision());
|
Tool tool = new Tool(this, configElement, getManagedBuildRevision());
|
||||||
addTool(tool);
|
addTool(tool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
||||||
*/
|
*/
|
||||||
public ITool getTool(String id) {
|
public ITool getTool(String id) {
|
||||||
Tool tool = (Tool)getToolMap().get(id);
|
Tool tool = (Tool)getToolMap().get(id);
|
||||||
return (ITool)tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -789,7 +789,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
||||||
Tool tool = new Tool(this, superClass, id, name, isExtensionElement);
|
Tool tool = new Tool(this, superClass, id, name, isExtensionElement);
|
||||||
addTool(tool);
|
addTool(tool);
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
return (ITool)tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class ToolChainModificationHelper {
|
||||||
|
|
||||||
for(Iterator iter = ceSet2.iterator(); iter.hasNext(); ){
|
for(Iterator iter = ceSet2.iterator(); iter.hasNext(); ){
|
||||||
CollectionEntry entry = (CollectionEntry)iter.next();
|
CollectionEntry entry = (CollectionEntry)iter.next();
|
||||||
Collection c1 = (Collection)m2.get(entry.getKey(), false);
|
Collection c1 = m2.get(entry.getKey(), false);
|
||||||
if(c1 != null){
|
if(c1 != null){
|
||||||
Collection c2 = entry.getValue();
|
Collection c2 = entry.getValue();
|
||||||
int i = c2.size();
|
int i = c2.size();
|
||||||
|
|
|
@ -441,7 +441,7 @@ public class ProjectConverter implements ICProjectConverter {
|
||||||
if(builder.getCommand() != null && builder.getCommand().length() != 0){
|
if(builder.getCommand() != null && builder.getCommand().length() != 0){
|
||||||
String[] errParserIds = builder.getCustomizedErrorParserIds();
|
String[] errParserIds = builder.getCustomizedErrorParserIds();
|
||||||
builder.setCustomizedErrorParserIds(null);
|
builder.setCustomizedErrorParserIds(null);
|
||||||
((ToolChain)cfg.getToolChain()).setBuilder((Builder)builder);
|
((ToolChain)cfg.getToolChain()).setBuilder(builder);
|
||||||
if(errParserIds != null && errParserIds.length != 0){
|
if(errParserIds != null && errParserIds.length != 0){
|
||||||
cfg.setErrorParserList(errParserIds);
|
cfg.setErrorParserList(errParserIds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,12 +459,12 @@ public class MbsMacroSupplier extends BuildCdtVariablesSupplierBase {
|
||||||
config = (IConfiguration) toolParent;
|
config = (IConfiguration) toolParent;
|
||||||
else if (toolParent instanceof IToolChain) {
|
else if (toolParent instanceof IToolChain) {
|
||||||
// must be a toolchain
|
// must be a toolchain
|
||||||
config = (IConfiguration) ((IToolChain) toolParent)
|
config = ((IToolChain) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (toolParent instanceof IResourceConfiguration) {
|
else if (toolParent instanceof IResourceConfiguration) {
|
||||||
config = (IConfiguration) ((IResourceConfiguration) toolParent)
|
config = ((IResourceConfiguration) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,12 +519,12 @@ public class MbsMacroSupplier extends BuildCdtVariablesSupplierBase {
|
||||||
config = (IConfiguration) toolParent;
|
config = (IConfiguration) toolParent;
|
||||||
else if (toolParent instanceof IToolChain) {
|
else if (toolParent instanceof IToolChain) {
|
||||||
// must be a toolchain
|
// must be a toolchain
|
||||||
config = (IConfiguration) ((IToolChain) toolParent)
|
config = ((IToolChain) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (toolParent instanceof IResourceConfiguration) {
|
else if (toolParent instanceof IResourceConfiguration) {
|
||||||
config = (IConfiguration) ((IResourceConfiguration) toolParent)
|
config = ((IResourceConfiguration) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class CollectionMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection getValues(){
|
public Collection getValues(){
|
||||||
return (Collection)valuesToCollection(null);
|
return valuesToCollection(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] getValuesArray(Class clazz){
|
public Object[] getValuesArray(Class clazz){
|
||||||
|
|
|
@ -20,11 +20,11 @@ public class ObjectSetList {
|
||||||
|
|
||||||
ObjectSetList(IObjectSet[] objects, boolean copy){
|
ObjectSetList(IObjectSet[] objects, boolean copy){
|
||||||
if(copy)
|
if(copy)
|
||||||
objects = (IObjectSet[])objects.clone();
|
objects = objects.clone();
|
||||||
fObjectSets = objects;
|
fObjectSets = objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IObjectSet[] getObjectSets(){
|
public IObjectSet[] getObjectSets(){
|
||||||
return (IObjectSet[])fObjectSets.clone();
|
return fObjectSets.clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public final class ObjectTypeBasedStorage implements Cloneable {
|
||||||
private Object fStorage[] = new Object[SIZE];
|
private Object fStorage[] = new Object[SIZE];
|
||||||
|
|
||||||
public static int[] getSupportedObjectTypes(){
|
public static int[] getSupportedObjectTypes(){
|
||||||
return (int[])OBJECT_TYPES.clone();
|
return OBJECT_TYPES.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getIndex(int type){
|
private int getIndex(int type){
|
||||||
|
@ -77,7 +77,7 @@ public final class ObjectTypeBasedStorage implements Cloneable {
|
||||||
public Object clone(){
|
public Object clone(){
|
||||||
try {
|
try {
|
||||||
ObjectTypeBasedStorage clone = (ObjectTypeBasedStorage)super.clone();
|
ObjectTypeBasedStorage clone = (ObjectTypeBasedStorage)super.clone();
|
||||||
clone.fStorage = (Object[])fStorage.clone();
|
clone.fStorage = fStorage.clone();
|
||||||
return clone;
|
return clone;
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -242,7 +242,7 @@ public abstract class ToolListModification implements
|
||||||
fOperations = (ModificationOperation[])opList.toArray(new ModificationOperation[opList.size()]);
|
fOperations = (ModificationOperation[])opList.toArray(new ModificationOperation[opList.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (IModificationOperation[])fOperations.clone();
|
return fOperations.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITool getTool() {
|
public ITool getTool() {
|
||||||
|
@ -342,7 +342,7 @@ public abstract class ToolListModification implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public IModificationOperation[] getSupportedOperations() {
|
public IModificationOperation[] getSupportedOperations() {
|
||||||
return (IModificationOperation[])getSupportedOperationsArray().clone();
|
return getSupportedOperationsArray().clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITool getTool() {
|
public ITool getTool() {
|
||||||
|
@ -407,7 +407,7 @@ public abstract class ToolListModification implements
|
||||||
// private LinkedHashMap fProjCompInfoMap = new LinkedHashMap();
|
// private LinkedHashMap fProjCompInfoMap = new LinkedHashMap();
|
||||||
// private HashMap fSysCompInfoMap = new HashMap();
|
// private HashMap fSysCompInfoMap = new HashMap();
|
||||||
if(base.fAllSysTools != null)
|
if(base.fAllSysTools != null)
|
||||||
fAllSysTools = (Tool[])base.fAllSysTools.clone();
|
fAllSysTools = base.fAllSysTools.clone();
|
||||||
|
|
||||||
if(base.fFilteredOutSysTools != null)
|
if(base.fFilteredOutSysTools != null)
|
||||||
fFilteredOutSysTools = (HashSet)base.fFilteredOutSysTools.clone();
|
fFilteredOutSysTools = (HashSet)base.fFilteredOutSysTools.clone();
|
||||||
|
|
|
@ -276,6 +276,6 @@ public class MatchObjectElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PatternElement[] getPatterns(){
|
public PatternElement[] getPatterns(){
|
||||||
return (PatternElement[])fPatterns.clone();
|
return fPatterns.clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class MatchObjectList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MatchObjectElement[] getMatchObjects(){
|
public MatchObjectElement[] getMatchObjects(){
|
||||||
return (MatchObjectElement[])fObjects.clone();
|
return fObjects.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,7 @@ public class RulesManager {
|
||||||
|
|
||||||
public ObjectSetListBasedDefinition[] getRules(int ruleType){
|
public ObjectSetListBasedDefinition[] getRules(int ruleType){
|
||||||
checkInitialization();
|
checkInitialization();
|
||||||
return (ConflictDefinition[])fConflictDefinitions.clone();
|
return fConflictDefinitions.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkInitialization(){
|
private void checkInitialization(){
|
||||||
|
|
|
@ -106,12 +106,12 @@ public class GnuLinkOutputNameProvider implements IManagedOutputNameProvider {
|
||||||
config = (IConfiguration) toolParent;
|
config = (IConfiguration) toolParent;
|
||||||
else if (toolParent instanceof IToolChain) {
|
else if (toolParent instanceof IToolChain) {
|
||||||
// must be a toolchain
|
// must be a toolchain
|
||||||
config = (IConfiguration) ((IToolChain) toolParent)
|
config = ((IToolChain) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (toolParent instanceof IResourceConfiguration) {
|
else if (toolParent instanceof IResourceConfiguration) {
|
||||||
config = (IConfiguration) ((IResourceConfiguration) toolParent)
|
config = ((IResourceConfiguration) toolParent)
|
||||||
.getParent();
|
.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(list.size() != 0) {
|
if(list.size() != 0) {
|
||||||
return (ITool[])list.toArray(new ITool[list.size()]);
|
return list.toArray(new ITool[list.size()]);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ public class NewCfgDialog implements INewCfgDialog {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rcfgs = (IConfiguration[])lst.toArray(new IConfiguration[lst.size()]);
|
rcfgs = lst.toArray(new IConfiguration[lst.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String _title) {
|
public void setTitle(String _title) {
|
||||||
|
|
|
@ -457,7 +457,7 @@ public final class MBSCustomPageManager
|
||||||
Iterator iterator = pageSet.iterator();
|
Iterator iterator = pageSet.iterator();
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
if (pageData.equals((MBSCustomPageData)iterator.next())) {
|
if (pageData.equals(iterator.next())) {
|
||||||
IWizardPage nextPage = null;
|
IWizardPage nextPage = null;
|
||||||
while (iterator.hasNext() && nextPage == null)
|
while (iterator.hasNext() && nextPage == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -162,7 +162,7 @@ public abstract class CVariable extends AbstractCVariable implements ICDIEventLi
|
||||||
createOriginal( cdiVariableObject );
|
createOriginal( cdiVariableObject );
|
||||||
}
|
}
|
||||||
fIsEnabled = !isBookkeepingEnabled();
|
fIsEnabled = !isBookkeepingEnabled();
|
||||||
setStatus( ICDebugElementStatus.ERROR, MessageFormat.format( CoreModelMessages.getString( "CVariable.1" ), (Object[])new String[]{ errorMessage } ) ); //$NON-NLS-1$
|
setStatus( ICDebugElementStatus.ERROR, MessageFormat.format( CoreModelMessages.getString( "CVariable.1" ), new String[]{ errorMessage } ) ); //$NON-NLS-1$
|
||||||
getCDISession().getEventManager().addEventListener( fEventListenerWrapper );
|
getCDISession().getEventManager().addEventListener( fEventListenerWrapper );
|
||||||
if ( cdiVariableObject != null ) {
|
if ( cdiVariableObject != null ) {
|
||||||
setInitialFormat();
|
setInitialFormat();
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class CVariableFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MessageFormat.format( "{0}::{1}", (Object[])new String[] { getPath().toOSString(), getName() } ); //$NON-NLS-1$
|
return MessageFormat.format( "{0}::{1}", new String[] { getPath().toOSString(), getName() } ); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals( Object obj ) {
|
public boolean equals( Object obj ) {
|
||||||
|
|
|
@ -479,7 +479,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
dialog.setInitialElementSelections( Arrays.asList( fAutoSolibs ) );
|
dialog.setInitialElementSelections( Arrays.asList( fAutoSolibs ) );
|
||||||
if ( dialog.open() == Window.OK ) {
|
if ( dialog.open() == Window.OK ) {
|
||||||
Object[] result = dialog.getResult();
|
Object[] result = dialog.getResult();
|
||||||
fAutoSolibs = (File[])Arrays.asList( result ).toArray( new File[result.length] );
|
fAutoSolibs = Arrays.asList( result ).toArray( new File[result.length] );
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class CDebugElementProxyFactory extends DefaultModelProxyFactory {
|
||||||
}
|
}
|
||||||
else if ( ICDebugUIConstants.ID_DEFAULT_DISASSEMBLY_EDITOR.equals( context.getId() ) ) {
|
else if ( ICDebugUIConstants.ID_DEFAULT_DISASSEMBLY_EDITOR.equals( context.getId() ) ) {
|
||||||
if ( element instanceof DisassemblyRetrieval ) {
|
if ( element instanceof DisassemblyRetrieval ) {
|
||||||
return new DisassemblyElementProxy( (DisassemblyRetrieval)element );
|
return new DisassemblyElementProxy( element );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.createModelProxy( element, context );
|
return super.createModelProxy( element, context );
|
||||||
|
|
|
@ -527,7 +527,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
||||||
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
||||||
|
|
||||||
for (Iterator<?> iter = structuredSelection.iterator(); iter.hasNext();) {
|
for (Iterator<?> iter = structuredSelection.iterator(); iter.hasNext();) {
|
||||||
Object element = (Object) iter.next();
|
Object element = iter.next();
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
|
|
||||||
if (element instanceof ICProject) {
|
if (element instanceof ICProject) {
|
||||||
|
|
|
@ -505,7 +505,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
|
dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
Object[] result = dialog.getResult();
|
Object[] result = dialog.getResult();
|
||||||
fAutoSolibs = (File[])Arrays.asList(result).toArray(new File[result.length]);
|
fAutoSolibs = Arrays.asList(result).toArray(new File[result.length]);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue