Commit 73874f4f authored by Kristof Szabados's avatar Kristof Szabados
Browse files

could be final.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 63a75e19
......@@ -57,7 +57,7 @@ public final class DynamicLinkingHelper {
final int oldSize = referenceChain.size();
referenceChain.add(actualProject);
for (IProject tempProject : referencedProjects) {
for (final IProject tempProject : referencedProjects) {
getAllReachableProjects(referenceChain, tempProject, knownProjects);
}
referenceChain.remove(oldSize);
......@@ -79,7 +79,7 @@ public final class DynamicLinkingHelper {
}
final IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (IProject project : projects) {
for (final IProject project : projects) {
if (project.isAccessible() && project.getName().equals(projectName)) {
try {
if (project.hasNature(DesignerHelper.NATURE_ID)) {
......
......@@ -44,7 +44,7 @@ public final class EnvironmentHelper {
public static Map<String, String> resolveVariables(final HashMap<String, String> originalVariables) throws CoreException {
final Map<String, String> env = new HashMap<String, String>(originalVariables.size());
final IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
for (Map.Entry<String, String> variable : originalVariables.entrySet()) {
for (final Map.Entry<String, String> variable : originalVariables.entrySet()) {
if (null != variable.getValue()) {
final String finalValue = manager.performStringSubstitution(variable.getValue());
if (null != finalValue) {
......@@ -68,7 +68,7 @@ public final class EnvironmentHelper {
public static Map<String, String> resolveVariables(final Map<String, String> originalVariables,
final Map<String, String> additionalVariables) throws CoreException {
final IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
for (Map.Entry<String, String> variable : additionalVariables.entrySet()) {
for (final Map.Entry<String, String> variable : additionalVariables.entrySet()) {
if (null != variable.getValue()) {
final String finalValue = manager.performStringSubstitution(variable.getValue());
if (null != finalValue) {
......@@ -164,7 +164,7 @@ public final class EnvironmentHelper {
final List<IProject> knownProjects = new ArrayList<IProject>();
DynamicLinkingHelper.getAllReachableProjects(new ArrayList<IProject>(), actualProject, knownProjects);
for (IProject tempProject : knownProjects) {
for (final IProject tempProject : knownProjects) {
try {
final String workingdirectory = tempProject.getPersistentProperty(
new QualifiedName(DesignerHelper.PROJECT_BUILD_PROPERTYPAGE_QUALIFIER, DesignerHelper.WORKINGDIR_PROPERTY));
......
......@@ -213,13 +213,13 @@ public abstract class BaseExecutor {
availableTestSetNames = configuration.getAttribute(TestSetTab.TESTSETNAMES_LABEL, (ArrayList<String>) null);
if (null != availableTestSetNames) {
availableTestSetContents = new ArrayList<List<String>>();
for (String testsetName : availableTestSetNames) {
for (final String testsetName : availableTestSetNames) {
availableTestSetContents.add(configuration.getAttribute(TestSetTab.TESTCASESOF_PREFIX + testsetName, (ArrayList<String>) null));
}
}
consoleLogging = configuration.getAttribute(CONSOLELOGGING, true);
boolean testcaseRefreshOnStart = configuration.getAttribute(TESTCASEREFRESHONSTART, true);
final boolean testcaseRefreshOnStart = configuration.getAttribute(TESTCASEREFRESHONSTART, true);
severityLevelExtraction = configuration.getAttribute(SEVERITYLEVELEXTRACTION, true);
maximumNotificationCount = configuration.getAttribute(MAXIMUMNOTIFICATIONLINECOUNT, 1000);
verdictExtraction = configuration.getAttribute(VERDICTEXTRACTION, true);
......@@ -228,13 +228,13 @@ public abstract class BaseExecutor {
String nullString = null;
lastTimeSelection = configuration.getAttribute("lastTimeSelection", nullString);
lastTimeSelectionTime = configuration.getAttribute("lastTimeSelectionTime", 1);
int tempLastSelectionType = configuration.getAttribute("lastTimeSelectionType", 0);
final int tempLastSelectionType = configuration.getAttribute("lastTimeSelectionType", 0);
lastTimeSelectionType = ExecutableType.getExecutableType(tempLastSelectionType);
List<String> hostNames = configuration.getAttribute(HOSTNAMES, (ArrayList<String>) null);
List<String> hostWorkingDirectories = configuration.getAttribute(HOSTWORKINGDIRECTORIES, (ArrayList<String>) null);
List<String> hostExecutables = configuration.getAttribute(HOSTEXECUTABLES, (ArrayList<String>) null);
List<String> hostCommands = configuration.getAttribute(HOSTCOMMANDS, (ArrayList<String>) null);
final List<String> hostNames = configuration.getAttribute(HOSTNAMES, (ArrayList<String>) null);
final List<String> hostWorkingDirectories = configuration.getAttribute(HOSTWORKINGDIRECTORIES, (ArrayList<String>) null);
final List<String> hostExecutables = configuration.getAttribute(HOSTEXECUTABLES, (ArrayList<String>) null);
final List<String> hostCommands = configuration.getAttribute(HOSTCOMMANDS, (ArrayList<String>) null);
if (null != hostNames && null != hostWorkingDirectories && null != hostCommands && null != hostExecutables) {
final int size = hostNames.size();
if (size > 0 && size == hostWorkingDirectories.size()
......@@ -249,14 +249,14 @@ public abstract class BaseExecutor {
//correct the testcase list
if (null != executablePath && executablePath.length() > 0 && testcaseRefreshOnStart) {
ExecutableCalculationHelper helper = BaseMainControllerTab.checkExecutable(configuration, project, URIUtil.toURI(executablePath));
final ExecutableCalculationHelper helper = BaseMainControllerTab.checkExecutable(configuration, project, URIUtil.toURI(executablePath));
if (helper.executableFileIsValid && helper.executableIsExecutable) {
helper.availableTestcases.toArray(new String[helper.availableTestcases.size()]);
}
if (null == availableTestcases) {
availableTestcases = helper.availableTestcases;
} else {
for (String testcase : helper.availableTestcases) {
for (final String testcase : helper.availableTestcases) {
if (testcase.endsWith(".control")) {
if (!availableControlParts.contains(testcase)) {
availableControlParts.add(testcase);
......@@ -282,7 +282,7 @@ public abstract class BaseExecutor {
private String resolvePathFromAttribute(final ILaunchConfiguration configuration, final String projectLocation, final String attribute) throws CoreException {
String path = configuration.getAttribute(attribute, (String) null);
if (!isNullOrEmpty(path)) {
URI uri = TITANPathUtilities.resolvePathURI(path, projectLocation);
final URI uri = TITANPathUtilities.resolvePathURI(path, projectLocation);
path = URIUtil.toPath(uri).toOSString();
}
return path;
......@@ -299,7 +299,7 @@ public abstract class BaseExecutor {
* Disposes all the host controllers handled by this executor.
* */
protected final void disposeHostControllers() {
for (HostJob job : innerHostControllers) {
for (final HostJob job : innerHostControllers) {
job.dispose();
}
innerHostControllers.clear();
......@@ -314,13 +314,13 @@ public abstract class BaseExecutor {
return;
}
ILaunchConfiguration configuration = launchStarted.getLaunchConfiguration();
final ILaunchConfiguration configuration = launchStarted.getLaunchConfiguration();
if (null == configuration) {
return;
}
try {
ILaunchConfigurationWorkingCopy copy = configuration.getWorkingCopy();
final ILaunchConfigurationWorkingCopy copy = configuration.getWorkingCopy();
copy.setAttribute("lastTimeSelection", lastTimeSelection);
copy.setAttribute("lastTimeSelectionTime", lastTimeSelectionTime);
copy.setAttribute("lastTimeSelectionType", lastTimeSelectionType.getValue());
......@@ -473,7 +473,7 @@ public abstract class BaseExecutor {
return;
}
WorkspaceJob op = new WorkspaceJob("Refreshing the project `" + project.getName() + "' to discover log files") {
final WorkspaceJob op = new WorkspaceJob("Refreshing the project `" + project.getName() + "' to discover log files") {
@Override
public IStatus runInWorkspace(final IProgressMonitor monitor) {
try {
......@@ -499,8 +499,9 @@ public abstract class BaseExecutor {
NO_HOSTCONTROLLER_SPECIFIED));
return;
}
ProcessBuilder pb = new ProcessBuilder();
Map<String, String> env = pb.environment();
final ProcessBuilder pb = new ProcessBuilder();
final Map<String, String> env = pb.environment();
if (!appendEnvironmentalVariables) {
env.clear();
}
......@@ -516,7 +517,7 @@ public abstract class BaseExecutor {
EnvironmentHelper.setTitanPath(env);
EnvironmentHelper.set_LICENSE_FILE_PATH(env);
IProject actualProject = DynamicLinkingHelper.getProject(projectName);
final IProject actualProject = DynamicLinkingHelper.getProject(projectName);
if (actualProject != null) {
EnvironmentHelper.set_LD_LIBRARY_PATH(actualProject, env);
}
......@@ -525,11 +526,11 @@ public abstract class BaseExecutor {
HostController controller;
List<String> shellCommand;
MessageConsoleStream stream = TITANConsole.getConsole().newMessageStream();
final MessageConsoleStream stream = TITANConsole.getConsole().newMessageStream();
String command;
for (int i = 0; i < hostControllers.size(); i++) {
StringBuilder hostControllerLabel = new StringBuilder("Host Controller instance " + (i + 1));
final StringBuilder hostControllerLabel = new StringBuilder("Host Controller instance " + (i + 1));
controller = hostControllers.get(i);
command = controller.command();
......@@ -546,7 +547,8 @@ public abstract class BaseExecutor {
path = TITANPathUtilities.resolvePathURI(controller.workingdirectory(), actualProject.getLocation().toOSString());
}
}
String workingDirResult = PathConverter.convert(oldStyleWorkingDir ? controller.workingdirectory() : URIUtil.toPath(path).toOSString(), true, TITANConsole.getConsole());
final String workingDirResult = PathConverter.convert(oldStyleWorkingDir ? controller.workingdirectory() : URIUtil.toPath(path).toOSString(), true, TITANConsole.getConsole());
command = command.replace(REPLACEABLEHOSTWORKIGNDIRECTORY, workingDirResult);
boolean oldStyleExecutable = true;
......@@ -559,7 +561,8 @@ public abstract class BaseExecutor {
path = TITANPathUtilities.resolvePathURI(controller.executable(), actualProject.getLocation().toOSString());
}
}
String executableResult = PathConverter.convert(oldStyleExecutable ? controller.executable() : URIUtil.toPath(path).toOSString(), true, TITANConsole.getConsole());
final String executableResult = PathConverter.convert(oldStyleExecutable ? controller.executable() : URIUtil.toPath(path).toOSString(), true, TITANConsole.getConsole());
String result = PathUtil.getRelativePath(workingDirResult, executableResult);
if (!result.equals(executableResult)) {
result = "./" + result;
......@@ -577,7 +580,7 @@ public abstract class BaseExecutor {
shellCommand.add("-c");
shellCommand.add(command);
for (String c : shellCommand) {
for (final String c : shellCommand) {
stream.print(c + ' ');
}
stream.println();
......@@ -588,7 +591,7 @@ public abstract class BaseExecutor {
}
try {
proc = pb.start();
HostJob job = new HostJob(hostControllerLabel.toString(), proc, this);
final HostJob job = new HostJob(hostControllerLabel.toString(), proc, this);
innerHostControllers.add(job);
job.setPriority(Job.DECORATE);
job.setUser(true);
......@@ -638,8 +641,9 @@ public abstract class BaseExecutor {
*/
private String getLogDir() {
if ( this.logFileNameDefined && mLogFileName != null ) {
File file = new File(mLogFileName);
String parent = file.getParent();
final File file = new File(mLogFileName);
final String parent = file.getParent();
return parent != null ? parent : "";
}
......@@ -651,8 +655,8 @@ public abstract class BaseExecutor {
* @return the generated cfg string
*/
protected String generateCfgString() {
StringBuilder builder = new StringBuilder();
String workingDirRelative = getDefaultLogFileDir();
final StringBuilder builder = new StringBuilder();
final String workingDirRelative = getDefaultLogFileDir();
if (workingDirRelative != null && workingDirRelative.length() != 0) {
builder.append("\n//This part was added by the TITAN Executor.\n");
builder.append("[LOGGING]\n");
......@@ -661,6 +665,7 @@ public abstract class BaseExecutor {
builder.append(getDefaultLogFileName());
builder.append("\"\n\n");
}
return builder.toString();
}
......@@ -676,7 +681,7 @@ public abstract class BaseExecutor {
final ConfigFileHandler configHandler = new ConfigFileHandler();
configHandler.readFromFile(configFilePath);
Map<String, String> env = appendEnvironmentalVariables ? new HashMap<String, String>( System.getenv() ) : new HashMap<String, String>();
final Map<String, String> env = appendEnvironmentalVariables ? new HashMap<String, String>( System.getenv() ) : new HashMap<String, String>();
if (environmentalVariables != null) {
try {
......@@ -702,21 +707,22 @@ public abstract class BaseExecutor {
return;
}
String workingDirRelative = getLogDir();
final String workingDirRelative = getLogDir();
if ( workingDirRelative == null ) {
return;
}
String logFileFolder = workingdirectoryPath + File.separator + workingDirRelative + File.separator;
Path path = new Path(logFileFolder);
IContainer folder = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);
final String logFileFolder = workingdirectoryPath + File.separator + workingDirRelative + File.separator;
final Path path = new Path(logFileFolder);
final IContainer folder = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);
if (folder == null || !folder.exists()) {
return;
}
final StringBuilder filesThatCanNotBeDeleted = new StringBuilder();
try {
for (IResource resource : folder.members()) {
for (final IResource resource : folder.members()) {
try {
if (resource instanceof IFile && "log".equals(resource.getFileExtension())) {
resource.delete(true, new NullProgressMonitor());
......@@ -766,23 +772,23 @@ public abstract class BaseExecutor {
return;
}
String workingDirRelative = getLogDir();
final String workingDirRelative = getLogDir();
if ( workingDirRelative == null ) {
return;
}
String logFileFolder = workingdirectoryPath + File.separator + workingDirRelative + File.separator;
Path path = new Path(logFileFolder);
final String logFileFolder = workingdirectoryPath + File.separator + workingDirRelative + File.separator;
final Path path = new Path(logFileFolder);
IContainer folder = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);
final IContainer folder = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);
if (folder == null || !folder.exists()) {
return;
}
List<IFile> filesToMerge = new ArrayList<IFile>();
final List<IFile> filesToMerge = new ArrayList<IFile>();
try {
folder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
for (IResource resource : folder.members()) {
for (final IResource resource : folder.members()) {
if (resource instanceof IFile && "log".equals(resource.getFileExtension())) {
try {
if (!Boolean.valueOf(resource.getPersistentProperty(MergeLog.MERGED_FILE_PROPERTY))) {
......@@ -799,7 +805,7 @@ public abstract class BaseExecutor {
"The log folder "+logFileFolder+ " is not accessible.");
}
MergeLog mergeLog = new MergeLog();
final MergeLog mergeLog = new MergeLog();
mergeLog.setShowDialog(false);
mergeLog.run(filesToMerge, false);
}
......@@ -818,7 +824,7 @@ public abstract class BaseExecutor {
}
if (!keepTemporarilyGeneratedConfigFiles && null != temporalConfigFile && temporalConfigFile.exists()) {
boolean result = temporalConfigFile.delete();
final boolean result = temporalConfigFile.delete();
if (!result) {
ErrorReporter.logError("The temporal configuration file " + temporalConfigFile.getName() + " could not be deleted");
return;
......
......@@ -249,21 +249,21 @@ public final class ExecuteDialog extends Dialog {
if (null != controlparts) {
helper = new TreeBranch("control parts");
treeRoot.addChildToEnd(helper);
for (String name : controlparts) {
for (final String name : controlparts) {
helper.addChildToEnd(new InnerLeaf(name, ExecutableType.CONTROLPART));
}
}
if (null != testsets) {
helper = new TreeBranch("test sets");
treeRoot.addChildToEnd(helper);
for (String name : testsets) {
for (final String name : testsets) {
helper.addChildToEnd(new InnerLeaf(name, ExecutableType.TESTSET));
}
}
if (null != testcases) {
helper = new TreeBranch("testcases");
treeRoot.addChildToEnd(helper);
for (String name : testcases) {
for (final String name : testcases) {
helper.addChildToEnd(new InnerLeaf(name, ExecutableType.TESTCASE));
}
}
......@@ -274,8 +274,8 @@ public final class ExecuteDialog extends Dialog {
}
if (null != selectedElement) {
for (ITreeLeaf branch : treeRoot.children()) {
for (ITreeLeaf leaf : ((ITreeBranch) branch).children()) {
for (final ITreeLeaf branch : treeRoot.children()) {
for (final ITreeLeaf leaf : ((ITreeBranch) branch).children()) {
if (selectedElement.equals(leaf.name())) {
rawSelection = (InnerLeaf) leaf;
}
......
......@@ -58,7 +58,7 @@ public final class HostJob extends Job {
@Override
protected IStatus run(final IProgressMonitor monitor) {
IProcess process = DebugPlugin.newProcess(executor.getLaunchStarted(), proc, getName());
final IProcess process = DebugPlugin.newProcess(executor.getLaunchStarted(), proc, getName());
final IStreamsProxy proxy = process.getStreamsProxy();
if (null != proxy) {
......@@ -184,7 +184,8 @@ public final class HostJob extends Job {
fastLine = null;
return;
}
char c = builder.charAt(fastOffset);
final char c = builder.charAt(fastOffset);
if ('\n' == c) {
fastOffset++;
return;
......
......@@ -68,11 +68,11 @@ public abstract class LaunchShortcut implements ILaunchShortcut {
final ILaunchConfiguration[] configurations = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configurationType);
final List<ILaunchConfiguration> candidateConfigurations = new ArrayList<ILaunchConfiguration>();
for (ILaunchConfiguration configuration : configurations) {
IResource[] resources = configuration.getMappedResources();
for (final ILaunchConfiguration configuration : configurations) {
final IResource[] resources = configuration.getMappedResources();
if (null != resources) {
boolean found = false;
for (IResource resource : resources) {
for (final IResource resource : resources) {
if (file.equals(resource)) {
found = true;
}
......@@ -87,13 +87,13 @@ public abstract class LaunchShortcut implements ILaunchShortcut {
candidateConfigurations.get(0).launch(mode, null);
return null;
} else if (candidateConfigurations.size() > 1) {
ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(null, labelProvider);
final ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation();
final ElementListSelectionDialog dialog = new ElementListSelectionDialog(null, labelProvider);
dialog.setTitle(getDialogTitle());
dialog.setMessage("Select existing configuration:");
dialog.setElements(candidateConfigurations.toArray(new ILaunchConfiguration[candidateConfigurations.size()]));
if (dialog.open() == Window.OK) {
ILaunchConfiguration result = (ILaunchConfiguration) dialog.getFirstResult();
final ILaunchConfiguration result = (ILaunchConfiguration) dialog.getFirstResult();
result.launch(mode, null);
labelProvider.dispose();
return null ;
......@@ -102,7 +102,7 @@ public abstract class LaunchShortcut implements ILaunchShortcut {
labelProvider.dispose();
}
final String configurationName = "new configuration (" + file.getFullPath().toString().replace("/", "__") + ")";
ILaunchConfigurationWorkingCopy wc = configurationType.newInstance(null, configurationName);
final ILaunchConfigurationWorkingCopy wc = configurationType.newInstance(null, configurationName);
wc.setMappedResources(new IResource[] {project});
wc.setAttribute(EXECUTECONFIGFILEONLAUNCH, true);
......@@ -138,7 +138,7 @@ public abstract class LaunchShortcut implements ILaunchShortcut {
if ((selections[0] instanceof IProject)) {
// try to find the cfg file:
project = (IProject) selections[0];
List<IFile> cfgFiles = ProjectFileHandler.getCfgFiles(project);
final List<IFile> cfgFiles = ProjectFileHandler.getCfgFiles(project);
if (cfgFiles.size() == 1) {
cfgFile = cfgFiles.get(0);
} else if (cfgFiles.size() > 1) {
......@@ -177,7 +177,7 @@ public abstract class LaunchShortcut implements ILaunchShortcut {
}
try {
if (result) {
ILaunchConfiguration conf = wc.doSave();
final ILaunchConfiguration conf = wc.doSave();
conf.launch(mode, null);
}
} catch (CoreException e) {
......
......@@ -66,11 +66,11 @@ public abstract class LaunchShortcutConfig implements ILaunchShortcut {
final ILaunchConfigurationType configurationType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(getConfigurationId());
final ILaunchConfiguration[] configurations = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configurationType);
final List<ILaunchConfiguration> candidateConfigurations = new ArrayList<ILaunchConfiguration>();
for (ILaunchConfiguration configuration : configurations) {
IResource[] resources = configuration.getMappedResources();
for (final ILaunchConfiguration configuration : configurations) {
final IResource[] resources = configuration.getMappedResources();
if (null != resources) {
boolean found = false;
for (IResource resource : resources) {
for (final IResource resource : resources) {
if (file.equals(resource)) {
found = true;
}
......
......@@ -35,8 +35,7 @@ public abstract class TitanLaunchConfigurationDelegate extends LaunchConfigurati
@Override
protected IProject[] getBuildOrder(final ILaunchConfiguration configuration, final String mode) throws CoreException {
IResource[] resources = configuration.getMappedResources();
final IResource[] resources = configuration.getMappedResources();
if( resources == null) { return null; }
final List<IProject> result = new ArrayList<IProject>();
for (final IResource resource : resources) {
......@@ -61,7 +60,8 @@ public abstract class TitanLaunchConfigurationDelegate extends LaunchConfigurati
if (!PlatformUI.isWorkbenchRunning()) {
return; // headless mode
}
IWorkbench workbench = PlatformUI.getWorkbench();
final IWorkbench workbench = PlatformUI.getWorkbench();
try {
workbench.showPerspective("org.eclipse.titan.executor.perspectives.ExecutingPerspective", workbench.getActiveWorkbenchWindow());
......
......@@ -25,9 +25,10 @@ public class TreeBranch extends TreeLeaf implements ITreeBranch {
@Override
public void dispose() {
for (ITreeLeaf element : children) {
for (final ITreeLeaf element : children) {
element.dispose();
}
children.clear();
super.dispose();
}
......@@ -43,7 +44,7 @@ public class TreeBranch extends TreeLeaf implements ITreeBranch {
}
public final void addChildBefore(final TreeLeaf child, final TreeLeaf reference) {
int index = children.indexOf(reference);
final int index = children.indexOf(reference);
if (index == -1) {
children.add(child);
} else {
......@@ -63,7 +64,7 @@ public class TreeBranch extends TreeLeaf implements ITreeBranch {
* @param element the element whose children are to be transported.
* */
public final void transferChildren(final TreeBranch element) {
for (ITreeLeaf tempElement : element.children) {
for (final ITreeLeaf tempElement : element.children) {
children.add(tempElement);
tempElement.parent(this);
}
......
......@@ -114,7 +114,7 @@ public final class JniExecutor extends BaseExecutor implements IJNICallback {
super(configuration);
if (null == configFilePath) {
IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, CONFIGFILEPATH_NULL, null);
final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, CONFIGFILEPATH_NULL, null);
throw new CoreException(status);
}
......@@ -260,8 +260,8 @@ public final class JniExecutor extends BaseExecutor implements IJNICallback {
if (automaticExecuteSectionExecution) {
if (!LaunchStorage.getLaunchElementMap().containsKey(launch)) {
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
LaunchElement launchElement = new LaunchElement(launchConfiguration.getName(), launch);
final ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
final LaunchElement launchElement = new LaunchElement(launchConfiguration.getName(), launch);
LaunchStorage.registerLaunchElement(launchElement);
ExecutorStorage.registerExecutorStorage(launchElement);
}
......@@ -339,27 +339,27 @@ public final class JniExecutor extends BaseExecutor implements IJNICallback {
@Override
public void batchedInsertNotify(final ArrayList<String[]> s) {
if (loggingIsEnabled && consoleLogging) {
for (String[] sv : s) {
for (final String[] sv : s) {
consoleStream.println(sv[2] + ": " + sv[4]);
}
}
List<String> times = new ArrayList<String>(s.size());
List<Notification> tempNotifications = new ArrayList<Notification>(s.size());
final List<String> times = new ArrayList<String>(s.size());
final List<Notification> tempNotifications = new ArrayList<Notification>(s.size());
if (severityLevelExtraction) {
int severity;
for (String[] value : s) {
for (final String[] value : s) {
severity = Integer.parseInt(value[3]);
Formatter formatter = new Formatter();
final Formatter formatter = new Formatter();
formatter.format(DATETIMEFORMAT, new Date(Long.parseLong(value[0]) * 1000), Long.valueOf(value[1]));
times.add(formatter.toString());
tempNotifications.add(new Notification(formatter.toString(), SeverityResolver.getSeverityString(severity), value[2], value[4]));
formatter.close();
}
} else {
for (String[] value : s) {
Formatter formatter = new Formatter();