mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
cosmetics: Autotools core bundle cleanups.
Various improvements: * Remove useless comments * Remove unused methods * Use String.isEmpty * Multi-catch Change-Id: I5d4e6ca5d4bcc925aad4db5c47f82d5d51d24522 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
ca3aa5de95
commit
7f30fb8efa
5 changed files with 7 additions and 27 deletions
|
@ -93,7 +93,6 @@ public class AutotoolsConfigurationBuilder extends ACBuilder {
|
|||
cos.flush();
|
||||
cos.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,10 +127,6 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
private IBuilder builder;
|
||||
|
||||
|
||||
public void generateDependencies() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
*/
|
||||
|
@ -766,7 +762,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
|
||||
private IPath getSourcePath(){
|
||||
IPath sourcePath;
|
||||
if (srcDir.equals(""))
|
||||
if (srcDir.isEmpty())
|
||||
sourcePath = getProjectLocation();
|
||||
else { // find location of source directory which may be a virtual folder
|
||||
IResource sourceResource = project.findMember(srcDir);
|
||||
|
@ -946,7 +942,6 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
try {
|
||||
proc.waitFor();
|
||||
} catch (InterruptedException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
exitValue = proc.exitValue();
|
||||
|
@ -1028,7 +1023,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
|
||||
// Method to get the Win OS Type to distinguish between Cygwin and MingW
|
||||
private String getWinOSType() {
|
||||
if (winOSType.equals("")) {
|
||||
if (winOSType.isEmpty()) {
|
||||
try {
|
||||
RemoteCommandLauncher launcher = new RemoteCommandLauncher();
|
||||
launcher.setProject(getProject());
|
||||
|
@ -1285,7 +1280,6 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
|||
try {
|
||||
proc.waitFor();
|
||||
} catch (InterruptedException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
exitValue = proc.exitValue();
|
||||
|
|
|
@ -79,9 +79,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
|||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (SecurityException e) {
|
||||
return false;
|
||||
} catch (NoSuchMethodException e) {
|
||||
} catch (SecurityException | NoSuchMethodException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,14 +261,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
|||
list = cfgList;
|
||||
}
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SAXException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
} catch (ParserConfigurationException | SAXException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class NewAutotoolsProject extends ProcessRunner {
|
|||
}
|
||||
|
||||
List<?> configs = template.getTemplateInfo().getConfigurations();
|
||||
if (configs == null || configs.size() == 0) {
|
||||
if (configs == null || configs.isEmpty()) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -98,14 +98,10 @@ public class NewAutotoolsProject extends ProcessRunner {
|
|||
|
||||
restoreAutoBuild(workspace);
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
|
||||
// throw new ProcessFailureException(Messages.getString("NewAutotoolsProject.5") + projectName); //$NON-NLS-1$
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
|
||||
} catch (BuildException e) {
|
||||
} catch (CoreException | BuildException e) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue